/* ═══════════════════════════════════════════════════════════
   Gratias · Vitrine marketing — Page FAQ
   Feuille additionnelle : se charge APRÈS /vitrine/styles.css,
   dont elle reprend variables, familles et rythmes.

     <link rel="stylesheet" href="/vitrine/styles.css">
     <link rel="stylesheet" href="/vitrine/faq.css">
     <body class="page-faq">

   Rien n'est redéfini ici de ce qui vit dans styles.css : les
   couleurs, les fontes et l'assouplissement viennent des variables
   --ink, --ivory, --gold, --serif, --sans, --ease.

   ── Balisage attendu ─────────────────────────────────────────
   <body class="page-faq">
     <header class="topbar" id="topbar"> … identique à la vitrine … </header>

     <main>
       <section class="faq-hero">
         <div class="wrap">
           <p class="kicker">Questions</p>
           <h1>Tout ce qu'une maison <em>veut savoir</em></h1>
           <div class="ornament"><span></span><i>◆</i><span></span></div>
           <p class="faq-hero-sub">…</p>
         </div>
       </section>

       <div class="faq-body">
         <div class="wrap faq-layout">

           <nav class="faq-toc" aria-label="Sommaire">
             <p class="faq-toc-title">Sommaire</p>
             <ol class="faq-toc-list">
               <li><a class="faq-toc-link" href="#maison">
                     <span class="faq-toc-num">I</span>
                     <span class="faq-toc-label">La maison</span></a></li>
               …
             </ol>
           </nav>

           <div class="faq-sections">
             <section class="faq-section" id="maison">
               <header class="faq-section-head">
                 <p class="faq-section-num">I</p>
                 <h2 class="faq-section-title">La maison</h2>
                 <p class="faq-section-intro">…</p>
               </header>

               <div class="faq-list">

                 <!-- Variante A · dépliant. TOUJOURS "open" :
                      le contenu reste visible et indexable sans JavaScript. -->
                 <details class="faq-item" id="q-frais" open>
                   <summary class="faq-q">
                     <span class="faq-q-text">Qui paie les frais de service ?</span>
                     <span class="faq-q-sign" aria-hidden="true"></span>
                   </summary>
                   <div class="faq-a">
                     <p>…</p>
                     <p class="faq-a-note">…</p>
                   </div>
                 </details>

                 <!-- Variante B · question fixe, même rendu, sans dépliant. -->
                 <article class="faq-item" id="q-devise">
                   <h3 class="faq-q"><span class="faq-q-text">…</span></h3>
                   <div class="faq-a"><p>…</p></div>
                 </article>

               </div>
             </section>
           </div>

         </div>
       </div>

       <section class="faq-outro"> … .btn .btn-gold … </section>
     </main>

     <footer class="footer"> … identique à la vitrine … </footer>
   </body>

   Les deux variantes se ressemblent trait pour trait : le choix
   est libre, et il peut même être mixé au sein d'une section.
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Réglages propres à la FAQ. Aucune variable de styles.css n'est écrasée. */
  --faq-toc-width: 15rem;
  --faq-gutter: 4.5rem;
  --faq-clear: 5.5rem;            /* hauteur réservée sous la barre fixe */
  --faq-item-pad: 1.9rem;
  --faq-radius: 2px;
}

/* ── Garde-fous de page ──────────────────────────────────────
   La vitrine escamote sa barre tant que le héros n'est pas
   dépassé ; la FAQ n'a pas de héros plein écran, donc la barre
   doit rester posée en permanence. */

html.js-anim body.page-faq .topbar:not(.is-visible) { transform: none; }

/* Les ancres du sommaire ne doivent pas glisser sous la barre fixe. */
.faq-section,
.faq-item { scroll-margin-top: var(--faq-clear); }

/* ── En-tête de page ─────────────────────────────────────────
   Le seuil de la FAQ : même matière que .chapter-deep, en plus bas
   de plafond. On ne rejoue pas les portes ni le lustre. */

