/* ============================================================
   DCP — Foire aux questions
   ============================================================ */

.container--faq { max-width: 820px; }

/* --- Champ de recherche ------------------------------------------------ */

.faq-recherche {
  display: block;
  margin-bottom: 1.5rem;
}

.faq-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* Le conseil accompagne la question sans peser autant qu'elle. */
.faq-label-conseil {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.faq-champ-enveloppe {
  position: relative;
  display: block;
}

.faq-champ {
  width: 100%;
  padding: 0.875rem 2.75rem;
  font-family: inherit;
  font-size: 1.0625rem;
  color: var(--text-primary);
  background-color: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  transition: border-color 150ms ease;
}

.faq-champ::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.faq-champ:hover { border-color: var(--accent-gold); }

.faq-champ:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
  border-color: var(--accent-gold);
}

/* La croix native du champ de recherche ferait doublon avec la notre. */
.faq-champ::-webkit-search-cancel-button { -webkit-appearance: none; }

@media (prefers-reduced-motion: reduce) {
  .faq-champ { transition: none; }
}

.faq-loupe {
  position: absolute;
  left: 0.9375rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 1.25rem;
  color: var(--accent-gold-text);
}

.faq-vider {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-vider:hover {
  background-color: var(--surface-alt);
  color: var(--text-primary);
}

.faq-vider:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 1px;
}

.faq-aide {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0.5rem 0 0;
}

/* --- Suggestions --------------------------------------------------------- */

.faq-suggestions {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.faq-suggestions-titre {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold-text);
  margin-bottom: 0.75rem;
}

.faq-resultats {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.faq-resultat {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  text-align: left;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 150ms ease;
}

.faq-resultat:hover { border-color: var(--accent-gold); }

.faq-resultat:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .faq-resultat { transition: none; }
}

.faq-resultat-theme {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.faq-resultat-question {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
}

/* --- Bandeau « rien trouve » ---------------------------------------------- */

.faq-bandeau {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: var(--bg);
  border: 2px solid var(--accent-gold);
  border-radius: 10px;
  text-align: center;
}

.faq-bandeau-titre {
  font-family: 'Source Serif Pro', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.faq-bandeau-texte {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.125rem;
}

/* --- Liste des questions --------------------------------------------------- */

.faq-theme {
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--bg);
}

.faq-theme:last-child { margin-bottom: 0; }

.faq-theme[open] { border-color: var(--accent-gold); }

/* Premier niveau de depliage. Le chevron est plus marque que celui des
   questions, pour que la hierarchie des deux niveaux se voie. */
.faq-theme-resume {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem 0.875rem 2.5rem;
  position: relative;
  cursor: pointer;
  list-style: none;
  background-color: var(--surface);
}

.faq-theme-resume::-webkit-details-marker { display: none; }

.faq-theme-resume::before {
  content: '▸';
  position: absolute;
  left: 1.125rem;
  color: var(--accent-gold);
  font-size: 1rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.faq-theme[open] > .faq-theme-resume::before { transform: rotate(90deg); }

@media (prefers-reduced-motion: reduce) {
  .faq-theme-resume::before { transition: none; }
}

.faq-theme-resume:hover { background-color: var(--surface-alt); }

.faq-theme-resume:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: -2px;
}

.faq-theme-titre {
  font-size: 1.125rem;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.faq-theme-compte {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  padding: 0.125rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
}

.faq-questions { padding: 0 1.25rem; }

.faq-questions {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.faq-questions > li + li {
  border-top: 1px solid var(--border);
}

/* <details> natif : depliage, clavier et etat annonce sans JavaScript. */
.faq-question {
  position: relative;
  display: block;
  padding: 0.875rem 0 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::before {
  content: '▸';
  position: absolute;
  left: 0;
  top: 0.9375rem;
  color: var(--accent-gold);
  font-size: 0.875rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.faq-item[open] > .faq-question::before { transform: rotate(90deg); }

@media (prefers-reduced-motion: reduce) {
  .faq-question::before { transition: none; }
}

.faq-question:hover { color: var(--accent-gold-text); }

.faq-question:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 2px;
  border-radius: 3px;
}

/* L'en-tete colle en haut de l'ecran : sans cette marge de defilement,
   une question rejointe depuis la recherche s'arreterait dessous. */
.faq-item { scroll-margin-block: 6rem; }

.faq-reponse {
  padding: 0 0 1rem 1.75rem;
}

.faq-reponse p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 0.875rem;
}

.faq-reponse p:last-child { margin-bottom: 0; }

/* --- Etat et sortie ---------------------------------------------------------- */

.faq-etat {
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.faq-etat--erreur {
  border-color: var(--status-err-text);
  background-color: var(--status-err-bg);
  color: var(--text-primary);
}

.faq-sortie {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.faq-sortie-texte {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 52ch;
  margin: 0 auto 1.25rem;
}

.faq-sortie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

@media (max-width: 599px) {
  .faq-sortie-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .faq-sortie-actions .btn { justify-content: center; }
}
