/* Site Tunilu : une page d'accueil et les pages légales. Couleurs, rayons, espacements et courbes viennent des tokens
   de l'app (tokens.css, généré par npm run build:web) ; ici, seulement la mise en page et les animations. */

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin.woff2") format("woff2");
  font-weight: 500 900;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; position: relative;
  background: var(--bg) var(--site-fond);
  color: var(--ink);
  font-family: var(--font);
  font-weight: var(--w-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-weight: var(--w-strong); line-height: 1.1; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--brand-ink); }
ul { list-style: none; margin: 0; padding: 0; }
strong { font-weight: var(--w-strong); }

.sprites { position: absolute; width: 0; height: 0; overflow: hidden; }
main, .pied { position: relative; z-index: 1; }

/* Décor en parallaxe : taches de couleur floues et notes, derrière le contenu (vitesse : data-vitesse, site.js) */
.decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.tache {
  position: absolute; left: var(--x); top: var(--y); width: var(--t); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 70%, transparent) 0%, transparent 68%);
  will-change: translate;
}
.motif {
  position: absolute; left: var(--x); top: var(--y); font-size: var(--s); font-weight: 900; line-height: 1;
  color: var(--surface); opacity: 0.75; rotate: var(--r); will-change: translate;
  text-shadow: 0 6px 18px rgba(24, 22, 47, 0.12);
}
.conteneur { width: min(1120px, 100% - 2 * var(--space-4)); margin-inline: auto; }
@media (min-width: 720px) { .conteneur { width: min(1120px, 100% - 2 * var(--space-10)); } }

.aller-contenu { position: absolute; left: -999px; top: var(--space-2); z-index: 20; background: var(--surface); padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); }
.aller-contenu:focus { left: var(--space-2); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: var(--radius-xs); }

/* En-tête ------------------------------------------------------------------ */
/* En-tête : capsule de verre (Liquid Glass) qui flotte en haut pendant le défilement, plus étroite que la page */
.entete { position: sticky; top: var(--space-3); z-index: 10; padding: var(--space-3) var(--space-4) 0; }
.entete-ligne.conteneur {
  width: min(960px, 100%); display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4); border-radius: var(--radius-full);
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(1.8); -webkit-backdrop-filter: blur(22px) saturate(1.8);
  box-shadow: var(--shadow-1), inset 0 1px 0 var(--glass-border);
}
.logo { display: inline-flex; align-items: center; gap: var(--space-2); text-decoration: none; }
.logo-lulu { width: 40px; height: 40px; }
.logo-mot { font-size: 1.75rem; font-weight: 900; letter-spacing: 0.01em; line-height: 1; }
.logo-mot span:nth-child(1) { color: var(--logo-1); }
.logo-mot span:nth-child(2) { color: var(--logo-2); }
.logo-mot span:nth-child(3) { color: var(--logo-3); }
.logo-mot span:nth-child(4) { color: var(--logo-4); }
.logo-mot span:nth-child(5) { color: var(--logo-5); }
.logo-mot span:nth-child(6) { color: var(--logo-6); }
.bientot {
  font-size: 0.875rem; font-weight: var(--w-strong); color: var(--brand-ink);
  background: var(--brand-soft); padding: var(--space-3) var(--space-4); border-radius: var(--radius-full); white-space: nowrap;
}
@media (max-width: 420px) { .bientot { display: none; } }

/* Boutons et pastilles ----------------------------------------------------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 52px; padding: 0 var(--space-6); border-radius: var(--radius-full);
  font: inherit; font-weight: var(--w-strong); text-decoration: none; text-align: center;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-out);
}
.bouton:hover { transform: translateY(-2px); }
.bouton:active { transform: scale(0.96); }
.bouton-plein { background: var(--brand-fill); color: var(--on-brand); box-shadow: var(--shadow-brand); }
.bouton-plein[aria-disabled="true"] { cursor: default; }
.bouton-plein[aria-disabled="true"]:hover { transform: none; }
.bouton-doux { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-1); }
.bouton-surface { background: var(--surface); color: var(--brand-ink); box-shadow: var(--shadow-2); }
.pastille {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-1);
  font-size: 0.9375rem; font-weight: var(--w-strong); color: var(--ink);
}

/* Accueil ------------------------------------------------------------------ */
.hero {
  position: relative;
  padding: var(--space-8) 0 var(--space-16);
}

