/* Nexa · accueil v2 « Une journée avec Nexa » (page d'accueil « / », voir vercel.json).
   En-tête et pied : nexa-landing.css. Le reste vit sous main.v2 (jetons DA client).
   Par défaut (sans JS, mouvement réduit) : figures statiques dans leur état final.
   html.has-motion : scène collante .stage pilotée par --p0…--p7 (0 → 1) écrites par le JS.
   Aucun état initial masqué hors de .has-motion / .stage ; on n'anime que transform et opacity. */

/* Polices DA auto-hébergées (SIL OFL 1.1) */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/fonts/da/Fredoka-latin.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url('/fonts/da/Nunito-latin.woff2') format('woff2'); }
@font-face { font-family: 'Patrick Hand'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/da/PatrickHand-latin.woff2') format('woff2'); }

/* ---------- Jetons DA utilisés (tokens.css, thème clair) ---------- */
.v2 {
  --da-bg: #faf7f2;
  --da-ink: #141423; --da-ink-2: #3d3b52;
  --da-coral: #e8543a; --da-coral-text: #b83c24;
  --da-violet: #6441bd;
  --da-font-display: 'Fredoka', 'Nunito', ui-rounded, system-ui, sans-serif;
  --da-font-text: 'Nunito', 'Inter', ui-rounded, -apple-system, 'Segoe UI', system-ui, sans-serif;
  --da-font-hand: 'Patrick Hand', 'Segoe Print', 'Bradley Hand', cursive;
  --da-shadow-card: 0 1px 2px rgba(20,20,35,0.04), 0 8px 24px -10px rgba(20,20,35,0.14);
  --da-shadow-float: 0 12px 32px -8px rgba(20,20,35,0.18), 0 2px 6px rgba(20,20,35,0.06);
  --da-ease-out: cubic-bezier(0.22, 1, .36, 1);
  --da-ease-spring: cubic-bezier(0.34, 1.56, .64, 1);

  /* Mobile : la scène collante prend la hauteur de l'écran moins l'en-tête et la place de la carte de
     texte (250 px), pour un téléphone aussi grand que possible (≥ 230 px de large à 390×844). */
  --card-room: 250px;
  --stage-h: clamp(300px, calc(100vh - var(--nav-h, 60px) - var(--card-room)), 560px);
  --stage-h: clamp(300px, calc(100svh - var(--nav-h, 60px) - var(--card-room)), 560px);

  /* Progression : 1 par défaut = état final des figures statiques */
  --p0: 1; --p1: 1; --p2: 1; --p3: 1; --p4: 1; --p5: 1; --p6: 1; --p7: 1;

  display: block;
  overflow-x: clip;
  background: var(--da-bg);
  color: var(--da-ink);
  font-family: var(--da-font-text);
  font-size: 17px;
  line-height: 1.5;
}
/* Écrans courts : carte de texte resserrée (texte ≥ 16 px), plus de place pour le téléphone */
@media (max-height: 760px) {
  .v2 { --card-room: 200px;
    --stage-h: clamp(270px, calc(100vh - var(--nav-h, 60px) - var(--card-room)), 560px);
    --stage-h: clamp(270px, calc(100svh - var(--nav-h, 60px) - var(--card-room)), 560px); }
}

/* Fenêtres calculées depuis --pN (redéclarées sur .stage) */
.v2, .v2 .stage {
  --k1o: clamp(0, var(--p1) / .15, 1);
  --kq: clamp(0, (var(--p1) - .45) / .3, 1);
  --k2o: clamp(0, var(--p2) / .15, 1);
  --kb: clamp(0, (var(--p2) - .8) / .12, 1);
  --kbx: clamp(0, var(--p3) / .1, 1);
  --k8: clamp(0, (var(--p3) - .1) / .25, 1);
  --kc: clamp(0, (var(--p3) - .7) / .25, 1);
  --k4o: clamp(0, var(--p4) / .08, 1);
  --k5m: clamp(0, var(--p5) / .15, 1);
  --k6o: clamp(0, var(--p6) / .12, 1);
  --kbr: clamp(0, var(--p6) / .45, 1);
}

.v2 :focus-visible { outline: 3px solid #141423; outline-offset: 3px; border-radius: 6px; }
.v2 .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.v2-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.story-wrap { background-color: #faf7f2; }

/* ---------- HÉROS ---------- */
.hero2 { position: relative; padding: 28px 20px 12px; max-width: 1200px; margin: 0 auto; }
.hero2-blobs { position: absolute; inset: 0; overflow: clip; pointer-events: none; z-index: 0; }
.hb { position: absolute; }
.hb-1 { width: 220px; height: 220px; right: -70px; top: -50px; transform: rotate(20deg); }
.hero2-text, .fig-hero { position: relative; z-index: 1; }
.kicker { display: inline-block; margin: 0 0 6px; font: 400 24px/1.1 var(--da-font-hand); color: var(--da-coral-text); transform: rotate(-2deg); }
.hero2 h1 { margin: 0; font-family: var(--da-font-display); font-weight: 700; font-size: clamp(40px, 10vw, 76px); line-height: 1.02; letter-spacing: -0.01em; color: var(--da-ink); }
.hero2 h1 .then { display: block; margin-top: .12em; color: var(--da-coral-text); }
.lead2 { margin: 18px 0 10px; max-width: 34em; font-size: 18px; line-height: 1.5; color: var(--da-ink-2); }
.hero-links { display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; }
.hero-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; font-size: 16px; color: var(--da-ink);
  text-decoration: underline; text-decoration-color: rgba(232,84,58,.65); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.hero-links a:hover { text-decoration-color: var(--da-coral); }
.hero-note { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font: 400 22px/1.15 var(--da-font-hand); color: var(--da-violet); }
.hand-arrow { flex: 0 0 auto; transform: rotate(70deg); }

/* ---------- Téléphone en CSS : bande d'état 11cqw + capture 600×1298 ---------- */
.nv-phone { --b: 8px; --ph: 480px; --pw: calc((var(--ph) - 2 * var(--b)) / 2.2733 + 2 * var(--b));
  position: relative; width: var(--pw); height: var(--ph); }
.nv-phone-load, .nv-phone-in { position: absolute; inset: 0; }
.nv-phone-in { border-radius: calc(var(--pw) * .16); background: #141423;
  box-shadow: 0 2px 6px rgba(20,20,35,.08), 0 28px 50px -18px rgba(20,20,35,.38); }
.nv-screen { position: absolute; inset: var(--b); overflow: hidden; container-type: inline-size; isolation: isolate;
  border-radius: calc(var(--pw) * .16 - var(--b)); background: #faf7f2; }
.scr { position: absolute; inset: 0; background: #faf7f2; isolation: isolate; }
.scr.strip-dark { background: #09090a; }
.scr.strip-pro { background: #f4efe6; }
.scr-6 { background: #2a2727; }
.app { position: absolute; left: 0; top: 11cqw; width: 100%; height: calc(100% - 11cqw); }
.app--cover { top: 0; left: -2.54%; width: 105.08%; height: 100%; }
.shot { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.status { position: absolute; left: 0; right: 0; top: 0; z-index: 30; height: 11cqw; display: flex; align-items: center; justify-content: space-between;
  padding: 0 7cqw 0 9cqw; color: #141423; font: 700 4.1cqw/1 var(--da-font-display); font-variant-numeric: tabular-nums; pointer-events: none; }
.status.dark { color: #fff; }
.isl { position: absolute; left: 50%; top: 2.4cqw; width: 25cqw; height: 6.8cqw; margin-left: -12.5cqw; border-radius: 99px; background: #0b0b0c; }
.st-icons { width: 15cqw; height: 3.3cqw; }

/* ---------- Surcouches : % de la capture, tailles en cqw ---------- */
/* Scanner : viseur recouvert à l'identique, notre QR dedans */
.vf { position: absolute; left: 13.59%; top: 34.12%; width: 73.08%; height: 33.77%; background: #09090a; overflow: hidden; }
.vf-in { position: absolute; inset: 2.1%; border-radius: 4.2%; background: #000; }
.vf-qr { position: absolute; left: 50%; top: 50%; width: 64%; aspect-ratio: 1; overflow: hidden; border-radius: 5%;
  transform: translate(-50%, -50%) scale(calc(.8 + .2 * var(--kq))); opacity: var(--kq); }
.vf-qr svg, .mqr svg, .qr-out svg { display: block; width: 100%; height: 100%; }
.vf-line { position: absolute; left: 6%; right: 6%; top: 3%; height: .7cqw; border-radius: 1cqw;
  background: linear-gradient(90deg, transparent, #e8543a 30%, #e8543a 70%, transparent); box-shadow: 0 0 3cqw rgba(232,84,58,.7);
  transform: translateY(calc(var(--kq) * 66cqw)); opacity: min(1, var(--kq) * 20, (1 - var(--kq)) * 20); }
.vf-corners { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 200ms var(--da-ease-out); }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }

/* Mes cartes : 8 cases recouvertes à l'identique */
.disc { position: absolute; left: var(--x); top: var(--y); width: 12.4cqw; height: 12.4cqw; margin: -6.2cqw 0 0 -6.2cqw; border-radius: 50%;
  background: #fff; box-shadow: 0 .4cqw 1.2cqw rgba(20,20,35,.12); display: grid; place-items: center; color: #e8543a; }
.disc svg { width: 49.5%; height: 49.5%; }
.pill-st { position: absolute; right: 10.26%; top: 35.55%; height: 6.67cqw; min-width: 22.6cqw; padding: 0 3.4cqw; border-radius: 99px; background: #fff;
  display: flex; align-items: center; justify-content: center; white-space: nowrap; font: 800 3.75cqw/1 var(--da-font-text); color: #141423; }
.pill-st.is-reward { background: #fddc7a; }
.sparks { position: absolute; left: 60.26%; top: 52.37%; width: 0; height: 0; }
.sparks i { position: absolute; left: -2cqw; top: -2cqw; width: 4cqw; height: 4cqw; opacity: 0; background: #fdc549;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.sparks i:nth-child(even) { background: #3db5a0; }
.circle { position: absolute; left: 1.5%; top: 31%; width: 97%; height: 37%; overflow: visible; }
.circle path { stroke-dasharray: 101px; stroke-dashoffset: calc((1 - var(--kc)) * 101px); }

/* Accueil du soir */
.veil { position: absolute; inset: 0; z-index: 2; background: rgba(20,20,35,.45); }

/* Fiche du salon : « Réserver » */
.book { position: absolute; left: 61.54%; top: 91.47%; width: 33.85%; height: 6.16%; border-radius: 99px; background: #c8432a; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 1.6cqw; font: 800 4.4cqw/1 var(--da-font-text); }
.book svg { width: 5.2cqw; height: 5.2cqw; }

/* Miam */
.feed { position: absolute; inset: 0; }
.dish { position: absolute; left: 0; right: 0; top: 0; height: 100%; overflow: hidden; }
.dish-2 { top: 100%; }
.heart { position: absolute; left: 90.77%; top: 61.61%; width: 11.86cqw; height: 11.86cqw; margin: -5.93cqw 0 0 -5.93cqw; border-radius: 50%;
  background: #fff; display: grid; place-items: center; }
.heart svg { width: 58%; height: 58%; }

/* Tableau du commerçant */
.pulse-ring { position: absolute; left: 5.13%; top: 12.32%; width: 89.74%; height: 9%; border-radius: 6.4cqw; opacity: 0; }
.promo-ring { position: absolute; left: 3.2%; top: 31.6%; width: 93.6%; height: 10.4%; overflow: visible; }
.promo-ring rect { stroke-dasharray: 101px; stroke-dashoffset: 0; }

/* Notifications, plus larges que le téléphone */
.note-card { position: absolute; left: -14px; right: -14px; top: 6%; z-index: 40; display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 22px; background: rgba(255,255,255,.97); color: #141423;
  box-shadow: 0 16px 32px -12px rgba(20,20,35,.4), 0 2px 6px rgba(20,20,35,.08); text-align: left; }
.nc-icon { flex: 0 0 34px; height: 34px; border-radius: 10px; background: #e8543a; color: #fff; display: grid; place-items: center; }
.nc-icon svg { width: 20px; height: 20px; }
.nc-icon--plus { background: #c8432a; font: 700 15px/1 var(--da-font-display); }
.nc-txt { display: flex; flex-direction: column; min-width: 0; }
.nc-app { font-size: 14px; line-height: 1.3; font-weight: 700; color: #676572; }
.nc-t { font-size: 16px; line-height: 1.25; font-weight: 800; }
.nc-b { font-size: 16px; line-height: 1.3; color: #3d3b52; }

/* ---------- Mode statique (sans JS ou mouvement réduit) ---------- */
.stage { display: none; }
.scene { position: relative; max-width: 1100px; margin: 0 auto; padding: 32px 20px; }
.scene-text { max-width: 560px; margin: 0 auto; }
.scene-text h2 { margin: 0 0 8px; font-family: var(--da-font-display); font-weight: 600; font-size: clamp(26px, 6.6vw, 40px); line-height: 1.08;
  letter-spacing: -0.005em; color: var(--da-ink); }
.when { display: block; margin-bottom: 4px; font: 700 18px/1.2 var(--da-font-display); font-variant-numeric: tabular-nums; color: var(--da-coral-text); }
.scene-text p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--da-ink-2); }
.hl { position: relative; white-space: nowrap; }
.ul { position: absolute; left: -2%; bottom: -.2em; width: 104%; height: .34em; overflow: visible; transform-origin: 0 50%; pointer-events: none; }
.fig { display: flex; justify-content: center; margin: 22px 0 0; }
.nv-phone--static { --ph: 480px; }
@media (min-width: 960px) {
  .hero2, .scene { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 56px; }
  .hero2 { padding: 64px 40px 32px; }
  .scene { padding: 40px; }
  .scene-text { margin: 0; }
  .fig { margin: 0; }
  .nv-phone--static { --ph: 540px; --b: 10px; }
}

/* ---------- MODE ANIMÉ (html.has-motion) ---------- */
.has-motion .fig { display: none; }
.has-motion .story { position: relative; background-color: inherit; }
.has-motion .stage { display: block; position: sticky; top: var(--nav-h); z-index: 5; height: var(--stage-h); background-color: inherit; }
.stage-clip { position: absolute; inset: 0; overflow: hidden; overflow: clip; }
.has-motion .scene { max-width: none; padding: 0 16px 10px; min-height: calc(var(--h) * .85vh); scroll-margin-top: calc(var(--nav-h) + var(--stage-h)); }
/* Mobile : 10 px sous chaque carte (= l'écart entre la scène collante et la carte collée) : quand la carte
   suivante se pose, la précédente est entièrement passée sous la scène (le JS l'efface en sortant). */
.has-motion .scene-text { position: sticky; z-index: 1; top: calc(var(--nav-h) + var(--stage-h) + 10px); max-width: 560px;
  padding: 14px 18px 16px; border-radius: 24px; background: #faf7f2; box-shadow: var(--da-shadow-card); }
.has-motion .scene-text h2 { font-size: clamp(24px, 6.4vw, 30px); }
.has-motion .when { font-size: 17px; }
.has-motion .hero2 { padding: 22px 20px 14px; }
.has-motion .hero-note { margin-top: 2px; }
.has-motion .ul { transform: scaleX(0); transition: transform 420ms var(--da-ease-out); }
.story.t2pose #cachet .ul, .story.r4 #ce-soir .ul { transform: none; }

/* ---------- Disposition de la scène ---------- */
.blobs { position: absolute; inset: 0; z-index: 1; }
.sb { position: absolute; }
.sb-1 { width: 62%; right: -16%; top: -8%; }
.sb-2 { width: 46%; left: -20%; top: 34%; }
.sb-3 { width: 52%; right: -10%; bottom: -14%; }
.stage .nv-phone { position: absolute; z-index: 4; left: calc(50% - var(--pw) / 2); top: calc(50% - var(--ph) / 2); --b: 7px; --ph: calc(var(--stage-h) - 16px); transform-origin: 50% 50%; }
.stage.live .nv-phone, .stage.live .mphone, .stage.live .flyer, .stage.live .qr-out { will-change: transform, opacity; }

/* Arrivée au chargement : le téléphone monte de 24 px et se redresse (le JS tient −1°) */
.has-motion .stage .nv-phone-load { animation: v2-rise 600ms var(--da-ease-out) both; }
@keyframes v2-rise { from { opacity: 0; transform: translateY(24px) rotate(-3deg); } to { opacity: 1; transform: none; } }
.blink i { position: absolute; left: var(--x); top: 23.7%; width: 4.4cqw; height: 4.4cqw; margin: -2.2cqw 0 0 -2.2cqw; color: #e8543a; opacity: 0;
  animation: v2-blink 380ms ease-out both; }
.blink i svg { width: 100%; height: 100%; display: block; }
.blink i:nth-child(1) { animation-delay: 650ms; } .blink i:nth-child(2) { animation-delay: 710ms; } .blink i:nth-child(3) { animation-delay: 770ms; }
.blink i:nth-child(4) { animation-delay: 830ms; } .blink i:nth-child(5) { animation-delay: 890ms; } .blink i:nth-child(6) { animation-delay: 950ms; }
@keyframes v2-blink { 0% { opacity: 0; transform: scale(.8); } 45% { opacity: 1; transform: scale(1.45); } 100% { opacity: 0; transform: scale(1); } }

/* ---------- Écrans visibles selon la scène active (data-s) ---------- */
.stage .scr { opacity: 0; }
.stage[data-s="0"] .scr-0, .stage[data-s="1"] .scr-0 { opacity: 1; }
.stage[data-s="1"] .scr-1 { opacity: var(--k1o); transform: scale(calc(.9 + .1 * var(--k1o))); transform-origin: 50% 94%; }
.stage[data-s="2"] .scr-1 { opacity: 1; }
.stage[data-s="2"] .scr-2 { opacity: var(--k2o); }
.stage[data-s="3"] .scr-2, .stage[data-s="4"] .scr-2 { opacity: 1; }
.stage[data-s="4"] .scr-3 { opacity: var(--k4o); }
.stage[data-s="5"] .scr-3 { opacity: 1; }
.stage[data-s="4"] .scr-4 { opacity: 1; transform: translateY(101%); transition: transform 360ms var(--da-ease-out) 120ms; }
.story.t4tap .stage[data-s="4"] .scr-4 { transform: none; }
.stage[data-s="5"] .scr-4 { opacity: 1; }
.stage[data-s="5"] .scr-5 { opacity: 1; transform: translateX(101%); transition: transform 360ms var(--da-ease-out); }
.story.t5tap .stage[data-s="5"] .scr-5 { transform: none; }
.stage[data-s="6"] .scr-5 { opacity: 1; }
.stage[data-s="6"] .scr-6 { opacity: var(--k6o); }
.stage[data-s="7"] .scr-6 { opacity: 1; }
.story.t7flip .stage[data-s="7"] .scr-7 { opacity: 1; }

/* Scène 1 : le QR entre dans le viseur, puis l'éclair */
.story.t1flash .stage .vf-corners { transform: scale(.95); }
.story.t1flash .stage[data-s="1"] .flash { animation: v2-flash 240ms ease-out; }
.story.t1flash .stage[data-s="1"] .nv-phone-in { animation: v2-shake 240ms linear; }
@keyframes v2-flash { 0% { opacity: 0; } 35% { opacity: .6; } 100% { opacity: 0; } }
@keyframes v2-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-2px); } 50% { transform: translateX(2px); } 75% { transform: translateX(-1px); } }

/* Scène 2 : la pose de 320 ms (écrasement, étincelles, pastille) */
.stage .disc { opacity: 0; }
.story.t2pose .stage .d7 { opacity: 1; animation: v2-squash 320ms var(--da-ease-spring); }
@keyframes v2-squash { 0% { transform: scale(1.18, .86); } 100% { transform: none; } }
.story.t2pose .stage[data-s="2"] .sparks i { animation: v2-spark 520ms ease-out both; }
@keyframes v2-spark { 0% { opacity: 0; transform: rotate(var(--a)) translateX(2cqw) scale(.3); } 30% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(15cqw) scale(1); } }
.stage .pill-st { opacity: 0; transform: scale(.6); transform-origin: 100% 50%; transition: opacity 160ms, transform 320ms var(--da-ease-spring); }
.stage .pill-st .pl0 { display: none; }
.story.t2pose .stage .pill-st { opacity: 1; transform: none; }
.story.t3bounce .stage .pill-st { background: #fddc7a; }
.story.t3bounce .stage .pill-st .pl1 { display: none; }
.story.t3bounce .stage .pill-st .pl0 { display: inline; }

/* Scène 3 : le 8e cachet, la vague, le cercle */
.stage[data-s="3"] .disc, .stage[data-s="4"] .disc { opacity: 1; }
.stage[data-s="3"] .d8 { opacity: var(--k8); transform: translateY(calc((var(--k8) - 1) * 16px)); }
.story.t3bounce .stage[data-s="3"] .d8 { animation: v2-bounce 320ms var(--da-ease-spring); }
@keyframes v2-bounce { 0% { transform: scale(1.2, .84); } 100% { transform: none; } }
.story.t3wave .stage[data-s="3"] .disc svg { animation: v2-wave 360ms ease-in-out both; animation-delay: calc(var(--i) * 40ms); }
@keyframes v2-wave { 0%, 100% { transform: none; } 50% { transform: rotate(45deg) scale(1.12); } }
.stage .circle { opacity: 0; }
.stage[data-s="3"] .circle { opacity: 1; }

/* Notifications */
.stage .note-card { opacity: 0; transform: translateY(-120%); pointer-events: none; }
.stage[data-s="2"] .toast { opacity: var(--kb); transform: translateY(calc((var(--kb) - 1) * 70%)); }
.stage[data-s="3"] .toast { opacity: calc(1 - var(--kbx)); transform: none; }
.stage .nt-reward, .stage .nt-soir { transition: transform 420ms var(--da-ease-spring), opacity 180ms; }
.story.t3notif .stage[data-s="3"] .nt-reward { opacity: 1; transform: none; }
.story.r4 .stage[data-s="4"] .nt-soir { opacity: 1; transform: none; }
.story.r4.t4tap .stage[data-s="4"] .nt-soir { animation: v2-tapout 420ms ease-in forwards; }
@keyframes v2-tapout { 0% { transform: none; opacity: 1; } 35% { transform: scale(.97); opacity: 1; } 100% { transform: scale(.97) translateY(-24%); opacity: 0; } }
.story.r4 .stage[data-s="4"] .nv-phone-in { animation: v2-buzz 200ms linear 2; }
@keyframes v2-buzz { 0%, 100% { transform: none; } 25% { transform: rotate(1.5deg); } 75% { transform: rotate(-1.5deg); } }

/* Scène 5 : le quartier */
.map { position: absolute; inset: 0; z-index: 2; opacity: 0; }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage[data-s="5"] .map { opacity: var(--k5m); transform: scale(calc(.96 + .04 * var(--k5m))); }
.stage[data-s="6"] .map { opacity: calc(1 - var(--k6o)); }
.toi { position: absolute; left: 50%; top: 11%; width: 0; height: 0; }
.toi-dot, .toi::after { position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%; }
.toi-dot { z-index: 1; background: #6441bd; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(20,20,35,.25); }
.toi::after { content: ''; background: rgba(100,65,189,.35); opacity: 0; }
.stage[data-s="5"] .toi::after { animation: v2-ping 1.4s ease-out 3; }
@keyframes v2-ping { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
.pin { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; }
.pin-1 { --x: 17%; --y: 30%; } .pin-2 { --x: 83%; --y: 26%; } .pin-3 { --x: 30%; --y: 9%; }
.pin-4 { --x: 85%; --y: 56%; } .pin-5 { --x: 14%; --y: 58%; } .pin-6 { --x: 70%; --y: 7%; }
.pin-7 { --x: 15%; --y: 85%; } .pin-8 { --x: 86%; --y: 84%; } .pin-9 { --x: 9%; --y: 6%; }
.pin-disc { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 2.5px solid #fff;
  display: grid; place-items: center; box-shadow: 0 6px 14px -4px rgba(20,20,35,.3); transform: scale(0); transition: transform 200ms var(--da-ease-spring); }
.pin-disc svg { width: 28px; height: 28px; }
.tone-peach .pin-disc { background: #ffdcc4; } .tone-pink .pin-disc { background: #fdd2d4; }
.tone-mint .pin-disc { background: #cdf4e4; } .tone-lav .pin-disc { background: #eacdfc; }
.pin::before { content: ''; position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border-radius: 50%; border: 2px solid rgba(232,84,58,.55); opacity: 0; }
.pin-pct { position: absolute; left: 8px; top: -32px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 99px; background: #c8432a; color: #fff;
  font: 800 14px/24px var(--da-font-text); text-align: center; transform: scale(0); transition: transform 200ms var(--da-ease-spring) 100ms; }
.pin.on .pin-disc, .pin.on .pin-pct { transform: none; }
.pin.on::before { animation: v2-halo 520ms ease-out; }
@keyframes v2-halo { 0% { opacity: 1; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.6); } }
.tap { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; background: rgba(20,20,35,.28); opacity: 0; }
.story.t5tap .stage[data-s="5"] .pin-4 .tap { animation: v2-tap 520ms ease-out; }
@keyframes v2-tap { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.8); } }
.stage .book { opacity: 0; }
.story.t5book .stage[data-s="5"] .book { opacity: 1; transform: scale(.96); background: #a83a24; transition: transform 160ms ease-out; }

/* Scène 6 : Miam */
.stage .feed { transition: transform 320ms var(--da-ease-out); }
.stage .dish-1 .shot { transform: scale(calc(1.03 - .03 * var(--kbr))); }
.story.t6next .stage .feed { transform: translateY(-100%); }
.stage .heart { opacity: 0; }
.story.t6like .stage .heart { opacity: 1; animation: v2-heart 420ms var(--da-ease-spring); }
@keyframes v2-heart { 0% { transform: scale(1); } 45% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* Scène 7 : derrière le comptoir */
.story.t7pulse .stage[data-s="7"] .pulse-ring { opacity: 1; animation: v2-pulse 700ms ease-out 2; }
@keyframes v2-pulse { 0% { box-shadow: 0 0 0 0 rgba(232,84,58,.6); } 100% { box-shadow: 0 0 0 4cqw rgba(232,84,58,0); } }
.stage .promo-ring rect { stroke-dashoffset: 101px; transition: stroke-dashoffset 420ms ease-out; }
.story.t7ring .stage .promo-ring rect { stroke-dashoffset: 0; }

/* ---------- Téléphone du commerçant, astérisque en vol, QR qui sort ---------- */
.mphone { --mw: 92px; position: absolute; z-index: 6; right: -4%; top: 16%; width: var(--mw); height: calc(var(--mw) * 2.05);
  border-radius: 20px; background: #141423; opacity: 0; box-shadow: 0 18px 36px -14px rgba(20,20,35,.45); }
.mscreen { position: absolute; inset: 5px; border-radius: 15px; overflow: hidden; background: #0e0e10; }
.mshot { position: absolute; left: 0; right: 0; top: 20%; aspect-ratio: 320 / 283; }
.mshot img { display: block; width: 100%; height: 100%; }
.mqr { position: absolute; left: 19.74%; top: 27.54%; width: 60.51%; height: 68.41%; padding: 5%; border-radius: 9%; background: #fff; overflow: hidden; }
.flyer { position: absolute; z-index: 8; left: 0; top: 0; width: 400px; height: 400px; color: #e8543a; opacity: 0; pointer-events: none; transform-origin: 50% 50%; }
.flyer svg { display: block; width: 100%; height: 100%; }
.qr-out { position: absolute; z-index: 7; left: 0; top: 0; width: 64px; height: 64px; padding: 5px; border-radius: 12px; background: #fff;
  box-shadow: var(--da-shadow-float); opacity: 0; transform-origin: 50% 50%; }

/* ---------- Annotations manuscrites (aria-hidden, décoratives) ---------- */
.note { position: absolute; z-index: 9; margin: 0; font: 400 22px/1.08 var(--da-font-hand); color: var(--da-violet); opacity: 0;
  transform: translateY(6px) rotate(-4deg); transition: opacity 240ms ease-out, transform 320ms var(--da-ease-spring); pointer-events: none; }
.note-7 { left: 2%; top: 30%; width: 23%; }
.note-offert { right: 3%; top: 22%; width: 22%; text-align: right; }
.note-qr { left: 2%; top: 22%; width: 27%; }
.note-full { right: 3%; bottom: 26px; width: 30%; text-align: right; }
.story.t2pose .stage[data-s="2"] .note-7 { opacity: 1; transform: rotate(-4deg); }
.stage[data-s="3"] .note-offert { opacity: clamp(0, (var(--p3) - .82) * 8, 1); transform: rotate(4deg); }
.story.t7note .stage[data-s="7"] .note-qr { opacity: 1; transform: rotate(-3deg); }
.story.t7full .stage[data-s="7"] .note-full { opacity: 1; transform: rotate(-3deg); }

/* Rail : la page est une carte de fidélité de 8 cases */
.rail { position: absolute; z-index: 9; right: 14px; bottom: 6px; display: flex; gap: 6px; }
.rail i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid #8f8a84; display: grid; place-items: center; color: #e8543a; transition: border-color 200ms; }
.rail svg { width: 13px; height: 13px; opacity: 0; transform: scale(.2); transition: opacity 200ms, transform 320ms var(--da-ease-spring); }
.rail i.on { border-color: transparent; }
.rail i.on svg { opacity: 1; transform: none; }

/* ---------- Ordinateur (≥ 960 px) : textes à gauche, téléphone collant à droite ---------- */
@media (min-width: 960px) {
  .has-motion .story { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); column-gap: 56px; max-width: 1240px; margin: 0 auto; padding: 0 40px; }
  .has-motion .hero2 { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - var(--nav-h)); padding: 40px 0; margin: 0; max-width: none; }
  .has-motion .hero2 h1 { font-size: clamp(44px, 4.6vw, 64px); }
  .has-motion .hero-note { margin-top: 18px; }
  .has-motion .stage { grid-column: 2; grid-row: 1 / span 8; align-self: start; top: var(--nav-h); height: calc(100vh - var(--nav-h)); }
  .has-motion .scene { grid-column: 1; display: block; padding: 0; margin: 0; min-height: calc(var(--h) * 1vh); scroll-margin-top: calc(50vh - 150px); }
  /* Scène 7 : + 50vh, car la colonne collante se décolle quand le bas de la scène touche le bas de l'écran ;
     le JS fait finir la scène à ce moment-là, le rythme de la scène reste celui de 140vh. */
  .has-motion #comptoir { min-height: calc(var(--h) * 1vh + 50vh); padding-bottom: calc(50vh - 140px); }
  /* (la marge basse fait partir la carte de texte avec le téléphone, au moment où il se décolle) */
  .has-motion .scene-text { top: calc(50vh - 110px); max-width: 460px; padding: 24px 28px 26px; }
  .has-motion .scene-text h2 { font-size: clamp(30px, 2.9vw, 40px); }
  .has-motion .scene-text p { font-size: 19px; }
  .has-motion .when { font-size: 20px; }
  .stage .nv-phone { --b: 10px; --ph: min(78vh, 680px); }
  .mphone { --mw: 168px; right: 1%; top: 18%; border-radius: 28px; }
  .mscreen { inset: 7px; border-radius: 21px; }
  .qr-out { width: 104px; height: 104px; padding: 8px; border-radius: 16px; }
  .note { font-size: 26px; }
  .note-7 { left: 3%; top: 38%; width: 22%; }
  .note-qr { left: 1%; top: 30%; width: 24%; }
  .note-full { right: 2%; bottom: 9%; width: 26%; }
  .flyer { width: 600px; height: 600px; }
  .stage-clip { overflow: visible; }
  .sb-1 { width: 58%; right: -14%; top: -6%; }
  .sb-2 { width: 40%; left: 2%; top: 38%; }
  .sb-3 { width: 50%; right: -12%; bottom: -10%; }
  .map { inset: 3% 0 3% 8%; border-radius: 36px; overflow: hidden; box-shadow: var(--da-shadow-card); }
  .has-motion .hero2-blobs { display: none; }
  .rail { left: 0; right: auto; top: 50%; bottom: auto; flex-direction: column; transform: translateY(-50%); }
  .pin-disc { left: -26px; top: -26px; width: 52px; height: 52px; }
  .pin-disc svg { width: 33px; height: 33px; }
  .pin::before { left: -30px; top: -30px; width: 60px; height: 60px; }
  .tap { left: -26px; top: -26px; width: 52px; height: 52px; }
  .note-card { left: -24px; right: -24px; }
}

/* Écrans courts : carte de texte resserrée (texte toujours ≥ 16 px) pour laisser la place au téléphone */
@media (max-width: 959px) and (max-height: 760px) {
  .has-motion .scene { padding-left: 12px; padding-right: 12px; }
  .has-motion .scene-text { padding: 11px 16px 12px; border-radius: 20px; }
  .has-motion .scene-text h2 { margin-bottom: 4px; font-size: 22px; }
  .has-motion .when { margin-bottom: 2px; font-size: 16px; }
  .has-motion .scene-text p { font-size: 16px; line-height: 1.42; }
}

/* Petits écrans (≤ 700 px de haut) : notifications plus compactes pour laisser voir l'écran */
@media (max-width: 959px) and (max-height: 700px) {
  .note-card { left: -30px; right: -30px; top: 4%; padding: 9px 11px; gap: 8px; border-radius: 18px; }
  .nc-icon { flex-basis: 28px; height: 28px; border-radius: 8px; }
  .nc-icon svg { width: 16px; height: 16px; }
  .nc-t { font-size: 15px; }
  .nc-b { font-size: 14px; }
  .nc-app { font-size: 14px; }
}

/* ---------- FIN : CHOISIS TON CÔTÉ ---------- */
.choose { position: relative; padding: 56px 20px 72px; background: #faf7f2; }
.choose-in { max-width: 1040px; margin: 0 auto; }
.choose h2 { margin: 0 0 26px; text-align: center; font-family: var(--da-font-display); font-weight: 600; font-size: clamp(30px, 7vw, 48px); line-height: 1.08; color: var(--da-ink); }
.choose h2 span { display: block; color: var(--da-coral-text); }
.sides { display: grid; gap: 16px; }
.side { border-radius: 28px; padding: 24px 22px 22px; }
.side--client { background: #ffeee2; }
.side--pro { background: #f3e5fd; }
.side h3 { margin: 0 0 8px; font: 600 26px/1.15 var(--da-font-display); color: var(--da-ink); }
.side p { margin: 0 0 18px; font-size: 17px; line-height: 1.5; color: var(--da-ink-2); }
.side-btns { display: flex; flex-direction: column; gap: 10px; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 24px; border-radius: 999px;
  font: 800 16px/1.2 var(--da-font-text); text-align: center; text-decoration: none; transition: background-color .15s; }
.pill svg { width: 18px; height: 18px; flex: 0 0 auto; }
.pill--coral { background: #c8432a; color: #fff; }
.pill--coral:hover { background: #b83c24; }
.pill--line { background: #fff; color: #141423; box-shadow: inset 0 0 0 1.5px #8f8a84; }
.pill--line:hover { box-shadow: inset 0 0 0 2px #141423; }
.pill--ink { background: #141423; color: #fff; }
.pill--ink:hover { background: #2a2a3c; }
.txt-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font-weight: 800; font-size: 16px; color: #6441bd;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
@media (min-width: 760px) {
  .sides { grid-template-columns: 1fr 1fr; gap: 24px; }
  .side { padding: 32px 32px 28px; display: flex; flex-direction: column; }
  .side p { flex: 1; }
  .choose { padding: 80px 40px 96px; }
}

/* Filet de sécurité : rien ne bouge si l'utilisateur réduit les animations. */
@media (prefers-reduced-motion: reduce) {
  .v2 *, .v2 *::before, .v2 *::after { animation: none !important; transition: none !important; }
}
