/* ============================================================
   TFE — Section FAQ (page d'adhésion, pleine largeur, avant footer)
   Tokens TFE : primary #6D2929 | text #282828 | radius 0
   Headlines: Georgia | Body/labels: Arial
   ============================================================ */

.tfe-faq {
  background: #fff;
  padding: 4rem 1.6rem;
  width: 100%;
}

.tfe-faq__inner {
  margin: 0 auto;
  max-width: 760px;
}

.tfe-faq__title {
  color: #282828;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 2rem;
  text-align: center;
}

.tfe-faq__list {
  /*border-top: 1px solid #e8dede;*/
  max-width: 800px;
}

.tfe-faq__item {
  /*border-bottom: 1px solid #e8dede;*/
}

.tfe-faq__question {
  align-items: center;
  background: none;
  border: 0;
  color: #707070;
  cursor: pointer;
  display: flex;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-style: italic;
  font-weight: 300;
  gap: 14px;
  padding: 12px 4px;
  text-align: left;
  width: 100%;
}

.tfe-faq__chevron {
  align-items: center;
  color: #282828;
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
  transition: transform 0.2s ease;
}

.tfe-faq__question[aria-expanded="true"] .tfe-faq__chevron {
  transform: rotate(90deg);
}

.tfe-faq__question[aria-expanded="true"] {
  color: #6D2929;
}

.tfe-faq__answer {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.25s ease;
}

.tfe-faq__item.is-open .tfe-faq__answer {
  grid-template-rows: 1fr;
}

.tfe-faq__answer-inner {
  color: #5a5a5a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow: hidden;
  padding: 0 4px 0 32px;
}

.tfe-faq__item.is-open .tfe-faq__answer-inner {
  padding-bottom: 18px;
}

.tfe-faq__illustration {
  margin: 4px 0 14px;
}

.tfe-faq__illustration img {
  border-radius: 0;
  display: block;
  height: auto;
  max-width: 100%;
}

.tfe-faq__answer-inner p:first-child {
  margin-top: 0;
}

.tfe-faq__answer-inner p:last-child {
  margin-bottom: 0;
}

.tfe-faq__answer-inner a {
  color: #6D2929;
}

@media screen and (max-width: 480px) {
  .tfe-faq {
    padding: 2.8rem 1.2rem;
  }

  .tfe-faq__title {
    font-size: 26px;
  }
}

/* ============================================================
   MODALE FAQ — déclenchée par .tfe-faq-trigger, ouverte par
   tfe-faq.js. Elle ne couvre que la colonne droite : ses offsets
   horizontaux viennent des variables --tfe-faq-modal-left/width,
   recalculées en JS depuis le rect de .tfe-offers__main.
   ============================================================ */

/* --- Déclencheur --- */

.tfe-offers__section--faq {
  text-align: center;
}

