/* Avant / après — styles de page.
   Construit section par section depuis les composants maîtres. Validation à l'œil. */

/* ── HERO (frame-427321420, 1440×543) ───────────────────────────────────────
   Photo insérée (marge 20px), MIROIR horizontal (source imageTransform a=-0.998)
   + échelle verticale d=0.5356 → bg 1403×935, posY -54. Calque ::before (le texte
   ne doit pas être retourné). Titre Nunito 200 80/88 blanc, aligné en bas-gauche.
   CTA = skin A3 (héros), bas-droite. Pas de sous-titre (source). */
.ba-hero {
  padding: 66px 20px 0;                      /* image top calé sur les autres pages (66px) */
}
.ba-hero__media {
  position: relative;
  height: 501px;
  overflow: hidden;
  background-color: var(--c-blue);           /* repli avant chargement */
}
.ba-hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../img/avant-apres-hero.webp') no-repeat;
  background-size: 1403px 935px;             /* photo-css : a=-0.998, d=0.5356 */
  background-position: 0 -54px;
  transform: scaleX(-1);                     /* miroir horizontal (source) */
}
.ba-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;                     /* counterAxis MAX = bas */
  justify-content: space-between;            /* primaryAxis SPACE_BETWEEN */
  gap: 192px;
  height: 100%;
  padding: 200px 80px 80px;
}
.ba-hero__title {
  margin: 0;
  max-width: 807px;
  font-family: var(--font-heading);          /* Nunito */
  font-weight: 200;                          /* ExtraLight (maître) */
  font-size: 80px;
  line-height: 88px;
  color: var(--neutral-0);
}

/* ── RANGÉE DE CAS (frames 4273214xx, 1440×442) ─────────────────────────────
   Marges 80/80 (contenu 1280). Bloc média 540 (flèche 32 + img 452 + flèche 32,
   gaps 12) + gap 80 + bloc texte 660. Texte centré vertical vs image (442).
   Variante --rev : média à droite (text-left). */
.ba-case {
  padding: 0 80px;
  display: flex;
  align-items: center;
  gap: 80px;
}
.ba-case--rev {
  flex-direction: row-reverse;
}
.ba-media {
  flex: 0 0 540px;
  display: flex;
  align-items: center;                       /* flèches centrées vs image (y205) */
  gap: 12px;                                  /* flèche↔image (source : 12px de part et d'autre) */
}
.ba-media__img {
  flex: 0 0 452px;
  height: 442px;                             /* composite avant/après pré-rendu (cadre navy + bandeau logo baked) */
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.ba-arrow {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: block;
}
.ba-arrow img { display: block; width: 32px; height: 32px; }

.ba-case__text {
  flex: 0 0 660px;
  display: flex;
  flex-direction: column;
}
.ba-case__title {
  margin: 0;
  font-family: var(--font-heading);          /* Nunito */
  font-weight: 300;
  font-size: 40px;
  line-height: 48px;
  color: var(--neutral-900);                 /* #202020 */
}

/* Variante TÉMOIGNAGE (cas 1 & 2) : H3 →80→ étoiles →16→ citation →80→ CTA */
.ba-stars {
  display: block;
  height: 23px;
  margin-top: 80px;
}
.ba-stars img { display: block; width: 115px; height: 23px; }
.ba-case__quote {
  margin: 16px 0 0;
  max-width: 596px;
  font-family: var(--font-body);             /* Inter */
  font-weight: 300;
  font-size: 18px;
  line-height: 28px;
  color: var(--neutral-900);
}
.ba-case__cta {
  margin-top: 80px;
  align-self: flex-start;
}

/* Variante CLINIQUE (cas 3→10) : H3 →72→ puces (flèche → #497793 + texte, gap 16) */
.ba-bullets {
  margin: 72px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ba-bullets li {
  display: flex;
  align-items: center;                       /* flèche centrée vs texte multi-lignes (source) */
  gap: 8px;                                   /* flèche fin x748 → texte x756 (source) */
  max-width: 604px;
  font-family: var(--font-body);             /* Inter */
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  color: var(--neutral-900);
}
.ba-bullet__ic {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background: no-repeat center / 24px 24px;
}

/* ── AVIS (section avis, 1440×305) — bitmap posé tel quel, marges 80/80. ─────── */
.ba-avis {
  padding: 0 80px;
}
.ba-avis__img {
  display: block;
  width: 100%;
  max-width: 1280px;
  height: auto;
}

/* ── Rythme inter-sections (160px, mesuré sur l'absolu Figma) ───────────────── */
main > section + section { margin-top: 160px; }
main + .site-footer { margin-top: 160px; }

/* ═════════════════════════════════════════════════════════════════════════
   RESPONSIVE Avant/après — base flex, empilement colonne sur mobile.
   Les rangées (et leur variante --rev) passent toutes média-puis-texte.
   ═════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  main > section + section { margin-top: 80px; }
  main + .site-footer { margin-top: 80px; }

  /* HERO */
  .ba-hero { padding: 66px 12px 0; }
  .ba-hero__media { height: auto; min-height: 420px; border-radius: 20px; }
  .ba-hero__media::before { background-image: url('../img/avant-apres-hero-m.webp'); } /* variante mobile 1000px (LCP), même crop */
  .ba-hero__inner { flex-direction: column; align-items: flex-start; gap: 24px; padding: 120px 24px 32px; }
  .ba-hero__title { max-width: 100%; }
  .ba-hero__title { font-size: 40px; line-height: 46px; }

  /* RANGÉES DE CAS : image (flèches carrousel masquées) au-dessus, texte dessous */
  .ba-case, .ba-case--rev { flex-direction: column; align-items: stretch; gap: 24px; padding: 0 24px; }
  .ba-media { flex: 0 0 auto; justify-content: center; }
  .ba-arrow { display: none; }                 /* déco carrousel desktop : rogne l'image sur mobile */
  .ba-media__img { flex: 1 1 auto; width: 100%; max-width: 452px; height: auto; aspect-ratio: 452 / 442; }
  .ba-case__text { flex: 1 1 auto; }
  .ba-case__title { font-size: 32px; line-height: 38px; }
  .ba-stars { margin-top: 32px; }
  .ba-bullets { margin-top: 32px; }

  /* AVIS bitmap */
  .ba-avis { padding: 0 24px; }
}

@media (max-width: 560px) {
  .ba-hero__title { font-size: 32px; line-height: 38px; }
  .ba-case__title { font-size: 28px; line-height: 34px; }
}
