/* ProPilot · récit animé au scroll (#methode) et scène PP.story (propriétaire : B)
   1. Section .story : plateau collant, libellé et rail, blocs de texte qui défilent par-dessus (balisage : REFONTE.md §7).
   2. Hero (bloc 0) : titre, formulaire en verre, mention, indice de scroll.
   3. Étapes (blocs 1 à 5).
   4. Mobile (< 760 px).
   5. Scène .pps-* construite par js/story.js (aussi dans la modale de démo) : plan de 900 × 1000 ;
      les positions et tailles sont celles de maquette/pp-scroll-story.jsx ; le script n'anime que transform et opacity. */

/* 1. Section et plateau collant
   line-height 1.22 = valeur « normal » de Montserrat, fixée : l'arrivée de la police ne décale aucune ligne (CLS). */
.story {
  --focus: var(--cyan);
  --story-gap: 30px;
  position: relative;
  background: var(--navy);
  color: var(--white);
}
.story__sticky {
  position: sticky; top: var(--nav-h); z-index: 0;
  height: calc(100vh - var(--nav-h));
  height: calc(100svh - var(--nav-h));
  overflow: hidden;
  background: radial-gradient(ellipse 55% 65% at 70% 55%, var(--navy-glow) 0%, var(--navy) 72%);
}
.story__stage { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }   /* pas d'inset : Safari 14.0 */
.story__meta {
  position: absolute; left: 0; right: 0; bottom: 28px;
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; justify-content: flex-end; align-items: center; gap: 16px;
  pointer-events: none;
}
.story:not(.is-ready) .story__meta { visibility: hidden; }   /* sans script : ni libellé ni rail */
.story__label {   /* boîte fixe à gauche du rail, texte calé à droite : changer de libellé ne décale rien (CLS) */
  flex: 1; min-width: 0; text-align: right;
  font-size: 11px; font-weight: 700; line-height: 1.22; letter-spacing: .16em; text-transform: uppercase;
  white-space: nowrap; color: var(--mist-2);
}
.story__rail { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.story__rail li { position: relative; display: block; width: 28px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
.story__rail li::after {   /* le cyan apparaît en fondu (opacity), pas en changeant la couleur */
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: inherit;
  background: var(--cyan); opacity: 0; transition: opacity .5s;
}
.story__rail li.is-reached::after { opacity: 1; }

.story__blocks {   /* remonte de la hauteur du plateau : le texte défile par-dessus la scène, et le plateau
                       (dans le flux, sans marge négative) ne peut jamais déborder sous la section */
  position: relative; z-index: 1;
  max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter);
  margin-top: calc(var(--nav-h) - 100vh);
  margin-top: calc(var(--nav-h) - 100svh);
}

/* 2. Hero */
.story__block--hero {
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex; flex-direction: column; justify-content: center; gap: var(--story-gap);
  max-width: min(620px, 46vw);
  padding: 56px 0 96px;
}
.story__kicker {
  font-size: 12px; font-weight: 700; line-height: 1.22; letter-spacing: .18em; text-transform: uppercase;
  color: var(--cyan-light);
}
.story__title {
  margin: 0;
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(30px, 3.6vw, 54px); line-height: 1.04; letter-spacing: -.018em;
  text-wrap: balance;
}
.story__title--hero { font-size: var(--fs-h1); line-height: .98; letter-spacing: -.025em; text-wrap: wrap; }
.story__line { display: block; }
.story__line--accent { font-style: italic; color: var(--cyan); }
.story__text {
  margin: 0;
  font-size: clamp(15px, 1.2vw, 17px); line-height: 1.62; color: var(--mist);
  text-wrap: pretty;
}
.story__text--hero { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.6; max-width: 520px; }

/* Barre de lien en verre : champ + bouton (colonne sur mobile) */
.story__form {
  display: flex; gap: 6px;
  max-width: 600px; padding: 6px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--r-pill);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.story__input {
  flex: 1 1 auto; min-width: 0; height: 52px;
  margin: 0; padding: 0 18px;
  border: 0; border-radius: var(--r-pill); background: transparent;
  font-family: var(--font-ui); font-size: 16px; color: var(--white);
}
.story__input::placeholder { color: var(--mist-2); opacity: 1; }   /* gris du navigateur (#757575) : 3,5:1 sur le verre, sous AA */
.story__submit {
  flex: none; height: 52px; padding: 0 24px;
  border: 0; border-radius: var(--r-pill);
  background: var(--cyan); color: var(--on-cyan, #0B1424);   /* texte navy sur cyan (blanc : 2,77:1, sous AA) */
  font-family: var(--font-ui); font-size: 16px; font-weight: 700; line-height: 1.2; white-space: nowrap;
  cursor: pointer; transition: background-color .3s, color .3s;
}
@media (hover: hover) { .story__submit:hover { background: var(--white); color: var(--navy); } }
.story__submit:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.story__input:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
@supports selector(:has(*)) {   /* le contour suit la pilule entière plutôt que le champ */
  .story__input:focus-visible { outline: none; }
  .story__form:has(.story__input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
}
.story__note {
  max-width: 600px; margin-top: calc(12px - var(--story-gap));   /* 12 px sous la barre, comme dans la maquette */
  padding-left: 18px;
  font-size: 13px; line-height: 1.22; color: var(--mist-2);
}
.story__note a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

/* Indice de scroll : souris et molette */
.story__cue { display: flex; align-items: center; gap: 12px; padding-top: 24px; }
.story__mouse {
  flex: none; display: flex; justify-content: center;
  width: 22px; height: 34px; padding-top: 6px;
  border: 1.5px solid rgba(255, 255, 255, .35); border-radius: 12px;
}
.story__wheel { display: block; width: 3px; height: 7px; border-radius: 2px; background: var(--white); }
.story__cue-text { font-size: 13px; line-height: 1.22; color: var(--mist-2); }

/* Entrées au chargement (ppIn de la maquette) */
@keyframes storyIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }   /* sans le flou de ppIn : transform et opacity seulement */
@keyframes storyFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes storyCue { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(14px); opacity: 0; } }
.story__block--hero > .story__kicker { animation: storyIn 1s var(--ease) both; }
.story__title--hero .story__line { animation: storyIn 1.1s var(--ease) .08s both; }
.story__title--hero .story__line:nth-child(2) { animation-delay: .2s; }
.story__title--hero .story__line:nth-child(3) { animation-delay: .32s; }
.story__text--hero { animation: storyIn 1.1s var(--ease) .44s both; }
.story__form, .story__block--hero > .story__note { animation: storyIn 1.1s var(--ease) .56s both; }
.story__cue { animation: storyFade 1.4s ease 1.2s both; }
.story__wheel { animation: storyCue 1.8s ease-in-out infinite; }

/* 3. Étapes */
.story__block:not(.story__block--hero) {
  min-height: 92vh; min-height: 92svh;
  display: flex; flex-direction: column; justify-content: center;
  max-width: min(480px, 40vw);
  padding: 14vh 0;
  transition: opacity .7s var(--ease);
}
.story__panel { display: flex; flex-direction: column; gap: 20px; }
.story__head { display: flex; align-items: flex-end; gap: 16px; }
.story__num {
  font-family: var(--font-serif); font-size: var(--fs-step); line-height: .78; letter-spacing: -.04em;
  color: var(--cyan);
}
.story__head .story__kicker { font-weight: 800; padding-bottom: 5px; }
.story__tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.story__tag {
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; line-height: 1.22; white-space: nowrap; color: var(--mist);
}
.story__tag--who { padding: 6px 12px; border: 0; background: var(--white); color: var(--navy); font-weight: 700; }
@media (min-width: 760px) {   /* l'étape lue est pleine, les autres s'effacent (le script pose .is-active) */
  .story.is-ready .story__block:not(.story__block--hero):not(.is-active) { opacity: .74; }   /* .28 dans la maquette : 2,0:1, sous AA ; .74 donne ≥ 4,5:1 sur tout le texte et les pastilles */
}

/* 4. Mobile : scène dans les 44 % du haut, chaque étape est une carte en bas d'écran */
@media (max-width: 759.98px) {
  .story { --story-gap: 22px; }
  .story__sticky::after {   /* dégradé navy sur la moitié basse, pour la lisibilité */
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(11, 20, 36, 0) 38%, rgba(11, 20, 36, .94) 62%);
  }
  .story__meta, .story__cue { display: none; }
  .story__block--hero { max-width: 620px; padding: 42vh 0 56px; padding-top: 42svh; }
  .story__block:not(.story__block--hero) {
    justify-content: flex-end; max-width: 520px;
    padding: 0 0 8vh; padding-bottom: 8svh;
  }
  .story__panel {
    gap: 14px; padding: 22px;
    background: rgba(11, 20, 36, .78);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .08); border-radius: 20px;
  }
  .story__form { flex-direction: column; border-radius: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .story *, .story *::before, .story *::after { animation: none !important; transition: none !important; }
}

