/* ════════════════════════════════════════════════════════════════════
   La FAQ des pages publiques. Portée le 05/11/2026 depuis la maquette
   validée (maquettes/faq/, son LISEZ-MOI). Le socle commun (jetons, barre,
   boutons, pied) est dans vitrine.css. Sans mode sombre.
   ════════════════════════════════════════════════════════════════════ */
/* Dans l'aperçu de la plateforme des textes : une réponse encore à écrire. */
.q-a-rediger { color: var(--encre-3); font-style: italic; }
body.page-faq { display: block; background: var(--fond); }
.page-faq main { display: block; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
h2, h3 { font-family: var(--police-titre); font-weight: 700; line-height: 1.15; margin: 0; }

/* ── L'en-tête : le titre, la phrase, la recherche ─────────────────── */
.entete { position: relative; overflow: hidden; background: var(--fond-alt); padding: 56px 0 40px; }
.entete .cadre { position: relative; z-index: 1; }
/* La mosaïque du logo, à droite, penchée et transparente, qui s'efface en
   allant vers les textes de gauche (Joël, 05/11). Le dégradé est porté par
   une couche DROITE (non penchée) : il reste horizontal à l'écran. Aucun
   rouge (Joël, 04/11 : « trop de rouge »). */
.entete-fond {
  position: absolute; inset: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 38%, rgba(0, 0, 0, .55) 62%, #000 88%);
          mask-image: linear-gradient(to right, transparent 38%, rgba(0, 0, 0, .55) 62%, #000 88%);
}
.entete-mosaique { position: absolute; right: -60px; top: 50%; width: 620px; height: auto; transform: translateY(-50%) rotate(-12deg); }
.e-case { fill: var(--case-b); fill-opacity: .42; transition: fill 1.2s ease; }
.e-case.a { fill: var(--case-a); }
.e-case.c { fill: var(--case-c); fill-opacity: .34; }
.entete h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); letter-spacing: -.01em; }
.entete .chapeau { margin-top: 12px; font-size: 1.15rem; color: var(--encre-2); max-width: 60ch; }
.recherche { position: relative; margin-top: 28px; max-width: 640px; }
.recherche label { display: block; margin-bottom: 6px; font-size: .9rem; font-weight: 700; color: var(--encre-2); }
.recherche input {
  width: 100%; padding: 13px 92px 13px 44px; border: 1px solid var(--case-b); border-radius: var(--rayon);
  background: var(--fond); color: var(--encre); font: 400 1.05rem/1.3 var(--police-corps);
}
/* Pas de halo au clic (Joël, 04/11) : seul le bord fonce. */
.recherche input:focus { outline: none; border-color: var(--encre-2); }
/* La croix du navigateur (bleue, sous Chrome et Edge) se superposait à
   « Effacer » (vu par Joël le 05/11) : un seul bouton, le nôtre. */
.recherche input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.recherche input::-ms-clear { display: none; }
.recherche .loupe { position: absolute; left: 14px; bottom: 14px; width: 18px; height: 18px; color: var(--encre-3); pointer-events: none; }
.recherche .effacer {
  position: absolute; right: 8px; bottom: 8px; padding: 6px 8px; border: 0; background: none; cursor: pointer;
  font: 400 .85rem var(--police-corps); color: var(--encre-3);
}
.recherche .effacer:hover { color: var(--action); }
.compte-resultats { margin-top: 10px; min-height: 1.4em; font-size: .9rem; color: var(--encre-3); }

/* ── Le corps : la liste des sections à gauche, les questions à droite ─ */
.corps { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding: 48px 0 72px; }
.corps > * { min-width: 0; }
.sommaire { position: sticky; top: 92px; align-self: start; }
.sommaire ol { list-style: none; margin: 0; padding: 0; border-left: .8px solid var(--filet); }
.sommaire a {
  display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent;
  color: var(--encre-2); text-decoration: none; font-size: .95rem; line-height: 1.3;
}
.sommaire a:hover { color: var(--action); }
.sommaire a[aria-current="true"] { color: var(--encre); font-weight: 700; border-left-color: var(--action); }

.section-faq { padding-bottom: 40px; }
.section-faq + .section-faq { padding-top: 40px; border-top: .8px solid var(--filet); }
.section-faq h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
.section-faq .intro { margin-top: 8px; color: var(--encre-2); }
.questions { list-style: none; margin: 22px 0 0; padding: 0; }
.question { border-bottom: .8px solid var(--filet); }
.question:first-child { border-top: .8px solid var(--filet); }
.q-tete {
  position: relative; display: block; width: 100%; padding: 17px 44px 17px 0; border: 0; background: none;
  text-align: left; cursor: pointer; color: var(--encre);
  font: 700 1.05rem/1.4 var(--police-titre);
}
.q-tete:hover { color: var(--action); }
.q-tete .plus { position: absolute; right: 6px; top: 50%; width: 18px; height: 18px; margin-top: -9px; }
.plus::before, .plus::after { content: ""; position: absolute; left: 2px; right: 2px; top: 8px; height: 2px; background: currentColor; transition: transform .2s ease; }
.plus::after { transform: rotate(90deg); }
.q-tete[aria-expanded="true"] .plus::after { transform: rotate(0deg); }
.q-corps { padding: 0 44px 20px 0; color: var(--encre-2); }
.q-texte { max-width: 68ch; line-height: 1.6; }
.q-texte a, .q-liens a { color: var(--action); }
.q-liens { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .95rem; }
.q-pied { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: .85rem; color: var(--encre-3); }
.q-avis { display: inline-flex; align-items: center; gap: 8px; }
.q-pied button {
  padding: 3px 10px; border: .8px solid var(--case-b); border-radius: var(--rayon); background: var(--fond);
  font: 400 .85rem var(--police-corps); color: var(--encre-2); cursor: pointer;
}
.q-pied button:hover { border-color: var(--encre-2); color: var(--encre); }
.q-pied .copier { border: 0; padding: 3px 0; text-decoration: underline; text-underline-offset: 2px; background: none; }
.q-merci { color: var(--encre-2); }
mark { background: rgba(165, 37, 36, .14); color: inherit; border-radius: 2px; padding: 0 1px; }
/* Une question demandée par l'adresse (/faq#mot-de-passe-oublie) : un
   repère discret, le temps de la trouver des yeux. */
