/* Pose — landing « Argentique de nuit » : le noir domine, une vraie photo de soirée, du verre minimal. */

@font-face {
  font-family: 'Instrument Sans';
  src: url('fonts/instrument-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
/* La police de l'app : seulement pour le compteur du viseur dans la scène. */
@font-face {
  font-family: 'Manrope';
  src: url('fonts/manrope-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
/* Seul manuscrit de la page : le tape « Les 30 ans de Léa ». */
@font-face {
  font-family: 'Kalam';
  src: url('fonts/kalam-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Couleurs */
  --nuit: #0b0b0a;
  --creme: #f3efe6;
  --creme-appui: #e6e0d3;
  --encre: #1a1917;
  --blanc: #fff;
  --blanc-92: rgb(255 255 255 / 0.92);
  --blanc-72: rgb(255 255 255 / 0.72);
  --blanc-60: rgb(255 255 255 / 0.6);
  --gris-titre: #a19c92;
  --gris-titre-creme: #6d685f;
  --texte-creme: #57534c;
  --trait-nuit: rgb(255 255 255 / 0.12);
  --trait-creme: rgb(26 25 23 / 0.14);
  --tel-cadre: #1c1b19;
  --ombre-tel: 0 30px 60px rgb(0 0 0 / 0.32);
  --ombre-objet: drop-shadow(2px 3px 3px rgb(20 19 17 / 0.28)) drop-shadow(14px 26px 30px rgb(20 19 17 / 0.26));
  --ombre-tirage:
    0 1px 1px rgb(26 25 23 / 0.1), 0 8px 14px -4px rgb(26 25 23 / 0.16), 6px 22px 40px -14px rgb(26 25 23 / 0.28);
  --f-app: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-main: 'Kalam', 'Comic Sans MS', cursive;
  --t-section: clamp(1.875rem, 7.8vw, 4.5rem);
  --s-12: 48px;
  --s-16: 64px;
  --s-24: 96px;
  --s-30: 120px;
  --entre: var(--s-24);
  /* Verre (spec plein-cadre-verre §2) */
  --verre-flou: 20px;
  --verre-saturation: 1.4;
  --verre-fond: rgb(23 23 23 / 0.42);
  --verre-liseré: inset 0 0 0 1px rgb(255 255 255 / 0.16);
  --verre-reflet: inset 0 1px 0 rgb(255 255 255 / 0.1);
  --verre-ombre: 0 8px 24px rgb(0 0 0 / 0.22);
  --verre-repli: rgb(23 23 23 / 0.84);
  /* Typo */
  --f: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --t-titre: clamp(2.5rem, 11.8vw, 8.25rem);
  /* Espacements (échelle de 4) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --gouttiere: 20px;
  /* Formes */
  --r-pilule: 999px;
  --r-carte: 20px;
  --h-bouton: 52px;
  --h-pastille: 34px;
  /* Mouvement */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-doux: cubic-bezier(0.4, 0, 0.2, 1);
  --d-entree: 0.9s;
  color-scheme: dark;
}
@media (min-width: 900px) {
  :root {
    --gouttiere: 40px;
    --h-bouton: 56px;
    --entre: 160px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--nuit);
  color: var(--blanc);
  font-family: var(--f);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img,
svg {
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
p,
h1 {
  margin: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.evitement {
  position: absolute;
  left: var(--s-4);
  top: -60px;
  z-index: 10;
  padding: var(--s-3) var(--s-4);
  background: var(--creme);
  color: var(--encre);
  border-radius: var(--r-pilule);
}
.evitement:focus {
  top: var(--s-4);
}
:focus-visible {
  outline: 2px solid var(--creme);
  outline-offset: 3px;
}

/* ---------- Verre ---------- */
.verre {
  background: var(--verre-repli);
  box-shadow: var(--verre-liseré), var(--verre-reflet), var(--verre-ombre);
  color: var(--blanc-92);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .verre {
    background: var(--verre-fond);
    -webkit-backdrop-filter: blur(var(--verre-flou)) saturate(var(--verre-saturation));
    backdrop-filter: blur(var(--verre-flou)) saturate(var(--verre-saturation));
  }
}
@media (prefers-reduced-transparency: reduce) {
  .verre {
    background: var(--verre-repli);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ---------- En-tête ---------- */
.entete {
  position: fixed;
  z-index: 5;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(64px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gouttiere) 0;
  transition:
    background-color 0.3s var(--ease-doux),
    box-shadow 0.3s var(--ease-doux);
}
/* Après le héros : une barre de verre dense (lisible aussi au-dessus du crème). */
.entete.est-defile {
  background: rgb(11 11 10 / 0.86);
  box-shadow: inset 0 -1px 0 var(--trait-nuit);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .entete.est-defile {
    background: rgb(11 11 10 / 0.72);
    -webkit-backdrop-filter: blur(var(--verre-flou)) saturate(var(--verre-saturation));
    backdrop-filter: blur(var(--verre-flou)) saturate(var(--verre-saturation));
  }
}
/* Au-dessus du crème, la barre devient du verre clair : jamais de gris boueux. */
.entete.est-defile.entete--creme {
  background: rgb(243 239 230 / 0.82);
  box-shadow: inset 0 -1px 0 var(--trait-creme);
}
.entete--creme .logo {
  color: var(--encre);
}
.entete--creme .bouton-entete {
  background: rgb(26 25 23 / 0.06);
  box-shadow: inset 0 0 0 1px var(--trait-creme);
  color: var(--encre);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
@media (prefers-reduced-transparency: reduce) {
  .entete.est-defile.entete--creme {
    background: rgb(243 239 230 / 0.97);
  }
  .entete.est-defile {
    background: rgb(11 11 10 / 0.96);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
.logo {
  display: flex;
  align-items: center;
  height: 44px;
  color: var(--blanc-92);
}
/* Le mot seul, petit : il signe sans concurrencer le titre. */
.logo__mot {
  width: 44px;
  height: 15.8px;
}
.bouton-entete {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 var(--s-4);
  border-radius: var(--r-pilule);
  font-size: 0.875rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  transition: background-color 0.2s var(--ease-out);
}
@media (max-width: 599px) {
  /* Le bouton crème est déjà à l'écran : l'en-tête mobile ne garde que le logo. */
  .bouton-entete {
    display: none;
  }
}
.bouton-entete:hover {
  background: rgb(23 23 23 / 0.6);
}

/* ---------- Héros ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 var(--gouttiere) calc(40px + env(safe-area-inset-bottom));
  overflow: clip;
  text-align: center;
  isolation: isolate;
}
.hero__photos {
  position: absolute;
  inset: 0 0 auto;
  height: 76%;
  z-index: -1;
  background: var(--nuit);
  /* Mobile : la photo occupe le haut (cadrage moins serré, moins d'agrandissement) ;
     son bord bas se fond dans la nuit, jamais de ligne dure. */
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 58%, transparent 99%);
}
.hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% var(--m, 30%);
  /* Rendu flash : un peu plus de contraste et de densité, comme un tirage. */
  filter: contrast(1.06) saturate(1.06);
  opacity: 0;
  transition: opacity 1.1s var(--ease-doux);
}
.hero__photo.est-visible {
  opacity: 1;
}
.hero__grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.3;
}
/* Voile : haut pour l'en-tête, bas pour le texte (le texte est toujours sur ≥ 80 % d'encre). */
.hero__voile {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(11 11 10 / 0.6) 0, rgb(11 11 10 / 0) 160px),
    radial-gradient(140% 90% at 50% 40%, rgb(11 11 10 / 0) 55%, rgb(11 11 10 / 0.35) 100%);
}
/* Halo de flash : une lumière chaude qui éclot en haut de l'image, jamais un voile blanc plein. */
.hero__flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    70% 55% at 50% 36%,
    rgb(255 248 235 / 0.95),
    rgb(255 248 235 / 0.4) 40%,
    rgb(255 248 235 / 0) 78%
  );
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  /* Le halo épargne le haut (compteur, logo) : il éclot sur les visages. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 120px, #000 240px);
  mask-image: linear-gradient(to bottom, transparent 120px, #000 240px);
}

/* Compteur de poses : la pastille du viseur, centrée en haut. */
.compteur {
  position: absolute;
  top: calc(76px + env(safe-area-inset-top));
  left: 50%;
  translate: -50% 0;
  display: inline-flex;
  align-items: center;
  height: var(--h-pastille);
  padding: 0 14px 0 12px;
  border-radius: var(--r-pilule);
  font-variant-numeric: tabular-nums;
  /* Verre plus dense : le compteur reste lisible au pic du halo de flash. */
  --verre-fond: rgb(23 23 23 / 0.58);
}
.compteur svg {
  width: 16px;
  height: 16px;
  margin-right: var(--s-2);
}
.compteur__reste {
  display: inline-flex;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
/* Chaque chiffre roule seul dans sa piste ; le voisin est entrevu (masque estompé). */
.chiffre {
  position: relative;
  display: inline-block;
  height: 1.5em;
  line-height: 1.5em;
  overflow: clip;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}
.chiffre > span {
  display: block;
}
.chiffre > span + span {
  position: absolute;
  inset: 0;
}
.compteur__total {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--blanc-60);
}

.hero__bloc {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1100px;
}
/* Fondu vers la nuit porté par le bloc de texte : le contraste ne dépend pas de la hauteur d'écran. */
.hero__bloc::before {
  content: '';
  position: absolute;
  z-index: -1;
  left: 50%;
  width: 100vw;
  translate: -50% 0;
  top: -112px;
  bottom: calc(-1 * (40px + env(safe-area-inset-bottom)));
  background: linear-gradient(
    to bottom,
    rgb(11 11 10 / 0) 0,
    rgb(11 11 10 / 0.6) 112px,
    rgb(11 11 10 / 0.88) 176px,
    rgb(11 11 10 / 0.96) 300px,
    var(--nuit) 100%
  );
  pointer-events: none;
}
.pastille {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  height: var(--h-pastille);
  padding: 0 12px 0 10px;
  border-radius: var(--r-pilule);
  font-size: 0.8125rem;
  font-weight: 550;
  letter-spacing: 0;
}
.pastille__court {
  display: none;
}
/* Petits écrans : la même information, raccourcie (jamais une pastille pleine largeur). */
@media (max-width: 399px) {
  .pastille .pastille__long.pastille__jour {
    display: none;
  }
  .pastille .pastille__court.pastille__jour {
    display: inline;
  }
}
@media (max-width: 374px) {
  .pastille .pastille__long {
    display: none;
  }
  .pastille .pastille__court {
    display: inline;
  }
}
.pastille svg {
  width: 15px;
  height: 15px;
  margin-right: 2px;
  opacity: 0.8;
}
.pastille__point {
  margin: 0 1px;
  color: var(--blanc-60);
}
.titre {
  margin-top: var(--s-5);
  font-size: var(--t-titre);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.045em;
  color: var(--blanc);
  font-kerning: normal;
}
.ligne {
  display: block;
  overflow: clip;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.ligne > span {
  display: inline-block;
}
.ligne--2 {
  color: var(--gris-titre);
}
.chapo {
  max-width: 34ch;
  margin-top: var(--s-5);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--blanc-72);
  text-wrap: balance;
}
.chapo > span {
  display: block;
  text-wrap: balance;
}
.insecable {
  white-space: nowrap;
}
.actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s-2);
  width: 100%;
  max-width: 340px;
  margin-top: var(--s-8);
}
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: var(--h-bouton);
  padding: 0 var(--s-6);
  border-radius: var(--r-pilule);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition:
    background-color 0.2s var(--ease-out),
    transform 0.2s var(--ease-out);
}
.bouton:active {
  transform: scale(0.98);
}
.bouton svg {
  width: 20px;
  height: 20px;
}
.bouton--creme {
  background: var(--creme);
  color: var(--encre);
}
.bouton--creme:hover {
  background: var(--blanc);
}
.bouton--creme:active {
  background: var(--creme-appui);
}
.lien-demo {
  display: inline-flex;
  align-self: center;
  align-items: center;
  gap: 2px;
  height: 44px;
  padding: 0 var(--s-2);
  font-size: 0.9375rem;
  font-weight: 550;
  color: var(--blanc-92);
  transition: color 0.2s var(--ease-out);
}
.lien-demo svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  transition: translate 0.2s var(--ease-out);
}
.lien-demo:hover {
  color: var(--blanc);
}
.lien-demo:hover svg {
  translate: 2px 0;
}
/* Mobile : la promesse en petit, sous le lien de la démo (sur ordinateur, la carte QR la porte). */
.note-hero {
  margin: -6px 0 0;
  font-size: 0.8125rem;
  color: var(--blanc-60);
}
@media (min-width: 900px) {
  .note-hero {
    display: none;
  }
}

/* Indice de défilement : un trait fin qui respire, en bas au centre. */
.indice-defilement {
  position: absolute;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: 1.5px;
  height: 28px;
  margin-left: -0.75px;
  border-radius: 1px;
  background: linear-gradient(to bottom, rgb(255 255 255 / 0.85), rgb(255 255 255 / 0.1));
  transform-origin: 50% 0;
}
.est-pret .indice-defilement {
  animation: respire 2.8s var(--ease-doux) 2s infinite;
}
@keyframes respire {
  0%,
  100% {
    transform: scaleY(0.45);
  }
  50% {
    transform: scaleY(1);
  }
}

/* Carte QR (ordinateur seulement) */
.carte-qr {
  display: none;
}
.carte-qr__petit {
  color: var(--blanc-60);
}
.qr {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
}
.qr svg {
  width: 100%;
  height: 100%;
}
.qr .qr__icone {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20%;
  height: 20%;
  translate: -50% -50%;
  color: var(--encre);
  --icone-fond: var(--creme);
}

@media (max-height: 700px) and (max-width: 899px) {
  .compteur {
    display: none;
  }
  /* Écran court : la photo remonte pour garder les visages au-dessus du texte. */
  .hero__photos {
    inset: -14% 0 auto;
    height: 82%;
  }
  .chapo {
    margin-top: var(--s-4);
  }
  .actions {
    margin-top: var(--s-6);
  }
}

/* ---------- Ordinateur : une seule grande photo plein cadre, texte au centre ---------- */
@media (min-width: 900px) {
  .hero {
    padding-bottom: 56px;
  }
  .hero__bloc::before {
    top: -96px;
    bottom: -56px;
    background: linear-gradient(
      to bottom,
      rgb(11 11 10 / 0) 0,
      rgb(11 11 10 / 0.55) 96px,
      rgb(11 11 10 / 0.8) 160px,
      rgb(11 11 10 / 0.95) 340px,
      var(--nuit) 100%
    );
  }
  .hero__photos {
    inset: 0;
    height: 100%;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero__photo {
    object-position: 50% 50%;
  }
  .titre {
    margin-top: var(--s-10);
    font-size: clamp(5rem, 7.4vw, 7.5rem);
  }
  .hero__voile {
    background:
      radial-gradient(520px 240px at 0 0, rgb(11 11 10 / 0.82) 20%, rgb(11 11 10 / 0)),
      linear-gradient(to bottom, rgb(11 11 10 / 0.75) 0, rgb(11 11 10 / 0.3) 120px, rgb(11 11 10 / 0) 220px),
      radial-gradient(140% 90% at 50% 40%, rgb(11 11 10 / 0) 55%, rgb(11 11 10 / 0.4) 100%);
  }
  /* Compteur ancré comme dans le viseur : centré en haut, sous la navigation. */
  .compteur {
    top: 88px;
  }
  .chapo {
    max-width: none;
    font-size: 1.1875rem;
    margin-top: var(--s-6);
  }
  .actions {
    align-items: center;
    max-width: none;
  }
  .bouton {
    padding: 0 28px;
  }
  .carte-qr {
    position: fixed;
    z-index: 6;
    right: var(--gouttiere);
    bottom: 40px;
    display: flex;
    align-items: center;
    gap: var(--s-4);
    padding: var(--s-3) var(--s-10) var(--s-3) var(--s-3);
    border-radius: var(--r-carte);
    text-align: left;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--blanc-92);
    transition:
      opacity 0.4s var(--ease-doux),
      translate 0.4s var(--ease-out),
      visibility 0s linear 0.4s;
  }
  .carte-qr.est-cachee {
    opacity: 0;
    translate: 0 12px;
    visibility: hidden;
    pointer-events: none;
  }
  .carte-qr:not(.est-cachee) {
    transition-delay: 0s;
  }
  .carte-qr__fermer {
    position: absolute;
    top: 6px;
    right: 6px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--blanc-60);
    cursor: pointer;
    transition:
      background-color 0.2s var(--ease-out),
      color 0.2s var(--ease-out);
  }
  /* Au-dessus du crème : verre clair, texte encre. */
  .carte-qr--creme {
    background: rgb(243 239 230 / 0.72);
    box-shadow:
      inset 0 0 0 1px var(--trait-creme),
      0 8px 24px rgb(26 25 23 / 0.12);
    color: var(--encre);
  }
  .carte-qr--creme .carte-qr__petit,
  .carte-qr--creme .carte-qr__fermer {
    color: var(--texte-creme);
  }
  .carte-qr__fermer:hover {
    background: rgb(255 255 255 / 0.1);
    color: var(--blanc);
  }
  .carte-qr__fermer svg {
    width: 16px;
    height: 16px;
  }
  .carte-qr .qr {
    width: 84px;
    height: 84px;
  }
}

/* ---------- Entrée : flash, puis révélation ---------- */
.js .ligne > span {
  transform: translateY(105%);
}
.js .entree {
  opacity: 0;
  translate: 0 12px;
}
.js .compteur.entree {
  translate: -50% 12px;
}
.js .hero__photo {
  scale: 1.06;
}
.est-pret .ligne > span {
  transform: none;
  transition: transform var(--d-entree) var(--ease-out) var(--d, 0s);
}
.est-pret .entree {
  opacity: 1;
  translate: 0 0;
  transition:
    opacity 0.7s var(--ease-out) var(--d, 0s),
    translate 0.7s var(--ease-out) var(--d, 0s);
}
.est-pret .compteur.entree {
  translate: -50% 0;
}
.est-pret .hero__photo {
  scale: 1;
  transition:
    scale 2.2s var(--ease-out),
    opacity 1.1s var(--ease-doux);
}
@media (prefers-reduced-motion: reduce) {
  .js .ligne > span,
  .js .entree,
  .js .hero__photo {
    transform: none;
    translate: none;
    scale: none;
  }
  .js .compteur.entree {
    translate: -50% 0;
  }
  .js .hero__bloc,
  .js .compteur {
    opacity: 0;
  }
  .est-pret .hero__bloc,
  .est-pret .compteur,
  .est-pret .entree {
    opacity: 1;
    transition: opacity 0.4s linear;
  }
  .est-pret .ligne > span {
    transition: none;
  }
  .est-pret .indice-defilement {
    animation: none;
    transform: scaleY(0.7);
  }
}

/* =====================================================================
   Suite de la page : scène collante, rendus, gestes, FAQ, appel final.
   ===================================================================== */

/* ---------- Titres de section : même voix que le héros, une taille en dessous ---------- */
.titre-section,
.titre-final {
  margin: 0;
  font-size: var(--t-section);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.l {
  display: block;
  overflow: clip;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.l > span {
  display: inline-block;
}
.l--gris {
  color: var(--gris-titre);
}
.centre {
  width: min(100% - 2 * var(--gouttiere), 880px);
  margin-inline: auto;
  text-align: center;
}
.section__chapo {
  max-width: 34ch;
  margin: var(--s-5) auto 0;
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--blanc-72);
  text-wrap: balance;
}

/* ---------- Scène collante ----------
   Liée au défilement sans lissage. Pendant la scène, rien ne se recalcule à chaque image : seulement transform et
   opacity, sur des calques dont le contenu (ombres, encre, tape) est dessiné une fois. */
.histoire {
  position: relative;
  height: 360svh;
  background: var(--nuit);
}
.histoire__colle {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100svh;
  padding: calc(64px + env(safe-area-inset-top)) 0 calc(84px + env(safe-area-inset-bottom));
  overflow: clip;
}
/* Le crème monte au moment de la surprise : seule respiration chaude de la scène. */
.histoire__fond {
  position: absolute;
  inset: 0;
  background: var(--creme);
  opacity: 0;
  will-change: opacity;
}
.histoire__textes {
  position: relative;
  display: grid;
  width: min(100% - 2 * var(--gouttiere), 880px);
  margin-inline: auto;
  padding-top: var(--s-4);
}
/* Les titres apparaissent au franchissement d'un seuil (classe), jamais à moitié dessinés. */
.etape {
  grid-area: 1 / 1;
  color: var(--blanc);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s var(--ease-out),
    visibility 0s linear 0.35s;
}
.etape.est-actif {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.35s var(--ease-out),
    visibility 0s;
}
.etape .l > span {
  transform: translateY(105%);
  transition: transform 0.35s var(--ease-out);
}
.etape .l + .l > span {
  transition-delay: 60ms;
}
.etape.est-actif .l > span {
  transform: none;
}
.etape .titre-section {
  font-size: clamp(1.75rem, min(4.3svh, 8vw), 3.5rem);
}
.etape__chapo {
  max-width: 32ch;
  margin: var(--s-3) auto 0;
  font-size: clamp(0.9375rem, 2svh, 1.125rem);
  line-height: 1.45;
  color: var(--blanc-72);
  text-wrap: balance;
  transform: translateY(8px);
  transition: transform 0.35s var(--ease-out) 0.12s;
}
.etape.est-actif .etape__chapo {
  transform: none;
}
.etape--creme {
  color: var(--encre);
}
.etape--creme .l--gris {
  color: var(--gris-titre-creme);
}
.etape--creme .etape__chapo {
  color: var(--texte-creme);
}
.histoire__scene {
  position: relative;
  margin-top: var(--s-4);
  overflow: clip;
}

/* Téléphone au cadre épuré : pas de boutons, pas d'îlot détaillé, un liseré de lumière. */
.tel {
  position: absolute;
  left: 0;
  top: 0;
  padding: 9px;
  border-radius: 46px;
  background: var(--tel-cadre);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.12),
    0 0 0 1px rgb(0 0 0 / 0.5),
    var(--ombre-tel);
  will-change: transform;
}
.tel__ecran {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 37px;
  background: #f7f6f2;
  container-type: inline-size;
  isolation: isolate;
}
.ecran,
.tel__poses,
.tel__poses img {
  position: absolute;
  width: 100%;
  object-fit: cover;
}
.ecran {
  inset: 0;
  height: 100%;
  opacity: 0;
}
.ecran--viseur {
  opacity: 1;
}
/* Les poses du viseur : la zone photo de la capture (sous la barre du compteur). */
.tel__poses {
  left: 0;
  top: 6.635%;
  height: 73.46%;
  overflow: hidden;
}
.tel__poses img {
  inset: 0;
  height: 100%;
  opacity: 0;
}
.tel__poses img.est-visible {
  opacity: 1;
}
/* Le compteur du viseur, posé sur celui de la capture (même police que l'app). */
.tel__compteur {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6.64%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 0.2%;
  background: #0f0f0f;
  color: #fff;
  font-family: var(--f-app);
  font-weight: 500;
  font-size: 5.13cqi;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tel__chiffres {
  display: inline-flex;
}
.tel__chiffres .chiffre {
  height: 1.2em;
  line-height: 1.2em;
  -webkit-mask-image: none;
  mask-image: none;
}
/* La cartouche de l'écran d'attente s'efface quand la pochette prend le relais. */
.tel__cache-cartouche {
  position: absolute;
  left: 18%;
  top: 30.5%;
  width: 72%;
  height: 17%;
  background: #f7f6f2;
  opacity: 0;
}
.tel__voile-ecran {
  position: absolute;
  inset: 0;
  background: #f7f6f2;
  opacity: 0;
}
/* Halo de flash : dégradé en fondu normal (pas de mode de fusion à recalculer). */
.tel__flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 40%,
    rgb(255 252 244 / 0.92) 0%,
    rgb(255 246 224 / 0.45) 42%,
    rgb(255 246 224 / 0) 80%
  );
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* Pochette : un seul calque qui se déplace ; ses parties sont placées une fois pour toutes (unités du rendu
   833 × 1364 : pli à 443, haut de la face à 533). L'ombre est une image, pas un filtre. */
.pochette {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  visibility: hidden;
  will-change: transform;
}
.pochette > img {
  position: absolute;
  left: 0;
  width: 100%;
}
.pochette__ombre {
  left: -12% !important;
  top: 0;
  width: 124% !important;
  height: 107.33%;
}
.pochette__dos,
.pochette__face {
  top: 0;
  height: 100%;
}
.pochette__rabat {
  top: 0;
  height: 32.62%;
  transform-origin: 50% 100%;
  opacity: 0;
}
.pochette__rabat-ferme {
  top: 32.48%;
  height: 32.62%;
  transform-origin: 50% 0;
}
.tape-nom {
  position: absolute;
  left: 15%;
  top: 80.6%;
  width: 70%;
  aspect-ratio: 600 / 91;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  container-type: inline-size;
  opacity: 0;
  will-change: transform, opacity;
}
.tape-nom__papier {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.tape-nom__texte {
  position: relative;
  padding-top: 0.12em;
  font-family: var(--f-main);
  font-weight: 700;
  font-size: 9.4cqi;
  line-height: 1;
  white-space: nowrap;
  color: rgb(43 42 40 / 0.9);
  /* L'encre qui boit le papier : filtre posé une fois, jamais animé. */
  filter: url('#encre-tape');
}
/* L'écriture : un morceau de tape qui glisse vers la droite et découvre le texte (transform seulement). */
.tape-nom__cache {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: transform;
}
.tape-nom__cache img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}
.tape-nom__caret {
  position: absolute;
  left: 0;
  top: 24%;
  width: 2px;
  height: 52%;
  background: var(--encre);
}

/* Tirages : ils sortent par la bouche de la pochette (fenêtre fixe), se développent (voile en opacity), puis
   rejoignent leurs cases dans l'album. */
.tirages {
  position: absolute;
  left: 0;
  top: 0;
  overflow: clip;
  visibility: hidden;
}
.tirages.est-libre {
  overflow: visible;
}
.tirage {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform, opacity;
}
/* Le bord blanc du tirage, hors de la photo : il s'efface à l'arrivée, la photo tombe pile sur sa case. */
.tirage__cadre {
  position: absolute;
  inset: -5%;
  background: #fbf8f1;
  border-radius: 2px;
  box-shadow: var(--ombre-tirage);
  will-change: opacity;
}
.tirage img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1px;
  background: #eae4d7;
}
.tirage__voile {
  position: absolute;
  inset: 0;
  background: rgb(250 238 214);
  will-change: opacity;
}
@media (min-width: 900px) {
  /* Ordinateur : deux colonnes, les titres à gauche, le téléphone à droite. */
  .histoire__colle {
    grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
    grid-template-rows: 1fr;
    padding: calc(64px + var(--s-4)) var(--gouttiere) var(--s-6);
  }
  .histoire__textes {
    width: auto;
    margin: 0;
    padding: 0 0 0 max(0px, (100vw - 1280px) / 2);
    align-self: center;
  }
  .etape {
    text-align: left;
  }
  .etape .titre-section {
    font-size: clamp(2.5rem, 3.4vw, 3.25rem);
  }
  .etape__chapo {
    margin-left: 0;
    font-size: 1.1875rem;
  }
  .histoire__scene {
    margin-top: 0;
  }
}

/* ---------- Rendus : le comparateur sur la nuit ---------- */
.rendus {
  padding: var(--entre) 0;
  background: var(--nuit);
}
.comparateur-bloc {
  width: 100%;
  margin-top: var(--s-10);
}
.comparateur {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #1c1b19;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.comparateur img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.comparateur__apres,
.comparateur__apres-inner {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.comparateur__apres {
  overflow: hidden;
}
.comparateur__apres-inner img {
  opacity: 0;
  transition: opacity 0.4s var(--ease-doux);
}
.comparateur__apres-inner img.est-actif {
  opacity: 1;
}
/* Étiquettes en verre, posées sur la photo comme les pastilles de l'app. */
.etiquette {
  position: absolute;
  top: var(--s-4);
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border-radius: var(--r-pilule);
  font-size: 0.8125rem;
  font-weight: 550;
  pointer-events: none;
}
.etiquette--avant {
  left: var(--s-4);
}
.etiquette--apres {
  right: var(--s-4);
}
.comparateur__poignee {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  will-change: transform;
}
.comparateur__trait {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -0.75px;
  width: 1.5px;
  background: var(--creme);
  box-shadow: 0 0 8px rgb(0 0 0 / 0.3);
}
.comparateur__bouton {
  position: absolute;
  left: -24px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
}
.comparateur__bouton svg {
  width: 20px;
  height: 20px;
}
.comparateur__bouton:focus-visible {
  outline: 2px solid var(--creme);
  outline-offset: 2px;
}
.rendus__controles {
  margin-top: var(--s-6);
  text-align: center;
}
.onglets {
  position: relative;
  display: inline-flex;
  height: 44px;
  padding: 4px;
  border-radius: var(--r-pilule);
}
.onglets__fond {
  position: absolute;
  left: 0;
  top: 4px;
  width: 0;
  height: 36px;
  border-radius: var(--r-pilule);
  background: var(--creme);
  transition:
    transform 0.24s var(--ease-out),
    width 0.24s var(--ease-out);
}
.onglets button {
  position: relative;
  height: 36px;
  padding: 0 var(--s-4);
  border: 0;
  border-radius: var(--r-pilule);
  background: transparent;
  color: var(--blanc-92);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 550;
  cursor: pointer;
  transition: color 0.24s var(--ease-out);
}
.onglets button[aria-selected='true'] {
  color: var(--encre);
}
.rendus__legende {
  min-height: 1.45em;
  margin-top: var(--s-3);
  font-size: 0.9375rem;
  color: var(--blanc-60);
}
@media (min-width: 900px) {
  .comparateur-bloc {
    width: min(100% - 2 * var(--gouttiere), 880px);
    margin: var(--s-12) auto 0;
  }
  .comparateur {
    aspect-ratio: auto;
    height: min(78vh, 720px);
    border-radius: 28px;
  }
  .etiquette {
    top: var(--s-5);
  }
  .etiquette--avant {
    left: var(--s-5);
  }
  .etiquette--apres {
    right: var(--s-5);
  }
  .rendus__controles {
    margin-top: var(--s-8);
  }
}

/* ---------- Trois gestes : la respiration crème ---------- */
.etapes {
  padding: var(--entre) var(--gouttiere);
  background: var(--creme);
  color: var(--encre);
}
.etapes .l--gris {
  color: var(--gris-titre-creme);
}
.etapes__liste {
  display: grid;
  gap: var(--s-10);
  max-width: 1040px;
  margin: var(--s-12) auto 0;
  padding: 0;
  list-style: none;
  text-align: center;
}
.etapes__num {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--texte-creme);
}
.etapes__liste h3 {
  margin: var(--s-3) 0 0;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.etapes__liste p {
  max-width: 30ch;
  margin: var(--s-2) auto 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--texte-creme);
  text-wrap: balance;
}
.engagements {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s-2);
  max-width: 880px;
  margin: var(--s-16) auto 0;
  padding: 0;
  list-style: none;
}
.engagements li {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  padding: 0 var(--s-4) 0 var(--s-3);
  border-radius: var(--r-pilule);
  box-shadow: inset 0 0 0 1px var(--trait-creme);
  font-size: 0.9375rem;
  font-weight: 500;
}
.engagements svg {
  width: 18px;
  height: 18px;
  flex: none;
}
@media (min-width: 900px) {
  .etapes__liste {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-12);
    margin-top: var(--s-16);
  }
}

