/* ============================================================
   MY VTC GO — faq.css (global)
   Accordéon FAQ — utilisé sur toutes les pages avec FAQ
   ============================================================ */

/* ============================================================
   MY VTC GO — faq.css
   Source unique de vérité pour tous les styles FAQ du site.

   3 variantes conservées à l'identique :
   ① FAQ standard      → pages index (style.css)
   ② FAQ villes        → pages villes (city-base.css)
   ③ FAQ bienveillance → pages sante (sante.css)

   Phase 2 — refactorisation CSS
   ============================================================ */


/* ============================================================
   ① FAQ STANDARD — pages index (fr/en/de/lu/pt)
   Chargé via style.css → maintenant centralisé ici
   Flèche : <span class="arrow">▾</span>
   Ouverture : max-height / .faq-a.open
   ============================================================ */

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.14);
  transition: border-color 0.25s ease, transform 0.35s cubic-bezier(.22,.68,0,1.2), background 0.25s ease, box-shadow 0.25s ease;
}

.faq-item:hover {
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-4px);
  background: rgba(255,255,255,0.010);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}

.faq-item:has([aria-expanded="true"]) {
  border-color: rgba(192,192,192,0.40);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: color var(--t);
}

.faq-q:hover,
.faq-q[aria-expanded="true"] { color: #D4D4D4; }

.arrow {
  font-size: 14px;
  color: #C0C0C0;
  flex-shrink: 0;
  transition: transform .3s ease;
}

.faq-q[aria-expanded="true"] .arrow { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}

.faq-a.open { max-height: 300px; }

.faq-a p {
  padding: 0 22px 18px;
  font-size: 14px;
  color: rgba(255,255,255,0.90);
  line-height: 1.7;
  border-top: 1px solid var(--g-border);
  padding-top: 14px;
}


/* ============================================================
   ② FAQ VILLES — pages villes (city-base.css)
   Surcharge de la FAQ standard pour les pages villes.
   Flèche : <span class="arrow">▾</span> (couleur gold)
   Ouverture : display:none → display:block / .faq-a.open
   Bordure : 3px + macOS dots
   ============================================================ */

/* Uniquement sur les pages qui chargent city-base.css
   Les variables --card-bg, --border2, --r, --gold, --muted,
   --border, --t sont définies dans city-base.css */

/* Surcharge list */
.city-page .faq-list,
body:not(.index-page) .faq-list {
  gap: 10px;
}

/* city-base redéfinit .faq-item — conservé intact dans city-base.css
   car lié aux macOS dots et aux règles de cartes globales.
   Seules les règles pures FAQ sont ici. */

/* Surcharge arrow : gold au lieu de gris */
.city-faq .arrow,
.faq-item .arrow {
  color: var(--gold, #C9A84C);
  transition: transform var(--t);
  flex-shrink: 0;
}

/* Ouverture display:none / block (variante city-base) */
/* NOTE : city-base.css utilise display:none/block au lieu de max-height.
   Cette règle est conservée dans city-base.css car elle est
   imbriquée dans les overrides de cartes macOS.
   Référence : city-base.css lignes 218-221 */


/* ============================================================
   ③ FAQ BIENVEILLANCE — pages sante (sante.css)
   Surcharge spécifique pour bienveillance/health-fare/etc.
   Flèche : <svg class="faq-arrow"> (SVG rotatif)
   Ouverture : max-height / .faq-item.open + .faq-a.open
   Bordure : 2px, radius 12px
   ============================================================ */

.faq-item.open {
  border-color: rgba(192,192,192,0.35);
}

.faq-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.3s;
  color: rgba(255,255,255,0.4);
}

.faq-item.open .faq-arrow { transform: rotate(180deg); }

/* Ouverture : les deux sélecteurs couvrent faq.js */
.faq-item.open .faq-a,
.faq-a.open { max-height: 200px; }

/* Fix taille SVG faq-arrow (anti-étirement) */
.faq-arrow { width: 18px !important; height: 18px !important; }


/* ============================================================
   RESPONSIVE — commun à toutes les variantes
   ============================================================ */

@media (max-width: 768px) {
  .faq-list  { gap: 8px; }
  .faq-q     { padding: 16px 18px; font-size: 14px; }
  .faq-a p   { padding: 0 18px 16px; padding-top: 12px; font-size: 13px; }
}