/* 5. Scène (PP.story) */
.pps {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; pointer-events: none; contain: strict;
  color: var(--white); font: 400 16px/normal var(--font-ui); letter-spacing: normal; text-align: left;
  -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none;
}
.pps *, .pps *::before, .pps *::after { box-sizing: border-box; }
.pps img, .pps video { display: block; max-width: none; }
.pps .is-off { visibility: hidden; }
.pps-plane { position: absolute; left: 0; top: 0; width: 900px; height: 1000px; transform-origin: 0 0; }

.pps-svg { position: absolute; left: 0; top: 0; width: 900px; height: 1000px; overflow: visible; }
.pps-svg * { transform-box: view-box; transform-origin: 0 0; }
.pps-wave { fill: none; stroke: var(--cyan); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pps-curve { fill: none; stroke: var(--cyan); stroke-width: 2; stroke-opacity: .55; vector-effect: non-scaling-stroke; }
.pps-cdot { fill: var(--cyan); }

/* Pastilles (pill() de la référence) */
.pps-pill {
  position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font-weight: 700; border-radius: 999px;
  background: var(--white); color: var(--navy);
  box-shadow: 0 14px 36px rgba(11, 20, 36, .28);
}
.pps-pill--dark { background: var(--navy); color: var(--white); }
.pps-dot { flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--cyan); }

