/* ============================================================
   LE RECIT, AVEC LE VRAI TELEPHONE — ET, ENTRE DEUX, LA METHODE.

   Quatre chapitres sur blanc : le rendu de trois quarts de Tanguy et
   les VRAIES captures de l'app, gauchies par une homographie pour tomber
   exactement dans l'ouverture du rendu. Entre eux, sur gris clair : la
   regle du film (la carte des series, et la barre ou les disques
   glissent), la salle (trois fois l'ecran Gym Setup), et le carrousel
   des details. Les fonds alternent toujours : jamais deux fois le meme
   de suite.

   CE QUI EST ECRIT DANS LA FEUILLE, C'EST L'ARRIVEE : sans script on lit
   des scenes finies ; c'est le script qui pose `data-histoire-pilote`
   et confie les scenes au defilement.

   Tout est range sous .histoire et .details : rien ici ne touche le
   reste du site. Dans le site, c'est assets/recit.css, charge APRES
   style.css : il en reprend les jetons et la typographie de l'accueil.
   ============================================================ */
/* Les jetons du recit que le site n'a pas : le gris des intermedes, le
   gris de l'app, et le bas des pastilles de la barre (leur marge haute
   plus leur hauteur). Le reste (--blanc, --encre, --n2, --n3, --trait,
   --bleu, --l3, --neue, --etroite, --marge, --e) vient du site. */
.histoire, .details {
  --gris: #f0f0f4;
  --plan: #e6e6ed;
  --barre-bas: calc(clamp(10px, 1.2vw, 18px) + clamp(50px, 4vw, 60px));
}
/* `clip` et non `hidden` : un debord coupe sans creer de conteneur de
   defilement. */
.histoire { position: relative; overflow: clip; }

/* UN CHAPITRE A TELEPHONE : un ecran de haut, sur blanc. La scene
   reserve en haut la place de la barre. */
.histoire__ch { position: relative; height: 100svh; background: var(--blanc); }
.histoire__colle {
  position: relative; height: 100svh; box-sizing: border-box;
  padding-top: calc(var(--barre-bas) + clamp(18px, 3.4svh, 40px));
  padding-bottom: clamp(14px, 3svh, 34px);
  display: grid;
}

/* UN GESTE, UNE CARTE. En grand, chaque carte du recit fait un ecran ;
   c'est le script qui mene de l'une a l'autre, un geste a la fois.
   Tant que le recit est a l'ecran, le calage du site se tait : sur un
   grand ecran, il ramenait la page vers le point de calage voisin (la
   litanie) au lieu de la laisser sur la carte. Pendant un glissement,
   le defilement doux du site se tait aussi. */
.histoire[data-histoire-pilote] > :is(.histoire__ch, .surcharge, .inter, .details) { height: 100svh; }
html.histoire-dedans { scroll-snap-type: none !important; }
html.histoire-glisse { scroll-behavior: auto !important; }
.histoire__grille {
  width: min(1240px, calc(100% - 2 * var(--marge))); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center; gap: clamp(24px, 4vw, 72px);
  min-height: 0;
}
/* ------------------------------------------------------------
   L'OUVERTURE, D'APRES LE HANDOFF.

   Fonds, corps, approches, rayons, ombres et mouvement sont ceux du
   document, a la mesure. Ce qui s'en ecarte est dit dans le balisage,
   et tient a une seule chose : cette carte vit DANS le recit, donc
   elle fait exactement un ecran, la ou le handoff laisse la page
   s'allonger.
   ------------------------------------------------------------ */
.histoire__ouv { background: #eeeef2; }
.histoire__ouv .histoire__colle {
  /* `minmax(0, 1fr)` SUR LA COLONNE, ET C'EST INDISPENSABLE. La scene
     est ecrite a 1240 px de large ; une colonne `auto` se dimensionne
     sur son contenu, donc la carte entiere prenait 1240 px et tout
     sortait de l'ecran sur un telephone. */
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  padding-top: calc(var(--barre-bas) + clamp(12px, 3svh, 40px));
  padding-bottom: clamp(10px, 2svh, 24px);
  overflow: hidden;
}
/* La lueur blanche derriere le titre : une ellipse de 1200 x 520,
   centree, qui deborde de 220 px par le haut. */
.ouv__lueur {
  position: absolute; left: 50%; top: -220px; width: 1200px; height: 520px;
  transform: translateX(-50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0));
}
.ouv__dire {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-inline: 24px;
}
.ouv__t {
  margin: 0; font-family: var(--neue);
  font-size: clamp(40px, 6vw, 88px); line-height: .98; font-weight: 600;
  letter-spacing: -.048em; max-width: 1000px; text-wrap: balance; color: #0b0b0f;
}
.ouv__s {
  margin: 18px 0 0; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.45;
  color: #6b6b74; max-width: 540px; text-wrap: pretty;
}
.ouv__actes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 24px 0 0; }

/* LES DEUX TOUCHES. La sombre porte son liseret clair et son ombre
   basse ; la claire est du verre — le meme que les capsules de la
   barre, a ceci pres que le handoff le veut un peu plus dense. */
