/* ============================================================
   Avrile — FAQ
   Accordéon : titre à gauche, questions à droite séparées par des règles.
   Sans JS (et dans l'éditeur Bricks) toutes les réponses restent visibles :
   le repli n'est actif qu'une fois .is-ready posé par faq.js.
   ============================================================ */

.avr-faq {
  padding: calc(var(--avr-space-section) / 2) var(--avr-space-gutter);
  background: var(--avr-bg);
  width: 100%;
}

.avr-faq__inner {
  width: 100%;
  max-width: var(--avr-max-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: var(--avr-space-xxl);
  align-items: start;
}

.avr-faq .avr-faq__head h2 {
  margin: 0;
  text-wrap: balance;
}

/* ----------------------------------------------------------
   Liste
---------------------------------------------------------- */
.avr-faq .avr-faq__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--avr-rule);
}

.avr-faq .avr-faq__item {
  border-bottom: 1px solid var(--avr-rule);
}

/* Question — croix fine « + » (même dessin que .avr-btn-primary) */
.avr-faq .avr-faq__question {
  appearance: none;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--avr-space-xs);
  padding: var(--avr-space-xs) 0;
  border: none;
  background: transparent;
  font-family: var(--avr-font-body);
  font-size: var(--avr-text-lead);
  font-weight: var(--avr-weight-medium);
  line-height: var(--avr-leading-body);
  text-align: left;
  color: var(--avr-fg);
  cursor: pointer;
  transition: color 0.25s ease;
}

.avr-faq .avr-faq__question::after {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(currentColor, currentColor) center / 1.2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) center / 100% 1.2px no-repeat;
  transition: transform 0.3s ease;
}

.avr-faq .avr-faq__question:hover {
  color: var(--avr-accent);
}

.avr-faq .avr-faq__question:focus-visible {
  outline: 2px solid var(--avr-accent);
  outline-offset: 4px;
}

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

/* ----------------------------------------------------------
   Réponse — repli en grid-rows (animable), actif avec .is-ready
---------------------------------------------------------- */
.avr-faq .avr-faq__answer {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.35s var(--avr-ease-reveal);
}

.avr-faq .avr-faq__answer-text {
  min-height: 0;
  overflow: hidden;
  max-width: 640px;
  margin: 0;
  padding-bottom: var(--avr-space-xs);
  font-size: var(--avr-text-body);
  line-height: var(--avr-leading-loose);
  color: var(--avr-muted);
}

.avr-faq.is-ready .avr-faq__answer {
  grid-template-rows: 0fr;
}

.avr-faq.is-ready .avr-faq__answer-text {
  padding-bottom: 0;
  transition: padding-bottom 0.35s var(--avr-ease-reveal);
}

.avr-faq.is-ready .avr-faq__item.is-open .avr-faq__answer {
  grid-template-rows: 1fr;
}

.avr-faq.is-ready .avr-faq__item.is-open .avr-faq__answer-text {
  padding-bottom: var(--avr-space-xs);
}

/* ----------------------------------------------------------
   Responsive
---------------------------------------------------------- */
@media (max-width: 980px) {
  .avr-faq__inner {
    grid-template-columns: 1fr;
    gap: var(--avr-space-sm);
  }

  .avr-faq .avr-faq__question {
    font-size: var(--avr-text-body);
    padding: var(--avr-space-xxs) 0;
    min-height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .avr-faq .avr-faq__answer,
  .avr-faq .avr-faq__answer-text,
  .avr-faq .avr-faq__question::after {
    transition: none;
  }
}
