/* =========================================================
   HOME — FAQ
========================================================= */

.home-faq {
  position: relative;
  z-index: 24;
  isolation: isolate;

  overflow: hidden;
  height: var(--site-section-height);
  min-height: 0;

  padding:
    clamp(24px, 3.2svh, 42px)
    0;

  background: #f1eee8;
  color: #111419;
}

.home-faq__container {
  width: min(calc(100% - 96px), 1480px);
  height: 100%;
  margin-inline: auto;

  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(18px, 2.6svh, 32px);
}

/* =========================================================
   HEADER
========================================================= */

.home-faq__header {
  margin-bottom: 0;
}

.home-faq__eyebrow {
  margin-bottom: clamp(12px, 1.6svh, 20px);

  display: flex;
  align-items: center;
  gap: 18px;

  color: rgba(17, 20, 25, 0.56);

  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-faq__eyebrow-line {
  width: 42px;
  height: 1px;

  background: var(--studio-red);
}

.home-faq__heading {
  display: grid;
  grid-template-columns:
    minmax(0, 1.35fr)
    minmax(300px, 0.65fr);

  align-items: end;
  gap: clamp(28px, 4vw, 56px);
}

.home-faq__title {
  max-width: 960px;
  margin: 0;

  font-size: clamp(34px, 4.6vw, 68px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.065em;
}

.home-faq__title span {
  display: block;

  color: rgba(17, 20, 25, 0.35);
}

.home-faq__introduction {
  max-width: 440px;
  margin: 0;

  color: rgba(17, 20, 25, 0.64);

  font-size: clamp(12px, 0.92vw, 15px);
  line-height: 1.45;
}

/* =========================================================
   LISTE
========================================================= */

.home-faq__list {
  min-height: 0;
  height: 100%;

  display: flex;
  flex-direction: column;

  border-top: 1px solid rgba(17, 20, 25, 0.24);
}

.home-faq__item {
  min-height: 0;
  flex: 1 1 0;

  display: flex;
  flex-direction: column;
  overflow: hidden;

  border-bottom: 1px solid rgba(17, 20, 25, 0.24);
}

.home-faq__item.is-open {
  flex-grow: 1.45;
}

.home-faq__question-heading {
  margin: 0;
}

.home-faq__question {
  width: 100%;

  padding:
    clamp(18px, 2.2svh, 30px)
    0;

  display: grid;
  grid-template-columns:
    70px
    minmax(0, 1fr)
    48px;

  align-items: center;
  gap: clamp(16px, 2vw, 30px);

  border: 0;
  background: transparent;

  color: #111419;

  text-align: left;
  cursor: pointer;
}

.home-faq__number {
  color: var(--studio-red);

  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
}

.home-faq__question-text {
  max-width: 1000px;

  font-size: clamp(20px, 1.95vw, 34px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;

  transition:
    color 250ms ease,
    transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-faq__question:hover .home-faq__question-text,
.home-faq__question:focus-visible .home-faq__question-text {
  color: var(--studio-red);
  transform: translateX(8px);
}

.home-faq__question:focus-visible {
  outline: 2px solid var(--studio-red);
  outline-offset: 8px;
}

/* =========================================================
   ICÔNE PLUS / MOINS
========================================================= */

.home-faq__icon {
  position: relative;

  width: 38px;
  height: 38px;

  display: block;

  border: 1px solid rgba(17, 20, 25, 0.26);
  border-radius: 50%;

  transition:
    background-color 300ms ease,
    border-color 300ms ease,
    transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-faq__icon span {
  position: absolute;
  top: 50%;
  left: 50%;

  display: block;

  width: 13px;
  height: 1px;

  background: #111419;

  transform: translate(-50%, -50%);

  transition:
    background-color 300ms ease,
    transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-faq__icon span:last-child {
  transform: translate(-50%, -50%) rotate(90deg);
}

.home-faq__item.is-open .home-faq__icon {
  border-color: var(--studio-red);
  background: var(--studio-red);

  transform: rotate(180deg);
}

.home-faq__item.is-open .home-faq__icon span {
  background: #fff;
}

.home-faq__item.is-open .home-faq__icon span:last-child {
  transform: translate(-50%, -50%) rotate(0deg);
}

.home-faq__item.is-open .home-faq__question-text {
  color: var(--studio-red);
}

/* =========================================================
   RÉPONSE
========================================================= */

.home-faq__answer {
  display: grid;
  grid-template-rows: 0fr;

  visibility: hidden;

  transition:
    grid-template-rows 500ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 500ms;
}

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

  visibility: visible;
}

.home-faq__answer-inner {
  min-height: 0;
  overflow: hidden;
}

.home-faq__answer-inner p {
  max-width: 830px;

  margin:
    0
    0
    clamp(12px, 1.5svh, 20px);

  padding-left: calc(70px + clamp(16px, 2vw, 30px));

  color: rgba(17, 20, 25, 0.65);

  font-size: clamp(13px, 1vw, 16px);
  line-height: 1.55;
}

/* =========================================================
   TABLETTE
========================================================= */

@media (max-width: 1050px) {
  .home-faq {
    padding:
      18px
      0;
  }

  .home-faq__container {
    width: min(calc(100% - 64px), 1480px);
    gap: 16px;
  }

  .home-faq__heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .home-faq__eyebrow {
    margin-bottom: 10px;

    font-size: 9px;
  }

  .home-faq__title {
    font-size: clamp(30px, 4.8vw, 46px);
  }

  .home-faq__introduction {
    max-width: 620px;

    font-size: 11px;
    line-height: 1.4;
  }

  .home-faq__question {
    padding:
      14px
      0;

    grid-template-columns:
      46px
      minmax(0, 1fr)
      30px;

    gap: 12px;
  }

  .home-faq__question-text {
    font-size: clamp(18px, 2vw, 26px);
  }

  .home-faq__icon {
    width: 34px;
    height: 34px;
  }

  .home-faq__icon span {
    width: 12px;
  }

  .home-faq__answer-inner p {
    margin-bottom: 12px;

    padding-left: calc(46px + 12px);

    font-size: 11px;
    line-height: 1.4;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {
  .home-faq {
    height: auto;
    min-height: 0;

    padding:
      90px
      0;
  }

  .home-faq__container {
    width: min(calc(100% - 40px), 1480px);
    height: auto;

    display: block;
  }

  .home-faq__header {
    margin-bottom: 68px;
  }

  .home-faq__eyebrow {
    margin-bottom: 28px;
  }

  .home-faq__title {
    font-size: clamp(42px, 13vw, 66px);
  }

  .home-faq__introduction {
    font-size: 15px;
    line-height: 1.65;
  }

  .home-faq__question {
    padding:
      26px
      0;

    grid-template-columns:
      34px
      minmax(0, 1fr)
      38px;

    gap: 14px;
  }

  .home-faq__number {
    font-size: 9px;
  }

  .home-faq__question-text {
    font-size: clamp(21px, 6vw, 30px);
    line-height: 1.18;
  }

  .home-faq__icon {
    width: 36px;
    height: 36px;
  }

  .home-faq__answer-inner p {
    margin-bottom: 30px;

    padding-left: 48px;
    padding-right: 48px;

    font-size: 14px;
    line-height: 1.7;
  }
}

/* =========================================================
   TRÈS PETITS ÉCRANS
========================================================= */

@media (max-width: 420px) {
  .home-faq__container {
    width: min(calc(100% - 28px), 1480px);
  }

  .home-faq__question {
    grid-template-columns:
      26px
      minmax(0, 1fr)
      34px;

    gap: 10px;
  }

  .home-faq__icon {
    width: 32px;
    height: 32px;
  }

  .home-faq__answer-inner p {
    padding-left: 36px;
    padding-right: 34px;
  }
}

/* =========================================================
   RÉDUCTION DES ANIMATIONS
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .home-faq *,
  .home-faq *::before,
  .home-faq *::after {
    scroll-behavior: auto !important;

    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