.hero-grille { display: grid; gap: var(--space-12); align-items: center; }
@media (min-width: 960px) { .hero-grille { grid-template-columns: 1.05fr 0.95fr; gap: var(--space-8); } }
.hero-texte { display: grid; gap: var(--space-6); justify-items: start; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 900; }
.surligne { position: relative; color: var(--brand-ink); white-space: nowrap; }
.surligne::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: 0.04em; height: 0.28em; z-index: -1;
  background: var(--surface); border-radius: var(--radius-full); opacity: 0.7;
  transform-origin: left; animation: trait 1s 0.6s var(--ease-out) both;
}
@keyframes trait { from { transform: scaleX(0); } }
.hero-intro { font-size: clamp(1.0625rem, 2.2vw, 1.25rem); color: var(--ink); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* Téléphone de démonstration (écran dessiné, aux couleurs de l'app) */
.telephone-parallaxe { will-change: translate; }
.lulu-hero { will-change: translate; }
.hero-visuel { position: relative; display: flex; justify-content: center; padding-bottom: var(--space-6); }
.telephone {
  width: min(310px, 78vw); aspect-ratio: 310 / 640; padding: 12px; border-radius: 52px;
  background: linear-gradient(145deg, #2a2840, #0e0d1c);
  box-shadow: var(--shadow-2), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  transform: rotate(3deg); animation: flotte-tel 7s var(--ease-soft) infinite alternate;
}
@keyframes flotte-tel { to { transform: rotate(1deg) translateY(-12px); } }
.ecran {
  position: relative; height: 100%; border-radius: 41px; overflow: hidden;
  background: linear-gradient(180deg, var(--moment-matin-haut) 0%, var(--moment-matin-bas) 42%, var(--bg) 100%);
  display: flex; flex-direction: column;
}
.ecran-haut { display: flex; justify-content: space-between; align-items: center; padding: 14px 26px 0; height: 44px; }
.ecran-heure { font-size: 0.8rem; font-weight: 800; color: var(--ink); }
.ilot { position: absolute; left: 50%; top: 11px; width: 92px; height: 27px; margin-left: -46px; border-radius: var(--radius-full); background: #000; }
.ecran-contenu { flex: 1; padding: 6px 16px 0; display: grid; align-content: start; gap: 10px; }
.ecran-bonjour { font-size: 1.35rem; font-weight: 900; color: var(--ink); }
.ecran-bonjour span { display: inline-block; animation: coucou 2.4s ease-in-out infinite; transform-origin: 70% 70%; }
@keyframes coucou { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(16deg); } 20%, 40% { transform: rotate(-8deg); } }
.carte-moment {
  display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius-lg);
  background: var(--g-quotidien); color: var(--g-quotidien-ink); box-shadow: var(--shadow-1);
}
.carte-moment-quand { font-size: 0.7rem; font-weight: 800; opacity: 0.85; }
.carte-moment strong { font-size: 1rem; }
.carte-moment-texte { font-size: 0.72rem; line-height: 1.35; }
.ecran-titre { font-size: 0.8rem; font-weight: 800; color: var(--ink); margin-top: 2px; }
.etagere { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pochette {
  aspect-ratio: 1; border-radius: var(--radius-md); background: var(--g); display: grid; place-items: center;
  font-size: 1.9rem; box-shadow: var(--shadow-1); position: relative; overflow: hidden;
}
.pochette::after { content: ""; position: absolute; inset: 0 0 55% 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0)); }
.ligne-chanson { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-1); }
.ligne-chanson strong { display: block; font-size: 0.74rem; color: var(--ink); line-height: 1.2; }
.ligne-chanson small, .mini-lecteur small { display: block; font-size: 0.64rem; color: var(--ink-2); }
.mini-pochette { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--g); display: grid; place-items: center; font-size: 1.05rem; }
.mini-lecteur {
  margin: 10px; padding: 8px 12px 8px 8px; display: flex; align-items: center; gap: 10px; border-radius: var(--radius-lg);
  background: var(--glass); border: 1px solid var(--glass-border); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow-1);
}
.mini-lecteur-titre { flex: 1; min-width: 0; }
.mini-lecteur-titre strong { display: block; font-size: 0.74rem; color: var(--ink); line-height: 1.2; }
.egaliseur { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.egaliseur i { width: 4px; height: 100%; border-radius: 2px; background: var(--brand); transform-origin: bottom; animation: eq 0.9s ease-in-out infinite alternate; }
.egaliseur i:nth-child(2) { animation-delay: -0.3s; }
.egaliseur i:nth-child(3) { animation-delay: -0.6s; }
.egaliseur i:nth-child(4) { animation-delay: -0.15s; }
@keyframes eq { from { transform: scaleY(0.25); } to { transform: scaleY(1); } }

/* Lulu */
.lulu { display: block; overflow: visible; }
.lulu-hero { position: absolute; left: max(0px, calc(50% - 260px)); bottom: 0; width: clamp(120px, 22vw, 170px); }
.lulu-hero .lulu { width: 100%; height: auto; filter: drop-shadow(0 18px 24px rgba(24, 22, 47, 0.25)); animation: lulu-flotte 2.6s var(--ease-soft) infinite alternate; }
@keyframes lulu-flotte { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-10px) rotate(3deg); } }
.note { position: absolute; font-weight: 900; color: var(--lulu-crest); font-size: 1.8rem; opacity: 0; animation: note 3.6s ease-out infinite; }
.n1 { left: 70%; top: 4%; }
.n2 { left: 6%; top: 14%; animation-delay: 1.2s; font-size: 1.5rem; color: var(--rose); }
.n3 { left: 86%; top: 30%; animation-delay: 2.4s; color: var(--logo-4); }
@keyframes note { 0% { transform: translateY(10px) scale(0.6); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-70px) rotate(18deg) scale(1.1); opacity: 0; } }

