/* Caress — le site.
   Les couleurs suivent la même règle que l'app (Sources/Design/Palette.swift) :
   aucune n'est écrite en dur, toutes dérivent d'une teinte --h en OKLCH,
   y compris les gris. Changer --h retient toute la page, comme dans l'app. */

@property --h {
  syntax: '<number>';
  inherits: true;
  initial-value: 350;
}

:root {
  --h: 350;
  color-scheme: light;

  /* Le dégradé de l'en-tête : deux teintes, la seconde décalée de 42°. */
  --grad-a: oklch(0.800 0.132 var(--h));
  --grad-b: oklch(0.872 0.095 calc(var(--h) + 42));
  --sur-grad: oklch(0.255 0.045 var(--h));

  --accent: oklch(0.595 0.170 var(--h));
  --vif: oklch(0.680 0.165 var(--h));
  --chaud: oklch(0.780 0.145 var(--h));
  --contre: oklch(0.400 0.080 var(--h));
  --contre-fonce: oklch(0.340 0.070 var(--h));
  --creme: oklch(0.977 0.022 var(--h));
  --teinte: oklch(0.972 0.018 var(--h));

  --fond: oklch(0.968 0.010 var(--h));
  --carte: oklch(1 0 var(--h));
  --trait: oklch(0.910 0.012 var(--h));
  --encre: oklch(0.245 0.030 var(--h));
  --doux: oklch(0.560 0.022 var(--h));
  --pale: oklch(0.700 0.018 var(--h));
  --ombre: oklch(0.30 0.03 var(--h) / 0.10);

  /* Ce qui doit crier reste rouge, quelle que soit la teinte (Palette.alerte). */
  --alerte: oklch(0.550 0.185 28);

  --affiche: "Bricolage Grotesque", "Avenir Next", ui-sans-serif, sans-serif;
  --texte: "Figtree", "Avenir Next", ui-sans-serif, sans-serif;

  --marge: clamp(20px, 5vw, 72px);
  --large: 1240px;

  transition: --h 900ms cubic-bezier(.2, .75, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 17px;
  line-height: 1.55;
  /* Pas d'overflow ici : il ferait du body une zone de défilement et casserait
     le téléphone qui suit la lecture (position: sticky). C'est html qui coupe. */
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--affiche); font-weight: 800; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
a, button { -webkit-tap-highlight-color: transparent; }

.titre-geant {
  font-size: clamp(44px, 5.7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 96;
}
.titre-section {
  font-size: clamp(36px, 4.8vw, 68px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 96;
}

/* ---------- Barre du haut ---------- */
.barre {
  position: fixed;
  inset: max(12px, env(safe-area-inset-top)) var(--marge) auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 8px 8px 8px 12px;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.55);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid oklch(1 0 0 / 0.6);
  box-shadow: 0 6px 24px var(--ombre);
  transform: translateY(-140%);
  animation: descend 700ms 200ms cubic-bezier(.2, .8, .2, 1) forwards;
}
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--affiche); font-weight: 800; font-size: 21px; letter-spacing: -0.02em; }
.marque img { width: 36px; height: 36px; border-radius: 22%; box-shadow: 0 2px 6px var(--ombre); }
.liens { display: flex; gap: 22px; margin-left: auto; font-weight: 600; font-size: 15px; }
.liens a { text-decoration: none; color: var(--encre); opacity: 0.72; transition: opacity 0.2s; }
.liens a:hover { opacity: 1; }
.pastille {
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--encre);
  color: var(--creme);
  font-weight: 600;
  font-size: 14.5px;
  white-space: nowrap;
  transition: transform 0.25s, background 0.3s;
}
.pastille:hover { transform: translateY(-1px); background: var(--contre); }
@keyframes descend { to { transform: none; } }