/* ---------- FAQ : une colonne centrée ---------- */
.faq {
  padding: var(--entre) var(--gouttiere);
  background: var(--nuit);
  text-align: center;
}
.faq__liste {
  max-width: 720px;
  margin: var(--s-12) auto 0;
  text-align: left;
  border-top: 1px solid var(--trait-nuit);
}
.faq__item {
  border-bottom: 1px solid var(--trait-nuit);
}
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 64px;
  padding: var(--s-4) 0;
  list-style: none;
  cursor: pointer;
  font-size: 1.0625rem;
  font-weight: 550;
  letter-spacing: -0.01em;
  color: var(--blanc-92);
}
.faq__item summary::-webkit-details-marker {
  display: none;
}
.faq__item summary:hover {
  color: var(--blanc);
}
/* Le « + » devient « − » : la barre verticale s'efface, rien ne tourne. */
.faq__plus {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
}
.faq__plus::before,
.faq__plus::after {
  content: '';
  position: absolute;
  left: 0;
  top: 7.25px;
  width: 16px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.25s var(--ease-out);
}
.faq__plus::after {
  transform: scaleX(0.094) scaleY(10.67);
}
.faq__item[open] .faq__plus::after {
  transform: scaleX(0.094) scaleY(0);
}
.faq__rep p {
  max-width: 60ch;
  margin: 0;
  padding: 0 var(--s-8) var(--s-5) 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--blanc-72);
}
.faq__item[open] .faq__rep {
  animation: deplie 0.35s var(--ease-out);
}
@keyframes deplie {
  from {
    opacity: 0;
    translate: 0 -6px;
  }
}
@media (min-width: 900px) {
  .faq__item summary {
    min-height: 72px;
    font-size: 1.1875rem;
  }
}