/* Sections ----------------------------------------------------------------- */
.section { padding: var(--space-16) 0; }
@media (min-width: 720px) { .section { padding: calc(var(--space-16) * 1.5) 0; } }
.sur-titre { font-size: 0.875rem; font-weight: var(--w-strong); color: var(--ink); opacity: 0.85; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--space-3); }
.section h2 { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 18em; }
.section-intro { color: var(--ink); font-size: 1.125rem; max-width: 36em; margin-top: var(--space-4); }

/* Sections au fil du défilement (univers, création) : avec script, la section est haute et son contenu reste à l'écran
   (sticky) ; site.js donne l'étape (classe « actif ») et l'avancement dans l'étape (--t). */
.scrolly { padding: var(--space-16) 0; }
.js .scrolly { padding: 0; }
.js .scrolly-collant { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; padding-top: 72px; }
@media (max-width: 899px) { .js .scrolly-collant { align-items: flex-start; padding-top: 104px; } }

/* Univers : paquet de cartes */
.js .paquet-univers { height: 680vh; }
.paquet-grille { display: grid; gap: var(--space-8); align-items: center; }
@media (min-width: 900px) { .paquet-grille { grid-template-columns: 0.9fr 1.1fr; gap: var(--space-16); } }
.paquet-univers h2 { font-size: clamp(1.9rem, 4.4vw, 3.2rem); }
.univers-index { list-style: none; padding: 0; margin: var(--space-8) 0 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.univers-index button {
  display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-4) 0 var(--space-2);
  border: 1px solid var(--glass-border); border-radius: var(--radius-full); background: var(--glass); color: var(--ink);
  font: inherit; font-size: 0.9375rem; font-weight: var(--w-strong); cursor: pointer;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-out), background 0.35s;
}
.univers-index button span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--g); font-size: 0.95rem; }
.univers-index button:hover { transform: translateY(-2px); }
.univers-index button.actif { background: var(--surface); box-shadow: var(--shadow-1); transform: scale(1.06); }
html:not(.js) .univers-index { display: none; }