/* ---------- Ouverture ---------- */
.ouverture {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: 40px;
  padding: 120px var(--marge) 140px;
  background:
    radial-gradient(120% 90% at 85% 10%, oklch(0.9 0.08 calc(var(--h) + 42) / 0.9), transparent 60%),
    linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: var(--sur-grad);
  overflow: hidden;
  isolation: isolate;
}
/* Grain léger : le dégradé ne fait pas « écran ». */
.ouverture::after, .prix::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.16;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
}
.ouverture-texte { position: relative; z-index: 2; max-width: 640px; }
.surtitre { font-weight: 700; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.7; margin-bottom: 22px; }
.ouverture h1 { margin-bottom: 28px; }
.ligne { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.ligne > span { display: inline-block; transform: translateY(105%); animation: monte 900ms cubic-bezier(.2, .8, .2, 1) forwards; }
.ligne:nth-child(2) > span { animation-delay: 90ms; }
.ligne:nth-child(3) > span { animation-delay: 180ms; }
@keyframes monte { to { transform: none; } }

.souligne { font-style: normal; position: relative; white-space: nowrap; }
.souligne::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%; bottom: 0.04em;
  height: 0.2em;
  border-radius: 999px;
  background: var(--creme);
  opacity: 0.85;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  animation: trace 700ms 900ms cubic-bezier(.6, 0, .2, 1) forwards;
}
@keyframes trace { to { transform: scaleX(1); } }