.ouvb {
  display: flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; white-space: nowrap; text-decoration: none;
  transition: background 200ms var(--e), color 200ms var(--e);
}
.ouvb--noir {
  background: #0b0b0f; color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 20px -4px rgba(11, 11, 15, .28);
}
.ouvb--noir:hover { background: #24242c; color: #fff; }
.ouvb--verre {
  padding: 0 20px; font-weight: 500; color: #0b0b0f;
  background: rgba(255, 255, 255, .42);
  -webkit-backdrop-filter: blur(28px) saturate(190%); backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .95), inset 0 -1px 1px rgba(255, 255, 255, .35),
              0 1px 2px rgba(20, 20, 40, .04), 0 10px 30px -8px rgba(20, 20, 40, .12);
}
.ouvb--verre:hover { color: #1f1fff; }
.ouvb__f { color: #9a9aa3; }

/* LA SCENE EST ECRITE A 1240 x 705 ET MISE A L'ECHELLE. Le handoff ne
   la cale que sur la largeur ; ici elle doit aussi tenir en hauteur,
   parce qu'une carte du recit fait un ecran et pas plus. Le facteur
   est pose par le script, dans `--ouv-z`. */
.ouv__cadre { position: relative; z-index: 1; display: grid; place-items: start center; min-height: 0; margin-top: 32px; }
/* `zoom` ET NON `transform: scale()`, comme le handoff. Une mise a
   l'echelle par transformation ne change pas la place PRISE : la boite
   de 1240 px restait de 1240 px dans la mise en page et debordait.
   `zoom` redimensionne la boite elle-meme. */
.ouv__scene {
  position: relative; width: 1240px; height: 705px; flex: none;
  zoom: var(--ouv-z, 1);
}
.ouv__sol {
  position: absolute; left: 50%; bottom: 6px; width: 620px; height: 50px;
  transform: translateX(-50%); filter: blur(12px);
  background: radial-gradient(50% 50% at 50% 50%, rgba(20, 20, 40, .18), rgba(20, 20, 40, 0) 70%);
}

/* LES DEUX APPAREILS. Boites de 461 x 691 a gauche 389 ; dedans, le
   rendu de 1024 x 1536 ramene a 0,45. */
.tel34, .teldr {
  position: absolute; left: 389px; width: 461px; height: 691px;
  transition: transform 1600ms var(--sortie), opacity 900ms ease;
}
.tel34__in, .teldr__in {
  position: absolute; left: 0; top: 0; width: 1024px; height: 1536px;
  transform: scale(.45); transform-origin: 0 0;
}
.tel34__cadre, .teldr__cadre { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.tel34 { top: 4px; z-index: 1; opacity: 0; transform: translateX(0) scale(.9);
  filter: drop-shadow(0 30px 40px rgba(20, 20, 40, .18)); }
.teldr { top: 0; z-index: 2; transform: translateX(0);
  filter: drop-shadow(0 40px 50px rgba(20, 20, 40, .22)); }
/* La revelation part a l'ARRIVEE de la carte — `data-joue` — et elle
   rejoue quand on y revient. Le handoff la declenche 450 ms apres le
   chargement de la page ; ici la carte est a un geste d'en bas, on ne
   la verrait jamais. */
.histoire__ouv[data-joue] .tel34 { opacity: 1; transform: translateX(140px) scale(.97); }
.histoire__ouv[data-joue] .teldr { transform: translateX(-80px); }
/* SANS PILOTE — au telephone, en mouvement reduit — LES DEUX SONT
   DEJA SORTIS. C'est la regle du site : ce qui est ecrit dans la
   feuille, c'est l'arrivee. Autrement on ne verrait qu'un appareil,
   et le second resterait a opacite zero pour toujours. */
.histoire:not([data-histoire-pilote]) .tel34 { opacity: 1; transform: translateX(140px) scale(.97); }
.histoire:not([data-histoire-pilote]) .teldr { transform: translateX(-80px); }

/* La capture gauchie dans l'ecran du rendu de trois quarts :
   TL(255,90) TR(748,69) BR(748,1458) BL(255,1445), en pixels du cadre. */
.tel34__ecran {
  position: absolute; left: 0; top: 0; width: 1206px; height: 2622px;
  border-radius: 170px; overflow: hidden; transform-origin: 0 0;
  transform: matrix3d(0.39360732, -0.01881342, 0, -0.0000203, 0, 0.51678108, 0, 0, 0, 0, 1, 0, 255, 90, 0, 1);
}
.tel34__ecran > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.tel34__bar { position: absolute; left: 0; top: 0; width: 402px; height: 54px; transform: scale(3); transform-origin: 0 0; }

/* La decoupe de l'ecran droit : 652 x 1402 a (186, 68). Le contenu est
   ecrit en POINTS (402 x 874) et agrandi de 1,6219. */
.teldr__ecran {
  position: absolute; left: 186px; top: 68px; width: 652px; height: 1402px;
  border-radius: 92px; overflow: hidden; background: #e6e6ed;
}
.pts { position: absolute; left: 0; top: 0; width: 402px; height: 874px; transform: scale(1.6219); transform-origin: 0 0; }

/* La barre d'etat d'iOS, en points. */
.sysbar {
  position: absolute; left: 0; top: 0; width: 402px; height: 54px; background: #e6e6ed;
  display: flex; align-items: center; justify-content: space-between; padding: 8px 33px 0 48px;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif; z-index: 3;
}
.sysbar__h { font-size: 17px; font-weight: 600; color: #000; letter-spacing: -.01em; }
.sysbar__i { display: flex; align-items: center; gap: 6px; }
.sysbar__sig { display: flex; align-items: flex-end; gap: 1.5px; height: 12px; }
.sysbar__sig i { width: 3px; background: #000; border-radius: 1px; }
.sysbar__bat { display: flex; align-items: center; gap: 1px; }
.sysbar__cuve { position: relative; width: 26px; height: 13px; border-radius: 4.2px; background: rgba(0, 0, 0, .32); overflow: hidden; }
.sysbar__plein { position: absolute; left: 0; top: 0; bottom: 0; width: 80%; background: #000; }
.sysbar__cuve b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.sysbar__plot { width: 1.5px; height: 4.5px; border-radius: 0 1px 1px 0; background: rgba(0, 0, 0, .35); }

/* L'ECRAN DE CONNEXION, refait en points. */
.porte {
  position: absolute; inset: 0; background: linear-gradient(#e6e6ed 70%, #e3e3e6);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif; color: #0b0b14;
}
.porte > * { position: absolute; }
.porte__t { left: 16px; top: 160px; font-size: 42px; line-height: 36px; font-weight: 700; letter-spacing: -.045em; }
.porte__s { left: 16px; top: 259px; width: 270px; font-size: 15px; line-height: 19.7px; color: #85858e; }
.porte__seg {
  left: 16px; top: 335px; width: 363px; height: 41px; display: grid; grid-template-columns: 1fr 1fr;
  padding: 3px; border-radius: 14px; background: #c9c9d3;
}
.porte__seg div { display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; color: #6e6e78; }
.porte__seg .on { border-radius: 11px; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); color: #0b0b14; }
.porte__l { left: 16px; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; color: #8e8e97; }
.porte__c {
  left: 16px; width: 363px; height: 49px; display: flex; align-items: center; padding: 0 14px;
  border-radius: 16px; background: #dbdbe3; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .025);
  font-size: 18.5px; color: #9b9ba4;
}
.porte__c--mdp { padding: 0 15px; font-size: 8px; letter-spacing: 4px; color: #8e8e97; }
.porte__b {
  left: 16px; top: 579px; width: 363px; height: 48px; display: flex; align-items: center; justify-content: center;
  border-radius: 24px; background: #1100fe; font-size: 19px; font-weight: 600; color: #fff; letter-spacing: -.01em;
}
.porte__o { left: 0; right: 0; top: 642px; text-align: center; font-size: 17px; font-weight: 500; color: #1100fe; }
/* La barre d'onglets est decoupee dans la vraie capture, et son haut
   s'efface pour cacher la couture. */
.porte__onglets {
  left: 0; top: 766px; width: 402px; height: 108px; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 28px); mask-image: linear-gradient(transparent, #000 28px);
}
.porte__onglets img { position: absolute; left: 0; top: -766px; width: 402px; height: 874px; max-width: none; }

@media (prefers-reduced-motion: reduce) { .tel34, .teldr { transition: none; } }

/* ------------------------------------------------------------
   LE PORTABLE. Meme principe que les telephones : la capture est
   posee a la place exacte de la dalle, et le RENDU passe par-dessus.
   Ses bords, son encoche et son pied sont opaques, tout le reste est
   transparent — c'est lui qui donne la matiere, la capture ne fait que
   remplir l'ecran.

   LES FRACTIONS SONT MESUREES SUR LE RENDU, pas estimees : la dalle
   noire occupe x 160..1375 et y 98..899 d'une image de 1536 x 1024,
   soit 10,417 % du bord gauche, 9,570 % du haut, 79,167 % de large et
   78,320 % de haut. La capture a le meme rapport (1,516), donc elle
   remplit sans etre deformee.
   ------------------------------------------------------------ */
/* LE DERNIER ECRAN S'EMPILE, IL NE SE RANGE PAS A COTE.

   Un portable est LARGE la ou un telephone est haut : dans la colonne
   de droite des autres cartes, il ne faisait plus que sept cents
   pixels et le reste de la carte etait du vide. Le titre passe donc
   au-dessus, centre, et le portable prend toute la mesure dessous.

   Ca rime avec la premiere carte, qui est centree elle aussi : le
   recit s'ouvre et se ferme sur une presentation, et les quatre
   chapitres tiennent entre les deux.

   LA PLUS GRANDE DALLE QUI TIENNE DANS LA RANGEE. `container-type:
   size` fait du cadre la reference : le portable prend la plus petite
   des deux contraintes — toute la largeur, ou toute la hauteur ramenee
   a son rapport. C'est le meme calcul que la toile du film avait. */
.histoire__mac .histoire__grille {
  grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(16px, 3svh, 36px); align-items: stretch;
}
.histoire__mac .histoire__dire { text-align: center; }
.histoire__mac .tete { justify-content: center; }
.histoire__mac .h2 { max-width: 20ch; margin-inline: auto; }
.histoire__mac .dit { max-width: 80ch; margin-inline: auto; }
.histoire__mac .histoire__voir { container-type: size; display: grid; place-items: center; height: 100%; }
.mac {
  position: relative; margin: 0;
  width: min(100%, calc(100cqh * 1536 / 1024));
  aspect-ratio: 1536 / 1024;
}
/* Le gris : le 04 est blanc, le pied est noir. */
.histoire__mac { background: var(--gris); }
.mac__dalle {
  position: absolute; left: 10.417%; top: 9.570%; width: 79.167%; height: 78.320%;
  object-fit: cover; object-position: top center;
  display: block; max-width: none; background: #0b0b10; z-index: 0;
}
.mac__corps {
  position: absolute; inset: 0; width: 100%; height: 100%;
  max-width: none; display: block; pointer-events: none; z-index: 1;
}
/* ============================================================
   IL MONTE AVEC LA CARTE — ET C'EST LE SCRIPT QUI LE MENE.

   Il y avait ici une animation declenchee par `data-joue`. Deux
   defauts, mesures l'un apres l'autre :

   LE SURSAUT. `data-joue` se pose quand la carte arrive a moins d'un
   cinquieme d'ecran de sa place, et a cet instant le portable est
   deja largement visible. L'animation le remettait d'un coup a
   opacite zero, vingt-six pixels plus bas, en plein defilement : la
   page avancait de trente pixels par image, le portable de six. Il
   est maintenant mene par `jouerMac`, depuis la POSITION de la carte,
   comme les telephones des autres cartes — continu par construction.

   LE SCINTILLEMENT. L'entree portait aussi un `scale(.985)`. La
   dalle est un PNG de 1824 px ramene a 570, soit un facteur de 3,20,
   et une page de statistiques est ce qu'il y a de plus dense. Pendant
   les 900 ms, elle prenait QUARANTE-QUATRE largeurs distinctes, de
   561,57 a 570,13 : autant de reinterpolations sur une grille
   decalee, donc du texte qui grouille. Il ne reste que l'opacite et
   la montee, qui ne changent aucune dimension.

   `will-change` promeut le groupe en couche a part pour que le
   compositeur le deplace sans le redessiner. Il est pose tant que la
   carte est a l'ecran, pas en permanence.
   ============================================================ */
.histoire__mac .mac { will-change: transform, opacity; }
.histoire__acte { margin-top: clamp(16px, 2.4svh, 26px); }
/* Une vraie touche, celle du site : c'est la seule action de tout
   le recit, et un lien bleu ne la donnait pas a voir. */
.histoire__acte .bouton { text-decoration: none; }

.histoire__dire { position: relative; z-index: 2; min-width: 0; }
.histoire__voir { position: relative; height: 100%; min-height: 0; }

/* La typographie est celle de l'accueil du site (.accueil .tete, .cap,
   .h2, .dit). Le recit n'en change que ceci : le titre cede un cran a
   l'appareil, et chaque phrase reste d'un bloc tant qu'elle tient. */
.histoire .h2 { font-size: clamp(34px, 4.2vw, 60px); max-width: none; }
.histoire .dit { margin-top: clamp(14px, 2.2svh, 22px); text-wrap: pretty; }
.histoire .phrase { display: inline-block; }
.histoire .mot { display: inline; }

/* ============================================================
   LE TELEPHONE

   Quatre couches dans un cadre aux proportions du rendu (603 x 1462) :
   l'ombre, l'ecran (masque par l'ouverture du rendu), le rendu
   lui-meme, et ce qui sort de l'ecran. Sa place est ecrite en centiemes
   de la zone : --x et --y pour le centre, --h pour la hauteur.
   ============================================================ */
.appareil {
  position: absolute; margin: 0;
  left: calc(var(--xe, var(--x)) * 1%); top: calc(var(--y) * 1%);
  height: calc(var(--h) * 1%); aspect-ratio: 603 / 1462;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.appareil--arriere { z-index: 1; }
.appareil__mvt { position: absolute; inset: 0; will-change: transform; }
.appareil__ombre {
  position: absolute; left: -7.794%; top: -1.368%; width: 120.232%; height: 108.276%;
  max-width: none; pointer-events: none; user-select: none;
}
.appareil__ecran {
  position: absolute; inset: 0; overflow: hidden;
  -webkit-mask: url('recit/img/tel-34-masque.png') 0 0 / 100% 100% no-repeat;
          mask: url('recit/img/tel-34-masque.png') 0 0 / 100% 100% no-repeat;
}
/* Sans script : la capture remplit le rectangle de l'ouverture. */
.capture { position: absolute; left: 4.892%; top: 2.401%; width: 81.924%; height: 95.094%; overflow: hidden; background: #e6e6ec; }
.capture__plan { position: absolute; inset: 0; }
.capture__img { display: block; width: 100%; height: 100%; max-width: none; }
.appareil__corps { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; pointer-events: none; user-select: none; }

/* Avec le script : la capture est un plan de 739 x 1608, mis a
   l'echelle puis gauchi par une homographie (matrix3d). */
[data-gauchi] .capture { left: 0; top: 0; transform-origin: 0 0; }
[data-gauchi] .capture__plan { inset: auto; left: 0; top: 0; width: 739px; height: 1608px; transform-origin: 0 0; }
[data-gauchi] .capture__img { width: 739px; height: 1608px; }

/* Les tranches : des morceaux de la capture, poses a leur place. Pas de
   `will-change` : peintes dans le plan de l'ecran, elles restent aussi
   nettes que la capture. */
.part { position: absolute; background-repeat: no-repeat; background-size: 739px 1608px; }

/* ============================================================
   LE REFLET DU RECORD, repris de l'app (`.pr::after`, skin.css) —
   mesures, courbe et rythme compris.

   CINQ SECONDES PILE, DONT UNE DE MOUVEMENT. Une boucle continue sur
   un element qu'on regarde devient un clignotant ; c'est le SILENCE
   entre deux passages qui fait qu'on la remarque sans s'en lasser. Un
   cinquieme du temps en mouvement, quatre en repos.

   LES DEUX PASTILLES AU MEME INSTANT. Des reflets decales feraient
   une guirlande : l'oeil suivrait la sequence au lieu de voir la
   matiere. Le meme instant pour les deux se lit comme UNE lumiere qui
   traverse l'ecran, ce qui est la seule fiction credible ici.

   Le balayage est en `transform` et non en `background-position` : le
   premier ne coute rien, le second repeindrait la tranche a chaque
   image. Et `linear` a l'interieur du passage — une lumiere qui
   traverse ne ralentit pas au milieu. */
.part--pr { overflow: hidden; }
.part--pr::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0;
  width: 220%; pointer-events: none;
  background: linear-gradient(100deg,
    transparent 40%,
    color-mix(in srgb, #fff 62%, transparent) 50%,
    transparent 60%);
  transform: translateX(-70%);
}
/* ELLE PART QUAND LA CARTE ARRIVE, ET ELLE REVIENT SOUVENT.

   L'app tient ses pastilles cinq secondes, dont une de mouvement : on
   les regarde longtemps, et c'est le silence qui fait qu'on les
   remarque sans s'en lasser. Ici on ne regarde la carte qu'un
   instant, et l'animation tournait depuis le chargement de la page :
   on arrivait une fois sur deux en plein silence, et le reflet ne se
   voyait pas.

   `data-joue`, pose par le script a l'arrivee de la carte et retire
   quand elle se rearme, redemarre l'animation a zero : le premier
   passage est immediat. Et le cycle tombe de cinq secondes a deux
   deux : trois passages dans les six premieres secondes au lieu
   d'un. */
.histoire__ch[data-joue] .part--pr::after {
  animation: recit-reflet 2200ms linear infinite;
}
@keyframes recit-reflet {
  0%   { transform: translateX(-70%); }
  32%  { transform: translateX(70%); }
  100% { transform: translateX(70%); }
}
@media (prefers-reduced-motion: reduce) {
  .histoire__ch[data-joue] .part--pr::after { animation: none; opacity: 0; }
}

/* LA PASTILLE DU RECORD. Elle jaillit du ✓ de « Log set », grandit et
   plane devant l'appareil, puis retombe — BOOM — dans sa place sur la
   ligne de S1. Un disque d'or, l'etoile a l'encre : celle de l'app. */
.medaille { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; visibility: hidden; transform-origin: 50% 50%; will-change: transform; }
.medaille svg { display: block; width: 100%; height: 100%; overflow: visible; }
.anneau { position: absolute; box-sizing: border-box; border-radius: 50%; border: 0 solid #e5c156; opacity: 0; pointer-events: none; }

/* CE QUI SORT DE L'ECRAN. Un morceau de la capture qui se decolle et
   flotte devant l'ecran, DANS LE PLAN DE L'IPHONE : meme perspective,
   un peu plus grand parce que plus pres, decale vers la gauche — la ou
   la normale de l'ecran pointe. Il laisse son creux dans l'ecran. */
.leve { position: absolute; left: 0; top: 0; transform-origin: 0 0; z-index: 4; pointer-events: none; will-change: transform; }
.leve__ombre, .leve__img { position: absolute; inset: 0; border-radius: inherit; }
.leve__ombre { box-shadow: 0 2px 8px rgba(13, 14, 24, .12), 0 26px 60px rgba(13, 14, 24, .26); }
.leve__img { background-repeat: no-repeat; }

/* LA SALLE : trois fois l'ecran Gym Setup, sur une ligne, du haut de
   l'ecran vers le detail. Chaque appareil a sa legende ; la ligne est une
   liste. Sous mille pixels, elle defile au doigt. */
.salle {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 44px); margin: clamp(36px, 6svh, 64px) 0 0; padding: 0; list-style: none;
}
.salle__tel { display: grid; gap: clamp(10px, 1.8svh, 18px); justify-items: center; align-content: start; min-width: 0; }
.salle__voir { position: relative; width: 100%; height: clamp(440px, 64svh, 720px); }
.salle__note { margin: 0; max-width: 30ch; text-align: center; font-size: 14px; line-height: 1.45; color: var(--n2); text-wrap: balance; }

/* ============================================================
   LES INTERMEDES. Sur gris clair, hors de l'app : la methode qu'on
   touche. Titre au centre — c'est un autre registre que les chapitres —
   puis l'objet, blanc sur le gris : le gris porte, le blanc montre.
   ============================================================ */
.inter {
  position: relative; background: var(--gris);
  padding-block: clamp(96px, 15svh, 170px) clamp(80px, 13svh, 150px);
}
.inter__in { width: min(1240px, calc(100% - 2 * var(--marge))); margin-inline: auto; }
.inter__tete { max-width: 860px; margin-inline: auto; text-align: center; }
.inter__tete .tete { justify-content: center; }
.inter__tete .h2 { margin-inline: auto; }
.inter__tete .dit { margin-inline: auto; max-width: 54ch; }
/* En grand, la salle tient dans son ecran : le titre en haut, sur une
   ligne ; la rangee des trois ecrans prend tout le reste. */
.histoire[data-histoire-pilote] .inter {
  display: grid; padding-block: calc(var(--barre-bas) + clamp(18px, 3.4svh, 40px)) clamp(14px, 3svh, 34px);
}
.histoire[data-histoire-pilote] .inter__in { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.histoire[data-histoire-pilote] .inter .h2 { font-size: clamp(30px, 3.2vw, 46px); max-width: none; }
.histoire[data-histoire-pilote] .inter .dit { margin-top: clamp(10px, 1.6svh, 16px); }
/* Les trois legendes partagent leur rangee (subgrid) : les trois
   telephones ont la meme taille, quelle que soit la longueur du texte. */
.histoire[data-histoire-pilote] .salle { grid-template-rows: minmax(0, 1fr) auto; row-gap: clamp(10px, 1.8svh, 18px); min-height: 0; margin-top: clamp(18px, 3.6svh, 44px); }
.histoire[data-histoire-pilote] .salle__tel { grid-row: span 2; grid-template-rows: subgrid; min-height: 0; }
.histoire[data-histoire-pilote] .salle__voir { height: auto; min-height: 0; }
.histoire[data-histoire-pilote] .salle__note { max-width: 34ch; }
.module__note {
  margin: 18px 0 0; text-align: center;
  font-family: var(--neue); font-size: 13px; line-height: 1.45; color: var(--n3);
}

/* LE CURSEUR. Un vrai <input type="range"> : clavier, lecteur d'ecran
   et toucher sont fournis par le navigateur. La piste se remplit jusqu'au
   pouce (--plein), en encre — en rouge quand la mesure touche le haut. */
.curseur {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 36px; margin: 0; background: transparent; cursor: pointer;
  --plein: 0%; --remplir: var(--encre);
  touch-action: pan-y;
}
.curseur:focus { outline: none; }
.curseur::-webkit-slider-runnable-track {
  height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--remplir) 0 var(--plein), #dedee6 var(--plein) 100%);
}
.curseur::-moz-range-track { height: 6px; border-radius: 3px; background: #dedee6; }
.curseur::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--remplir); }
.curseur::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; margin-top: -11px; border: 0; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 .5px rgba(13, 14, 24, .14), 0 2px 6px rgba(13, 14, 24, .18), 0 6px 16px rgba(13, 14, 24, .10);
  transition: transform 160ms var(--e);
}
.curseur::-moz-range-thumb {
  width: 28px; height: 28px; border: 0; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 .5px rgba(13, 14, 24, .14), 0 2px 6px rgba(13, 14, 24, .18), 0 6px 16px rgba(13, 14, 24, .10);
}
.curseur:active::-webkit-slider-thumb { transform: scale(1.1); }
.curseur:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--bleu), 0 2px 6px rgba(13, 14, 24, .18); }
.curseur:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--bleu), 0 2px 6px rgba(13, 14, 24, .18); }

/* ============================================================
   A. LA SURCHARGE, SUR GRIS. La regle du film, qui se joue toute seule
   quand sa carte arrive : la carte des series et la barre ou glissent
   les disques. Tout y est une fonction de t, le temps du film. Les
   cotes de la carte sont celles du film, en unites --u (1 unite = 1 px
   du film a 1920 de large), posees par le script.

   CE QUI EST ECRIT ICI, C'EST L'ARRIVEE : la carte au moment ou la
   charge monte, en flux, sans barre. Le script pose la barre, et la
   carte (data-histoire-pilote) ou le curseur des seances (sans pilote).
   ============================================================ */
.surcharge { position: relative; background: var(--gris); --u: .6px; }
.surcharge__colle {
  position: relative; box-sizing: border-box;
  padding: clamp(64px, 10svh, 96px) 0;
}
.histoire[data-histoire-pilote] .surcharge__colle {
  height: 100svh; overflow: hidden; display: grid;
  /* LA BARRE DU HAUT EST RESERVEE, LE RESTE EST SYMETRIQUE. Il y
     avait quarante pixels d'air en plus sous la barre et trente-quatre
     seulement en bas : le bloc entier paraissait pose trop bas. Ce qui
     doit etre reserve, c'est la hauteur de la barre — pas davantage. */
  /* LA BARRE DU HAUT EST RESERVEE, LE RESTE EST SYMETRIQUE : le meme
     air sous la barre fixe qu'au bas de l'ecran. */
  padding-top: calc(var(--barre-bas) + clamp(10px, 1.8svh, 20px));
  padding-bottom: clamp(10px, 1.8svh, 20px);
}
.surcharge__toile { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.surcharge__grille {
  position: relative; width: min(1240px, calc(100% - 2 * var(--marge))); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(26px, 5svh, 44px);
}
.histoire[data-histoire-pilote] .surcharge__grille {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: minmax(0, 1fr) auto;
  /* LE HAUT, PAS LE MILIEU. La rangee du haut prend tout ce qui reste
     (`1fr`) et la barre tient le bas : en centrant son contenu dedans,
     la moitie du jeu partait AU-DESSUS du titre et l'autre entre la
     carte et la barre — cent quinze pixels d'air en haut contre
     trente-trois en bas. Cale en haut, le jeu se retrouve entier la
     ou il se voit le moins : entre la carte et la barre. */
  align-items: start; column-gap: clamp(24px, 4vw, 72px); row-gap: clamp(8px, 2svh, 24px); min-height: 0;
}
/* La barre entiere, sur toute la mesure : sa rangee a elle, sous le texte
   et la carte. Le script en fixe la hauteur (--zone) et la dessine. */
.surcharge__barre { height: var(--zone, 180px); }
.histoire[data-histoire-pilote] .surcharge__barre { grid-column: 1 / -1; }
.surcharge__dire { position: relative; z-index: 2; min-width: 0; }
.surcharge__voir { position: relative; z-index: 1; min-width: 0; }
.histoire[data-histoire-pilote] .surcharge__voir { height: 100%; min-height: 0; }

/* La carte : blanche, a peine cernee, l'ombre de l'app. Elle grandit
   vers le haut quand le bandeau s'ouvre : son bas ne bouge pas. */
.surcharge__carte {
  position: relative; margin: 0 auto; box-sizing: border-box;
  width: calc(760 * var(--u)); padding: calc(38 * var(--u));
  background: #fff; border-radius: calc(40 * var(--u));
  box-shadow: 0 calc(2 * var(--u)) calc(5 * var(--u)) rgba(13, 14, 24, .07), 0 0 0 1px rgba(13, 14, 24, .05);
  transform-origin: 50% 62%;
  font-family: var(--etroite); font-weight: 700;
}
.histoire[data-gauchi] .surcharge__carte { position: absolute; margin: 0; }
.surcharge__haut {
  display: flex; justify-content: space-between; align-items: center; height: calc(30 * var(--u));
  font-size: calc(26 * var(--u)); line-height: 1; letter-spacing: calc(2.2 * var(--u));
  text-transform: uppercase; color: rgba(13, 14, 24, .36); white-space: nowrap;
}
/* Le numero de la seance roule : l'ancien sort par le haut, le nouveau
   entre par le bas. */
.surcharge__n {
  display: inline-grid; overflow: hidden; vertical-align: baseline;
  min-width: calc(.62 * 26 * var(--u)); padding-block: calc(.12 * 26 * var(--u)); margin-block: calc(-.12 * 26 * var(--u));
  color: var(--encre);
}
.surcharge__n i { grid-area: 1 / 1; text-align: right; font-style: normal; letter-spacing: 0; }

/* Le bandeau de l'app, tel quel : boite claire, titre rouge en
   capitales, phrase grise dessous. Il se decouvre par le bas. */
.surcharge__bandeau { position: relative; height: calc(168 * var(--u)); overflow: hidden; }
.surcharge__bandeau > div {
  position: absolute; left: 0; right: 0; bottom: calc(31 * var(--u)); height: calc(116 * var(--u));
  box-sizing: border-box; padding: calc(17 * var(--u)) calc(26 * var(--u)) 0;
  border-radius: calc(18 * var(--u)); background: #e8edff;
}
.surcharge__bandeau b {
  display: block; font-size: calc(33 * var(--u)); line-height: calc(40 * var(--u));
  letter-spacing: calc(2 * var(--u)); text-transform: uppercase; color: var(--l3); white-space: nowrap;
}
.surcharge__bandeau span {
  display: block; margin-top: calc(4 * var(--u)); font-weight: 400;
  font-size: calc(33 * var(--u)); line-height: calc(40 * var(--u)); color: rgba(13, 14, 24, .56); white-space: nowrap;
}

/* Les douze crans : un creux gris, son chiffre ; le niveau monte du
   bas du cran, en encre, et le chiffre blanchit sous lui. */
.surcharge__crans {
  display: grid; grid-template-columns: repeat(4, calc(160 * var(--u)));
  justify-content: space-between; row-gap: calc(13 * var(--u));
}
.surcharge__cran {
  position: relative; display: grid; place-items: center; height: calc(112 * var(--u));
  border-radius: calc(16 * var(--u));
  background: linear-gradient(rgba(13, 14, 24, .09), rgba(13, 14, 24, 0) calc(10 * var(--u))), #dbdbe3;
  font-style: normal; font-size: calc(44 * var(--u)); line-height: 1; color: rgba(13, 14, 24, .36);
  font-variant-numeric: tabular-nums;
}
.surcharge__cran em {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit;
  font-style: normal; color: #fff; background: var(--plein, var(--encre));
  clip-path: inset(calc((1 - var(--f, 1)) * 100%) 0 0 0);
}
/* L'arrivee : la quatrieme seance, le plafond rouge. */
.surcharge__cran[data-j="2"] em { --plein: var(--l3); }
.surcharge__s {
  display: grid; grid-template-columns: repeat(4, calc(160 * var(--u))); justify-content: space-between;
  height: calc(46 * var(--u)); align-items: end; text-align: center;
  font-size: calc(26 * var(--u)); line-height: 1; letter-spacing: calc(2.2 * var(--u)); color: rgba(13, 14, 24, .36);
}

/* Sans pilote, on fait defiler les seances au doigt. */
.surcharge__lecture { display: none; width: min(540px, calc(100% - 2 * var(--marge))); margin: clamp(18px, 3svh, 28px) auto 0; }
.histoire[data-gauchi]:not([data-histoire-pilote]) .surcharge__lecture { display: block; }
.surcharge__lecture .module__note { margin-top: 10px; }

/* ============================================================
   LES DETAILS. Le carrousel entre 03 et 04 : des cartes blanches
   sur gris, qu'on fait defiler a l'horizontale. Chacune dit UNE petite
   chose que l'app fait a ta place, avec un visuel hors de l'ecran.
   La premiere carte s'aligne sur la grille ; la file deborde a droite,
   ce qui dit qu'il y a une suite.
   ============================================================ */
.details {
  background: var(--gris); padding-block: clamp(90px, 13svh, 150px) clamp(70px, 10svh, 120px);
  overflow: hidden;
  --gauche: max(var(--marge), calc((100% - 1240px) / 2));
}
/* En grand, le carrousel tient dans son ecran, centre sous la barre. */
.histoire[data-histoire-pilote] .details {
  display: flex; flex-direction: column; justify-content: center;
  padding-block: calc(var(--barre-bas) + clamp(10px, 2svh, 24px)) clamp(14px, 3svh, 30px);
}
.details__tete { width: min(1240px, calc(100% - 2 * var(--marge))); margin-inline: auto; }
.details .h2 { font-size: clamp(34px, 4.2vw, 60px); max-width: 18ch; }
.details__piste {
  list-style: none; margin: clamp(32px, 5svh, 56px) 0 0; padding: 6px var(--gauche) 26px;
  display: flex; gap: clamp(14px, 1.6vw, 22px);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gauche);
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.details__piste::-webkit-scrollbar { display: none; }
.details__piste:focus-visible { outline: 2px solid var(--bleu); outline-offset: -2px; border-radius: 30px; }
.detail { flex: 0 0 clamp(280px, 27vw, 372px); min-width: 0; scroll-snap-align: start; }
.detail__in {
  box-sizing: border-box; height: clamp(470px, 40vw, 540px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--blanc); border-radius: 28px; padding: 30px 28px 28px;
}
/* En grand, le carrousel tient dans son ecran : le titre sur une ligne,
   les cartes prennent ce qui reste (le haut, le titre, les commandes :
   environ 290 px), sans descendre sous ce que leur contenu demande. */
.histoire[data-histoire-pilote] .details .h2 { max-width: none; }
.histoire[data-histoire-pilote] .detail__in { height: clamp(400px, calc(100svh - 290px), 540px); }
.histoire[data-histoire-pilote] .details__piste { margin-top: clamp(20px, 4svh, 48px); }
.detail__t {
  margin: 10px 0 0; font-family: var(--neue); font-weight: 600;
  font-size: clamp(22px, 1.9vw, 27px); line-height: 1.12; letter-spacing: -.025em; text-wrap: balance;
}
.detail__dit { margin: 10px 0 0; font-family: var(--neue); font-size: 15px; line-height: 1.45; color: var(--n2); text-wrap: pretty; }
.detail__vis { flex: 1; min-height: 0; display: grid; place-items: center; margin-top: 18px; }
.details__cmd {
  width: min(1240px, calc(100% - 2 * var(--marge))); margin: 4px auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.details__points { display: flex; gap: 2px; }
.details__points button {
  appearance: none; border: 0; padding: 0; margin: 0; background: none; cursor: pointer;
  width: 26px; height: 26px; display: grid; place-items: center;
}
.details__points button::before {
  content: ''; width: 8px; height: 8px; border-radius: 99px; background: rgba(13, 14, 24, .22);
  transition: width 300ms var(--e), background 300ms var(--e);
}
.details__points button[aria-current="true"]::before { width: 22px; background: var(--encre); }
.details__points button:focus-visible { outline: 2px solid var(--bleu); outline-offset: 0; border-radius: 99px; }
.details__fleches { display: flex; gap: 10px; }
/* La fleche ronde du site : blanche sur le gris, encre au survol. */
.details__fleche {
  appearance: none; border: 0; margin: 0; cursor: pointer;
  width: 46px; height: 46px; border-radius: 999px; display: grid; place-items: center;
  background: var(--blanc); color: var(--encre);
  transition: background 220ms var(--e), color 220ms var(--e), opacity 220ms var(--e), transform 220ms var(--e);
}
.details__fleche svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .details__fleche:hover { background: var(--encre); color: var(--blanc); } }
.details__fleche:active { transform: scale(.95); }
.details__fleche:disabled { opacity: .35; cursor: default; background: var(--blanc); color: var(--encre); transform: none; }
.details__fleche:focus-visible { outline: 2px solid var(--bleu); outline-offset: 2px; }

/* --- Les visuels. Des morceaux de l'app, redessines en grand : leurs
   couleurs sont celles des captures (le jaune du repos, l'or des records,
   le bleu de ce qu'on touche). Ils jouent une fois, quand la carte est vue,
   a l'allure du recit (30 % plus vite que les premieres maquettes). --- */
.v-log { width: 100%; box-sizing: border-box; background: #f0effd; border-radius: 22px; padding: 18px; display: grid; gap: 12px; position: relative; }
.v-log__set { font-family: var(--neue); font-weight: 700; font-size: 14px; color: var(--bleu); }
.v-log__set span { font-weight: 600; font-size: 12px; margin-left: 4px; }
.v-log__pas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v-pas { display: grid; justify-items: center; gap: 2px; padding: 12px 0 10px; border-radius: 999px; background: #dbdbe2; }
.v-pas b { font-family: var(--neue); font-weight: 500; font-size: 28px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.v-pas small { font-family: var(--etroite); font-weight: 700; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--n3); }
.v-pas--rouge b { color: var(--l3); }
.v-log__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: 999px;
  background: var(--bleu); color: #fff; font-family: var(--neue); font-weight: 600; font-size: 17px;
}
.v-log__ok {
  position: absolute; top: -12px; right: -10px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bleu); color: #fff; font-size: 19px;
  box-shadow: 0 0 0 4px var(--blanc); transform: scale(0); opacity: 0;
}
.detail[data-detail-vu] .v-log__btn { animation: appui 400ms var(--e) 540ms both; }
.detail[data-detail-vu] .v-log__ok { animation: pastille 400ms var(--e) 885ms both; }
@keyframes appui { 0% { transform: none; } 40% { transform: scale(.95); filter: brightness(.9); } 100% { transform: none; } }
@keyframes pastille { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

.v-repos { width: 100%; box-sizing: border-box; background: #e5c156; border-radius: 26px; padding: 22px 20px 20px; display: grid; gap: 18px; }
.v-repos__t b { display: block; font-family: var(--neue); font-weight: 600; font-size: 54px; line-height: 1; letter-spacing: -.03em; color: var(--encre); font-variant-numeric: tabular-nums; }
.v-repos__t small { display: block; margin-top: 4px; font-family: var(--neue); font-size: 14px; color: rgba(13, 14, 24, .66); }
.v-repos__b { display: flex; justify-content: space-between; gap: 8px; }
.v-repos__b span {
  flex: 1; display: grid; place-items: center; height: 52px; border-radius: 999px;
  background: #eacf76; font-family: var(--neue); font-weight: 600; font-size: 15px; color: var(--encre);
}
.v-repos__b .blanc { background: #fff; }

.v-sugg { width: 100%; box-sizing: border-box; display: grid; gap: 10px; padding: 14px; border-radius: 26px; background: #e6e6ed; }
.v-sugg__p {
  position: relative; overflow: hidden; display: grid; gap: 4px; padding: 16px 20px; border-radius: 999px; background: #fff;
  font-family: var(--neue); color: #a5a6a9;
}
.v-sugg__p b { position: relative; font-weight: 600; font-size: 17px; letter-spacing: .02em; }
.v-sugg__p small { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: 12.5px; }
.v-sugg__p small span { white-space: nowrap; }
.v-sugg__p small i { font-style: normal; font-weight: 600; padding: 2px 7px; border-radius: 99px; background: rgba(255, 255, 255, .22); margin-right: 6px; }
.v-sugg__p--on { color: #fff; border-radius: 26px; }
.v-sugg__p--on::before { content: ''; position: absolute; inset: 0; background: var(--bleu); border-radius: inherit; transform-origin: left center; transform: scaleX(1); }
.detail[data-detail-vu] .v-sugg__p--on::before { animation: remplit 690ms var(--e) 385ms both; }
@keyframes remplit { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.v-poids { width: 100%; height: auto; overflow: visible; }
.v-poids .pt { fill: rgba(13, 14, 24, .30); }
.v-poids .med { fill: none; stroke: var(--encre); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.v-poids text { font: 700 10.5px/1 var(--etroite); letter-spacing: .14em; text-transform: uppercase; fill: var(--encre); }
.v-poids .leg { fill: var(--n3); }
.detail[data-detail-vu] .v-poids .pt { animation: point 310ms var(--e) both; animation-delay: calc(155ms + var(--i) * 21.5ms); }
.detail[data-detail-vu] .v-poids .med { animation: trace 1075ms var(--e) 540ms both; }
@keyframes point { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes trace { from { stroke-dashoffset: var(--long); } to { stroke-dashoffset: 0; } }
.v-poids .med { stroke-dasharray: var(--long); }

.v-rec {
  width: 100%; box-sizing: border-box; position: relative; overflow: hidden;
  display: grid; gap: 6px; padding: 20px; border-radius: 22px; background: #f4ebd1; box-shadow: inset 0 0 0 1px #e4cc89;
  font-family: var(--neue);
}
.v-rec__badge { justify-self: start; padding: 5px 10px; border-radius: 99px; background: #e4cc89; font-family: var(--etroite); font-weight: 700; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.v-rec__ex { margin-top: 6px; font-weight: 600; font-size: 16px; }
.v-rec__kg { display: flex; align-items: baseline; gap: 8px; }
.v-rec__kg b { font-weight: 600; font-size: 40px; letter-spacing: -.03em; line-height: 1.05; }
.v-rec__kg i { font-style: normal; font-weight: 600; font-size: 15px; }
.v-rec__prev { font-size: 13px; color: rgba(13, 14, 24, .45); }
.v-rec::after {
  content: ''; position: absolute; inset: -40% auto -40% 0; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: translateX(-160%) skewX(-12deg); pointer-events: none;
}
.detail[data-detail-vu] .v-rec::after { animation: eclat 1000ms var(--e) 460ms both; }
@keyframes eclat { from { transform: translateX(-160%) skewX(-12deg); } to { transform: translateX(320%) skewX(-12deg); } }

/* La derniere carte, en encre : la litanie, une derniere fois. */
.detail--nuit .detail__in { background: var(--encre); color: #fff; justify-content: center; }
.v-libre { display: grid; justify-items: start; gap: 10px; color: #fff; }
.v-libre b {
  font-family: 'Play Extra', var(--neue); font-weight: 700; font-variation-settings: 'wdth' 417;
  font-size: clamp(28px, 2.55vw, 37px); letter-spacing: -.12em; line-height: .9;
}
.v-libre span { font-family: var(--etroite); font-weight: 400; font-size: clamp(28px, 2.6vw, 38px); letter-spacing: -.02em; line-height: 1; }

/* ============================================================
   SOUS MILLE PIXELS, ET EN MOUVEMENT REDUIT, LE RECIT SE POSE.
   Les chapitres s'empilent, chacun a son arrivee — la regle du site.
   Les intermedes restent manipulables : ils ne bougent que sous le doigt.
   ============================================================ */
@media (max-width: 999px) {
  .histoire__ch { height: auto; }
  .histoire__colle { position: static; height: auto; padding: clamp(40px, 9svh, 90px) 0 clamp(20px, 4svh, 40px); }
  .histoire__grille { grid-template-columns: minmax(0, 1fr); gap: clamp(26px, 5svh, 44px); }
  .histoire__voir { height: min(124vw, 76svh); }
  /* LE PORTABLE SE MESURE EN LARGEUR ICI. Sa rangee n'a plus de
     hauteur definie — la carte se laisse pousser par son contenu —
     donc `100cqh` vaut zero et le calcul le faisait disparaitre. */
  .histoire__mac .histoire__grille { grid-template-rows: auto auto; }
  .histoire__mac .histoire__voir { container-type: normal; height: auto; }
  .histoire__mac .mac { width: 100%; }
  .appareil--arriere { --xe: 73; }
  .inter { padding-block: clamp(64px, 10svh, 96px); }
  .detail { flex-basis: min(80vw, 320px); }
  /* Les trois ecrans de la salle : une file qu'on fait defiler au doigt,
     qui deborde jusqu'aux bords ; le suivant depasse, ce qui dit la suite. */
  .salle {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--marge)); padding: 4px var(--marge) 8px; scroll-padding-inline: var(--marge);
    scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .salle::-webkit-scrollbar { display: none; }
  .salle__tel { flex: 0 0 min(72vw, 330px); scroll-snap-align: start; }
  .salle__voir { height: min(150vw, 640px, 76svh); }
}
@media (prefers-reduced-motion: reduce) {
  /* Le site donne une milliseconde de transition a TOUT en mouvement
     reduit ; comme transition-property vaut `all` par defaut, chaque
     style que le script pose (une hauteur, une variable) transiterait,
     et une mesure prise aussitot lirait l'ancienne valeur : la barre de
     la regle se dessinait 70 px trop bas. Le recit pose ses etats
     lui-meme : chez lui, rien ne transite. */
  .histoire, .histoire *, .histoire *::before, .histoire *::after,
  .details, .details *, .details *::before, .details *::after { transition-duration: 0s !important; }
  .histoire__ch { height: auto; }
  .histoire__colle { position: relative; }
  .curseur::-webkit-slider-thumb { transition: none; }
  .detail[data-detail-vu] .v-log__btn, .detail[data-detail-vu] .v-log__ok, .detail[data-detail-vu] .v-sugg__p--on::before,
  .detail[data-detail-vu] .v-poids .pt, .detail[data-detail-vu] .v-poids .med, .detail[data-detail-vu] .v-rec::after { animation: none; }
  .v-log__ok { transform: none; opacity: 1; }
  .v-poids .med { stroke-dasharray: none; }
}