.question.ciblee .q-tete { color: var(--action); }

/* ── La vidéo, en tête de la section « démonstration » quand elle existe ─ */
.video { margin-top: 20px; aspect-ratio: 16 / 9; max-width: 720px; border-radius: var(--rayon-bloc); background: #3f4e55; position: relative; display: flex; align-items: center; justify-content: center; }
.video button { width: 64px; height: 64px; border: 0; border-radius: 50%; background: var(--action); cursor: pointer; }
.video button::after { content: ""; display: block; margin-left: 26px; border: 12px solid transparent; border-left: 18px solid #fff; border-right: 0; width: 0; height: 0; }
.video .duree { position: absolute; right: 12px; bottom: 10px; font-size: .85rem; color: #fff; opacity: .85; }

/* ── La bibliothèque des sources, fabriquée à partir des fiches ─────── */
.bibliotheque { margin-top: 32px; }
.bibliotheque h3 { font-size: 1.2rem; }
.bibliotheque .intro { margin-top: 6px; font-size: .95rem; }
.table-defile { margin-top: 14px; overflow-x: auto; }
.biblio { width: 100%; border-collapse: collapse; font-size: .92rem; }
.biblio th, .biblio td { padding: 10px 14px 10px 0; border-bottom: .8px solid var(--filet); text-align: left; vertical-align: top; }
.biblio thead th { font-weight: 700; color: var(--encre-3); font-size: .85rem; }
.biblio td:first-child { font-weight: 700; color: var(--encre); white-space: nowrap; }
/* La période en dernière colonne (24/11), sur une ligne sur ordinateur. */
.biblio td:nth-child(2) { color: var(--encre-2); }
.biblio td:last-child { white-space: nowrap; color: var(--encre-2); padding-right: 0; }
.biblio-maj { margin-top: 8px; font-size: .82rem; color: var(--encre-3); }

/* ── Aucune réponse / Vous n'avez pas trouvé ? ─────────────────────── */
.aucune { padding: 28px 0; }
.aucune p:first-child { font-family: var(--police-titre); font-weight: 700; font-size: 1.2rem; color: var(--encre); }
.aucune p + p { margin-top: 6px; color: var(--encre-2); }
.pas-trouve { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 24px; padding: 28px 32px; border-radius: var(--rayon-bloc); background: var(--fond-alt); }
.pas-trouve h2 { font-size: 1.35rem; }
.pas-trouve p { margin-top: 6px; color: var(--encre-2); max-width: 52ch; }
.pas-trouve .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.bouton-clair { background: var(--fond); color: var(--encre); border-color: var(--case-b); }
.bouton-clair:hover, .bouton-clair:focus-visible { background: var(--fond); border-color: var(--encre-2); }

/* ── Écrans étroits : le sommaire devient une rangée de pastilles ───── */
@media (max-width: 900px) {
  /* minmax(0, 1fr) et min-width: 0 : sans eux, la rangée de pastilles
     imposait sa largeur entière à la colonne (page de 1 082 px sur un
     téléphone de 375, vu le 05/11). */
  .corps { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .corps > * { min-width: 0; }
  .sommaire { position: sticky; top: 60px; z-index: 5; margin: 0 -16px; padding: 10px 16px; background: var(--fond); border-bottom: .8px solid var(--filet); }
  .sommaire ol { display: flex; gap: 8px; overflow-x: auto; border: 0; scrollbar-width: none; }
  .sommaire ol::-webkit-scrollbar { display: none; }
  .sommaire a { white-space: nowrap; padding: 6px 12px; margin: 0; border: .8px solid var(--case-b); border-radius: 999px; font-size: .88rem; }
  .sommaire a[aria-current="true"] { border-color: var(--action); background: var(--action); color: #fff; font-weight: 400; }
  .section-faq:first-child { padding-top: 28px; }
}
@media (max-width: 640px) {
  .entete { padding: 36px 0 28px; }
  /* Sur téléphone, le titre prend toute la largeur : la mosaïque se fait
     plus petite et plus discrète, en haut à droite. */
  .entete-mosaique { width: 340px; right: -90px; top: 38%; }
  .entete-fond { opacity: .6; -webkit-mask-image: linear-gradient(to right, transparent 30%, #000 95%); mask-image: linear-gradient(to right, transparent 30%, #000 95%); }
  .q-tete { padding-right: 34px; font-size: 1rem; }
  .q-corps { padding-right: 0; }
  .pas-trouve { padding: 22px; }
  .biblio td:first-child, .biblio td:last-child { white-space: normal; }
}
@media (max-width: 400px) { .barre .cadre { flex-wrap: wrap; } }