.paquet { list-style: none; padding: 0; margin: 0; }
.js .paquet { position: relative; width: min(440px, 100%); height: clamp(380px, 58vh, 540px); margin-inline: auto; perspective: 1400px; }
html:not(.js) .paquet { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.univers-carte {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-8); border-radius: calc(var(--radius-2xl) * 1.3);
  background: var(--g); color: var(--g-ink); border: 2px solid var(--glass-border); box-shadow: var(--shadow-2);
}
.univers-carte::after { content: ""; position: absolute; inset: 0 0 55% 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0)); pointer-events: none; }
/* Avec script : les cartes s'empilent ; celles à venir attendent derrière, décalées ; celles passées s'envolent */
.js .univers-carte {
  --rang: 0;
  position: absolute; inset: 0; transform-origin: 50% 100%;
  transform: translateY(calc(var(--rang) * -40px)) rotate(calc(var(--rang) * 3deg)) scale(calc(1 - var(--rang) * 0.05));
  opacity: calc(1 - var(--rang) * 0.22); z-index: calc(20 - var(--rang));
  transition: transform 0.75s var(--ease-spring), opacity 0.5s var(--ease-out);
}
.js .univers-carte:not(.actif) { pointer-events: none; }
.js .univers-carte.cachee { opacity: 0; }
.js .univers-carte.passee { transform: translate(-70%, -12%) rotate(-16deg) scale(0.9); opacity: 0; z-index: 30; }
.js .univers-carte:not(.actif) > * { opacity: 0.0; transition: opacity 0.3s; }
.js .univers-carte.actif > * { opacity: 1; transition: opacity 0.5s 0.15s; }
.univers-emoji { font-size: clamp(4rem, 9vw, 6rem); line-height: 1; margin-bottom: var(--space-4); }
.js .univers-carte.actif .univers-emoji { transform: translateY(calc(var(--t, 0) * -14px)) rotate(calc(var(--t, 0) * 10deg - 5deg)); transition: transform 0.2s linear; }
.univers-kicker { font-size: 0.85rem; font-weight: var(--w-strong); text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; }
.univers-carte strong { font-size: clamp(1.8rem, 3.6vw, 2.4rem); line-height: 1.1; }
.univers-texte { font-size: 1.05rem; line-height: 1.45; }
.univers-chansons { margin-top: auto; display: grid; gap: var(--space-2); padding-top: var(--space-4); }
.univers-chansons > span {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  background: var(--glass); color: var(--ink); font-weight: var(--w-strong); font-size: 0.95rem;
}
.univers-chansons b { font-size: 1.2rem; }
.univers-chansons > span > span { flex: 1; }
.lecture {
  flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-fill); box-shadow: var(--shadow-brand); transition: transform 0.3s var(--ease-spring);
}
.lecture svg { width: 14px; height: 14px; fill: var(--on-brand); margin-left: 2px; }
.univers-chansons > span:hover .lecture { transform: scale(1.12); }
/* Carte de fin : Lulu et la promesse de nouvelles chansons */
.univers-fin { justify-content: center; }
.univers-fin .lulu { width: clamp(110px, 16vw, 150px); height: auto; margin-bottom: var(--space-4); filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.25)); }
.js .univers-fin.actif .lulu { animation: saut 1.4s var(--ease-soft) infinite; }
@media (max-width: 899px) {
  .js .paquet-univers .sur-titre, .js .paquet-univers .section-intro, .js .univers-index { display: none; }
  .js .paquet-univers h2 { font-size: 1.6rem; }
  .univers-carte { padding: var(--space-6); }
}

