/* =====================================================================
   Number Cake — feuille de style
   Mise en page : vitrine photographique sticky à gauche (58 %),
   configurateur éditorial à droite (42 %). Thème clair, monochrome :
   la couleur vient uniquement des photographies.
   ===================================================================== */
:root {
  --bg: #f6f5f3;
  --surface: #ffffff;
  --surface-2: #fdfcfb;
  --fg: #171615;
  --muted: #6c6863;
  --dim: #9d9892;
  --line: rgba(23, 22, 21, .1);
  --line-strong: rgba(23, 22, 21, .3);
  --glow: rgba(255, 255, 255, .95);
  --on-fg: #faf9f7;
  --stage-a: #ffffff;
  --stage-b: #ebe9e5;
  --glass: rgba(246, 245, 243, .86);
  --thumb: #efede9;
  --shadow: rgba(70, 52, 34, .2);

  --font-brand: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-display: "Inter Tight", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --t: 320ms;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--fg); color: var(--on-fg); padding: 10px 16px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding-inline: clamp(16px, 3.4vw, 48px);
  background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; justify-self: start; }
.brand-name { font-family: var(--font-brand); font-size: 25px; font-weight: 400; letter-spacing: .02em; }
.brand-name em { font-style: italic; font-weight: 300; }
.brand-sub { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--dim); margin-top: 3px; }
.site-nav { display: flex; gap: 34px; }
.site-nav a {
  text-decoration: none; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  padding-block: 6px; border-bottom: 1px solid transparent; transition: color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--fg); border-color: var(--line-strong); }
.cart-link { justify-self: end; position: relative; display: inline-flex; padding: 8px; }
.cart-link svg { width: 22px; height: 22px; fill: none; stroke: var(--fg); stroke-width: 1.2; }
.cart-count {
  position: absolute; top: 0; right: -2px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--fg); color: var(--on-fg);
  font-size: 10px; font-weight: 500; line-height: 17px; text-align: center; font-variant-numeric: tabular-nums;
}
.cart-link.bump { animation: bump 500ms var(--ease); }
@keyframes bump { 30% { transform: scale(1.18); } 100% { transform: scale(1); } }

/* ---------- Grille produit ---------- */
.upg-product {
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
  min-height: calc(100vh - var(--header-h));
}

