/* ============================================================
   FAQ — page Définition (à propos)
   Desktop  : 2 colonnes indépendantes (questions 1-6 | 7-12)
   Mobile   : colonne unique, ordre 1 → 12
   Les réponses ne sont repliées que si faq.js est chargé
   (classe .faq-enhanced) : sans JS, tout reste lisible.
   ============================================================ */

.faq-section {
  position: relative;
  isolation: isolate;
  max-width: 1400px;
  margin: 6rem auto 0;
}

/* Voile flou identique à celui du bandeau de navigation (blur 6px),
   bords estompés pour ne pas former de rectangle net */
.faq-section::before {
  content: '';
  position: absolute;
  inset: -3rem -2rem;
  z-index: -1;
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%),
    linear-gradient(to right,  transparent 0%, black 4%,  black 96%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%),
    linear-gradient(to right,  transparent 0%, black 4%,  black 96%, transparent 100%);
  mask-composite: intersect;
}

.faq-title {
  margin-bottom: 2.5rem;
  font-family: 'ambroise-std', serif;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--yellow);
  line-height: 1.2;
  text-wrap: balance;
}

/* Deux colonnes indépendantes : ouvrir une question ne décale pas l'autre colonne */
.faq-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 5vw;
  align-items: start;
}

.faq-col { border-top: 1px solid rgba(244, 190, 38, 0.25); }

/* ── Item ──────────────────────────────────────────────── */
.faq-item {
  position: relative;
  border-bottom: 1px solid rgba(244, 190, 38, 0.25);
}

/* Filet jaune qui se déploie au survol et à l'ouverture */
.faq-item::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--yellow);
  transition: width 0.7s var(--ease-smooth);
  pointer-events: none;
}

.faq-heading { font-size: inherit; font-weight: inherit; }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem 0;
  text-align: left;
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.5;
  color: var(--white);
  transition: color 0.35s ease, padding-left 0.55s var(--ease-smooth);
}

.faq-question:focus-visible {
  outline: 1px solid var(--yellow);
  outline-offset: 4px;
}

/* ── Icône + qui devient × ─────────────────────────────── */
.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  transition: transform 0.5s var(--ease-smooth);
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}
.faq-icon::before { width: 14px; height: 1px; }
.faq-icon::after  { width: 1px; height: 14px; }

/* ── États ouvert / survol ─────────────────────────────── */
.faq-item.open::after { width: 100%; }
.faq-item.open .faq-question { color: var(--yellow); padding-left: 0.7rem; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* Survol réservé aux appareils avec souris : évite l'état
   « bloqué » après un tap sur mobile */
@media (hover: hover) {
  .faq-item:hover::after { width: 100%; }
  .faq-item:hover .faq-question { color: var(--yellow); padding-left: 0.7rem; }
  .faq-item:not(.open):hover .faq-icon { transform: rotate(90deg); }
}

/* ── Réponse : déploiement fluide sans hauteur fixe ────── */
.faq-enhanced .faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease-smooth);
}
.faq-enhanced .faq-item.open .faq-answer { grid-template-rows: 1fr; }

.faq-enhanced .faq-answer-inner {
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease, visibility 0s linear 0.55s;
}
.faq-enhanced .faq-item.open .faq-answer-inner {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s ease 0.1s, visibility 0s;
}

.faq-answer-inner p {
  padding: 0.2rem 2.5rem 1.6rem 0.7rem;
  font-size: 0.92rem;
  line-height: 1.85;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
}

.faq-answer-inner a {
  color: var(--yellow);
  border-bottom: 1px solid rgba(244, 190, 38, 0.4);
  transition: border-color 0.3s ease;
}
.faq-answer-inner a:hover,
.faq-answer-inner a:focus-visible { border-bottom-color: var(--yellow); }

/* ── Tablette / mobile ─────────────────────────────────── */
@media (max-width: 900px) {
  .faq-section { margin-top: 4rem; }
  .faq-section::before { inset: -2rem -1rem; }
  .faq-title { margin-bottom: 1.75rem; }
  .faq-columns { grid-template-columns: 1fr; }
  /* La 2e colonne se raccorde à la 1re sans double filet */
  .faq-col + .faq-col { border-top: none; }
  .faq-question { gap: 1rem; padding: 1.15rem 0; font-size: 0.95rem; letter-spacing: 0.03em; }
  .faq-answer-inner p { padding-right: 0.5rem; font-size: 0.95rem; line-height: 1.7; }
}

@media (max-width: 480px) {
  .faq-section { margin-top: 3rem; }
  .faq-section::before { inset: -1.5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  .faq-item::after,
  .faq-question,
  .faq-icon,
  .faq-enhanced .faq-answer,
  .faq-enhanced .faq-answer-inner { transition: none; }
}
