/* Container global */
.hec-faq-accordion {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Item */
.hec-faq-item {
  padding-bottom: 20px;
}

/* QUESTION — structure en 3 colonnes */
.hec-faq-accordion .hec-faq-item button.hec-faq-question {
  width: 100%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  padding: 0;
  cursor: pointer;

  font-size: 26px;
  font-weight: 400;
  color: var(--e-global-color-primary);
}

/* COLONNE 1 : numéro */
.hec-faq-index {
  width: 40px; /* largeur fixe pour aligner toutes les questions */
  font-size: 14px;
  color: #8489a0;
  flex-shrink: 0; /* empêche la colonne de bouger */
  text-align: left;
}

/* COLONNE 2 : texte */
.hec-faq-text {
  flex: 1; /* prend toute la place disponible */
  position: relative;
  display: inline-block;
  text-align: left;
}

/* COLONNE 3 : icône */
.hec-faq-icon {
  font-size: 28px;
  width: 40px; /* largeur FIXE comme la maquette */
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  color: var(--e-global-color-primary);
}

/* État des icônes */
.hec-faq-item.active .icon-plus {
  display: none;
}
.hec-faq-item:not(.active) .icon-minus {
  display: none;
}

/* Réponse */
.hec-faq-answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}

.hec-faq-inner {
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--e-global-color-primary);
}

/* Icône position gauche */
.hec-faq-accordion[data-icon-pos="left"] .hec-faq-question {
  flex-direction: row-reverse;
}

/* Underline animé */
.hec-faq-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease;
}

.hec-faq-question:hover .hec-faq-text::after {
  width: 100%;
}

/* ------------------------------ */
/* TABLETTE                       */
/* ------------------------------ */
@media (max-width: 1024px) {
  /* Taille de police plus douce */
  .hec-faq-accordion .hec-faq-item button.hec-faq-question {
    font-size: 22px;
  }

  /* Colonne numéro : un peu moins large */
  .hec-faq-index {
    width: 35px;
    font-size: 13px;
  }

  /* Icône */
  .hec-faq-icon {
    width: 35px;
    font-size: 26px;
  }

  /* Réponse */
  .hec-faq-inner {
    font-size: 15px;
  }
}

/* ------------------------------ */
/* MOBILE                         */
/* ------------------------------ */
@media (max-width: 767px) {
  /* Question plus compacte */
  .hec-faq-accordion .hec-faq-item button.hec-faq-question {
    font-size: 20px;
    gap: 10px; /* réduit l’espace entre colonnes */
  }

  /* Numéro plus petit */
  .hec-faq-index {
    width: 28px;
    font-size: 12px;
  }

  /* Icône adaptée */
  .hec-faq-icon {
    width: 28px;
    font-size: 24px;
  }

  /* Texte de réponse plus lisible */
  .hec-faq-inner {
    font-size: 15px;
    line-height: 1.6;
  }

  /* Underline animé — petit ajustement vertical */
  .hec-faq-text::after {
    bottom: -1px;
  }
}

/* ------------------------------ */
/* PETITS MOBILES (optionnel)     */
/* ------------------------------ */
@media (max-width: 480px) {
  .hec-faq-accordion .hec-faq-item button.hec-faq-question {
    font-size: 18px;
  }

  .hec-faq-index {
    width: 24px;
    font-size: 11px;
  }

  .hec-faq-icon {
    width: 24px;
    font-size: 22px;
  }
}