/* ---------- Vitrine (colonne gauche) ---------- */
.stage {
  position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  height: calc(100vh - var(--header-h));
  min-height: 620px;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto;
  padding: 22px clamp(16px, 3vw, 44px) 26px;
  background:
    radial-gradient(62% 54% at 50% 44%, var(--stage-a) 0%, var(--stage-a) 30%, var(--stage-b) 100%);
  border-right: 1px solid var(--line);
  overflow: hidden;
}
.stage-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; position: relative; z-index: 6; }
.stage-top .stage-caption { margin-right: auto; }
.stage-actions { display: flex; align-items: center; gap: 8px; }
.vb-short { display: none; }
.stage-caption { margin: 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: rgba(255,255,255,.7); }
.view-btn {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  padding: 8px 16px; border-radius: 999px; transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.view-btn:hover { color: var(--fg); }
.view-btn[aria-pressed="true"] { background: var(--fg); color: var(--on-fg); }

.stage-frame { position: relative; display: grid; place-items: center; min-height: 0; padding-block: 8px; }

/* Le conteneur des calques : un seul cadre, ratio des PNG (1122 × 1402) */
.cake {
  position: relative;
  aspect-ratio: 1122 / 1402;
  height: min(100%, 82vh);
  max-height: 100%;
  max-width: 100%;
  opacity: 0; translate: 0 14px;
  --turn: 0deg;
  transition: transform 600ms var(--ease), opacity 900ms var(--ease), translate 900ms var(--ease),
              --turn var(--turn-dur, 1600ms) cubic-bezier(.33, .7, .2, 1);
}

/* ---------- Plateau tournant ----------
   --turn est une propriété enregistrée : elle s'anime, et le gâteau comme
   le dessus du plateau tournent avec elle autour du même axe. */
@property --turn { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
.turntable {
  position: absolute; inset: 0; z-index: 1;
  rotate: var(--turn);
  transform-origin: 50% 56%;
}
.turntable-base, .turntable-ring {
  position: absolute; left: 50%; top: 56%;
  width: 118%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; pointer-events: none;
  transition: opacity 500ms var(--ease);
}
.turntable-base {
  z-index: 0;
  background:
    radial-gradient(circle at 40% 32%, #ffffff 0%, #f7f6f3 46%, #e9e6e1 88%, #dcd8d2 100%);
  box-shadow:
    0 40px 70px -30px rgba(70, 52, 34, .38),
    0 8px 18px -10px rgba(70, 52, 34, .25),
    inset 0 0 0 1px rgba(23, 22, 21, .06),
    inset 0 -14px 30px rgba(70, 52, 34, .07);
}
.turntable-base::after {
  content: ""; position: absolute; inset: 2.6%; border-radius: 50%;
  border: 1px solid rgba(23, 22, 21, .07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}
/* Graduations gravées sur le pourtour : elles rendent la rotation lisible */
.turntable-ring {
  left: 50%; top: 56%;
  background:
    conic-gradient(from -1deg, rgba(23, 22, 21, .5) 0 2deg, transparent 2deg 360deg),
    repeating-conic-gradient(from 0deg, rgba(23, 22, 21, .16) 0 .5deg, transparent .5deg 7.5deg);
  -webkit-mask: radial-gradient(circle, transparent 0 46.2%, #000 46.4% 48.6%, transparent 48.8%);
          mask: radial-gradient(circle, transparent 0 46.2%, #000 46.4% 48.6%, transparent 48.8%);
}
.layer-missing { rotate: calc(-1 * var(--turn)); }
.cake.is-exploded .turntable-base,
.cake.is-exploded .turntable-ring { opacity: 0; }

.spin-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: rgba(255,255,255,.7);
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.spin-btn:hover { border-color: var(--line-strong); background: var(--surface); }
.spin-btn svg { width: 17px; height: 17px; fill: none; stroke: var(--fg); stroke-width: 1.3; transition: rotate 600ms var(--ease); }
.spin-btn:hover svg { rotate: 90deg; }
.spin-btn:disabled { opacity: .4; cursor: default; }
body.is-ready .cake { opacity: 1; translate: 0 0; }
.cake-shadow { display: none;
  position: absolute; left: 10%; right: 10%; bottom: 0%; height: 10%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(70,52,34,.32), transparent 70%);
  filter: blur(10px); z-index: 0; transition: opacity 500ms var(--ease);
}
.cake::before {
  content: ""; position: absolute; inset: 6% -12% 0; z-index: 0; pointer-events: none;
  background: radial-gradient(45% 40% at 50% 48%, var(--glow), transparent 72%);
}

.layer {
  position: absolute; inset: 0;
  transition: transform 640ms var(--ease), opacity var(--t) var(--ease), filter var(--t) var(--ease);
  transform-origin: 50% 50%;
  pointer-events: none;
}
.layer-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
  translate: var(--ax, 0) var(--ay, 0);
  scale: var(--as, 1);
  opacity: 0;
  transform: scale(1.012);
  transition: opacity var(--t) var(--ease), transform 420ms var(--ease);
  user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 16px 20px var(--shadow));
}
.layer[data-layer="decoration"] .layer-img { transform: translateY(-1.2%); filter: drop-shadow(0 4px 6px var(--shadow)); }
.layer-img.is-in { opacity: 1; transform: none; }

/* Montage en direct : une couche non atteinte est soulevée et invisible ;
   quand elle devient visible, elle descend et se pose sur la précédente. */
.layer { transition: transform 700ms cubic-bezier(.2, 1.15, .4, 1), opacity 360ms var(--ease); }
.layer.is-off { opacity: 0; transform: translateY(-9%); transition: transform 420ms var(--ease), opacity 300ms var(--ease); }
.layer-img.is-out { opacity: 0; }

/* Emplacement réservé (visuel non fourni) */
.layer-missing {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(78%, 300px); padding: 20px 22px;
  display: flex; flex-direction: column; gap: 4px; text-align: center;
  background: rgba(255, 255, 255, .86); border: 1px dashed var(--line-strong);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity var(--t) var(--ease);
}
.layer-missing.is-in { opacity: 1; }
.lm-eyebrow { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.lm-title { font-family: var(--font-display); font-size: 24px; line-height: 1.15; }
.lm-text { font-size: 12px; color: var(--muted); }

/* Vue éclatée : écartement vertical léger, en escalier */
.cake.is-exploded { transform: scale(.96); }
.cake.is-exploded .cake-shadow { opacity: 0; }
.cake.is-exploded .layer[data-layer="decoration"] { transform: translate(-15%, -31%) scale(.44); }
.cake.is-exploded .layer[data-layer="creme"]      { transform: translate(-5%, -10.5%) scale(.44); }
.cake.is-exploded .layer[data-layer="garniture"]  { transform: translate(5%, 10.5%) scale(.44); }
.cake.is-exploded .layer[data-layer="biscuit"]    { transform: translate(15%, 31%) scale(.44); }
.cake.is-exploded .layer[data-layer="decoration"] .layer-missing { transform: translate(-50%, -50%) scale(1.6); }

.layer-labels {
  list-style: none; margin: 0; padding: 0;
  position: absolute; inset: 0; z-index: 10; pointer-events: none;
  opacity: 0; transition: opacity 400ms var(--ease);
}
.cake.is-exploded .layer-labels { opacity: 1; transition-delay: 260ms; }
.layer-labels li {
  position: absolute; left: calc(100% + 4px);
  display: flex; flex-direction: column; gap: 1px;
  padding-left: 14px; border-left: 1px solid var(--line-strong);
  min-width: 128px; max-width: 180px;
}
.layer-labels li::before {
  content: ""; position: absolute; right: 100%; top: 50%; width: 46px; border-top: 1px dotted var(--line-strong);
}
.layer-labels [data-for="decoration"] { top: 14%; }
.layer-labels [data-for="creme"]      { top: 36%; }
.layer-labels [data-for="garniture"]  { top: 58%; }
.layer-labels [data-for="biscuit"]    { top: 80%; }
.ll-name { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.ll-value { font-family: var(--font-display); font-size: 18px; line-height: 1.2; }

.coming-soon {
  position: absolute; right: 0; bottom: 8px; z-index: 7;
  max-width: 260px; padding: 16px 18px;
  background: rgba(255,255,255,.92); border: 1px solid var(--line-strong);
}
.cs-eyebrow { margin: 0; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.cs-title { margin: 2px 0 6px; font-family: var(--font-display); font-size: 26px; line-height: 1.1; }
.cs-text { margin: 0; font-size: 12px; color: var(--muted); }

.stage-note {
  margin: 4px auto 0; max-width: 560px; text-align: center;
  font-size: 11.5px; line-height: 1.5; color: var(--muted);
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  position: relative; z-index: 6;
}

/* Bandeau des étapes de montage */
.strip {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px;
  margin-top: 16px; position: relative; z-index: 6;
  max-width: 620px; width: 100%; justify-self: center;
}
.strip-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 6px 7px; border: 1px solid var(--line); background: rgba(255,255,255,.55);
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
.strip-item:hover { border-color: var(--line-strong); }
.strip-item.is-active { border-color: var(--fg); background: var(--surface); }
.strip-thumb { position: relative; width: 100%; aspect-ratio: 1122 / 1402; max-height: 74px; display: block; }
.strip-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mini-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); }
.strip-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.strip-item.is-active .strip-label { color: var(--fg); }

/* ---------- Configurateur (colonne droite) ---------- */
.panel {
  padding: 40px clamp(20px, 4.4vw, 72px) 72px;
  display: flex; flex-direction: column; gap: 28px;
  min-width: 0;
}
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
.eyebrow { margin: 6px 0 -16px; font-size: 11px; letter-spacing: .38em; text-transform: uppercase; color: var(--muted); }
.upg-product .title {
  margin: 0; font-family: var(--font-display); font-weight: 300;
  font-size: clamp(40px, 4.4vw, 66px); line-height: 1.02; letter-spacing: -.01em;
  text-wrap: balance;
}
.lede { margin: -6px 0 0; max-width: 46ch; color: var(--muted); font-size: 15px; }
.price-line { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.upg-product .price { font-family: var(--font-display); font-size: 36px; font-weight: 400; font-variant-numeric: tabular-nums; }
.price-meta { font-size: 12px; color: var(--dim); letter-spacing: .04em; }

/* Progression 1 → 5 */
.progress {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  position: relative;
}
.progress::before {
  content: ""; position: absolute; top: 16px; left: 10%; right: 10%; border-top: 1px solid var(--line);
}
.progress li { display: flex; justify-content: center; position: relative; }
.prog-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 4px; }
.prog-num {
  width: 33px; height: 33px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); background: var(--bg);
  font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted);
  transition: all var(--t) var(--ease);
}
.prog-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); transition: color var(--t) var(--ease); }
.progress li.is-done .prog-num { border-color: var(--fg); color: var(--fg); }
.progress li.is-current .prog-num { background: var(--fg); border-color: var(--fg); color: var(--on-fg); }
.progress li.is-current .prog-label, .progress li.is-done .prog-label { color: var(--fg); }
.prog-btn:hover .prog-num { border-color: var(--fg); }