.faq-hero {
  position: relative;
  padding: calc(var(--faq-clear) + 5rem) 0 4.5rem;
  background:
    radial-gradient(1100px 520px at 50% -20%, rgba(201, 164, 92, 0.09), transparent 65%),
    var(--ink);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.faq-hero .wrap { position: relative; z-index: 1; }

/* Le filigrane : un point d'interrogation en Cormorant, à peine là. */
.faq-hero::after {
  content: "?";
  position: absolute;
  top: 2.5rem;
  right: max(1.5rem, calc(50% - 42rem));
  z-index: 0;
  font-family: var(--serif);
  font-size: clamp(9rem, 18vw, 18rem);
  line-height: 1;
  color: rgba(201, 164, 92, 0.05);
  pointer-events: none;
  user-select: none;
}

.faq-hero .kicker { padding-left: 0.34em; }

.faq-hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
}

.faq-hero .ornament { margin: 1.8rem 0 1.6rem; }

.faq-hero-sub {
  max-width: 40rem;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--ivory-2);
}

/* Fil d'Ariane, retour à la vitrine. */
.faq-crumb {
  margin-bottom: 1.4rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-left: 0.22em;
  color: var(--muted);
}

.faq-crumb a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.faq-crumb a:hover { color: var(--gold); border-bottom-color: var(--line-strong); }

.faq-crumb i { font-style: normal; margin: 0 0.55rem; color: var(--gold); }

/* ── Corps : sommaire à gauche, questions à droite ───────────── */

.faq-body {
  padding: 5.5rem 0 6.5rem;
  background: var(--ink-2);
}

.faq-layout {
  display: grid;
  grid-template-columns: var(--faq-toc-width) 1fr;
  gap: var(--faq-gutter);
  align-items: start;
}

/* ── Sommaire ───────────────────────────────────────────────── */

.faq-toc {
  position: sticky;
  top: var(--faq-clear);
  align-self: start;
  padding-left: 1.1rem;
  border-left: 1px solid var(--line);
}

.faq-toc-title {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding-left: 0.3em;
  color: var(--gold);
  margin-bottom: 1.1rem;
}

.faq-toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  counter-reset: faq-toc;
}

.faq-toc-link {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.42rem 0;
  text-decoration: none;
  color: var(--ivory-2);
  font-size: 0.88rem;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.faq-toc-link:hover,
.faq-toc-link:focus-visible,
.faq-toc-link.is-active { color: var(--gold); }

.faq-toc-num {
  flex: none;
  min-width: 1.5rem;
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.3s ease;
}

.faq-toc-link:hover .faq-toc-num,
.faq-toc-link.is-active .faq-toc-num { color: var(--gold); }

/* Si le numéro n'est pas écrit dans le balisage, on le compte. */
.faq-toc-list > li { counter-increment: faq-toc; }

.faq-toc-link .faq-toc-num:empty::before {
  content: counter(faq-toc, upper-roman);
}

/* ── Sections de questions ──────────────────────────────────── */

.faq-sections {
  min-width: 0;              /* évite tout débordement horizontal en grille */
  max-width: 46rem;
}

.faq-section + .faq-section { margin-top: 5rem; }

.faq-section-head { margin-bottom: 2.2rem; }

.faq-section-num {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.55rem;
}

.faq-section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: 0.01em;
  margin-bottom: 0;          /* neutralise le margin-bottom global des h2 */
}

.faq-section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

.faq-section-intro {
  margin-top: 0.9rem;
  max-width: 38rem;
  font-size: 0.98rem;
  color: var(--ivory-2);
}

/* Un filet fin sous le titre de section, à la mesure du texte. */
.faq-section-head::after {
  content: "";
  display: block;
  width: 72px;
  height: 1px;
  margin-top: 1.6rem;
  background: var(--line-strong);
}

/* ── Une question ───────────────────────────────────────────── */

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

/* Le dépliant natif : on retire le triangle du navigateur, le signe
   dessiné plus bas le remplace. Le contenu reste dans le DOM dans
   tous les cas, et les <details> sont écrits "open". */
.faq-q {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.4rem;
  padding: var(--faq-item-pad) 0 0.85rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--ivory);
  list-style: none;
  transition: color 0.3s ease;
}

.faq-q::-webkit-details-marker { display: none; }
.faq-q::marker { content: ""; }

/* Seule la variante <details>/<summary> se clique. */
summary.faq-q { cursor: pointer; }
summary.faq-q:hover { color: var(--gold); }

/* Repliée, la question reprend l'air que la réponse lui laissait. */
details.faq-item:not([open]) > .faq-q { padding-bottom: var(--faq-item-pad); }

.faq-q-text { display: block; }

