/* ══ LABORATOIRE ════════════════════════════════════════════════════════ */
.labo { background: var(--lime); }
.labo__title { max-width: 800px; margin-bottom: clamp(48px, 6vw, 75px); }
.labo__grid {
  --labo-gap: clamp(24px, 4vw, 60px);
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--labo-gap); align-items: start;
}
.feature {
  position: relative; display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: 25px; padding: 10px;
}
.feature__icon {
  width: 55px; height: 55px; border-radius: 14px;
  background: var(--ink); color: var(--lime);
  display: grid; place-items: center; flex-shrink: 0;
  transition: transform .25s ease;
}
.feature__icon svg { width: 30px; height: 30px; }
.feature__label {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--fs-h3); line-height: 1.05; color: var(--ink);
  transition: transform .25s ease;
}
/* Filet centré symétriquement entre deux icônes : 42px de chaque centre
   d'icône (le - var(--labo-gap) réintègre l'espace de grille côté droit). */
.feature:not(:last-child)::after {
  content: ""; position: absolute; top: 37px;
  left: calc(50% + 42px); right: calc(-50% - var(--labo-gap) + 42px);
  border-top: 1px solid rgba(20, 23, 28, .5);
}
/* Survol : l'icône respire, comme les icônes de méthode/bilan. Posé sur l'icône
   (enfant) et non sur .feature qui porte le reveal → aucun conflit de transform. */
@media (hover: hover) {
  .feature:hover .feature__icon { transform: scale(1.08); }
  .feature:hover .feature__label { transform: translateY(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  .feature__icon, .feature__label { transition: none; }
  .feature:hover .feature__icon, .feature:hover .feature__label { transform: none; }
}

/* ══ COMMENT ÇA MARCHE ══════════════════════════════════════════════════ */
.methode { background: var(--paper-2); }
.methode__title { margin-bottom: clamp(36px, 4.5vw, 56px); }
.steps { display: flex; flex-direction: column; }
.step {
  display: flex; align-items: center; gap: clamp(18px, 3.4vw, 48px);
  border-top: 2px solid var(--lime);
  padding: clamp(26px, 3.4vw, 42px) 0;
}
.step__num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(52px, 7vw, 92px); line-height: 1;
  letter-spacing: -.02em; color: var(--ink);
  flex: 0 0 auto; width: clamp(80px, 9vw, 128px);
  transition: color .25s ease;
}
.step__icon { flex: 0 0 auto; width: 56px; height: 56px; transition: transform .25s ease; }
.step__icon svg { width: 100%; height: 100%; }
.step__body { flex: 1; transition: transform .25s ease; }
.step__body h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.2vw, 28px); color: var(--ink); margin-bottom: 6px; }
.step__body p { color: var(--ink-2); font-size: 14px; line-height: 1.5; max-width: 76ch; }
/* Survol : le numéro géant prend l'accent bleu, l'icône respire. Rien n'est posé
   sur .step (qui porte le reveal .7s) → aucun conflit de transform, pas de wrapper. */
@media (hover: hover) {
  .step:hover .step__num { color: var(--blue); }
  .step:hover .step__icon { transform: scale(1.08); }
  .step:hover .step__body { transform: translateX(6px); }
}
@media (prefers-reduced-motion: reduce) {
  .step__icon, .step__body { transition: none; }
  .step:hover .step__icon, .step:hover .step__body { transform: none; }
}

/* ══ CE QUE CONTIENT LE BILAN ═══════════════════════════════════════════ */
.bilan { background: var(--white); padding-block: clamp(112px, 13vw, 184px); }
.bilan__title { color: var(--blue); margin-bottom: clamp(48px, 6vw, 75px); }
.bilan__cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(14px, 2vw, 24px); }
/* Conteneur de reveal : porte l'apparition au scroll (transform .7s) pour la
   dissocier du transform de hover de .bcard (.25s) — deux transforms sur des
   éléments distincts, sinon leurs transitions se marchent dessus. La grille
   interne laisse .bcard remplir la cellule → hauteurs de cartes toujours égales. */