/* Étapes en accordéon */
.steps { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.step { border-bottom: 1px solid var(--line); }
.step-h { margin: 0; font: inherit; }
.step-head {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 16px;
  padding: 20px 2px; text-align: left;
}
.step-num {
  font-family: var(--font-display); font-size: 20px; color: var(--dim); width: 22px;
  font-variant-numeric: lining-nums tabular-nums; transition: color var(--t) var(--ease);
}
.step-title { font-family: var(--font-display); font-size: 23px; font-weight: 400; line-height: 1.2; }
.step-value {
  font-size: 12px; color: var(--muted); text-align: right;
  max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chev { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.2; transition: transform var(--t) var(--ease); }
.step.is-open .chev { transform: rotate(180deg); }
.step.is-open .step-num { color: var(--fg); }
.step.is-open .step-value { opacity: 0; }

.step-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 380ms var(--ease); }
.step.is-open .step-body { grid-template-rows: 1fr; }
.step-inner { overflow: hidden; min-height: 0; }
.step.is-open .step-inner { padding-bottom: 24px; }

.opts {
  margin: 0; padding: 0; border: 0; min-width: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.opts.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opts:has(> .opt:nth-of-type(2):last-of-type) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.opt {
  position: relative; cursor: pointer;
  display: flex; flex-direction: column; gap: 10px;
  padding: 8px 8px 12px;
  border: 1px solid var(--line); background: var(--surface);
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), transform var(--t) var(--ease);
}
.opt:hover { border-color: var(--line-strong); }
.opt:has(input:checked) { border-color: var(--fg); background: var(--surface-2); }
.opt:has(input:focus-visible) { outline: 1px solid var(--fg); outline-offset: 3px; }
.opt.is-disabled { cursor: not-allowed; }
.opt.is-disabled .opt-thumb, .opt.is-disabled .opt-name { opacity: .45; }

.opt-thumb {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--thumb);
}
.opt-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.opt:hover .opt-thumb img { transform: scale(1.05); }
.opt-thumb.is-shape { display: grid; place-items: center; background: var(--thumb); }
.opt-thumb.is-shape img { width: 62%; height: 62%; object-fit: contain; opacity: .92; }
.opt-thumb.is-zoom img { transform: scale(2.2); }
.opt-thumb.is-glyph { display: grid; place-items: center; background: var(--thumb); }
.glyph { font-variant-numeric: lining-nums; font-family: var(--font-display); font-weight: 300; font-size: clamp(44px, 4.6vw, 64px); line-height: 1; color: var(--fg); }
.opt-thumb.is-glyph svg { width: 48%; fill: none; stroke: var(--fg); stroke-width: 1.4; }
.opt-thumb.is-pending {
  display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(135deg, var(--thumb) 0 8px, #e6e3df 8px 16px);
  border: 1px dashed var(--line-strong);
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); line-height: 1.5;
}

