/* ===========================================
   FAQ BLOCK – Base Styles
   =========================================== */

.faq-block,
.faq-global {
  max-width: 800px;
  margin: 2rem auto;
  font-family: inherit;
  color: inherit;
}

/* Chaque élément de FAQ */
.faq-item {
  border-bottom: 1px solid #e0e0e0;
  padding: 0.5rem 0;
}

/* ===========================================
   QUESTION BUTTON
   =========================================== */

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: #e2e2e2;
  border: 0;
  padding: 0.75rem 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: inherit;
  transition: color 0.2s ease;
}

.faq-question:hover,
.faq-question:focus {
  color: #e2e2e2;
  outline: none;
  background: #0073aa;
}

/* Petit indicateur (optionnel) */
.faq-question::after {
  content: '+';
  font-weight: bold;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

/* ===========================================
   ANSWER PANEL – Animations
   =========================================== */

.faq-answer {
  overflow: hidden;
  padding: 0.75rem 0.75rem;
  height: 0;
  opacity: 0;
  transition:
    height 0.28s ease,
    opacity 0.2s ease;
}

/* Quand le panneau est ouvert */
.faq-answer.is-open {
  opacity: 1;
}

/* Contenu interne */
.faq-answer p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

/* ===========================================
   SOURCE LINK (pour faq_global)
   =========================================== */

.faq-source {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.faq-source a {
  color: #0073aa;
  text-decoration: none;
}

.faq-source a:hover {
  text-decoration: underline;
}

/* ===========================================
   TITRES DE SECTION (faq_global)
   =========================================== */

.faq-type-title {
  margin-top: 2rem;
  font-size: 1.4rem;
  font-weight: 700;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 0.25rem;
  color: #0073aa;
}

/* ===========================================
   SPACING / GLOBAL LAYOUT
   =========================================== */

.faq-item + .faq-item {
  margin-top: 0.5rem;
}

.faq-answer > *:first-child {
  margin-top: 0;
}
.faq-answer > *:last-child {
  margin-bottom: 0;
}

/* ===========================================
   MEDIA QUERIES
   =========================================== */

@media (max-width: 600px) {
  .faq-block,
  .faq-global {
    padding: 0 1rem;
  }

  .faq-question {
    font-size: 1rem;
  }
}

/* ===========================================
   DARK MODE
   =========================================== */

@media (prefers-color-scheme: dark) {
  .faq-block,
  .faq-global {
    color: #eaeaea;
  }

  .faq-item {
    border-bottom: 1px solid #444;
  }

  .faq-question:hover,
  .faq-question:focus {
    color: #66b3ff; /* bleu clair lisible sur fond sombre */
  }

  .faq-question::after {
    color: #aaa;
  }

  .faq-type-title {
    color: #66b3ff;
    border-bottom-color: #66b3ff;
  }

  .faq-source a {
    color: #66b3ff;
  }

  .faq-source a:hover {
    text-decoration: underline;
  }

  .faq-answer p {
    color: #ddd;
  }
}