/* ---------- Appel final : le mur de l'album ---------- */
.final {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: var(--s-24) var(--gouttiere);
  overflow: clip;
  isolation: isolate;
  text-align: center;
}
.final__mur {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 2px;
  background: var(--nuit);
}
.final__mur img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.04) saturate(1.04);
}
/* Au-delà de la grille visible (3 × 4 sur mobile), les tirages restent dans le tiroir. */
.final__mur img:nth-of-type(n + 13) {
  display: none;
}
.final__voile {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(80% 58% at 50% 50%, rgb(11 11 10 / 0.94) 0%, rgb(11 11 10 / 0.88) 60%, rgb(11 11 10 / 0.6) 100%),
    linear-gradient(to bottom, var(--nuit) 0, rgb(11 11 10 / 0) 18%, rgb(11 11 10 / 0) 82%, var(--nuit) 100%);
}
.final__inner {
  position: relative;
  max-width: 1200px;
}
.titre-final {
  font-size: clamp(2.375rem, 9.4vw, 5.5rem);
}
.final__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s-2);
  width: 100%;
  max-width: 340px;
  margin: var(--s-10) auto 0;
}
.final__fetes {
  margin-top: var(--s-5);
  font-size: 0.875rem;
  color: var(--blanc-60);
}
@media (min-width: 900px) {
  .final__mur {
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(2, 1fr);
  }
  .final__actions {
    align-items: center;
    max-width: none;
  }
}