.opt-text { display: flex; flex-direction: column; gap: 2px; padding-inline: 2px; min-width: 0; }
.opt-name { font-size: 13px; font-weight: 400; line-height: 1.35; }
.opt-detail { font-size: 11.5px; color: var(--dim); line-height: 1.35; }
.opt-price { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.opt-tag {
  align-self: flex-start; margin-top: 6px;
  font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line-strong); padding: 2px 7px; border-radius: 999px;
}
.opt-check {
  position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--fg);
  opacity: 0; transform: scale(.6); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}
.opt-check svg { width: 12px; height: 12px; fill: none; stroke: var(--on-fg); stroke-width: 1.8; }
.opt:has(input:checked) .opt-check { opacity: 1; transform: none; }

.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.ghost-btn {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  padding: 10px 0; border-bottom: 1px solid transparent;
}
.ghost-btn:hover { color: var(--fg); border-color: var(--line-strong); }
.next-btn {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  padding: 11px 22px; border: 1px solid var(--line-strong); border-radius: 999px;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.next-btn:hover { background: var(--fg); color: var(--on-fg); border-color: var(--fg); }

/* Personnalisation */
.section-title { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1.2; }
.custom { display: flex; flex-direction: column; gap: 22px; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.field-row { flex-direction: row; align-items: center; justify-content: space-between; }
.field-label { padding: 0; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.field-help { margin: 0; font-size: 12px; color: var(--dim); }
.input-wrap { position: relative; }
.input-wrap input {
  width: 100%; padding: 14px 64px 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 0;
  font-family: var(--font-display); font-size: 20px; font-style: italic;
  transition: border-color var(--t) var(--ease);
}
.input-wrap input::placeholder { color: var(--dim); }
.input-wrap input:focus { outline: none; border-color: var(--fg); }
.counter { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }

.pills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pill {
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 10px 6px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), color var(--t) var(--ease);
}
.pill:hover { border-color: var(--line-strong); }
.pill-main { font-size: 14px; font-variant-numeric: tabular-nums; }
.pill-sub { font-size: 10.5px; color: var(--dim); }
.pill:has(input:checked) { background: var(--fg); border-color: var(--fg); color: var(--on-fg); }
.pill:has(input:checked) .pill-sub { color: rgba(250,249,247,.68); }
.pill:has(input:focus-visible) { outline: 1px solid var(--fg); outline-offset: 3px; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; }
.stepper-btn { width: 42px; height: 40px; font-size: 18px; color: var(--fg); }
.stepper-btn:disabled { color: var(--dim); cursor: not-allowed; }
.stepper input {
  width: 40px; text-align: center; background: none; border: 0; font-size: 15px; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Récapitulatif */
.upg-product .summary {
  padding: 26px; border: 1px solid var(--line-strong); background: var(--surface);
  display: flex; flex-direction: column; gap: 18px;
}
.summary-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.link-btn { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }
.link-btn:hover { color: var(--fg); border-color: var(--fg); }
.summary-list { margin: 0; display: flex; flex-direction: column; }
.sum-row { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.sum-row dt { font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); padding-top: 2px; }
.sum-row dd { margin: 0; display: flex; justify-content: space-between; gap: 12px; min-width: 0; }
.sum-value { font-size: 13.5px; overflow-wrap: anywhere; }
.sum-price { font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; }
.summary-total > span:first-child { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.upg-product .total { font-family: var(--font-display); font-size: 38px; font-variant-numeric: tabular-nums; line-height: 1; }

.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; padding: 18px 28px; border-radius: 999px;
  background: var(--fg); color: var(--on-fg);
  font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  box-shadow: 0 0 0 0 rgba(23,22,21,0);
  transition: box-shadow 400ms var(--ease), transform 200ms var(--ease);
}
.cta svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.cta:hover { box-shadow: 0 14px 34px -8px rgba(23,22,21,.38); }
.cta:active { transform: scale(.985); }
.summary-foot { margin: -4px 0 0; text-align: center; font-size: 11.5px; color: var(--dim); }

.assurances {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
}
.assurances li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.assurances svg { width: 26px; height: 26px; fill: none; stroke: var(--fg); stroke-width: 1; }

/* Barre mobile + toast */
.mobile-bar { display: none; }
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); z-index: 80;
  transform: translate(-50%, 16px); opacity: 0;
  max-width: calc(100vw - 32px);
  padding: 14px 22px; background: var(--fg); color: var(--on-fg);
  font-size: 13px; letter-spacing: .02em; border-radius: 999px;
  box-shadow: 0 12px 40px rgba(23,22,21,.25);
  transition: opacity 300ms var(--ease), transform 300ms var(--ease);
}
.toast.is-in { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .opts.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opts.cols-4 .opt { flex-direction: row; align-items: center; }
  .opts.cols-4 .opt-thumb { width: 64px; flex: none; }
  .layer-labels li { min-width: 108px; }
  .ll-value { font-size: 16px; }
}
@media (max-width: 1100px) {
  .site-nav { gap: 22px; }
  .assurances { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cake.is-exploded { transform: scale(.86) translateX(-8%); }
}

@media (max-width: 920px) {
  :root { --header-h: 64px; }
  .site-header { grid-template-columns: 1fr auto; }
  .site-nav { display: none; }
  .upg-product { grid-template-columns: minmax(0, 1fr); }
  .stage {
    position: relative; top: 0; height: auto; min-height: 0;
    border-right: 0; border-bottom: 1px solid var(--line);
    padding: 16px 16px 20px;
  }
  .stage-frame { padding-block: 16px; }
  .cake { height: auto; width: min(80%, 420px); margin-block: 6%; }
  .panel { padding: 28px 16px 120px; }
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .mobile-bar > div { display: flex; flex-direction: column; min-width: 0; }
  .mb-price { font-family: var(--font-display); font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
  .mb-meta { font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cta-small { width: auto; padding: 14px 20px; font-size: 11px; flex: none; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .cake.is-exploded { transform: scale(.9) translateX(-12%); }
  .opts.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .opts.cols-4 .opt { flex-direction: column; align-items: stretch; }
  .opts.cols-4 .opt-thumb { width: auto; }
}

@media (max-width: 560px) {
  .stage-actions { width: 100%; }
  .vb-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .vb-short { display: inline; }
  .view-toggle { flex: 1; }
  .view-btn { flex: 1; padding: 9px 8px; font-size: 10px; letter-spacing: .08em; }
  .stage-caption { width: 100%; text-align: center; }
  .stage-top { justify-content: center; }
  .strip { gap: 6px; }
  .strip-label { font-size: 8.5px; letter-spacing: .06em; }
  .opts, .opts.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opts.is-wide { grid-template-columns: minmax(0, 1fr); }
  .opts.is-wide .opt { flex-direction: row; align-items: center; }
  .opts.is-wide .opt-thumb { width: 76px; flex: none; }
  .step-value { display: none; }
  .step-title { font-size: 21px; }
  .pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assurances { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upg-product .summary { padding: 20px 16px; }
  .sum-row { grid-template-columns: 78px 1fr; }
  .cake.is-exploded { transform: scale(.78) translateX(-16%); }
  .layer-labels li { min-width: 0; max-width: 118px; padding-left: 8px; left: calc(100% - 10px); }
  .layer-labels li::before { width: 20px; }
  .ll-name { font-size: 10px; letter-spacing: .12em; }
  .ll-value { font-size: 16px; }
  .coming-soon { left: 0; right: 0; max-width: none; }
  .upg-product .title { font-size: 40px; }
}

/* =====================================================================
   EFFETS IMMERSIFS
   ===================================================================== */
/* Inclinaison de la scène et parallaxe des couches (souris) */
.stage.is-immersive .stage-frame {
  transform: perspective(1800px) rotateX(calc(var(--py, 0) * -4deg)) rotateY(calc(var(--px, 0) * 5deg));
}
.stage.is-immersive .layer {
  translate: calc(var(--px, 0) * var(--depth, 0) * 1px) calc(var(--py, 0) * var(--depth, 0) * 1px);
}
.layer[data-layer="garniture"]  { --depth: 3; }
.layer[data-layer="creme"]      { --depth: 6; }
.layer[data-layer="decoration"] { --depth: 12; }
.stage.is-immersive .turntable-base { translate: calc(-50% + var(--px, 0) * -4px) calc(-50% + var(--py, 0) * -4px); }

/* Reflet lumineux qui passe sur le gâteau */
.sheen {
  position: absolute; inset: 6% 4% 4%; z-index: 5; pointer-events: none; overflow: hidden;
  mix-blend-mode: soft-light;
}
.sheen::before {
  content: ""; position: absolute; inset: -10% -60%;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.95) 50%, transparent 58%);
  transform: translateX(-80%);
  animation: sheen 11s var(--ease) 3s infinite;
}
@keyframes sheen { 0% { transform: translateX(-80%); } 16%, 100% { transform: translateX(80%); } }
.cake.is-exploded .sheen { display: none; }

/* Décoration posée pièce par pièce */
.pieces-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none;
  filter: drop-shadow(0 4px 6px var(--shadow));
}

/* Loupe gros plan */
.stage.is-immersive .cake:not(.is-exploded) { cursor: none; }
.loupe {
  position: absolute; z-index: 20; pointer-events: none;
  width: var(--size); height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  border-radius: 50%; overflow: hidden;
  background: var(--stage-a);
  box-shadow: 0 24px 60px -14px rgba(40, 30, 20, .45), 0 0 0 3px rgba(255, 255, 255, .95), 0 0 0 4px rgba(23, 22, 21, .08);
  opacity: 0; transform: scale(.5);
  transition: opacity 220ms var(--ease), transform 300ms cubic-bezier(.2, 1.3, .4, 1);
}
.loupe.is-on { opacity: 1; transform: none; }
.loupe-inner { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.loupe-inner .turntable { position: absolute; inset: 0; }
.loupe-inner .layer { translate: none; }
.loupe-tag {
  position: absolute; left: 50%; bottom: 14px; translate: -50% 0;
  font-size: 10px; letter-spacing: .14em; padding: 2px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, .88); color: var(--fg);
}
.loupe-hint {
  display: none;
  position: absolute; left: 50%; bottom: 0; translate: -50% 0; z-index: 6; margin: 0;
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); white-space: nowrap;
  transition: opacity 600ms var(--ease);
}
.stage.is-immersive .loupe-hint { display: block; }
.loupe-hint.is-used { opacity: 0; }
/* Écrans tactiles : pas de survol, donc pas de loupe à annoncer */
@media (hover: none) { .stage.is-immersive .loupe-hint { display: none; } }

/* =====================================================================
   FILM D'INTRODUCTION
   ===================================================================== */
.cake.film-hidden { visibility: hidden; }
html.film-on, html.film-on body { overflow: hidden; }
.site-header, .panel > *, .stage-top, .strip, .stage-note, .loupe-hint {
  transition: opacity 900ms var(--ease), translate 900ms var(--ease);
}
html.film-on .site-header { opacity: 0; translate: 0 -14px; }
html.film-on .panel > * { opacity: 0; translate: 0 26px; }
html.film-on .stage-top, html.film-on .strip, html.film-on .stage-note, html.film-on .loupe-hint { opacity: 0; }
.panel > *:nth-child(1) { transition-delay: 350ms; }
.panel > *:nth-child(2) { transition-delay: 420ms; }
.panel > *:nth-child(3) { transition-delay: 490ms; }
.panel > *:nth-child(4) { transition-delay: 560ms; }
.panel > *:nth-child(5) { transition-delay: 630ms; }
.panel > *:nth-child(6) { transition-delay: 700ms; }
.panel > *:nth-child(n+7) { transition-delay: 770ms; }
.site-header { transition-delay: 500ms; }
.stage-top, .strip { transition-delay: 700ms; }

.film { position: fixed; inset: 0; z-index: 200; overflow: hidden; transition: opacity 400ms var(--ease); }
.film.is-gone { opacity: 0; }
.film-bg {
  position: absolute; inset: 0;
  background: radial-gradient(70% 62% at 50% 50%, #ffffff 0%, #f4f2ef 52%, #e2ded8 100%);
  transition: opacity 1000ms var(--ease) 100ms;
}
.film.is-ending .film-bg { opacity: 0; }
.film-camera { position: absolute; inset: 0; display: grid; place-items: center; transform-origin: 50% 50%; will-change: transform, filter; }
.film-cake { position: relative; height: min(74vh, 108vw); aspect-ratio: 1122 / 1402; }
.film-turn { position: absolute; inset: 0; z-index: 1; transform-origin: 50% 56%; }
.film-layer, .film-deco img, .film-deco canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
}
.film-layer { filter: drop-shadow(0 16px 20px var(--shadow)); }
.film-deco { position: absolute; inset: 0; z-index: 4; }
.film-deco img { filter: drop-shadow(0 4px 6px var(--shadow)); }
.film-sheen {
  position: absolute; inset: 4% -20%; z-index: 5; pointer-events: none; mix-blend-mode: soft-light;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,1) 50%, transparent 60%);
  transform: translateX(-120%);
}
.film-bar {
  position: absolute; left: 0; right: 0; z-index: 3; height: 10vh; min-height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-inline: clamp(16px, 4vw, 56px);
  background: #0e0d0c; color: #f3f1ed;
  transition: transform 1000ms cubic-bezier(.7, 0, .2, 1);
}
.film-bar-top { top: 0; transform: translateY(-100%); padding-top: env(safe-area-inset-top, 0px); }
.film-bar-bottom { bottom: 0; transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom, 0px); }
.film.is-playing .film-bar { transform: none; }
.film.is-ending .film-bar-top { transform: translateY(-100%); }
.film.is-ending .film-bar-bottom { transform: translateY(100%); }
.film-brand { font-family: var(--font-brand); font-size: 22px; letter-spacing: .02em; }
.film-brand em { font-weight: 300; }
.film-meta { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: rgba(243, 241, 237, .55); }
.film-progress { position: relative; width: min(180px, 30vw); height: 1px; background: rgba(243, 241, 237, .2); overflow: hidden; }
.film-progress span { position: absolute; inset: 0; background: #f3f1ed; transform-origin: 0 50%; transform: scaleX(0); }
.film-skip {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #f3f1ed;
  padding: 10px 18px; border: 1px solid rgba(243, 241, 237, .4); border-radius: 999px;
  margin-left: auto;
  transition: background 300ms var(--ease), color 300ms var(--ease);
}
.film-skip:hover { background: #f3f1ed; color: #0e0d0c; }
.film-skip:focus-visible { outline-color: #f3f1ed; }
.film-caption {
  position: absolute; z-index: 2; left: 50%; bottom: calc(max(10vh, 56px) + 5vh);
  translate: -50% 12px; margin: 0; width: max-content; max-width: 92vw; text-align: center;
  font-family: var(--font-display); font-weight: 300; font-size: clamp(30px, 4.4vw, 64px); line-height: 1.05;
  color: var(--fg); text-shadow: 0 0 18px rgba(255, 255, 255, .95), 0 0 6px rgba(255, 255, 255, .9);
  opacity: 0; transition: opacity 600ms var(--ease), translate 800ms var(--ease);
  text-wrap: balance;
}
.film-caption.is-in { opacity: 1; translate: -50% 0; }
.film.is-ending .film-caption { opacity: 0; transition-duration: 400ms; }
@media (max-width: 560px) {
  .film-meta { display: none; }
  .film-brand { font-size: 19px; }
  .film-progress { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}

/* Sélecteur de chiffres (formes « 1 chiffre » et « 2 chiffres ») */
.digit-pick { display: flex; flex-direction: column; gap: 18px; margin-top: 22px; }
.digit-pick[hidden], .digit-row[hidden] { display: none; }
.digit-row { margin: 0; padding: 0; border: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.digit-keys { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; }
.digit-key {
  cursor: pointer; display: grid; place-items: center; aspect-ratio: 1;
  border: 1px solid var(--line); background: var(--surface);
  font-family: var(--font-display); font-size: 24px; font-weight: 400; line-height: 1;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), color var(--t) var(--ease);
}
.digit-key:hover { border-color: var(--line-strong); }
.digit-key:has(input:checked) { background: var(--fg); border-color: var(--fg); color: var(--on-fg); }
.digit-key:has(input:focus-visible) { outline: 1px solid var(--fg); outline-offset: 3px; }
.digit-key.is-disabled { cursor: not-allowed; color: var(--dim); background: transparent; border-style: dashed; }
.pill.is-disabled { cursor: not-allowed; opacity: .4; }
@media (max-width: 420px) {
  .digit-keys { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Informations complémentaires */
#note {
  width: 100%; padding: 12px 16px; resize: vertical; min-height: 84px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 0;
  font: inherit; font-size: 14px; line-height: 1.5; color: var(--fg);
  transition: border-color var(--t) var(--ease);
}
#note::placeholder { color: var(--dim); }
#note:focus { outline: none; border-color: var(--fg); }
.field-optional { text-transform: none; letter-spacing: 0; color: var(--dim); }