.bcard-wrap { display: grid; }
.bcard {
  border: 1px solid var(--blue); border-radius: var(--radius-lg);
  padding: 26px 20px; min-height: 257px;
  display: flex; flex-direction: column; gap: 20px;
  background: rgba(7, 66, 243, .025);
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, border-color .25s ease;
}
.bcard__icon { width: 75px; height: 75px; color: var(--blue); transition: transform .25s ease; }
.bcard__meta { display: flex; flex-direction: column; gap: 5px; }
.bcard__num { font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; color: rgba(61, 65, 77, .75); }
.bcard__text { font-size: 15px; color: var(--blue); }
@media (hover: hover) {
  .bcard:hover {
    transform: translateY(-4px);
    background: rgba(7, 66, 243, .05);
    border-color: var(--blue-2);
    box-shadow: 0 14px 30px -16px rgba(7, 66, 243, .45);
  }
  .bcard:hover .bcard__icon { transform: scale(1.08); }
}
/* Même valeur que le padding-bottom de .bilan → la pile a autant d'air
   au-dessus (cartes → pile) qu'en dessous (pile → section suivante). */
.bilan__preview { margin-top: clamp(112px, 13vw, 184px); }
/* Cascade des 3 pages du bilan : positions en % calquées sur le Figma
   (groupe 903×585), l'arrondi et l'ombre sont faits ici, plus dans l'image. */
.bilan__stack {
  position: relative; width: min(920px, 100%); margin-inline: auto;
  aspect-ratio: 903 / 585;
}
.bilan__page {
  position: absolute; height: auto; border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(20, 23, 28, .04),
    0 2px 6px rgba(20, 23, 28, .05),
    0 26px 52px -18px rgba(20, 23, 28, .30);
  transition:
    left .58s cubic-bezier(.5, 0, .2, 1),
    top .58s cubic-bezier(.5, 0, .2, 1),
    width .58s cubic-bezier(.5, 0, .2, 1);
}
.bilan__page--front { left: 0;      top: 0;      width: 72.81%; z-index: 3; }
.bilan__page--mid   { left: 16.94%; top: 13.33%; width: 69.89%; z-index: 2; }
.bilan__page--back  { left: 30.06%; top: 23.24%; width: 69.94%; z-index: 1; }

/* Pile cliquable : un clic fait tourner les 3 pages (cf. site.js). */
.bilan__stack { cursor: pointer; }

/* La page de devant part au fond en FONDU : elle disparaît (opacity 1 → 0), son
   z-index bascule pendant qu'elle est invisible (aucun claquement d'occlusion),
   puis elle réapparaît (opacity 0 → 1) au slot arrière. Son déplacement
   left/top/width reste géré par la transition de .bilan__page. Les deux autres
   pages ne s'inversent jamais entre elles (mid reste au-dessus de back). */
.bilan__page.is-leaving {
  animation: bilan-leave .58s cubic-bezier(.5, 0, .2, 1);
  will-change: opacity;
}
@keyframes bilan-leave {
  0%   { opacity: 1; z-index: 10; }
  42%  { opacity: 0; z-index: 10; }
  50%  { opacity: 0; z-index: 1;  }
  100% { opacity: 1; z-index: 1;  }
}

/* Reveal sans transparence : les pages partent empilées (position avant) et
   se déploient en éventail vers leur cascade au scroll. Le wrapper .reveal
   ne sert que de déclencheur (is-in), sans fondu. */
.bilan__preview.reveal { opacity: 1; transform: none; }
.bilan__preview.reveal:not(.is-in) .bilan__page--mid,
.bilan__preview.reveal:not(.is-in) .bilan__page--back {
  left: 0; top: 0; width: 72.81%;
}
@media (prefers-reduced-motion: reduce) {
  .bilan__page { transition: none; }
  .bcard, .bcard__icon { transition: none; }
  .bcard:hover, .bcard:hover .bcard__icon { transform: none; }
}

