/* ── FAQ Accordion ──────────────────────────────────────────────────────── */

.faq-accordion__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 768px) {
  .faq-accordion__layout {
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
  }
}

/* ── Colonne intro ──────────────────────────────────────────────────────── */

.faq-accordion__intro {
  /* sticky uniquement sur desktop — sur mobile la colonne est empilée
     et le sticky recouvrirait les items FAQ en dessous */
}

@media (min-width: 768px) {
  .faq-accordion__intro {
    position: sticky;
    top: 2rem;
  }
}

.faq-intro-content h2,
.faq-intro-content h3 {
  margin-bottom: 1rem;
}

.faq-intro-content p {
  color: var(--color-on-surface-variant);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── Liste accordéon ────────────────────────────────────────────────────── */

.faq-accordion__list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ── Item ───────────────────────────────────────────────────────────────── */

.faq-item {
  /* Tinte pastel au repos : 10 % de la couleur de section */
  background-color: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
  border-radius: 1rem;
  overflow: hidden;
  transition: background-color 0.25s ease;
}

.faq-item:hover {
  /* Légèrement plus vif au survol */
  background-color: color-mix(in srgb, var(--color-primary) 20%, var(--color-surface));
}

.faq-item.is-open {
  /* Couleur pleine quand l'item est ouvert */
  background-color: var(--color-primary);
}

/* ── Bouton trigger ─────────────────────────────────────────────────────── */

.faq-item__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.faq-item__question {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-on-surface);
  line-height: 1.45;
  flex: 1;
  transition: color 0.25s ease;
}

.faq-item.is-open .faq-item__question {
  color: #ffffff;
}

/* ── Icône + / × ────────────────────────────────────────────────────────── */

.faq-item__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  /* Bordure dans la teinte de la section */
  border: 1.5px solid color-mix(in srgb, var(--color-primary) 40%, transparent);
  color: color-mix(in srgb, var(--color-primary) 80%, var(--color-on-surface-variant));
  transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
              background-color 0.25s ease,
              border-color 0.25s ease,
              color 0.25s ease;
}

.faq-item.is-open .faq-item__icon {
  transform: rotate(45deg);
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

/* ── Panneau réponse ────────────────────────────────────────────────────── */

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.faq-item.is-open .faq-item__answer {
  max-height: 800px;
}

.faq-item__answer-inner {
  padding: 0 1.5rem 1.5rem;
  font-size: 0.9rem;
  color: var(--color-on-surface-variant);
  line-height: 1.75;
  transition: color 0.25s ease;
}

.faq-item.is-open .faq-item__answer-inner {
  color: rgba(255, 255, 255, 0.88);
}

.faq-item__answer-inner p {
  max-width: none;
  margin-bottom: 0.75em;
}

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