/* Moments : grand contrôle segmenté (Matin, Midi, Soir) et panneau aux couleurs du moment */
.journee { margin-top: var(--space-10); display: grid; gap: var(--space-6); }
.segments {
  --index: 0;
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); width: min(640px, 100%); justify-self: center;
  padding: var(--space-2); border-radius: var(--radius-full);
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(1.8); -webkit-backdrop-filter: blur(22px) saturate(1.8);
  box-shadow: var(--shadow-1), inset 0 1px 0 var(--glass-border);
}
.segments-curseur {
  position: absolute; top: var(--space-2); bottom: var(--space-2); left: var(--space-2);
  width: calc((100% - 2 * var(--space-2)) / 3); border-radius: var(--radius-full);
  background: var(--surface); box-shadow: var(--shadow-1); border: 1px solid var(--line-2);
  transform: translateX(calc(var(--index) * 100%)); transition: transform 0.5s var(--ease-spring);
}
.segment {
  position: relative; z-index: 1; min-height: 64px; border: 0; background: none; cursor: pointer;
  border-radius: var(--radius-full); font: inherit; font-size: clamp(1rem, 2.6vw, 1.25rem); font-weight: var(--w-strong); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
}
.segment span { font-size: 1.4em; transition: transform 0.4s var(--ease-spring); }
.segment[aria-selected="true"] span { transform: scale(1.15) rotate(-6deg); }
.panneau {
  display: grid; gap: var(--space-6); padding: clamp(var(--space-6), 4vw, var(--space-10)); border-radius: calc(var(--radius-2xl) * 1.3);
  background: linear-gradient(180deg, var(--haut) 0%, var(--bas) 100%); color: var(--ink);
  border: 2px solid var(--glass-border); box-shadow: var(--shadow-2);
}
.js .panneau:not(.actif) { display: none; }
.js .panneau.actif { animation: panneau 0.5s var(--ease-out); }
@keyframes panneau { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.panneau-tete { display: grid; gap: var(--space-1); max-width: 40em; }
.panneau-quand { font-weight: var(--w-strong); }
.panneau-tete strong { font-size: clamp(1.6rem, 3.6vw, 2.2rem); line-height: 1.15; }
.panneau-chansons { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.panneau-chansons li { display: grid; gap: var(--space-1); align-content: start; }
.js .panneau.actif .panneau-chansons li { animation: chanson 0.6s var(--ease-spring) both; animation-delay: calc(var(--k) * 70ms + 120ms); }
@keyframes chanson { from { opacity: 0; transform: translateY(16px) scale(0.92); } }
.panneau-chansons .pochette { font-size: 2.8rem; border-radius: var(--radius-xl); margin-bottom: var(--space-2); transition: transform 0.35s var(--ease-spring); }
.panneau-chansons li:hover .pochette { transform: translateY(-4px) rotate(-2deg); }
.panneau-chansons strong { font-size: 1rem; line-height: 1.25; }
.panneau-chansons small { font-size: 0.875rem; }
.panneau-idee {
  display: flex; align-items: center; gap: var(--space-3); justify-self: start;
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-full);
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-1);
}
.panneau-idee > span:first-child { font-size: 1.4rem; }

/* Histoire de la création, au fil du défilement ------------------------------------------------
   Avec script : la section est haute, la scène reste à l'écran (sticky) et site.js pose l'étape (classe « actif »)
   et l'avancement dans l'étape (--t, de 0 à 1). Sans script : les quatre écrans s'affichent l'un sous l'autre. */
.js .histoire { height: 460vh; }
.histoire-grille { display: grid; gap: var(--space-8); align-items: center; }
@media (min-width: 900px) { .histoire-grille { grid-template-columns: 1fr 1fr; gap: var(--space-16); } }
.histoire h2 { font-size: clamp(1.9rem, 4.4vw, 3.2rem); }
.etapes { list-style: none; padding: 0; margin-bottom: 0; display: grid; gap: var(--space-3); margin-top: var(--space-8); }
.etape {
  display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4); border-radius: var(--radius-xl);
  transition: background 0.4s var(--ease-out), opacity 0.4s var(--ease-out), transform 0.5s var(--ease-spring);
}
.js .etape { opacity: 0.55; }
.js .etape.actif { opacity: 1; background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-1); transform: translateX(6px); }
.etape-num {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--brand-ink); font-weight: 900; box-shadow: var(--shadow-1);
}
.etape.actif .etape-num { background: var(--brand-fill); color: var(--on-brand); }
.etape > span:last-child { display: grid; gap: 2px; }
.etape strong { font-size: 1.2rem; }
.etape > span:last-child > span { font-size: 0.975rem; }
@media (max-width: 899px) {
  .js .histoire .sur-titre { display: none; }
  .js .histoire-texte h2 { font-size: 1.6rem; }
  .js .etapes { margin-top: var(--space-3); }
  .js .etape:not(.actif) { display: none; }
  .js .etape.actif { transform: none; }
}