.chapeau { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; max-width: 34em; margin-bottom: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.bouton {
  display: inline-flex; align-items: center; justify-content: center;
  height: 54px; padding: 0 26px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  transition: transform 0.25s cubic-bezier(.2, .8, .2, 1), box-shadow 0.25s, background 0.3s;
}
.bouton-plein { background: var(--encre); color: var(--creme); box-shadow: 0 10px 24px oklch(0.25 0.05 var(--h) / 0.28); }
.bouton-plein:hover { transform: translateY(-2px); box-shadow: 0 14px 30px oklch(0.25 0.05 var(--h) / 0.32); }
.bouton-trait { border: 2px solid currentColor; color: var(--sur-grad); }
.bouton-trait:hover { background: oklch(1 0 0 / 0.35); }
.faits { display: flex; flex-wrap: wrap; font-size: 15px; font-weight: 600; opacity: 0.82; line-height: 1.7; }
.faits li:not(:last-child)::after { content: "·"; margin: 0 10px; opacity: 0.5; }

.ouverture-scene { position: relative; height: min(78vh, 720px); display: grid; place-items: center; }
.telephone {
  margin: 0;
  position: relative;
  padding: 9px;
  border-radius: 58px;
  background: linear-gradient(155deg, oklch(0.38 0.01 var(--h)), oklch(0.16 0.01 var(--h)) 40%, oklch(0.24 0.01 var(--h)));
  box-shadow:
    inset 0 0 0 1.5px oklch(0.55 0.01 var(--h) / 0.6),
    0 2px 0 oklch(1 0 0 / 0.15),
    0 40px 80px -20px oklch(0.25 0.06 var(--h) / 0.45),
    0 16px 30px -12px oklch(0.25 0.06 var(--h) / 0.35);
}
.telephone img { border-radius: 49px; width: 100%; background: var(--fond); }
.telephone-heros {
  width: min(340px, 64vw, max(240px, calc((100svh - 120px) * 0.46)));
  transform: rotate(-4deg) translateY(60px);
  opacity: 0;
  animation: pose 1100ms 250ms cubic-bezier(.2, .9, .25, 1.12) forwards;
  z-index: 2;
  will-change: transform;
}
@keyframes pose { to { opacity: 1; transform: rotate(-4deg) translateY(0); } }

.sticker { position: absolute; filter: drop-shadow(0 10px 14px oklch(0.25 0.06 var(--h) / 0.28)); pointer-events: none; }
.s-chien { width: min(220px, 34vw); height: auto; left: max(-10px, calc(50% - 300px)); bottom: 2%; z-index: 3; transform-origin: 50% 90%; opacity: 0; animation: surgit 700ms 1000ms cubic-bezier(.2, .9, .3, 1.4) forwards, salue 3.2s 1.9s ease-in-out infinite; }
.s-chat { width: min(170px, 26vw); height: auto; right: max(0px, calc(50% - 280px)); top: 3%; z-index: 1; transform: rotate(10deg); opacity: 0; animation: surgit-chat 700ms 1200ms cubic-bezier(.2, .9, .3, 1.3) forwards; }
@keyframes surgit { from { opacity: 0; transform: translateY(40px) scale(0.7); } to { opacity: 1; transform: none; } }
@keyframes surgit-chat { from { opacity: 0; transform: translate(-30px, 30px) rotate(-6deg) scale(0.7); } to { opacity: 1; transform: rotate(10deg); } }
@keyframes salue { 0%, 70%, 100% { rotate: 0deg; } 76% { rotate: -5deg; } 82% { rotate: 4deg; } 88% { rotate: -3deg; } 94% { rotate: 1deg; } }

.flotte { position: absolute; z-index: 4; filter: drop-shadow(0 6px 10px oklch(0.25 0.06 var(--h) / 0.3)); opacity: 0; animation: apparait 600ms forwards, flotte 6s ease-in-out infinite; }
.f1 { top: 18%; left: calc(50% - 250px); animation-delay: 1.3s, 1.3s; }
.f2 { top: 46%; right: calc(50% - 250px); animation-delay: 1.45s, 2.1s; }
.f3 { bottom: 16%; right: calc(50% - 215px); animation-delay: 1.6s, 0.7s; }
.f4 { top: 4%; left: calc(50% - 240px); animation-delay: 1.75s, 1.6s; }
@keyframes apparait { to { opacity: 1; } }
@keyframes flotte { 0%, 100% { translate: 0 0; rotate: -4deg; } 50% { translate: 0 -14px; rotate: 5deg; } }

.vague { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(50px, 8vw, 120px); fill: var(--fond); }

/* Les pattes qui suivent le curseur (la signature par empreinte de l'app). */
.patte { position: absolute; width: 26px; height: 26px; pointer-events: none; z-index: 1; color: var(--sur-grad); opacity: 0; animation: empreinte 1.6s ease-out forwards; }
@keyframes empreinte { 0% { opacity: 0; scale: 0.6; } 12% { opacity: 0.22; scale: 1; } 100% { opacity: 0; scale: 1; } }

/* ---------- Pour qui ---------- */
.especes { padding: 40px var(--marge) 100px; text-align: center; }
.especes-titre { font-family: var(--affiche); font-weight: 700; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.02em; margin-bottom: 30px; }
.especes-liste { display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(8px, 3vw, 48px); }
.especes-liste li { display: grid; justify-items: center; gap: 6px; font-weight: 600; color: var(--doux); }
.especes-liste img { width: clamp(84px, 11vw, 132px); height: auto; transition: transform 0.45s cubic-bezier(.2, .9, .3, 1.5); filter: drop-shadow(0 8px 12px var(--ombre)); }
.especes-liste li:hover img { transform: translateY(-10px) rotate(-6deg) scale(1.06); }

/* ---------- Une journée avec Caress ---------- */
.journee { padding: 40px var(--marge) 120px; max-width: var(--large); margin: 0 auto; }
.journee-tete { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: end; margin-bottom: 70px; }
.journee-tete p { color: var(--doux); max-width: 26em; }
.journee-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr); gap: clamp(30px, 6vw, 100px); }
.chapitre { min-height: 82vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; opacity: 0.28; transition: opacity 0.5s; }
.chapitre.actif { opacity: 1; }
.chapitre:first-child { min-height: 60vh; padding-top: 0; }
.onglet { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--teinte); border: 1px solid var(--trait); font-weight: 700; font-size: 14px; margin-bottom: 18px; }
.onglet img { width: 28px; height: 28px; }
.chapitre h3 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.02; letter-spacing: -0.03em; margin-bottom: 18px; }
.chapitre p { font-size: 18.5px; max-width: 30em; }
.chapitre .detail { margin-top: 14px; font-size: 16px; color: var(--doux); padding-left: 14px; border-left: 3px solid var(--chaud); }
.chapitre-alerte h3 { color: var(--alerte); }
.chapitre-alerte .detail { border-left-color: var(--alerte); }
/* Sur téléphone seulement : les onglets et les flèches de la démo. */
.demo-onglets, .demo-fleche { display: none; }