.faq-q em {
  font-style: italic;
  font-weight: 400;
  color: var(--gold);
}

/* Le signe : deux traits d'or, la barre verticale s'efface à l'ouverture.
   Il n'apparaît que là où il veut dire quelque chose. */
.faq-q-sign { display: none; }

details.faq-item .faq-q-sign {
  position: relative;
  display: block;
  flex: none;
  width: 0.85rem;
  height: 0.85rem;
  margin-top: 0.35rem;
  color: var(--gold);
}

.faq-q-sign::before,
.faq-q-sign::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.85rem;
  height: 1px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.faq-q-sign::after { transform: translate(-50%, -50%) rotate(90deg); }

details.faq-item[open] .faq-q-sign::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg);
}

/* ── Une réponse ────────────────────────────────────────────── */

.faq-a {
  padding: 0 0 var(--faq-item-pad);
  max-width: 40rem;
  font-family: var(--sans);
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--ivory-2);
  overflow-wrap: break-word;
}

/* La question fixe (h3) a besoin d'un peu d'air, faute de summary. */
.faq-item:not(details) > .faq-a { padding-top: 0.15rem; }

.faq-a p + p { margin-top: 1.05rem; }

.faq-a strong { font-weight: 500; color: var(--ivory); }

.faq-a em { font-style: italic; }

.faq-a a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.faq-a a:hover { color: var(--ivory); border-bottom-color: var(--ivory); }

/* Les listes de la réponse. .faq-figures est une <ul> aussi : elle
   est explicitement mise hors du lot, sa grille lui appartient. */
.faq-a ul:not(.faq-figures),
.faq-a ol {
  margin: 1.05rem 0 0;
  padding-left: 1.3rem;
}

.faq-a ul:not(.faq-figures) { list-style: none; padding-left: 0; }

.faq-a ul:not(.faq-figures) > li + li,
.faq-a ol > li + li { margin-top: 0.5rem; }

.faq-a ul:not(.faq-figures) > li {
  position: relative;
  padding-left: 1.5rem;
}

.faq-a ul:not(.faq-figures) > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 0.7rem;
  height: 1px;
  background: var(--line-strong);
}

.faq-a ol > li::marker { color: var(--gold); font-family: var(--serif); }

/* La mention basse : ton de bas de page, jamais un avertissement. */
.faq-a-note {
  margin-top: 1.1rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
}

/* Un chiffre qu'on veut lisible d'un coup d'œil : montant, plafond, devise. */
.faq-figures {
  list-style: none;
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.faq-figure {
  background: var(--ink-2);
  padding: 1.25rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.faq-figure-num {
  font-family: var(--serif);
  font-size: 1.85rem;
  line-height: 1.1;
  color: var(--gold);
}

.faq-figure-cap {
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Un encadré de rappel dans une réponse : un filet à gauche, rien d'autre. */
.faq-callout {
  margin-top: 1.4rem;
  padding: 1.1rem 0 1.1rem 1.4rem;
  border-left: 1px solid var(--line-strong);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ivory);
}

/* ── Sortie : l'invitation ──────────────────────────────────── */

.faq-outro {
  position: relative;
  padding: 6rem 0 7rem;
  text-align: center;
  border-top: 1px solid var(--line);
  background:
    radial-gradient(1000px 480px at 50% 120%, rgba(201, 164, 92, 0.10), transparent 62%),
    var(--ink);
}

.faq-outro .kicker { padding-left: 0.34em; }

.faq-outro-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.12;
  margin-bottom: 1.2rem;
}

.faq-outro-title em { font-style: italic; font-weight: 400; color: var(--gold); }

.faq-outro-sub {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--ivory-2);
}