/* ══ TÉMOIGNAGES ════════════════════════════════════════════════════════ */
.avis { background: var(--lime); overflow: hidden; }
.avis__title { text-align: left; margin-bottom: clamp(40px, 5vw, 60px); }
.avis__title em { font-style: italic; }
.tcard {
  background: var(--white); border-radius: 12px; padding: 30px;
  box-shadow: 0 12px 17px rgba(30, 32, 36, .07);
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  width: 432px; max-width: 100%; min-height: 232px;
}
.tcard__quote::before {
  content: "\201C"; display: block; font-family: var(--font-display);
  font-size: 60px; line-height: .5; color: var(--ink);
}
/* Le grand guillemet (::before, 60px) laisse un large blanc sous son encre ;
   on remonte le texte pour retrouver l'espacement serré du Figma (~11px). */
.tcard__quote p { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1.18; color: var(--ink); margin-top: -15px; }
.tcard__author { display: flex; align-items: flex-start; gap: 12px; }
.tcard__avatar {
  width: 36px; height: 36px; border-radius: 999px; flex-shrink: 0;
  margin-top: 5px; /* cale le haut du rond sur la hauteur de capitale du nom */
  background: var(--blue); color: #fff; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 500; font-size: 14px; letter-spacing: .04em;
}
.tcard__meta strong { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 15px; color: var(--ink); }
.tcard__meta span { display: inline-block; font-family: var(--font-mono); font-size: 11px; line-height: 1.2; text-transform: uppercase; color: var(--ink-2); letter-spacing: .02em; }

