/* ================================================================
   HEAR THE LIGHT — Page FAQ (faq.html)
   L'idée forte de la page : l'histoire est racontée en cinq chapitres.
   Le chapitre qui passe au milieu de l'écran « s'allume » : son grand
   numéro s'étire (axe wdth d'Anybody, 50 → 118) et prend la couleur
   de la lumière, avec un halo très doux. Tout le reste est calme :
   lignes fines, beaucoup d'air, questions de la communauté en fil.
   Règles projet : animations toujours actives, mobile uniquement dans
   @media (max-width: 768px), couleurs uniquement via les jetons.
   ================================================================ */

.fq { position: relative; z-index: 2; }
/* Couleur d'erreur : claire sur les palettes sombres, foncée sur les claires */
.fq, .faq-composer { --fq-err: #FF8A7E; }
html[data-palette="plein-jour"] .fq,
html[data-palette="polaroid"] .fq,
html[data-palette="plein-jour"] .faq-composer,
html[data-palette="polaroid"] .faq-composer { --fq-err: #C42B23; }
.fq-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── En-tête ──────────────────────────────────────────────────── */
.fq-head {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(56px, 9vw, 150px));
  padding-bottom: clamp(40px, 5vw, 80px);
  display: grid;
  /* Titre puis texte en dessous : le titre ne mord plus jamais sur le texte */
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
  gap: clamp(18px, 2vw, 28px);
}
.fq-head__side { max-width: 40em; }
/* Halo : s'éteint avant les bords de sa boîte (plus de coupure nette sur les grands écrans) */
.fq-head::before {
  content: '';
  position: absolute; z-index: -1; pointer-events: none;
  left: -10%; top: 0; width: min(1100px, 90vw); height: 130%;
  background: radial-gradient(closest-side at 45% 58%, color-mix(in srgb, var(--light) 11%, transparent), transparent);
}
/* « Tout savoir. » toujours sur une seule ligne */
.fq-title { --tune-to: 96; margin-left: -.03em; font-size: clamp(56px, 7.6vw, 150px); white-space: nowrap; text-wrap: nowrap; }
.fq-lead { margin: 0; color: var(--muted); font-size: clamp(17px, 1.35vw, 20px); line-height: 1.5; max-width: 26em; }
.fq-head__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

/* ── Teaser vidéo ─────────────────────────────────────────────── */
.fq-teaser-wrap { padding-bottom: clamp(72px, 9vw, 150px); }
/* Teaser plus petit, centré */
.fq-teaser-wrap .faq-video, .fq-teaser-wrap .faq-video-cap { max-width: 860px; margin-left: auto; margin-right: auto; }
/* Façade : miniature YouTube + bouton lecture ; rien ne se lance tout seul */
.faq-video__facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: #000; display: block; }
.faq-video__facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), opacity .6s var(--ease-out); }
.faq-video__facade:hover img { transform: scale(1.04); }
.faq-video__facade .faq-video-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.faq-video iframe { opacity: 0; transition: opacity .7s var(--ease-out); }
.faq-video.is-ready iframe { opacity: 1; }
.faq-video.is-playing .faq-video__facade { opacity: 0; transition: opacity .7s var(--ease-out) .15s; pointer-events: none; }
.faq-video {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: var(--r-media);
  overflow: hidden;
  background:
    radial-gradient(60% 90% at 50% 110%, rgba(var(--a1), .22), transparent 70%),
    radial-gradient(40% 70% at 78% 100%, rgba(var(--a2), .16), transparent 70%),
    var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.faq-video.has-video { background: #000; box-shadow: none; }
/* Cinq faisceaux qui respirent, comme le signe de la marque */
.faq-video-beams {
  position: absolute; left: 50%; bottom: 0;
  width: min(46%, 520px); height: 100%;
  transform: translateX(-50%);
  display: flex; align-items: flex-end; justify-content: space-between;
  pointer-events: none;
}
.faq-video-beams i {
  display: block; width: 7%; border-radius: 999px 999px 0 0;
  background: linear-gradient(to top, var(--light), color-mix(in srgb, var(--light-2) 60%, transparent) 55%, transparent);
  opacity: .5; filter: blur(10px);
  transform-origin: bottom;
  animation: fq-breathe 4.8s var(--ease-in-out) infinite alternate;
}
.faq-video-beams i:nth-child(1), .faq-video-beams i:nth-child(5) { height: 34%; opacity: .32; }
.faq-video-beams i:nth-child(2), .faq-video-beams i:nth-child(4) { height: 62%; opacity: .42; animation-delay: -1.6s; }
.faq-video-beams i:nth-child(3) { height: 92%; animation-delay: -3.1s; }
.faq-video-beams i:nth-child(5) { animation-delay: -.8s; }
@keyframes fq-breathe { from { transform: scaleY(.78); } to { transform: scaleY(1.06); } }

.faq-video-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 24px; text-align: center;
}
.faq-video-play {
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 30%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.faq-video-play svg { width: 26px; height: 26px; margin-left: 3px; fill: var(--fg); }
.faq-video-txt {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(26px, 3.2vw, 48px); line-height: 1;
  font-variation-settings: 'wdth' 84; color: var(--fg);
}
.faq-video-cap { margin: 16px 0 0; color: var(--muted); font-size: 14px; }

/* ── L'histoire : cinq chapitres ──────────────────────────────── */
.fq-story { padding-bottom: clamp(40px, 5vw, 80px); }
.fq-story__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  align-items: end; gap: 24px 32px;
  margin-bottom: clamp(32px, 4.5vw, 64px);
}
.fq-story__intro { margin: 0; color: var(--muted); font-size: 16px; max-width: 26em; }

.fq-ch {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px clamp(28px, 5vw, 96px);
  padding: clamp(40px, 5vw, 72px) 0;
  border-top: 1px solid var(--line);
}
.fq-ch:last-child { border-bottom: 1px solid var(--line); }
.fq-ch__side {
  position: sticky; top: calc(var(--nav-h) + 28px);
  align-self: start;
  display: grid; gap: 14px; justify-items: start;
}
.fq-ch__num {
  display: block;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(96px, 11vw, 184px); line-height: .8;
  letter-spacing: -.02em;
  font-variation-settings: 'wdth' 50;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--fg) 16%, transparent);
  transition: font-variation-settings 1.1s var(--ease-out), color .8s var(--ease-out), text-shadow .8s var(--ease-out);
}
.fq-ch.is-active .fq-ch__num {
  font-variation-settings: 'wdth' 118;
  color: var(--light);
  text-shadow: 0 0 60px rgba(var(--a1), .35);
}
.fq-ch__title { max-width: 14em; transition: color .6s var(--ease-out); color: var(--muted); }
.fq-ch.is-active .fq-ch__title { color: var(--fg); }