.tfe-faq-trigger {
  align-items: center;
  background: #e8dede;
  border: 1px solid #e8dede;
  color: #494949;
  cursor: pointer;
  display: inline-flex;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 700;
  gap: 10px;
  letter-spacing: 0.08em;
  padding: 14px 26px;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tfe-faq-trigger:hover,
.tfe-faq-trigger:focus-visible {
  background: #6D2929;
  border-color: #6D2929;
  color: #fff;
}

.tfe-faq-trigger__icon {
  display: flex;
}

/* --- Conteneur --- */

/* Classe doublée : garde-fou de spécificité face aux règles de colonne de
   tfe-offers-layout.css, chargé après cette feuille. */
.tfe-faq-modal.tfe-faq-modal {
  --tfe-faq-modal-left: 0px;
  --tfe-faq-modal-width: 100%;

  bottom: 0;
  left: var(--tfe-faq-modal-left);
  position: fixed;
  top: 0;
  width: var(--tfe-faq-modal-width);
  /* Au-dessus du header sticky (z-index 100) et de la barre CTA mobile (900). */
  z-index: 1100;
}

.tfe-faq-modal[hidden] {
  display: none;
}

.tfe-faq-modal__backdrop {
  background: rgba(40, 40, 40, 0.45);
  cursor: pointer;
  inset: 0;
  opacity: 0;
  position: absolute;
  transition: opacity 0.3s ease;
}

/* --- Panneau : ancré en bas, entre par glissement --- */

.tfe-faq-modal__panel {
  background: #fff;
  bottom: 0;
  /*box-shadow: 0 -12px 40px rgba(40, 40, 40, 0.18);*/
  display: flex;
  flex-direction: column;
  left: 0;
  max-height: 100%;
  position: absolute;
  right: 0;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  border: 1px solid gainsboro;
}

.tfe-faq-modal.is-open .tfe-faq-modal__backdrop {
  opacity: 1;
}

.tfe-faq-modal.is-open .tfe-faq-modal__panel {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .tfe-faq-modal__backdrop,
  .tfe-faq-modal__panel {
    transition: none;
  }
}

/* --- En-tête --- */

/* Gouttière commune à l'en-tête et au corps. Volontairement sobre : le
   contenu de la FAQ (questions longues, illustrations) doit disposer de
   toute la largeur du panneau. */
.tfe-faq-modal__head,
.tfe-faq-modal__body {
  padding-inline: max(1rem, calc((100% - 1280px) / 2));
}

.tfe-faq-modal__head {
  align-items: center;
  border-bottom: 1px solid #e8dede;
  display: flex;
  flex: 0 0 auto;
  gap: 1rem;
  justify-content: space-between;
  padding-block: 1rem;
}

.tfe-faq-modal__title {
  color: #8c7a7a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  padding-left: 34px;
}

.tfe-faq-modal__close {
  align-items: center;
  background: none;
  border: 0;
  color: #282828;
  cursor: pointer;
  display: flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.tfe-faq-modal__close:hover {
  color: #6D2929;
}

/* --- Corps scrollable --- */

.tfe-faq-modal__body {
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-block: 1rem 1.75rem;
}

/* Les partials FAQ viennent avec leurs propres marges (pensées pour une
   section pleine page). Dans le panneau, on les remet à plat : c'est la
   gouttière de .tfe-faq-modal__body qui gère l'espacement horizontal.
   .tfe-offers__main l'emporte à spécificité égale via tfe-offers-layout.css,
   d'où le sélecteur doublé sur .tfe-faq-modal__body. */
.tfe-offers__main .tfe-faq-modal__body .tfe-faq,
.tfe-faq-modal__body .tfe-faq {
  background: transparent;
  padding: 0;
}

.tfe-faq-modal__body .tfe-faq__inner {
  margin: 0;
  max-width: none;
}

.tfe-faq-modal__body .tfe-faq__title {
  display: none;
}

/* Bord à bord : plus de retrait latéral sur la question ni sur la réponse.
   Le seul décalage conservé est l'indentation qui aligne la réponse sous
   le libellé de la question (chevron 18px + gap 14px). */
.tfe-faq-modal__body .tfe-faq__question {
  padding-inline: 0;
}

.tfe-faq-modal__body .tfe-faq__answer-inner {
  padding-inline: 32px 0;
}

/* Rien ne dépasse : mots longs coupés, médias et tableaux bornés. */
.tfe-faq-modal__body .tfe-faq__question,
.tfe-faq-modal__body .tfe-faq__question > span,
.tfe-faq-modal__body .tfe-faq__answer-inner {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Le chevron ne doit pas se comprimer quand la question passe sur 2 lignes ;
   align-self le garde en tête de ligne plutôt qu'au centre du bloc. */
.tfe-faq-modal__body .tfe-faq__chevron {
  align-self: flex-start;
  margin-top: 2px;
}

.tfe-faq-modal__body .tfe-faq__answer-inner img,
.tfe-faq-modal__body .tfe-faq__answer-inner table,
.tfe-faq-modal__body .tfe-faq__answer-inner pre {
  max-width: 100%;
}

@media screen and (max-width: 480px) {
  .tfe-faq-modal__body .tfe-faq__answer-inner {
    padding-inline: 24px 0;
  }
}

/* Document figé pendant l'ouverture ; le snap de la page doit se taire. */
body.tfe-faq-modal-open {
  overflow: hidden;
}

html.tfe-has-offers:has(body.tfe-faq-modal-open) {
  scroll-snap-type: none;
}

@media screen and (max-width: 1199px) {
  .tfe-faq-modal__panel {
    max-height: 92%;
  }
}