/* ---------- Pied ---------- */
.pied .logo {
  height: auto;
}
.pied {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-8) var(--gouttiere) calc(var(--s-8) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--trait-nuit);
  background: var(--nuit);
  font-size: 0.8125rem;
  color: var(--blanc-60);
}
.pied p {
  margin: 0;
}
@media (min-width: 900px) {
  .pied {
    padding-bottom: var(--s-8);
  }
}

/* ---------- Barre collante mobile ---------- */
.barre-bas {
  position: fixed;
  z-index: 6;
  left: var(--s-3);
  right: var(--s-3);
  bottom: calc(var(--s-3) + env(safe-area-inset-bottom));
  padding: 6px;
  border-radius: var(--r-pilule);
  opacity: 0;
  translate: 0 calc(100% + 24px);
  visibility: hidden;
  transition:
    opacity 0.3s var(--ease-doux),
    translate 0.4s var(--ease-out),
    visibility 0s linear 0.4s;
}
.barre-bas.est-visible {
  opacity: 1;
  translate: 0 0;
  visibility: visible;
  transition-delay: 0s;
}
.bouton--barre {
  width: 100%;
  height: 48px;
}
.barre-bas--creme {
  background: rgb(243 239 230 / 0.7);
  box-shadow:
    inset 0 0 0 1px var(--trait-creme),
    0 8px 24px rgb(26 25 23 / 0.12);
}
.barre-bas--creme .bouton--barre {
  background: var(--encre);
  color: var(--creme);
}
@media (prefers-reduced-transparency: reduce) {
  .barre-bas--creme {
    background: rgb(243 239 230 / 0.97);
  }
}
@media (min-width: 900px) {
  .barre-bas {
    display: none;
  }
}