/* La scène : une carte façon écran de l'app */
.scene {
  position: relative; justify-self: center; width: min(420px, 100%); height: clamp(380px, 56vh, 520px);
  border-radius: calc(var(--radius-2xl) * 1.3); background: var(--surface); box-shadow: var(--shadow-2);
  border: 1px solid var(--glass-border); overflow: hidden;
}
html:not(.js) .scene { height: auto; display: grid; gap: var(--space-4); padding-bottom: var(--space-6); }
.scene-points { position: absolute; top: var(--space-4); left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.scene-points i { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--line-2); transition: width 0.4s var(--ease-spring), background 0.4s; }
.scene-points i.actif { width: 24px; background: var(--brand); }
html:not(.js) .scene-points { display: none; }
.scene-ecran {
  position: absolute; inset: 0; padding: var(--space-12) var(--space-6) var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3);
  opacity: 0; transform: translateY(24px) scale(0.97); pointer-events: none;
  transition: opacity 0.45s var(--ease-out), transform 0.55s var(--ease-spring);
}
.scene-ecran.actif { opacity: 1; transform: none; }
html:not(.js) .scene-ecran { position: static; opacity: 1; transform: none; padding-top: var(--space-8); }
.scene-titre { font-size: 1.4rem; font-weight: 900; }
.scene-label { font-size: 0.8rem; font-weight: var(--w-strong); color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.06em; margin-top: var(--space-2); }

/* 1. L'idée */
.enfants { display: flex; gap: var(--space-2); }
.enfant { display: inline-flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-4) 6px 6px; border-radius: var(--radius-full); background: var(--surface-2); font-weight: var(--w-strong); }
.enfant b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--kc); color: var(--ink); }
.enfant.choisi { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.saisie { min-height: 58px; display: flex; align-items: center; padding: 0 var(--space-4); border-radius: var(--radius-md); background: var(--surface-2); font-size: 1.15rem; font-weight: var(--w-strong); box-shadow: inset 0 0 0 2px var(--brand-soft); }
.curseur { width: 2px; height: 1.3em; margin-left: 2px; background: var(--brand); animation: curseur 1s steps(1) infinite; }
@keyframes curseur { 50% { opacity: 0; } }
.creer {
  margin-top: auto; min-height: 56px; display: flex; align-items: center; justify-content: center; gap: var(--space-2); border-radius: var(--radius-full);
  background: var(--brand-fill); color: var(--on-brand); font-weight: var(--w-strong); font-size: 1.05rem; box-shadow: var(--shadow-brand);
  opacity: calc(0.35 + 0.65 * min(1, var(--t, 0) * 1.4)); transition: transform 0.3s var(--ease-spring);
}
.idee.appuye .creer { transform: scale(0.94); }

/* 2. Lulu compose */
.compose { align-items: center; text-align: center; justify-content: center; }
.compose .lulu { width: 120px; height: 120px; animation: lulu-flotte 1.4s var(--ease-soft) infinite alternate; }
.notes-compose { position: relative; height: 0; width: 160px; }
.notes-compose i { position: absolute; bottom: 60px; font-style: normal; font-weight: 900; color: var(--brand); font-size: 1.4rem; animation: note 2.4s ease-out infinite; }
.notes-compose i:nth-child(1) { left: 0; }
.notes-compose i:nth-child(2) { left: 50%; animation-delay: 0.8s; color: var(--rose); }
.notes-compose i:nth-child(3) { right: 0; animation-delay: 1.6s; color: var(--logo-4); }
.progres { width: 100%; height: 12px; border-radius: var(--radius-full); background: var(--surface-2); overflow: hidden; }
.progres i { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--g-anniversaire); transform-origin: left; transform: scaleX(min(1, calc(0.04 + var(--t, 0) * 1.5))); }
.versions { display: grid; gap: var(--space-2); width: 100%; }
.version-carte {
  display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2); border-radius: var(--radius-lg); background: var(--surface-2); text-align: left;
  opacity: 0; transform: translateY(16px); transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-spring);
}
.version-carte .pochette { width: 48px; height: 48px; aspect-ratio: auto; font-size: 1.5rem; border-radius: var(--radius-sm); }
.version-carte > span:nth-child(2) { flex: 1; display: grid; }
.version-carte small { color: var(--ink-2); }
.version-carte b { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-fill); color: var(--on-brand); font-size: 0.8rem; }
.compose.pret .version-carte { opacity: 1; transform: none; }
.compose.pret .version-carte + .version-carte { transition-delay: 0.12s; }
html:not(.js) .version-carte { opacity: 1; transform: none; }

/* 3. Les paroles */
.lecteur-tete { display: flex; align-items: center; gap: var(--space-3); }
.lecteur-tete .pochette { width: 64px; height: 64px; aspect-ratio: auto; font-size: 2rem; border-radius: var(--radius-md); }
.lecteur-tete > span:last-child { display: grid; }
.lecteur-tete strong { font-size: 1.15rem; }
.lecteur-tete small { color: var(--ink-2); }
.paroles-fenetre {
  flex: 1; position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--g-nombres);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