/* ══ CTA CONTACT ════════════════════════════════════════════════════════ */
.cta { background: var(--blue); color: #fff; }
.cta__inner { display: flex; flex-direction: column; align-items: center; gap: 24px; max-width: 640px; margin-inline: auto; text-align: center; }
.cta__eyebrow { color: #fff; letter-spacing: .16em; }
.cta__title { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-display); line-height: 1; color: #fff; }
.cta__sub { color: var(--paper-2); font-size: 15px; letter-spacing: .02em; }
.form-inline { display: flex; gap: 8px; width: 100%; max-width: 460px; }
.form-inline input {
  flex: 1; height: 48px; border-radius: 999px; border: 1px solid #fff; background: #fff;
  padding-inline: 20px; font-family: var(--font-mono); font-size: 14px; color: var(--ink); min-width: 0;
}
.form-inline input::placeholder { color: var(--ink-3); }
.form-inline input:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--lime-2); }
.form-msg { font-family: var(--font-mono); font-size: 12px; min-height: 1em; letter-spacing: .02em; }
.form-msg--ok  { color: var(--lime); }
.form-msg--err { color: #ffd7cc; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.br-mobile { display: none; }

/* ── Reveal en cascade du CTA ────────────────────────────────────────── */
/* Le wrapper .reveal ne fait plus que déclencher (is-in), comme .bilan__preview :
   chaque élément monte séparément. On anime `translate` (pas `transform`) pour
   ne pas écraser le lift au survol du bouton, qui vit sur `transform`. */
.cta__inner.reveal { opacity: 1; transform: none; }
.cta__inner .cta-rise { opacity: 0; }
.cta__inner.is-in .cta-rise { animation: ctaRise .6s cubic-bezier(.22, 1, .36, 1) both; }
.cta__inner.is-in .cta__title.cta-rise        { animation-delay: .09s; }
.cta__inner.is-in .cta__sub.cta-rise          { animation-delay: .18s; }
.cta__inner.is-in .form-inline input.cta-rise { animation-delay: .27s; }
.cta__inner.is-in .form-inline .btn.cta-rise  { animation-delay: .36s; }
@keyframes ctaRise {
  from { opacity: 0; translate: 0 22px; }
  to   { opacity: 1; translate: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cta__inner .cta-rise, .cta__inner.is-in .cta-rise { animation: none; opacity: 1; }
}

/* ── Responsive sections ────────────────────────────────────────────── */
@media (max-width: 980px) {
  .bilan__cards { grid-template-columns: repeat(2, 1fr); }
  .bcard { min-height: 0; }
}
@media (max-width: 760px) {
  /* Labo : liste horizontale compacte (icône à gauche, libellé aligné à gauche)
     séparée par un filet — plus dense et scannable que la pile centrée. Les <br>
     du markup sont calés pour le desktop 3-colonnes → on les neutralise ici. */
  .labo__grid { grid-template-columns: 1fr; gap: 0; }
  .feature {
    flex-direction: row; align-items: center; text-align: left;
    gap: 18px; padding: 22px 4px;
  }
  .feature + .feature { border-top: 1px solid rgba(20, 23, 28, .16); }
  .feature:not(:last-child)::after { display: none; }
  .feature__label { font-size: clamp(18px, 5vw, 22px); line-height: 1.15; }
  .feature__label br { display: none; }
  /* Step : en-tête compact (numéro à gauche, icône à droite) puis corps
     pleine largeur dessous — au lieu d'empiler numéro / icône / titre / texte. */
  .step { flex-wrap: wrap; align-items: center; gap: 0; text-align: left; }
  .step__num { width: auto; font-size: 52px; }
  .step__icon { margin-left: auto; width: 48px; height: 48px; }
  .step__body { flex-basis: 100%; margin-top: 16px; }
  /* Bilan : cartes horizontales compactes (icône à gauche, num + texte à droite)
     au lieu des boîtes verticales très hautes de la grille desktop. */
  .bilan__cards { grid-template-columns: 1fr; gap: 12px; }
  .bcard { flex-direction: row; align-items: center; gap: 18px; padding: 18px 20px; }
  .bcard__icon { width: 54px; height: 54px; }
  .bcard__meta { gap: 4px; }
}
/* Pile bilan sur mobile : la cascade desktop (décalée à ~30 % à droite)
   écrasait les pages. On resserre les décalages et on agrandit la page de
   devant (92 % au lieu de 72,81 %) pour qu'elle reste lisible ; l'ombre est
   allégée à l'échelle. */
@media (max-width: 640px) {
  .bilan__stack { aspect-ratio: 1.4; }
  .bilan__page {
    border-radius: 8px;
    box-shadow:
      0 0 0 1px rgba(20, 23, 28, .04),
      0 2px 6px rgba(20, 23, 28, .05),
      0 14px 26px -12px rgba(20, 23, 28, .28);
  }
  .bilan__page--front { width: 92%; }
  .bilan__page--mid   { left: 4.5%; top: 4.5%; width: 90%; }
  .bilan__page--back  { left: 9%;   top: 9%;   width: 90%; }
  .bilan__preview.reveal:not(.is-in) .bilan__page--mid,
  .bilan__preview.reveal:not(.is-in) .bilan__page--back { width: 92%; }
}
/* Le formulaire CTA en ligne écrase l'input (bouton nowrap ~180px) sous ~390px
   → le placeholder est coupé. On empile input + bouton en pleine largeur. */
@media (max-width: 480px) {
  .form-inline { flex-direction: column; gap: 12px; }
  /* flex:none impératif : en colonne, le flex:1 de base met flex-basis:0 sur
     l'axe vertical et écrase la hauteur → l'input s'effondre à une ligne. */
  .form-inline input {
    flex: none; width: 100%; height: 56px;
    font-size: 16px; text-align: center;  /* 16px : pas de zoom auto iOS au focus */
  }
  .form-inline .btn { width: 100%; height: 56px; font-size: 14px; }
  .br-mobile { display: inline; }
}