/* Le téléphone tient toujours entre la barre du haut (environ 90 px) et le bas de la fenêtre,
   quelle que soit sa hauteur : c'est la hauteur qui fixe la taille, pas la largeur. */
.scene-collante { position: sticky; top: 0; height: 100vh; height: 100svh; box-sizing: border-box; padding: 96px 0 28px; display: flex; align-items: center; justify-content: center; gap: 22px; }
.telephone-collant { height: min(720px, calc(100svh - 96px - 28px - 18px)); width: auto; aspect-ratio: 1206 / 2622; padding: 9px; box-sizing: content-box; }
/* Les écrans glissent comme dans l'app : le suivant arrive par la droite et couvre
   le précédent, qui recule un peu dans l'ombre. Jamais deux écrans en transparence. */
.ecran-glisse { position: absolute; inset: 9px; border-radius: 49px; overflow: hidden; background: var(--fond); isolation: isolate; }
.ecran-glisse img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; transform: translateX(101%); box-shadow: -18px 0 30px oklch(0.2 0.03 var(--h) / 0.18); transition: transform 0.75s cubic-bezier(.22, .8, .22, 1), filter 0.75s; }
.ecran-glisse img.avant { transform: translateX(-26%); filter: brightness(0.82); }
.ecran-glisse img.actif { transform: none; filter: none; }
.repere { display: grid; gap: 8px; }
.repere li { width: 6px; height: 6px; border-radius: 999px; background: var(--trait); transition: height 0.4s cubic-bezier(.2, .8, .2, 1), background 0.4s; }
.repere li.actif { height: 26px; background: var(--accent); }

/* ---------- À votre couleur ---------- */
.couleur {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 120px var(--marge);
  background: linear-gradient(160deg, var(--teinte), var(--creme));
  border-top: 1px solid var(--trait);
  border-bottom: 1px solid var(--trait);
}
.couleur-texte { max-width: 520px; justify-self: end; }
.couleur-texte p { font-size: 19px; color: var(--doux); margin: 20px 0 34px; }
.nuancier { display: flex; flex-wrap: wrap; gap: 12px; }
.nuancier button {
  --t: 350;
  width: 56px; height: 56px;
  border-radius: 18px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, oklch(0.800 0.132 var(--t)), oklch(0.872 0.095 calc(var(--t) + 42)));
  box-shadow: 0 4px 10px oklch(0.3 0.05 var(--t) / 0.25), inset 0 0 0 1px oklch(1 0 0 / 0.5);
  transition: transform 0.3s cubic-bezier(.2, .9, .3, 1.5), box-shadow 0.3s;
  position: relative;
}
.nuancier button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.nuancier button:hover { transform: translateY(-3px) rotate(-4deg); }
.nuancier button[aria-checked="true"] { transform: scale(1.08); box-shadow: 0 0 0 3px var(--fond), 0 0 0 6px oklch(0.6 0.17 var(--t)), 0 8px 18px oklch(0.3 0.05 var(--t) / 0.3); }
.nom-teinte { margin-top: 18px; font-family: var(--affiche); font-weight: 700; font-size: 22px; color: var(--accent); }
.couleur-scene { position: relative; height: 640px; }
.telephone-teinte { position: absolute; left: 6%; top: 0; width: min(300px, 40vw); aspect-ratio: 1206 / 2622; box-sizing: content-box; z-index: 2; rotate: -3deg; }
.telephone-teinte img { position: absolute; inset: 9px; width: calc(100% - 18px); height: calc(100% - 18px); object-fit: cover; opacity: 0; transition: opacity 0.6s ease; }
.telephone-teinte img.actif { opacity: 1; }
.telephone-sombre { position: absolute; left: 44%; top: 70px; width: min(250px, 32vw); rotate: 5deg; z-index: 1; }
.legende { position: absolute; left: calc(44% + 40px); top: calc(70px + min(250px, 32vw) * 2.2 + 26px); font-weight: 600; color: var(--doux); font-size: 15px; rotate: 5deg; }