.paroles-liste { position: absolute; left: 0; right: 0; top: 50%; display: grid; gap: var(--space-3); padding: 0 var(--space-5); transition: transform 0.6s var(--ease-out); }
.paroles-liste span { font-size: 1.25rem; font-weight: 900; color: var(--g-nombres-ink); opacity: 0.35; transform: scale(0.92); transform-origin: left center; transition: opacity 0.4s, transform 0.5s var(--ease-spring); }
.paroles-liste span.chantee { opacity: 1; transform: none; }
html:not(.js) .paroles-fenetre { min-height: 280px; }
html:not(.js) .paroles-liste { position: static; padding: var(--space-6) var(--space-5); }
html:not(.js) .paroles-liste span { opacity: 1; transform: none; }
.lecteur-barre { height: 6px; border-radius: var(--radius-full); background: var(--surface-2); overflow: hidden; }
.lecteur-barre i { display: block; height: 100%; width: 100%; background: var(--brand); transform-origin: left; transform: scaleX(var(--t, 0)); }

/* 4. Le badge gagné */
.gagne { align-items: center; justify-content: center; text-align: center; }
.gagne > strong { font-size: 1.6rem; font-weight: 900; }
.badge-gagne { display: grid; justify-items: center; gap: var(--space-1); transform: scale(0.4) rotate(-14deg); opacity: 0; }
.badge-gagne .badge-dessin { width: 128px; animation: none; }
.badge-nom { font-weight: var(--w-strong); color: var(--ink-2); }
.gagne.fete .badge-gagne { animation: badge-pop 0.8s var(--ease-spring) forwards; }
@keyframes badge-pop { to { transform: none; opacity: 1; } }
html:not(.js) .badge-gagne { transform: none; opacity: 1; }
.autres-badges { display: flex; justify-content: center; gap: var(--space-4); margin-top: var(--space-2); opacity: 0; transform: translateY(14px); transition: opacity 0.5s 0.5s, transform 0.6s 0.5s var(--ease-spring); }
.gagne.fete .autres-badges { opacity: 1; transform: none; }
html:not(.js) .autres-badges { opacity: 1; transform: none; }
.autres-badges .badge { width: 72px; }
.autres-badges .badge-emoji { font-size: 1.35rem; }
.autres-badges figcaption { font-size: 0.72rem; color: var(--ink-2); }
.confettis { position: absolute; left: 50%; top: 40%; width: 0; height: 0; }
.confettis i { position: absolute; width: 10px; height: 14px; border-radius: 3px; background: var(--c); opacity: 0; }
.gagne.fete .confettis i { animation: confetti 1.4s var(--ease-out) forwards; }
@keyframes confetti {
  0% { opacity: 1; transform: rotate(var(--a)) translateY(0) rotate(0); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) rotate(calc(var(--r) * 8)); }
}

/* Médailles : même dessin que l'atome Medaille de l'app (SVG généré par build:web) */
.badge { margin: 0; display: grid; justify-items: center; gap: var(--space-2); width: 104px; text-align: center; }
.badge-dessin { position: relative; width: 100%; aspect-ratio: 100 / 125; animation: medaille 3s var(--ease-soft) infinite alternate; animation-delay: calc(var(--i, 0) * -0.7s); }
.badge-dessin svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 10px 12px rgba(24, 22, 47, 0.3)); }
.badge-emoji { position: absolute; left: 0; right: 0; top: 23.2%; height: 35.2%; display: grid; place-items: center; font-size: 2rem; }
.badge-gagne .badge-emoji { font-size: 2.6rem; }
.badge figcaption { font-weight: var(--w-strong); line-height: 1.2; }
@keyframes medaille { from { translate: 0 0; rotate: -4deg; } to { translate: 0 -8px; rotate: 4deg; } }

/* Confiance */
.grille-confiance { display: grid; gap: var(--space-4); margin-top: var(--space-10); grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.confiance { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-6); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-1); }
.confiance > span:first-child { font-size: 2rem; }
.confiance strong { font-size: 1.15rem; }
.confiance > span:last-child { color: var(--ink-2); font-size: 0.975rem; }

