/* =========================================================
   ACCUEIL — style « vitrine de luxe » :
   noir profond, argent, beaucoup d'air, un seul fil de lecture.
   (le configurateur, la boutique et le compte gardent style.css)
   ========================================================= */
:root {
  --step: 120vh;               /* longueur d'un chapitre du film */
  --silver: linear-gradient(180deg, #ffffff 0%, #d9dce1 45%, #9aa0a8 100%);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
body { background: #000; }

/* ---------- Petits éléments communs ---------- */
.skip-link { position: fixed; left: 12px; top: 12px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: #fff; color: #000; font-size: 15px; font-weight: 600; transform: translateY(-160%); transition: transform .3s var(--ease); }
.skip-link:focus-visible { transform: none; outline: 2px solid #2997ff; outline-offset: 2px; }
.film a, .film button, .chapters a, .mcard a, .models a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.film a:focus-visible, .film button:focus-visible, .chapters a:focus-visible, .mcard a:focus-visible { outline: 2px solid #2997ff; outline-offset: 3px; }
#modeles, #personnaliser { scroll-margin-top: 0; }
.eyebrow {
  margin: 0 0 14px; display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #86868b;
}
.eyebrow .num { font-variant-numeric: tabular-nums; color: inherit; opacity: .55; letter-spacing: .08em; }
.eyebrow .num::after { content: ""; display: inline-block; width: 22px; height: 1px; margin-left: 10px; vertical-align: middle; background: currentColor; opacity: .6; }
.silver { background: var(--silver); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pill-lux {
  min-height: 50px; padding: 0 30px; background: #f5f5f7; color: #000; font-weight: 600; font-size: 17px;
  box-shadow: 0 10px 40px -12px rgba(255,255,255,.35);
}
.pill-lux { transition: background-color .2s ease, transform .25s var(--ease), box-shadow .25s ease; }
.pill-lux:hover { background: #fff; }
.pill-lux:active, .pill-lux-sm:active { transform: scale(.97); }
.pill-lux-sm { min-height: 36px; padding: 0 18px; font-size: 14px; font-weight: 600; background: #1d1d1f; color: #fff; }
.pill-lux-sm { transition: background-color .2s ease, transform .25s var(--ease); }
.pill-lux-sm:hover { background: #000; }
.lx-title { margin: 0; font-size: clamp(40px, 11vw, 80px); line-height: 1.02; font-weight: 600; letter-spacing: -.045em; text-wrap: balance; }
.lx-title .muted { color: #a1a1a6; }

/* =========================================================
   LE FILM : une gourde, quatre chapitres
   ========================================================= */
.film { position: relative; height: calc(var(--step) * 4 + 100vh); background: #000; color: #f5f5f7; }
.film-anchor { position: absolute; left: 0; top: calc(var(--step) * var(--k)); height: 1px; width: 1px; pointer-events: none; }
.film-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
/* lumière de studio : un halo doux, teinté par la couleur de la gourde */
.film-stage::before {
  content: ""; position: absolute; left: 50%; top: 62%; width: 140vmax; height: 140vmax; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgb(var(--glow, 31 95 200) / calc(.34 * var(--glow-k, .4))) 0%, rgb(var(--glow, 31 95 200) / calc(.1 * var(--glow-k, .4))) 32%, transparent 62%);
  pointer-events: none;
}
.film-stage::after { /* vignette : les bords s'éteignent */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 55%, transparent 55%, rgba(0,0,0,.7) 100%);
}
.film-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; z-index: 1; }

.film-copy {
  position: absolute; left: 0; right: 0; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 5svh);
  z-index: 3; padding: 0 28px; text-align: center; will-change: opacity, transform;
}
.film-copy h1 { margin: 0; font-size: clamp(46px, 13.4vw, 104px); line-height: 1.0; font-weight: 600; letter-spacing: -.05em; text-wrap: balance; }
.film-copy h2 { margin: 0; font-size: clamp(42px, 12vw, 84px); line-height: 1.0; font-weight: 600; letter-spacing: -.045em; }
.film-sub { margin: 16px auto 0; max-width: 28ch; font-size: 17px; line-height: 1.45; color: #a1a1a6; letter-spacing: -.01em; text-wrap: balance; }
/* avant que le script prenne la main, seul le premier chapitre est visible (sinon les titres se superposent au chargement) */
.film-copy:not([data-k="0"]) { opacity: 0; visibility: hidden; }
.film-open { animation: rise 1.6s var(--ease) both .15s; }
.film-cta-in { display: none; }
.film-cta { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 7svh); z-index: 3; display: flex; justify-content: center; animation: rise 1.6s var(--ease) both .45s; }
.film-fact { margin: 16px 0 0; font-size: 15px; color: #a1a1a6; letter-spacing: -.005em; font-variant-numeric: tabular-nums; }
.film-fact b { color: #f5f5f7; font-weight: 600; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* chapitre Gravure (téléphone) : le texte passe en bas, la gourde occupe le haut */
.film-copy.low { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 78px); }
.film-copy.low::before { content: ""; position: absolute; left: 0; right: 0; top: -90px; bottom: -120px; z-index: -1; background: linear-gradient(transparent, rgba(0,0,0,.82) 45%); }

/* couleurs : nom + pastilles à toucher */
.film-colors {
  position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 70px); z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0; pointer-events: none;
}
.film-color-name { margin: 4px 0 0; font-size: 15px; font-weight: 500; color: #f5f5f7; letter-spacing: .02em; }
.film-dots { display: flex; gap: 18px; }
.film-dots button {
  width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; position: relative;
  background: var(--c); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), inset 0 -6px 10px rgba(0,0,0,.25), inset 0 5px 8px rgba(255,255,255,.18);
  transition: transform .4s var(--ease);
}
.film-dots button::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; }
.film-dots button::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid #f5f5f7; opacity: 0; transform: scale(.8); transition: opacity .4s, transform .4s var(--ease); }
.film-dots button[aria-checked="true"] { transform: scale(1.06); }
.film-dots button[aria-checked="true"]::after { opacity: 1; transform: none; }
.film-more { margin: -4px 0 0; font-size: 12px; color: #6e6e73; letter-spacing: .02em; }

/* étiquettes « Détails » accrochées à la gourde */
.film-tags { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.tag { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform; }
.tag i { position: absolute; left: -3.5px; top: -3.5px; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 5px rgba(255,255,255,.14); }
.tag em { position: absolute; left: 0; top: -.5px; height: 1px; width: var(--len, 30px); background: linear-gradient(90deg, rgba(255,255,255,.7), rgba(255,255,255,.25)); }
.tag .tx { position: absolute; left: calc(var(--len, 30px) + 10px); top: -10px; width: var(--w, 170px); font-size: 13px; line-height: 1.35; color: #a1a1a6; }
.tag b { display: block; font-size: 15px; color: #f5f5f7; font-weight: 600; letter-spacing: -.01em; margin-bottom: 2px; }

.film-hint {
  position: absolute; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 3; margin: 0; text-align: center;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: #6e6e73; animation: rise 1.6s var(--ease) both 1.2s;
}
.film-hint span { display: block; width: 1px; height: 28px; margin: 10px auto 0; background: linear-gradient(#6e6e73, transparent); animation: drip 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* =========================================================
   EN VRAI : la photo grandit jusqu'au plein écran
   ========================================================= */
.reel { position: relative; height: 280vh; background: #000; color: #f5f5f7; }
.reel[hidden] { display: none; }
.reel-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.reel-intro {
  position: absolute; left: 0; right: 0; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 5svh); z-index: 2; margin: 0; text-align: center;
  font-size: clamp(34px, 9vw, 64px); font-weight: 600; letter-spacing: -.04em;
}
.reel-ph { position: absolute; inset: 0; margin: 0; overflow: hidden; clip-path: inset(24% 8% 16% round 30px); }
.reel-ph + .reel-ph { clip-path: inset(100% 0 0 0); }
.reel-ph[hidden] { display: none; }
.reel-ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; will-change: transform; }

/* =========================================================
   04 MODÈLES
   ========================================================= */
.models { background: #f5f5f7; color: #1d1d1f; padding: clamp(96px, 14vw, 160px) 0 clamp(72px, 10vw, 120px); }
.models-head { text-align: center; margin-bottom: clamp(40px, 6vw, 72px); }
.models .eyebrow { color: #86868b; }
.mrail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.mcard { background: #fff; border-radius: 32px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 30px 60px -40px rgba(0,0,0,.25); }
.mcard-visual { aspect-ratio: 9 / 10.5; background: radial-gradient(80% 70% at 50% 40%, #fff 0%, #f2f2f4 70%, #e9e9ee 100%); }
.mcard-visual img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .8s ease; }
.mcard-visual img.ready { opacity: 1; }
.mcard-body { padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.mcard h3 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.mcard p { margin: 0; color: #6e6e73; font-size: 15px; line-height: 1.4; }
.mcard-dots { display: flex; align-items: center; gap: 7px; margin: 10px 0 2px; flex-wrap: wrap; }
.mcard-dots i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.mcard-opt { margin-left: 6px; font-size: 12px; color: #86868b; }
.mcard-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mcard-foot b { font-size: 19px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.models-note { margin: 28px auto 0; text-align: center; font-size: 13px; color: #86868b; }

/* =========================================================
   05 CRÉER (en-tête du configurateur)
   ========================================================= */
.create-head { text-align: center; margin-bottom: clamp(32px, 5vw, 56px); }
.create-steps { list-style: none; margin: 28px auto 0; padding: 0; display: flex; justify-content: center; gap: clamp(18px, 5vw, 56px); counter-reset: s; max-width: 720px; }
.create-steps li { counter-increment: s; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; color: #86868b; line-height: 1.3; }
.create-steps li::before { content: counter(s); width: 30px; height: 30px; margin-bottom: 8px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #1d1d1f; box-shadow: inset 0 0 0 1px #d2d2d7; }
.create-steps b { color: #1d1d1f; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }

/* =========================================================
   FIL DES CHAPITRES (en bas de l'écran)
   ========================================================= */
.chapters {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 25;
  display: flex; align-items: center; gap: 0; padding: 2px 6px; border-radius: 980px;
  background: rgba(30, 30, 32, .62); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: opacity .5s ease, transform .6s var(--ease), background .4s;
}
.chapters.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.chapters a { position: relative; display: flex; align-items: center; gap: 8px; height: 44px; min-width: 32px; justify-content: center; padding: 0 6px; border-radius: 980px; color: #f5f5f7; }
.chapters a::before { content: ""; position: absolute; inset: 7px 0; border-radius: 980px; background: transparent; transition: background-color .3s; z-index: -1; }
.chapters i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.3); transition: background .3s, width .4s var(--ease); }
.chapters a.done i { background: rgba(255,255,255,.7); }
.chapters a.cur { padding: 0 14px 0 12px; }
.chapters a.cur::before { background: rgba(255,255,255,.12); }
.chapters a { isolation: isolate; }
.chapters a.cur i { background: #fff; }
.chapters span { max-width: 0; overflow: hidden; white-space: nowrap; font-size: 13px; font-weight: 500; letter-spacing: -.01em; opacity: 0; transition: max-width .5s var(--ease), opacity .3s; }
.chapters a.cur span { max-width: 120px; opacity: 1; }
.chapters.on-light { background: rgba(255,255,255,.78); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06), 0 10px 30px -14px rgba(0,0,0,.25); }
.chapters.on-light a { color: #1d1d1f; }
.chapters.on-light i { background: rgba(0,0,0,.2); }
.chapters.on-light a.done i { background: rgba(0,0,0,.5); }
.chapters.on-light a.cur::before { background: rgba(0,0,0,.06); }
.chapters.on-light a.cur i { background: #1d1d1f; }
body.in-view .chapters, html.studio-on .chapters { display: none; }

/* =========================================================
   Téléphone
   ========================================================= */
@media (max-width: 834px) {
  .film-hint { display: none; }
  .mrail {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding: 0 28px 8px; scroll-padding-inline: 28px;
  }
  .mrail::-webkit-scrollbar { display: none; }
  .mcard { flex: 0 0 80%; scroll-snap-align: start; }
  .create-steps li span { font-size: 12px; }
}

/* =========================================================
   Grand écran : texte à gauche, gourde à droite
   ========================================================= */
@media (min-width: 835px) {
  .film-copy { top: 50%; left: max(48px, calc(50vw - 520px)); right: auto; width: min(520px, 44vw); padding: 0; text-align: left; margin-top: -1em; translate: 0 -50%; }
  .film-sub { margin-left: 0; }
  .film-copy.low { top: 50%; bottom: auto; }
  .film-cta { display: none; }
  .film-cta-in { display: inline-flex; margin-top: 28px; }
  .film-copy h1 { font-size: clamp(54px, 6.2vw, 96px); }
  .film-copy h2 { font-size: clamp(48px, 5.4vw, 84px); }
  .film-copy.low::before { display: none; }
  .film-colors { left: max(48px, calc(50vw - 520px)); right: auto; top: calc(50% + 150px); bottom: auto; align-items: flex-start; }
  .film-stage::before { left: 66%; top: 55%; }
  .reel-ph { clip-path: inset(18% 30% 10% round 30px); }

}

.mcard-visual { overflow: hidden; }
.mcard-visual img { transition: opacity .8s ease, transform .6s var(--ease); }
@media (hover: hover) {
  .mcard { transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
  .mcard:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 40px 80px -40px rgba(0,0,0,.35); }
  .mcard:hover .mcard-visual img { transform: scale(1.03); }
  .pill-lux:hover { transform: translateY(-1px); }
  .chapters a:not(.cur):hover::before { background: rgba(255,255,255,.08); }
  .chapters.on-light a:not(.cur):hover::before { background: rgba(0,0,0,.05); }
}

@media (prefers-reduced-motion: reduce) {
  .mcard, .mcard-visual img, .pill-lux, .skip-link { transition: none; }
  .film-open, .film-hint, .film-cta { animation: none; }
  .film-hint span { animation: none; }
}