/* ---------- Partage (l'aplat rayé de l'app) ---------- */
.partage {
  position: relative;
  padding: 130px var(--marge) 150px;
  color: var(--creme);
  background-color: var(--contre);
  background-image: repeating-linear-gradient(-45deg, transparent 0 14px, oklch(1 0 0 / 0.045) 14px 28px);
  overflow: hidden;
}
.partage-tete { max-width: var(--large); margin: 0 auto 60px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: end; }
.partage-tete p { font-size: 19px; opacity: 0.85; max-width: 28em; }
.niveaux { max-width: var(--large); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.niveau { background: oklch(1 0 0 / 0.08); border: 1px solid oklch(1 0 0 / 0.14); border-radius: 28px; padding: 30px; transition: transform 0.4s cubic-bezier(.2, .8, .2, 1), background 0.4s; }
.niveau:hover { transform: translateY(-6px); background: oklch(1 0 0 / 0.12); }
.niveau h3 { font-size: 26px; margin-bottom: 8px; }
.niveau .pour { display: inline-block; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px; background: oklch(1 0 0 / 0.14); font-size: 14px; font-weight: 700; opacity: 1; }
.niveau p { opacity: 0.82; }
.niveau:nth-child(2) { translate: 0 30px; }
.niveau:nth-child(3) { translate: 0 60px; }
.niveau { position: relative; }
.s-partage { right: 14px; top: -84px; width: 112px; rotate: 8deg; }

/* ---------- Langues ---------- */
.langues { padding: 120px 0 90px; text-align: center; overflow: hidden; }
.langues-titre { font-family: var(--affiche); font-weight: 700; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.02em; margin-bottom: 30px; padding: 0 var(--marge); }
.defile { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.defile-piste { display: flex; gap: 56px; width: max-content; animation: defile 38s linear infinite; }
.defile-piste span { font-family: var(--affiche); font-weight: 800; font-size: clamp(46px, 6vw, 86px); letter-spacing: -0.035em; white-space: nowrap; color: var(--encre); }
.defile-piste span:nth-child(odd) { color: var(--vif); }
.defile-piste span[lang="ja"] { font-family: "Hiragino Sans", "Noto Sans JP", sans-serif; font-weight: 800; letter-spacing: 0; }
@keyframes defile { to { transform: translateX(-50%); } }
.langues-liste { margin-top: 28px; color: var(--doux); padding: 0 var(--marge); }

/* ---------- Confiance ---------- */
.confiance { padding: 30px var(--marge) 120px; }
.confiance ul { max-width: var(--large); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--encre); }
.confiance li { padding: 28px 28px 0 0; }
.confiance li + li { padding-left: 28px; border-left: 1px solid var(--trait); }
.confiance h3 { font-size: 22px; line-height: 1.15; margin-bottom: 10px; }
.confiance p { color: var(--doux); font-size: 16px; }

/* ---------- Prix ---------- */
.prix {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  padding: 140px var(--marge) 170px;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: var(--sur-grad);
}
.prix-icone { width: 140px; height: 140px; border-radius: 22.5%; margin: 0 auto 34px; box-shadow: 0 24px 50px oklch(0.3 0.08 var(--h) / 0.35); }
.titre-prix { margin-bottom: 26px; }
.prix-montant { font-size: 22px; }
.prix-montant strong { font-family: var(--affiche); font-size: 30px; }
.prix-essai { margin-top: 8px; font-size: 18px; font-weight: 600; }
.prix-note { margin-top: 10px; opacity: 0.72; }
.s-final { right: 7%; bottom: -10px; width: min(200px, 26vw); rotate: -8deg; }

.pied { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 28px var(--marge) max(28px, calc(env(safe-area-inset-bottom) + 14px)); font-size: 14.5px; color: var(--doux); }
.pied a { color: var(--encre); font-weight: 600; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.pied a:hover { color: var(--accent); }
.pied-liens { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.vers-vitrine { text-decoration: none; padding: 6px 14px; border-radius: 999px; border: 1.5px solid var(--trait); transition: border-color 0.25s, color 0.25s; }
.vers-vitrine:hover { border-color: var(--accent); }
.surtitre a { color: inherit; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ---------- Apparitions au défilement ---------- */
.revele { opacity: 0; transform: translateY(26px); transition: opacity 0.8s cubic-bezier(.2, .8, .2, 1), transform 0.9s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.revele.vu { opacity: 1; transform: none; }
.ouverture .revele { transition-delay: calc(var(--d, 0s) + 0.1s); }

/* ---------- L'iPhone en 3D ----------
   La toile se pose sur l'hôte ; les images plates restent dessous, invisibles,
   pour garder la place et servir de repère (et de secours sans WebGL). */
.toile-3d { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.couleur-scene .toile-3d { inset: -80px; width: calc(100% + 160px); height: calc(100% + 160px); }
/* En haut de page, le téléphone s'efface dans un fondu avant la vague, au lieu d'être coupé net. */
.ouverture > .toile-3d { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 300px), transparent calc(100% - 70px)); mask-image: linear-gradient(to bottom, #000 calc(100% - 300px), transparent calc(100% - 70px)); }
.vague { z-index: 3; }
.couleur { overflow: clip; }
.trois-d .telephone-heros, .trois-d .telephone-collant, .trois-d .telephone-teinte, .trois-d .telephone-sombre { visibility: hidden; }
.repere, .legende { position: relative; z-index: 3; }
.legende { position: absolute; }

/* ---------- Petits écrans ---------- */
@media (max-width: 900px) {
  .liens { display: none; }
  .barre { gap: 12px; }
  .pastille { margin-left: auto; padding: 9px 14px; font-size: 13.5px; }
  .ouverture { grid-template-columns: 1fr; gap: 0; padding-top: 112px; padding-bottom: 96px; text-align: left; }
  .ouverture-scene { height: auto; padding: 34px 0 20px; }
  .telephone-heros { width: min(290px, 66vw); }
  .s-chien { left: 0; bottom: -10px; width: 34vw; }
  .s-chat { right: 0; top: 0; width: 28vw; }
  .f1 { left: 6%; } .f2 { right: 4%; } .f3 { right: 10%; } .f4 { left: 30%; }
  .journee-tete, .partage-tete { grid-template-columns: 1fr; gap: 16px; }
  .journee-tete { margin-bottom: 30px; }

  /* La démo : un seul téléphone, les écrans de l'app qu'on fait glisser du doigt,
     comme dans l'app, au lieu de six téléphones empilés. */
  .journee { padding-bottom: 90px; }
  .journee-corps { grid-template-columns: minmax(0, 1fr); grid-template-areas: "onglets" "scene" "texte"; gap: 0; }
  .demo-onglets {
    grid-area: onglets;
    display: flex; gap: 8px;
    overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * var(--marge)); padding: 2px var(--marge) 4px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--marge), #000 calc(100% - var(--marge)), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--marge), #000 calc(100% - var(--marge)), transparent);
  }
  .demo-onglets::-webkit-scrollbar { display: none; }
  .demo-onglets button {
    flex: none; display: inline-flex; align-items: center; gap: 7px;
    height: 42px; padding: 0 15px 0 8px; border-radius: 999px;
    border: 1px solid var(--trait); background: var(--teinte); color: var(--encre);
    font: 700 14.5px/1 var(--texte); cursor: pointer;
    transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.25s cubic-bezier(.2, .9, .3, 1.4);
  }
  .demo-onglets button img { width: 26px; height: 26px; }
  .demo-onglets button:active { transform: scale(0.95); }
  .demo-onglets button[aria-pressed="true"] { background: var(--encre); color: var(--creme); border-color: var(--encre); }
  .scene-collante { grid-area: scene; position: relative; top: auto; height: auto; padding: 20px 0 22px; touch-action: pan-y; cursor: grab; }
  .telephone-collant { height: clamp(380px, calc(100svh - 420px), 560px); }
  .ecran-glisse { border-radius: 40px; }
  .repere { display: none; }
  .demo-fleche {
    grid-area: scene; align-self: center; z-index: 4;
    display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
    border-radius: 999px; border: 1px solid var(--trait); color: var(--encre);
    background: oklch(1 0 0 / 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 16px var(--ombre); cursor: pointer;
    transition: opacity 0.3s, transform 0.25s cubic-bezier(.2, .9, .3, 1.4);
  }
  .demo-fleche:active { transform: scale(0.9); }
  .demo-fleche:disabled { opacity: 0; pointer-events: none; }
  .demo-precedent { justify-self: start; }
  .demo-suivant { justify-self: end; }
  .chapitres {
    grid-area: texte;
    display: flex; gap: 16px;
    overflow-x: auto; scrollbar-width: none;
    scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin: 0 calc(-1 * var(--marge)); padding: 0 var(--marge); scroll-padding-inline: var(--marge);
  }
  .chapitres::-webkit-scrollbar { display: none; }
  .chapitre, .chapitre:first-child { flex: 0 0 100%; min-height: 0; padding: 0; justify-content: flex-start; scroll-snap-align: start; scroll-snap-stop: always; opacity: 0.3; }
  .chapitre.actif { opacity: 1; }
  .chapitre .onglet { display: none; }
  .chapitre h3 { font-size: clamp(26px, 7vw, 34px); margin-bottom: 12px; }
  .chapitre p { font-size: 16.5px; }
  .chapitre .detail { font-size: 14.5px; margin-top: 12px; }

  .couleur { grid-template-columns: 1fr; gap: 24px; padding: 80px var(--marge); }
  .couleur-texte { justify-self: stretch; }
  .couleur-texte p { margin: 16px 0 26px; }
  /* Les six teintes sur une seule ligne, à la largeur de l'écran. */
  .nuancier { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; max-width: 420px; }
  .nuancier button { width: auto; height: auto; aspect-ratio: 1; border-radius: 16px; }
  /* La scène a la hauteur du grand téléphone : la légende passe dessous, sans le chevaucher. */
  .telephone-teinte { left: 0; width: min(58vw, 340px); }
  .telephone-sombre { left: 46%; width: min(46vw, 270px); }
  .couleur-scene { height: calc(min(58vw, 340px) * 2.174 + 30px); margin-bottom: 44px; }
  .legende { left: auto; right: 0; top: 100%; bottom: auto; margin-top: 6px; rotate: 0deg; }
  .partage { padding: 90px var(--marge) 110px; }
  .partage-tete { margin-bottom: 36px; }
  .niveaux { grid-template-columns: 1fr; gap: 14px; }
  .niveau { padding: 26px; }
  .niveau:nth-child(2), .niveau:nth-child(3) { translate: none; }
  .s-partage { top: auto; bottom: -78px; right: 8px; width: 96px; }
  .langues { padding: 80px 0 60px; }
  .confiance { padding-bottom: 90px; }
  .confiance ul { grid-template-columns: 1fr; }
  .confiance li, .confiance li + li { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--trait); }
  .prix { padding: 100px var(--marge) 140px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .titre-geant { font-size: clamp(40px, 11.6vw, 52px); }
  .titre-section { font-size: clamp(34px, 9.6vw, 44px); }
  .chapeau { font-size: 17px; margin-bottom: 26px; }
  .actions { gap: 10px; margin-bottom: 22px; }
  .bouton { height: 50px; padding: 0 20px; font-size: 15.5px; }
  /* Les petites infos deviennent des pastilles, plus lisibles qu'une ligne coupée. */
  .faits { gap: 6px; font-size: 13.5px; line-height: 1.3; opacity: 1; }
  .faits li { padding: 6px 11px; border-radius: 999px; background: oklch(1 0 0 / 0.38); border: 1px solid oklch(1 0 0 / 0.5); }
  .faits li::after { content: none !important; }
  .telephone { padding: 7px; border-radius: 46px; }
  .telephone img { border-radius: 39px; }
  .ecran-glisse { inset: 7px; border-radius: 39px; }
  .telephone-collant { padding: 7px; }
}
/* Au doigt, un survol reste « collé » après le toucher : on n'en garde pas l'effet. */
@media (hover: none) {
  .niveau:hover { transform: none; background: oklch(1 0 0 / 0.08); }
  .especes-liste li:hover img, .nuancier button:hover:not([aria-checked="true"]) { transform: none; }
  .bouton-plein:hover, .pastille:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  :root { transition: none; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .defile-piste { animation: none; }
  .revele { opacity: 1; transform: none; }
}