/* Questions fréquentes */
.faq-liste { margin-top: var(--space-10); display: grid; gap: var(--space-3); max-width: 820px; }
.faq { border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-1); border: 1px solid var(--glass-border); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: var(--space-5) var(--space-6); font-size: 1.125rem; font-weight: var(--w-strong);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink); font-size: 1.3rem; transition: transform 0.45s var(--ease-spring);
}
/* « ouvert » : posé par site.js dès le début de l'animation (le + tourne en même temps que le texte s'ouvre) */
.faq.ouvert summary::after, .faq[open]:not(.anime) summary::after { transform: rotate(45deg); }
.faq.anime:not(.ouvert) summary::after { transform: none; }
.faq { transition: box-shadow 0.35s var(--ease-out); }
.faq.ouvert { box-shadow: var(--shadow-2); }
.faq div { padding: 0 var(--space-6) var(--space-6); color: var(--ink-2); overflow: hidden; }

/* Lancement */
.final-carte {
  position: relative; overflow: hidden; display: grid; justify-items: center; gap: var(--space-4); text-align: center;
  padding: var(--space-12) var(--space-6); border-radius: calc(var(--radius-2xl) * 1.4);
  background: var(--g-brand); color: var(--on-brand); box-shadow: var(--shadow-brand);
}
.final-carte::before, .final-carte::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.final-carte::before { width: 340px; height: 340px; left: -120px; top: -160px; }
.final-carte::after { width: 260px; height: 260px; right: -80px; bottom: -120px; }
.final-carte h2 { font-size: clamp(2rem, 5vw, 3rem); }
.final-carte p { max-width: 30em; opacity: 0.92; font-size: 1.125rem; }
.lulu.content { width: 130px; height: 130px; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.25)); animation: saut 1.4s var(--ease-soft) infinite; }
@keyframes saut { 0%, 100% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-18px) scale(0.97, 1.03); } 85% { transform: translateY(0) scale(1.04, 0.96); } }

/* Pied de page ------------------------------------------------------------- */
.pied { border-top: 1px solid var(--glass-border); padding: var(--space-12) 0 var(--space-8); }
.pied-grille { display: grid; gap: var(--space-8); }
@media (min-width: 720px) { .pied-grille { grid-template-columns: 1fr auto; align-items: start; } }
.pied-devise { color: var(--ink); margin-top: var(--space-2); }
.pied-liens { display: grid; gap: var(--space-3); }
@media (min-width: 720px) { .pied-liens { grid-auto-flow: column; gap: var(--space-6); } }
.pied-liens a { color: var(--ink); text-decoration: none; font-weight: var(--w-strong); }
.pied-liens a:hover { text-decoration: underline; }
.pied-bas { color: var(--ink); opacity: 0.85; font-size: 0.875rem; margin-top: var(--space-8); }

/* Pages légales ------------------------------------------------------------ */
.doc { padding: var(--space-12) 0 var(--space-16); }
.doc .conteneur { max-width: 820px; background: var(--surface); border-radius: var(--radius-2xl); box-shadow: var(--shadow-2); padding: var(--space-10) clamp(var(--space-5), 5vw, var(--space-12)); }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: var(--space-2); }
.doc .maj { color: var(--ink-2); margin-bottom: var(--space-10); }
.doc h2 { font-size: 1.4rem; margin: var(--space-10) 0 var(--space-3); }
.doc p, .doc li { color: var(--ink-2); }
.doc p + p { margin-top: var(--space-3); }
.doc ul { list-style: disc; padding-left: var(--space-6); display: grid; gap: var(--space-2); margin-top: var(--space-3); }
.doc strong { color: var(--ink); }
.doc .a-completer { background: var(--warn-soft); color: var(--warn-ink); padding: 0 var(--space-1); border-radius: 6px; font-weight: var(--w-strong); }
.introuvable { display: grid; justify-items: center; gap: var(--space-4); text-align: center; }
.introuvable .lulu { width: 140px; height: 140px; animation: lulu-flotte 2.6s var(--ease-soft) infinite alternate; }
.retour { display: inline-flex; gap: var(--space-2); margin-bottom: var(--space-8); font-weight: var(--w-strong); text-decoration: none; }

/* Apparition au défilement ------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.visible { opacity: 1; transform: none; }

/* Mouvement réduit : rien ne bouge */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .note { display: none; }
}