.fq-ch__body { max-width: 62ch; padding-top: 6px; }
.fq-ch__body p { margin: 0 0 18px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.fq-ch__body p:last-child { margin-bottom: 0; }
.fq-ch__body strong { color: var(--fg); font-weight: 600; }

.fq-list { list-style: none; margin: 4px 0 22px; padding: 0; display: grid; }
.fq-list li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid var(--line);
  color: var(--fg); font-size: 17px; line-height: 1.45;
}
.fq-list li:first-child { border-top: 1px solid var(--line); }
.fq-list li::before {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 12px; height: 2px; border-radius: 2px;
  background: var(--light);
  box-shadow: 0 0 10px rgba(var(--a1), .6);
}

/* ── Fin du récit (moment centré) ─────────────────────────────── */
.fq-outro {
  text-align: center;
  padding-top: clamp(80px, 10vw, 170px);
  padding-bottom: clamp(80px, 10vw, 170px);
}
.fq-outro__lead { margin: 0 auto 28px; max-width: 34em; color: var(--muted); font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; }
.fq-outro__line {
  margin: 0 auto; max-width: 14em;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(40px, 6vw, 96px); line-height: .95;
  letter-spacing: -.01em; text-wrap: balance;
  font-variation-settings: 'wdth' 76;
  transition: font-variation-settings 1.2s var(--ease-out);
}
.fq-outro__line:hover { font-variation-settings: 'wdth' 100; }

/* ── Questions de la communauté ───────────────────────────────── */
#une-question { scroll-margin-top: calc(var(--nav-h) + 24px); }
.fq-qa {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 40px clamp(32px, 5vw, 96px);
  padding-top: clamp(64px, 8vw, 120px);
  padding-bottom: clamp(80px, 10vw, 160px);
  border-top: 1px solid var(--line);
}
.fq-qa__sticky { position: sticky; top: calc(var(--nav-h) + 28px); display: grid; justify-items: start; gap: 0; }
.fq-qa__title { margin-bottom: 18px; }
.fq-qa__text { margin: 0 0 26px; color: var(--muted); font-size: 16px; max-width: 24em; }

.faq-search-wrap { position: relative; display: block; width: 100%; margin-top: 40px; }
.faq-search-wrap svg { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
#faq-search {
  width: 100%; height: 52px;
  padding: 0 0 0 32px;
  border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--fg);
  font-family: var(--font-body); font-size: 17px;
  outline: none;
  transition: border-color .3s;
}
#faq-search:focus { border-bottom-color: var(--light); }
#faq-search::placeholder { color: var(--muted); opacity: .8; }