/* Reel incliné */
.pps-reel {
  position: absolute; left: 0; top: 0; width: 180px; height: 320px;
  border: 6px solid var(--white); border-radius: 18px; overflow: hidden;
  background: var(--navy-2); box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
}
.pps-reel__img { width: 100%; height: 100%; object-fit: cover; }
.pps-reel__tag { left: 10px; top: 10px; padding: 7px 14px; font-size: 26px; box-shadow: none; }
.pps-reel__title {
  position: absolute; left: 12px; right: 12px; bottom: 14px;
  font-family: var(--font-serif); font-size: 20px; line-height: 1.05; color: var(--white);
}

/* Carte vidéo / téléphone : ancre au centre, découpes arrondies (voir rrect() dans js/story.js) */
.pps-frame { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.pps-shadow { position: absolute; left: 0; top: 0; transform-origin: 0 0; box-shadow: 0 50px 110px rgba(0, 0, 0, .45); }
.pps-shadow--card { width: 600px; height: 760px; border-radius: 22px; }
.pps-shadow--phone { width: 344px; height: 708px; border-radius: 54px; }
.pps-rr { position: absolute; left: 0; top: 0; width: 2400px; height: 2400px; overflow: hidden; transform-origin: 0 0; }
.pps-rr--tl { border-top-left-radius: 50px; }
.pps-rr--tr { border-top-right-radius: 50px; }
.pps-rr--bl { border-bottom-left-radius: 50px; }
.pps-rr--br { border-bottom-right-radius: 50px; }
.pps-rr__in { position: absolute; left: 0; top: 0; width: 600px; height: 760px; transform-origin: 0 0; }
.pps-fill { position: absolute; left: 0; top: 0; width: 600px; height: 760px; background: var(--navy); }
.pps-fill.is-ring { background: #2A3A55; }
.pps-fill--screen { background: var(--navy-2); }
.pps-video { position: absolute; left: 0; top: 0; width: 600px; height: 760px; object-fit: cover; transform-origin: 0 0; }

/* Calque 0 : bien de démonstration */
.pps-o0 { position: absolute; left: 0; top: 0; width: 600px; height: 760px; }
.pps-o0__shade {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(180deg, rgba(11, 20, 36, .35) 0%, rgba(11, 20, 36, 0) 30%, rgba(11, 20, 36, 0) 55%, rgba(11, 20, 36, .85) 100%);
}
.pps-o0__pill { left: 26px; top: 26px; padding: 11px 20px; font-size: 27px; }
.pps-o0__txt { position: absolute; left: 30px; right: 30px; bottom: 34px; display: flex; flex-direction: column; gap: 8px; color: var(--white); }
.pps-o0__place { font-size: 27px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pps-o0__name { font-family: var(--font-serif); font-size: 78px; line-height: .92; letter-spacing: -.03em; }

/* Calque 1 : viseur */
.pps-o1 { position: absolute; left: 0; top: 0; width: 600px; height: 760px; }
.pps-corner { position: absolute; left: 0; top: 0; width: 54px; height: 54px; border-left: 3px solid var(--white); border-top: 3px solid var(--white); }
.pps-rec {
  position: absolute; left: 92px; top: 34px;
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--white);
}
.pps-rec__dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: #EF4444; }
.pps-cross { position: absolute; left: 0; top: 0; background: rgba(255, 255, 255, .25); transform-origin: 0 0; }
.pps-cross--h { width: 600px; height: 1px; }
.pps-cross--v { width: 1px; height: 760px; }

/* Page mobile des Tilleuls (390 × 1240) */
.pps-site { position: absolute; left: 0; top: 0; width: 390px; height: 1240px; transform-origin: 0 0; }
.pps-sm { position: absolute; left: 0; top: 0; width: 390px; height: 1240px; background: var(--white); color: var(--navy); }
.pps-sm__hero { position: absolute; left: 0; top: 0; width: 390px; height: 600px; object-fit: cover; object-position: center 30%; }
.pps-sm__shade {
  position: absolute; left: 0; top: 0; width: 390px; height: 600px;
  background: linear-gradient(180deg, rgba(11, 20, 36, .45) 0%, rgba(11, 20, 36, 0) 26%, rgba(11, 20, 36, 0) 46%, rgba(11, 20, 36, .85) 100%);
}
.pps-sm__bar {
  position: absolute; left: 22px; right: 22px; top: 58px;
  display: flex; justify-content: space-between;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--white);
}
.pps-sm__info { position: absolute; left: 22px; right: 22px; top: 420px; color: var(--white); }
.pps-sm__place { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.pps-sm__name { margin-top: 8px; font-family: var(--font-serif); font-size: 50px; line-height: 1; }
.pps-sm__price { margin-top: 10px; font-size: 19px; font-weight: 700; }
.pps-sm__ctas { position: absolute; left: 22px; right: 22px; top: 624px; display: flex; flex-direction: column; gap: 10px; }
.pps-sm__btn {
  height: 46px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--navy); border-radius: 999px; font-size: 15px; font-weight: 700;
}
.pps-sm__btn--dark { border: 0; background: var(--navy); color: var(--white); }
.pps-sm__h { position: absolute; left: 22px; top: 768px; font-family: var(--font-serif); font-size: 26px; }
.pps-sm__ph { position: absolute; top: 814px; width: 168px; height: 210px; object-fit: cover; border-radius: 6px; }
.pps-sm__ph--a { left: 22px; }
.pps-sm__ph--b { left: 200px; object-position: center 75%; }
.pps-sm__film { position: absolute; left: 22px; top: 1044px; width: 346px; height: 170px; border-radius: 6px; overflow: hidden; }
.pps-sm__film img { width: 100%; height: 100%; object-fit: cover; object-position: center 85%; }
.pps-sm__play { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center; background: rgba(11, 20, 36, .45); }
.pps-sm__ring { width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--white); border-radius: 50%; }
.pps-sm__ring svg { display: block; fill: var(--white); }