/* ---------- Entrées au défilement ---------- */
.js .revele .l > span {
  transform: translateY(105%);
  transition: transform var(--d-entree) var(--ease-out) var(--delai, 0s);
}
.js .revele.est-vu .l > span {
  transform: none;
}
.js .apparait {
  opacity: 0;
  translate: 0 16px;
  transition:
    opacity 0.7s var(--ease-out) var(--delai, 0s),
    translate 0.7s var(--ease-out) var(--delai, 0s);
}
.js .apparait.est-vu {
  opacity: 1;
  translate: 0 0;
}
@media (prefers-reduced-motion: reduce) {
  .js .revele .l > span {
    transform: none;
    transition: none;
  }
  .js .revele {
    opacity: 0;
    transition: opacity 0.4s linear;
  }
  .js .revele.est-vu {
    opacity: 1;
  }
  .js .apparait {
    translate: none;
    transition: opacity 0.4s linear;
  }
  .faq__item[open] .faq__rep {
    animation: none;
  }
  .barre-bas,
  .carte-qr {
    translate: none !important;
  }
}

/* Pendant la scène collante : en-tête et barre en fond presque opaque, sans flou (rien à redessiner). */
.en-scene .entete.est-defile,
.en-scene .barre-bas {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.en-scene .entete.est-defile {
  background: rgb(11 11 10 / 0.95);
}
.en-scene .entete.est-defile.entete--creme {
  background: rgb(243 239 230 / 0.96);
}
.en-scene .barre-bas {
  background: rgb(23 23 23 / 0.94);
}
.en-scene .barre-bas.barre-bas--creme {
  background: rgb(243 239 230 / 0.96);
}
@media (prefers-reduced-motion: reduce) {
  .etape .l > span,
  .etape__chapo {
    transform: none;
    transition: none;
  }
}