.faq-list { display: grid; }
.faq-item { padding: 30px 0; border-top: 1px solid var(--line); }
.faq-item:first-child { border-top: 0; padding-top: 6px; }
.faq-q { display: flex; gap: 16px; align-items: flex-start; }
.faq-avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-3); color: var(--fg);
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
  font-variation-settings: 'wdth' 90;
}
.faq-q-body { flex: 1; min-width: 0; }
.faq-pseudo { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); }
.faq-q-text {
  margin: 6px 0 0;
  color: var(--fg);
  font-size: clamp(18px, 1.5vw, 21px); line-height: 1.45;
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
}
.faq-badge { display: inline-flex; width: 15px; height: 15px; color: var(--light); flex: none; }
.faq-badge svg { width: 100%; height: 100%; }
.faq-badge .faq-badge-check { stroke: var(--on-light); }

/* La réponse : décalée sous la question, portée par un faisceau de lumière */
.faq-a { position: relative; margin: 20px 0 0 56px; padding: 2px 0 2px 22px; }
.faq-a::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--light), var(--light-2));
  box-shadow: 0 0 14px rgba(var(--a1), .45);
}
.faq-a-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.faq-a-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.faq-a-logo { display: inline-grid; width: 18px; height: 18px; color: var(--light); }
.faq-a-logo svg { width: 100%; height: 100%; }
.faq-a-pseudo { color: var(--fg); }
.faq-a-text { margin: 0; color: var(--fg); font-size: 16px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; }

.faq-a-pending { display: flex; align-items: center; gap: 10px; margin: 16px 0 0 56px; font-size: 14px; color: var(--muted); }
.faq-a-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--light); flex: none; animation: fq-pulse 1.8s var(--ease-in-out) infinite; }
@keyframes fq-pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); box-shadow: 0 0 10px rgba(var(--a1), .6); } }

#faq-empty { padding: 8px 0 30px; color: var(--muted); font-size: 16px; }
.faq-more { display: flex; justify-content: center; padding: 36px 0 8px; }
.faq-item:focus { outline: none; }

.fq-qa__more {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  margin-top: 24px; padding-top: 32px; border-top: 1px solid var(--line);
}
.fq-qa__more p { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2vw, 30px); line-height: 1.05; font-variation-settings: 'wdth' 96; }

/* ── Fenêtre « Ta question » ──────────────────────────────────── */
.faq-composer {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s var(--ease-out), visibility 0s linear .35s;
}
.faq-composer.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .35s var(--ease-out); }
.faq-composer-card {
  position: relative;
  width: 100%; max-width: 520px;
  background: var(--bg-2);
  border-radius: var(--r-media);
  padding: 28px;
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 120px -40px rgba(var(--a1), .35);
  transform: translateY(18px);
  transition: transform .5s var(--ease-out);
  font-family: var(--font-body); color: var(--fg);
}
.faq-composer.open .faq-composer-card { transform: none; }
.faq-composer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.faq-composer-head h3 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 30px; line-height: 1; font-variation-settings: 'wdth' 90; }
.faq-composer-close { flex: none; }
.faq-composer-as { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.faq-composer-as strong { color: var(--fg); font-weight: 600; }
#faq-composer-text {
  display: block; width: 100%; min-height: 130px; resize: vertical;
  padding: 14px 16px;
  border: 0; border-radius: 14px;
  background: var(--bg); color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--font-body); font-size: 17px; line-height: 1.55;
  outline: none; transition: box-shadow .3s;
}
#faq-composer-text:focus { box-shadow: inset 0 0 0 1px var(--light); }
#faq-composer-text::placeholder { color: var(--muted); opacity: .8; }
.faq-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
#faq-composer-count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
#faq-composer-count.full { color: var(--light); font-weight: 600; }
.faq-composer-msg { min-height: 1.2em; margin-top: 12px; font-size: 14px; }
.faq-composer-msg.err { color: var(--fq-err); }
.faq-composer-msg.ok { color: var(--fg); }

/* ── Toast ────────────────────────────────────────────────────── */
.faq-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 9500;
  transform: translate(-50%, 16px);
  max-width: calc(100vw - 40px);
  padding: 14px 22px; border-radius: var(--r-pill);
  background: var(--fg); color: var(--bg);
  font-family: var(--font-body); font-weight: 600; font-size: 15px; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease-out), transform .45s var(--ease-out);
}
.faq-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================================================================
   MOBILE (≤ 768px)
   ================================================================ */