/* Étiquettes, adresse, mentions */
.pps-tag { padding: 16px 26px; font-size: 30px; font-weight: 800; }
.pps-url { padding: 12px 22px; font-size: 24px; }
.pps-url__dot { line-height: 1; color: var(--blue); }   /* « ● » vient d'une police de repli plus haute : la pastille garde sa hauteur */
.pps-ment { left: 620px; top: 660px; padding: 12px 20px; font-size: 24px; background: var(--blue); }

/* Canaux et portée */
.pps-chan { padding: 12px 22px; font-size: 27px; }
.pps-chan__dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); }
.pps-chan__dot--navy { background: var(--navy); }
.pps-reach { position: absolute; left: 70px; top: 96px; display: flex; flex-direction: column; gap: 4px; color: var(--white); }
.pps-reach__num { font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pps-reach__lab { font-size: 25px; font-weight: 600; color: var(--mist); }

/* Fiches acheteurs */
.pps-lead {
  position: absolute; left: 0; top: 0; width: 540px; padding: 22px 26px;
  background: var(--white); color: var(--navy);
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .30);
  transform-origin: 0 0;
}
.pps-lead--hot { border: 2.5px solid var(--cyan); }
.pps-lead__row { display: flex; align-items: center; gap: 18px; }
.pps-lead__ini {
  flex: none; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #E6EAEE; color: var(--muted); font-size: 20px; font-weight: 800;
}
.pps-lead--hot .pps-lead__ini { background: var(--navy); color: var(--white); }
.pps-lead__name { flex: 1; min-width: 0; font-size: 32px; font-weight: 800; }
.pps-lead__score { font-size: 50px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.pps-lead__max { font-size: 24px; font-weight: 600; color: var(--muted); }
.pps-lead__bar { height: 8px; margin-top: 18px; overflow: hidden; border-radius: 4px; background: #E6EAEE; }
.pps-lead__fill { height: 8px; background: #B6AB98; transform-origin: 0 0; }
.pps-lead--hot .pps-lead__fill { background: var(--cyan); }
.pps-lead__sub { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; font-size: 25px; font-weight: 600; }
.pps-lead__item { display: flex; align-items: center; gap: 12px; }
.pps-lead__item::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); }
.pps-badge { padding: 12px 20px; font-size: 24px; background: var(--blue); }

/* Rapport */
.pps-report {
  position: absolute; left: 0; top: 0; width: 600px; padding: 34px;
  display: flex; flex-direction: column; gap: 22px;
  background: var(--white); color: var(--navy); border-radius: 18px;
  box-shadow: 0 60px 130px rgba(0, 0, 0, .5);
}
.pps-report__head { display: flex; justify-content: space-between; align-items: center; }
.pps-report__logo { width: auto; height: 26px; }
.pps-report__month { font-size: 27px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pps-report__who { font-size: 27px; font-weight: 700; color: var(--muted); }
.pps-report__title { margin-top: 6px; font-family: var(--font-serif); font-size: 46px; line-height: 1.05; }
.pps-report__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; overflow: hidden; border-radius: 12px; background: var(--line-soft); }
.pps-report__cell { padding: 16px 18px; background: var(--white); }
.pps-report__val { font-size: 48px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.pps-report__lab { font-size: 27px; color: var(--muted); }
.pps-report__bar { height: 12px; overflow: hidden; border-radius: 6px; background: var(--line-soft); }
.pps-report__bars { display: flex; height: 100%; transform-origin: 0 0; }
.pps-report__bars span { display: block; height: 100%; }
.pps-report__seg--a { width: 31%; background: var(--navy); }
.pps-report__seg--b { width: 50%; background: var(--cyan); }
.pps-report__seg--c { width: 19%; background: var(--mist); }
.pps-report__quote {
  padding-top: 18px; border-top: 1px solid var(--line-soft);
  font-family: var(--font-serif); font-style: italic; font-size: 27px; line-height: 1.4; color: var(--ink-2);
}
.pps-report__demo { font-size: 27px; font-weight: 600; color: var(--muted); }