.faq-outro-actions {
  margin-top: 2.6rem;
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Retour au récit, en bas de page. */
.faq-back {
  display: inline-block;
  margin-top: 2.8rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-indent: 0.22em;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 0.25rem;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.faq-back:hover { color: var(--gold); border-bottom-color: var(--line-strong); }

/* ── Variante jour ───────────────────────────────────────────
   Si une section de FAQ est posée sur le fond crème de la vitrine
   (.chapter-day sur .faq-body), tout se retourne d'un bloc. */

.faq-body.chapter-day,
.faq-hero.chapter-day,
.faq-outro.chapter-day {
  background:
    radial-gradient(1100px 500px at 50% 0%, rgba(255, 255, 255, 0.5), transparent),
    var(--day-bg);
  color: var(--day-ink);
  border-color: rgba(23, 20, 16, 0.14);
}

.chapter-day .faq-hero-sub,
.chapter-day .faq-section-intro,
.chapter-day .faq-outro-sub,
.chapter-day .faq-a { color: #574f40; }

.chapter-day .faq-crumb,
.chapter-day .faq-crumb a,
.chapter-day .faq-a-note,
.chapter-day .faq-figure-cap,
.chapter-day .faq-toc-num,
.chapter-day .faq-back { color: var(--day-muted); }

.chapter-day .faq-q,
.chapter-day .faq-a strong,
.chapter-day .faq-callout,
.chapter-day .faq-toc-link { color: var(--day-ink); }

.chapter-day .faq-toc-title,
.chapter-day .faq-section-num,
.chapter-day .faq-figure-num,
.chapter-day .faq-q-sign,
.chapter-day .faq-crumb i,
.chapter-day .faq-section-title em,
.chapter-day .faq-outro-title em,
.chapter-day .faq-q em { color: var(--gold-day); }

.chapter-day .faq-toc,
.chapter-day .faq-list,
.chapter-day .faq-item,
.chapter-day .faq-figures,
.chapter-day .faq-outro { border-color: rgba(23, 20, 16, 0.14); }

.chapter-day .faq-figures { background: rgba(23, 20, 16, 0.14); }
.chapter-day .faq-figure { background: var(--day-bg); }

.chapter-day .faq-callout { border-color: rgba(169, 129, 47, 0.5); }

.chapter-day .faq-section-head::after,
.chapter-day .faq-a ul:not(.faq-figures) > li::before { background: rgba(169, 129, 47, 0.5); }

.chapter-day summary.faq-q:hover,
.chapter-day .faq-toc-link:hover,
.chapter-day .faq-toc-link.is-active,
.chapter-day .faq-back:hover { color: var(--gold-day); }

.chapter-day .faq-a a { color: var(--gold-day); border-bottom-color: rgba(169, 129, 47, 0.5); }
.chapter-day .faq-a a:hover { color: var(--day-ink); border-bottom-color: var(--day-ink); }

.chapter-day .faq-hero::after { color: rgba(23, 20, 16, 0.05); }

/* ── Réactivité ─────────────────────────────────────────────── */

@media (max-width: 1023px) {
  /* Le sommaire passe au-dessus des questions et cesse de coller. */
  .faq-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .faq-toc {
    position: static;
    padding: 1.6rem 1.4rem;
    border-left: none;
    border: 1px solid var(--line);
  }

  .chapter-day .faq-toc { border-color: rgba(23, 20, 16, 0.14); }

  .faq-toc-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 0.2rem 1.6rem;
  }

  .faq-sections { max-width: none; }
}

@media (max-width: 900px) {
  :root { --faq-item-pad: 1.6rem; }

  .faq-hero { padding: calc(var(--faq-clear) + 3rem) 0 3.5rem; }
  .faq-body { padding: 4rem 0 5rem; }
  .faq-section + .faq-section { margin-top: 4rem; }
  .faq-outro { padding: 4.5rem 0 5.5rem; }
}

@media (max-width: 520px) {
  .faq-hero-sub { font-size: 1rem; }
  .faq-q { gap: 1rem; }
  .faq-a { font-size: 0.95rem; }
  .faq-figures { grid-template-columns: 1fr 1fr; }
  .faq-outro-actions .btn { width: 100%; text-align: center; }
  .faq-toc-list { grid-template-columns: 1fr; }
}

/* ── Impression ──────────────────────────────────────────────
   Une FAQ s'imprime : on déplie tout, on efface les fonds. */

@media print {
  .faq-hero,
  .faq-body,
  .faq-outro { background: none; color: #000; padding-top: 1rem; }

  .faq-hero::after,
  .faq-q-sign,
  .faq-toc,
  .faq-outro-actions,
  .faq-back { display: none; }

  details.faq-item > .faq-a { display: block; }

  .faq-item { break-inside: avoid; page-break-inside: avoid; }

  .faq-q,
  .faq-a,
  .faq-a-note,
  .faq-callout { color: #000; }

  .faq-list,
  .faq-item { border-color: #999; }
}