@media (max-width: 768px) {
  .fq-head {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-h) + 48px);
    padding-bottom: 36px;
    gap: 20px;
  }
  .fq-title { font-size: clamp(40px, 14vw, 84px); white-space: normal; text-wrap: balance; } /* tient dans l'écran (390 px) ; le titre EN, plus long, passe à la ligne */
  .fq-head__actions { margin-top: 22px; }
  .fq-head__actions .htl-btn { flex: 1 1 100%; }

  .fq-teaser-wrap { padding-bottom: 72px; }
  .faq-video { border-radius: 16px; }
  .faq-video-beams { width: 70%; }
  .faq-video-play { width: 60px; height: 60px; }
  .faq-video-play svg { width: 22px; height: 22px; }

  .fq-story__head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 28px; }
  .fq-ch { grid-template-columns: 1fr; gap: 18px; padding: 36px 0; }
  .fq-ch__side { position: static; gap: 10px; }
  .fq-ch__num { font-size: 76px; }
  .fq-ch__title { color: var(--fg); }
  .fq-ch__body p, .fq-list li { font-size: 16px; }

  .fq-outro { padding-top: 80px; padding-bottom: 80px; }
  .fq-outro__line { font-size: clamp(34px, 10.5vw, 52px); }

  .fq-qa { grid-template-columns: 1fr; gap: 28px; padding-top: 64px; padding-bottom: 96px; }
  .fq-qa__sticky { position: static; }
  .fq-qa__sticky .faq-ask-btn { width: 100%; }
  .faq-search-wrap { margin-top: 28px; }
  #faq-search { font-size: 16px; height: 48px; }

  .faq-item { padding: 24px 0; }
  .faq-q { gap: 12px; }
  .faq-avatar { width: 34px; height: 34px; font-size: 14px; }
  .faq-q-text { font-size: 17px; }
  .faq-a { margin-left: 0; margin-top: 16px; padding-left: 16px; }
  .faq-a-pending { margin-left: 46px; }

  .fq-qa__more { flex-direction: column; align-items: stretch; }
  .fq-qa__more .htl-btn { width: 100%; }

  .faq-composer { align-items: flex-end; padding: 0; }
  .faq-composer-card { max-width: none; border-radius: 20px 20px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px)); }
  .faq-composer-head h3 { font-size: 26px; }
  #faq-composer-text { font-size: 16px; min-height: 120px; }
  .faq-composer-foot { flex-wrap: wrap; }
  .faq-composer-foot .htl-btn { flex: 1 1 auto; }

  .faq-toast { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); font-size: 14px; }
}

/* ================================================================
   CORRECTEUR MOBILE M2 (≤ 768 px) — rien ne change sur PC
   ================================================================ */
@media (max-width: 768px) {
  /* Recherche rapide sous l'en-tête */
  .fq-quick { display: block; margin: -8px 0 40px; }
  .fq-quick .faq-search-wrap { margin-top: 0; }
  #faq-quick {
    width: 100%; height: 48px; padding: 0 0 0 32px;
    border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    background: transparent; color: var(--fg); -webkit-appearance: none; appearance: none;
    font-family: var(--font-body); font-size: 16px; outline: none; transition: border-color .3s;
  }
  #faq-quick:focus { border-bottom-color: var(--light); }
  #faq-quick::placeholder { color: var(--muted); opacity: .8; }
  #faq-quick::-webkit-search-decoration { -webkit-appearance: none; }

  /* Les 5 chapitres en accordéon (le premier est ouvert) */
  .fq-ch { gap: 12px; padding: 22px 0; }
  .fq-ch__side { cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; }
  .fq-ch__num { font-size: 44px; }
  .fq-ch__title { margin: 0; }
  .fq-ch__toggle { grid-column: 1 / -1; justify-self: start; min-height: 44px; margin-top: 4px; padding: 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--light); cursor: pointer; }
  .fq-ch__toggle::after { content: ' ▾'; }
  .fq-ch.is-open .fq-ch__toggle::after { content: ' ▴'; }
  .fq-ch:not(.is-open) .fq-ch__body { display: none; }

  /* Questions : réponses repliées, bouton « Lire la réponse » */
  .faq-item:not(.is-open) .faq-a { display: none; }
  .faq-toggle { display: inline-flex; align-items: center; min-height: 44px; margin: 10px 0 0 46px; padding: 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: var(--light); cursor: pointer; }
  .faq-toggle::after { content: ' ▾'; white-space: pre; }
  .faq-item.is-open .faq-toggle::after { content: ' ▴'; }

  /* La recherche reste à portée pendant qu'on lit la liste (collante, sous la nav quand elle revient) */
  .fq-qa { gap: 16px; }
  .fq-qa__side, .fq-qa__sticky { display: contents; }
  .fq-qa__sticky .faq-search-wrap {
    position: sticky; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 5;
    margin-top: 12px; padding-block: 8px; background: var(--bg);
    box-shadow: -20px 0 0 var(--bg), 20px 0 0 var(--bg);
    transition: top .45s var(--ease-out);
  }
  body:has(.htl-nav:not(.is-hidden)) .fq-qa__sticky .faq-search-wrap { top: calc(var(--nav-h) - 1px); }
  .faq-more .htl-btn { width: 100%; }
}
@media (min-width: 769px) {
  .fq-quick, .fq-ch__toggle, .faq-toggle { display: none; }
}

