/* Direction : la veillée de Noël. Il fait nuit, il neige, une guirlande court en haut de la page.
   Fond vert sapin presque noir, texte crème, or pour tout ce qui se clique. Les seules surfaces claires sont
   les objets qu'on regarde : les boules de Noël (un cadeau chacune), le studio 3D et la fiche d'un cadeau.
   La couleur des LED du setup (--led) déborde en halo autour de la pièce 3D. Une seule ambiance, pas de mode clair. */
@property --led { syntax: "<color>"; inherits: true; initial-value: #8a4dff; }
:root {
  --night: #050f0b;
  --moss: #0b1b15;
  --pine: #15382a;
  --fir: #2b5a45;
  --cream: #f5eedf;
  --paper: #f7f1e3;
  --ink: #14201a;
  --ink-soft: #56645c;
  --line: #e2d8c3;
  --gold: #e8b84a;
  --gold-hi: #f8dc8f;
  --gold-lo: #b7861c;
  --berry: #dc3b4f;
  --mist: rgba(245, 238, 223, 0.72);
  --hair: rgba(245, 238, 223, 0.14);
  --display: "Fraunces", "Georgia", serif;
  --body: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --hand: "Gochi Hand", "Segoe Print", cursive;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
  transition: --led 0.6s linear;
}

* { box-sizing: border-box; }
html { background: var(--night); scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  position: relative; min-height: 100vh; overflow-x: hidden;
  color: var(--cream); font: 400 1.03rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
/* le ciel : une lueur chaude en haut à droite, la forêt à gauche, un grain de papier par-dessus */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    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 1 0 0 0 0 1 0 0 0 0 1 .11 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(900px 520px at 84% -6%, rgba(232, 184, 74, 0.13), transparent 70%),
    radial-gradient(1000px 700px at -6% 4%, #12352a 0%, transparent 68%),
    linear-gradient(180deg, #08160f 0%, var(--night) 55%, #030a07 100%);
}
/* la neige : deux nappes de flocons qui descendent à des vitesses différentes */
.snow { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.snow::before, .snow::after { content: ""; position: absolute; inset: -320px 0 0; will-change: transform; }
.snow::before {
  background-image:
    radial-gradient(circle at 22px 30px, rgba(255, 255, 255, 0.75) 0 1.3px, transparent 2px),
    radial-gradient(circle at 118px 84px, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.7px),
    radial-gradient(circle at 170px 150px, rgba(255, 255, 255, 0.7) 0 1.5px, transparent 2.2px),
    radial-gradient(circle at 66px 178px, rgba(255, 255, 255, 0.45) 0 1px, transparent 1.7px);
  background-size: 210px 210px;
  animation: snow-a 17s linear infinite;
}
.snow::after {
  background-image:
    radial-gradient(circle at 60px 40px, rgba(255, 255, 255, 0.9) 0 2.2px, transparent 3.2px),
    radial-gradient(circle at 250px 210px, rgba(255, 255, 255, 0.6) 0 1.8px, transparent 2.8px),
    radial-gradient(circle at 150px 290px, rgba(255, 255, 255, 0.8) 0 2.6px, transparent 3.6px);
  background-size: 320px 320px; opacity: 0.55;
  animation: snow-b 11s linear infinite;
}
@keyframes snow-a { to { transform: translate3d(-30px, 210px, 0); } }
@keyframes snow-b { to { transform: translate3d(40px, 320px, 0); } }

/* la guirlande, accrochée tout en haut */
.garland { position: absolute; top: 0; left: 0; width: 100%; height: 76px; z-index: 2; pointer-events: none; stroke: none; }
.bulb { animation: twinkle 3.4s ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes twinkle { 0%, 55% { opacity: 1; } 100% { opacity: 0.42; } }

.wrap {
  width: 100%; max-width: 1200px; margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-optical-sizing: auto; margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--gold-hi); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

/* ================================================================= boutons et liens */
button {
  font: 500 0.92rem var(--body); color: var(--cream); background: rgba(245, 238, 223, 0.06);
  border: 1px solid rgba(245, 238, 223, 0.24); border-radius: 999px; padding: 8px 15px; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
button:hover:not(:disabled) { border-color: var(--gold); background: rgba(245, 238, 223, 0.12); }
button:disabled { opacity: 0.45; cursor: default; }
button[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--cream); font-weight: 600; }
button.primary { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 600; }
button.primary:hover:not(:disabled) { background: var(--gold-hi); border-color: var(--gold-hi); }
button.primary[aria-pressed="true"] { background: var(--cream); border-color: var(--cream); color: var(--ink); }
/* groupe de choix : une seule pastille active */
.seg { display: inline-flex; flex-wrap: wrap; gap: 3px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.32); border: 1px solid var(--hair); }
.seg button { border-color: transparent; background: transparent; padding: 7px 14px; }
.seg button:hover:not(:disabled) { border-color: transparent; background: rgba(245, 238, 223, 0.1); }
.seg button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.spacer { flex: 1; }

/* lien Amazon : une pastille d'or */
.buy {
  position: relative; display: inline-flex; align-items: center; gap: 9px; text-decoration: none; white-space: nowrap;
  font: 600 0.98rem var(--body); color: var(--ink);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 58%, #d39a2a);
  padding: 11px 19px; border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 10px 24px -10px rgba(232, 184, 74, 0.75);
  transition: transform 0.18s var(--ease), box-shadow 0.18s ease;
}
.buy:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 16px 30px -10px rgba(232, 184, 74, 0.95); }
.buy:active { transform: translateY(1px); }
.buy svg { transition: transform 0.18s var(--ease); }
.buy:hover svg { transform: translate(2px, -2px); }
.buy--small { padding: 8px 14px; font-size: 0.88rem; }
.buy--big { padding: 14px 24px; font-size: 1.05rem; }
.buy--none { background: none; box-shadow: none; color: var(--mist); border: 1px dashed rgba(245, 238, 223, 0.34); font-weight: 500; white-space: normal; }
.buy--none:hover { transform: none; box-shadow: none; }
.ghost {
  color: var(--cream); font-weight: 600; text-decoration: none; padding: 6px 0;
  background: linear-gradient(var(--gold), var(--gold)) 0 100% / 100% 2px no-repeat;
  transition: background-size 0.25s var(--ease), color 0.2s ease;
}
.ghost:hover { color: var(--gold-hi); background-size: 38% 2px; }

/* étiquette « N° 02 · catégorie », commune aux boules, aux fiches et aux pages cadeau */
.kind { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: var(--mist); font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; }
.no { font: italic 500 1.05rem/1 var(--display); letter-spacing: 0; text-transform: none; color: var(--gold); }
.note { margin: 0; color: var(--mist); }
.specs { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.specs li { position: relative; padding-left: 22px; }
.specs li::before { content: "✦"; position: absolute; left: 0; top: 0.1em; font-size: 0.8em; color: var(--gold); }

/* « À savoir » : ce qu'il faut absolument vérifier avant d'acheter */
.must { margin: 4px 0 0; padding: 10px 14px 11px; border-radius: 14px; font-size: 0.9rem; line-height: 1.45; text-align: left;
  color: var(--cream); background: rgba(232, 184, 74, 0.1); border: 1px solid rgba(232, 184, 74, 0.55); }
.must b { display: block; margin-bottom: 2px; font: italic 600 1rem/1.2 var(--display); color: var(--gold-hi); }
.sheet .must { color: var(--ink); background: #fbecc4; border-color: var(--gold-lo); }
.sheet .must b { color: var(--gold-lo); }
.intro .must { font-size: 0.98rem; }
/* boutons de couleur du néon : une pastille de la teinte devant le nom */
.seg--glow button[style]::before { content: ""; display: inline-block; width: 0.7em; height: 0.7em; margin-right: 6px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); vertical-align: 0; }

/* curseurs */
.joints { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 30px; }
.joints:disabled { opacity: 0.5; }
.joints--card { padding: 20px 22px; background: rgba(11, 27, 21, 0.78); border: 1px solid var(--hair); border-radius: 20px; }
.joint { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; min-width: 0; font-size: 0.92rem; }
.joint label { font-weight: 500; color: var(--mist); }
.joint output { color: var(--gold-hi); font-variant-numeric: tabular-nums; font-weight: 600; }
.joint input { grid-column: 1 / -1; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; --fill: 50%; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 99px; background: linear-gradient(90deg, var(--gold) var(--fill), rgba(245, 238, 223, 0.18) var(--fill)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 99px; background: rgba(245, 238, 223, 0.18); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 99px; background: var(--gold); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--cream); border: 3px solid var(--gold); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); transition: transform 0.15s ease; }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--cream); border: 3px solid var(--gold); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.18); }

/* ================================================================= accueil : en-tête */
.hero { position: relative; padding-block: 118px 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px; color: var(--gold); font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.76rem; animation: rise 0.8s var(--ease) both; }
.eyebrow::before { content: "✦"; font-size: 1.1em; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 30px 64px; align-items: end; }
.hero-title { min-width: 0; }
.hero h1 {
  font-size: clamp(3.7rem, 12.5vw, 9.6rem); font-weight: 600; line-height: 0.84; letter-spacing: -0.045em;
  font-variation-settings: "SOFT" 100, "WONK" 0; color: var(--cream);
  animation: rise 0.9s 0.08s var(--ease) both;
}
.hero h1 em {
  display: block; width: fit-content; margin-left: 0.34em; padding: 0 0.1em 0.14em 0; font-weight: 400;
  font-variation-settings: "SOFT" 100, "WONK" 1;
  background: linear-gradient(100deg, var(--gold-hi) 0%, var(--gold) 38%, #d08f25 62%, var(--gold-hi) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-side { animation: rise 0.9s 0.2s var(--ease) both; padding-bottom: 10px; }
.lede { margin: 0; font-size: 1.14rem; color: var(--cream); max-width: 46ch; }
.howto { list-style: none; margin: 22px 0 0; padding: 0; counter-reset: step; border-top: 1px solid var(--hair); }
.howto li { display: grid; grid-template-columns: 1.9rem 5.6rem minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--hair); font-size: 0.95rem; color: var(--mist); }
.howto li::before { counter-increment: step; content: counter(step); font: italic 500 1.3rem/1 var(--display); color: var(--gold); }
.howto b { color: var(--cream); font-weight: 600; }
.scribble {
  position: absolute; right: max(28px, env(safe-area-inset-right, 0px)); bottom: -16px; z-index: 5; margin: 0; pointer-events: none;
  display: flex; align-items: flex-start; gap: 4px;
  font: 400 clamp(1.5rem, 2.6vw, 2rem)/1 var(--hand); color: var(--gold-hi); transform: rotate(-6deg);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  animation: rise 0.9s 0.45s var(--ease) both;
}
.scribble svg { width: 1.7em; height: 1.7em; margin-top: 0.35em; stroke-width: 2.4; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes rise-tilt { from { opacity: 0; } }
@media (max-width: 860px) {
  .hero { padding-block: 104px 30px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .scribble { position: static; margin-top: 18px; width: fit-content; transform: rotate(-4deg); animation-name: rise-tilt; }
  .scribble svg { display: none; }
}

/* ================================================================= accueil : la pièce en 3D */
.room { position: relative; isolation: isolate; width: 100%; max-width: 1340px; margin-inline: auto; padding-inline: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px)); scroll-margin-top: 16px; }
/* le halo des LED : la couleur choisie déborde de la pièce sur la page */
.room::before {
  content: ""; position: absolute; inset: -34px 4px auto; height: calc(clamp(450px, 78vh, 830px) + 68px); z-index: -1; border-radius: 80px;
  background: var(--led); filter: blur(70px); opacity: 0.34; pointer-events: none;
}
.room-stage {
  position: relative; height: clamp(450px, 78vh, 830px); border-radius: 28px; overflow: hidden; scroll-margin-top: 16px;
  background: #060d0a url(img/setup_futur.jpg) center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(232, 184, 74, 0.42), 0 0 0 8px rgba(245, 238, 223, 0.045), 0 60px 90px -60px #000;
}
.room-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; opacity: 0; transition: opacity 0.8s ease; }
.room-stage.is-ready canvas { opacity: 1; }
.room-stage::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 140px rgba(0, 0, 0, 0.5), inset 0 -90px 90px -60px rgba(0, 0, 0, 0.55); }
.status { position: absolute; left: 50%; bottom: 18px; z-index: 3; transform: translateX(-50%); padding: 7px 16px; border-radius: 999px; white-space: nowrap; pointer-events: none; font-size: 0.88rem; color: var(--cream); background: rgba(5, 15, 11, 0.78); border: 1px solid var(--hair); }
.room-bar { position: absolute; top: 16px; left: 16px; z-index: 3; display: flex; gap: 3px; padding: 4px; border-radius: 999px; background: rgba(5, 15, 11, 0.7); border: 1px solid var(--hair); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.room-bar button { border-color: transparent; background: transparent; padding: 8px 16px; }
.room-bar button:hover:not(:disabled) { border-color: transparent; background: rgba(245, 238, 223, 0.1); }
.room-bar button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.room-tool { top: 68px; }
.room-tool button { padding: 6px 13px; font-size: 0.85rem; }
.room-tool button[aria-pressed="true"] { background: var(--cream); border-color: var(--cream); }
.room-hint { position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 3; margin: 0; font-size: 0.86rem; color: rgba(245, 238, 223, 0.92); text-shadow: 0 1px 8px #000; pointer-events: none; }
.has-sheet .room-hint { display: none; }

.room-pins { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.pin {
  position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; padding: 0; pointer-events: auto;
  border: 2px solid var(--cream); border-radius: 50%; color: var(--ink);
  background: radial-gradient(circle at 34% 28%, var(--gold-hi), var(--gold) 58%, #c98f22);
  font: 600 1rem/1 var(--display); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}
.pin::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 1.5px solid var(--gold-hi); opacity: 0; animation: ping 2.6s ease-out infinite; }
@keyframes ping { 0% { transform: scale(0.7); opacity: 0.9; } 70%, 100% { transform: scale(1.55); opacity: 0; } }
.pin:hover:not(:disabled), .pin.is-hot { background: var(--cream); border-color: var(--gold); }
.pin[aria-pressed="true"] { background: var(--cream); color: var(--ink); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(232, 184, 74, 0.45), 0 6px 18px rgba(0, 0, 0, 0.6); }
.pin-label {
  position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); white-space: nowrap;
  background: var(--paper); color: var(--ink); font: 600 0.8rem var(--body); padding: 5px 11px; border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
}
.pin:hover .pin-label, .pin:focus-visible .pin-label, .pin.is-hot .pin-label, .pin[aria-pressed="true"] .pin-label { opacity: 1; }

/* la fiche d'un cadeau : une carte de papier crème posée sur la scène */
.sheet {
  position: absolute; top: 14px; right: 14px; bottom: 14px; z-index: 4; width: min(380px, calc(100% - 28px));
  display: flex; flex-direction: column; gap: 9px; padding: 22px 22px 20px; overflow: auto;
  background: var(--paper); color: var(--ink); border-radius: 20px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(232, 184, 74, 0.5);
  animation: sheet-in 0.4s var(--ease);
}
@keyframes sheet-in { from { transform: translateX(26px); opacity: 0; } }
.sheet-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; padding: 0; color: var(--ink); background: transparent; border-color: var(--line); font-size: 1.25rem; line-height: 1; }
.sheet-close:hover:not(:disabled) { background: var(--line); border-color: var(--gold-lo); }
.sheet-num { margin: 0; font: italic 500 1.05rem/1 var(--display); color: var(--gold-lo); }
.sheet h2 { font-size: 1.7rem; line-height: 1.02; font-weight: 600; letter-spacing: -0.025em; padding-right: 40px; outline: none; font-variation-settings: "SOFT" 100; }
.sheet .kind { color: var(--ink-soft); }
.sheet-model { flex: none; height: 216px; border-radius: 14px; overflow: hidden; background: radial-gradient(90% 90% at 50% 38%, #ffffff, #e8e0cf); box-shadow: inset 0 0 0 1px var(--line); }
.sheet-model model-viewer { width: 100%; height: 100%; background: transparent; --poster-color: transparent; }
.place { margin: 4px 0 0; color: var(--ink-soft); }
.sheet .specs li::before { color: var(--gold-lo); }
.sheet .actions { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); }
.sheet .ghost { color: var(--ink); background-image: linear-gradient(var(--gold-lo), var(--gold-lo)); }
.sheet .ghost:hover { color: var(--gold-lo); }
.sheet .buy--none { color: var(--ink-soft); border-color: #c9bda4; }
@media (max-width: 720px) {
  .sheet { top: auto; left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 76%; }
  .sheet-model { height: 170px; }
  @keyframes sheet-in { from { transform: translateY(26px); opacity: 0; } }
}

/* la console sous la pièce : lumières, écrans, bras */
.console { margin: 18px auto 0; max-width: 1200px; background: rgba(11, 27, 21, 0.78); border: 1px solid var(--hair); border-radius: 22px; padding: 14px 20px 18px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.console-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px solid var(--hair); }
.tabs { display: flex; gap: 4px; }
.tabs button { position: relative; border: 0; background: none; border-radius: 10px; padding: 8px 14px; font: 500 1.06rem var(--display); color: var(--mist); }
.tabs button:hover:not(:disabled) { background: rgba(245, 238, 223, 0.07); color: var(--cream); }
.tabs button[aria-selected="true"] { color: var(--gold-hi); font-style: italic; }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -15px; height: 2px; background: var(--gold); border-radius: 2px; }
.console-side { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.panel { padding-top: 16px; }
.panel-note { margin: 0 0 16px; font-size: 0.92rem; color: var(--mist); max-width: 78ch; }
.console-msg { margin: 0; min-height: 0; font-size: 0.9rem; color: var(--gold-hi); }
.console-msg:not(:empty) { margin-top: 14px; }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; }
.swatch {
  position: relative; width: 42px; height: 42px; padding: 0; border-radius: 50%; cursor: pointer; flex: none;
  background: var(--c); border: 2px solid rgba(245, 238, 223, 0.28);
  box-shadow: 0 0 18px -2px var(--c), inset 0 2px 3px rgba(255, 255, 255, 0.45), inset 0 -6px 10px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s var(--ease), border-color 0.15s ease;
}
.swatch:hover:not(:disabled) { background: var(--c); border-color: var(--cream); transform: translateY(-3px); }
.swatch[aria-pressed="true"], .swatch.is-on { background: var(--c); border-color: var(--cream); outline: 2px solid var(--cream); outline-offset: 3px; }
.swatch--arc { --c: conic-gradient(#ff2a3c, #ff8a1f, #f5e23a, #2fe06a, #19d3ff, #2f6bff, #8a4dff, #ff3fb4, #ff2a3c); box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.45); }
.swatch--off { --c: #101a15; box-shadow: none; }
.swatch--off::after { content: ""; position: absolute; left: 50%; top: 7px; bottom: 7px; width: 2px; margin-left: -1px; background: rgba(245, 238, 223, 0.7); transform: rotate(45deg); }
.swatch--custom { --c: #16261f; box-shadow: none; overflow: hidden; display: grid; place-items: center; }
.swatch--custom::after { content: "+"; position: absolute; font: 600 1.3rem/1 var(--body); color: var(--cream); pointer-events: none; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); }
.swatch--custom input { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); padding: 0; border: 0; background: none; cursor: pointer; opacity: 0; }
.swatch--custom.is-on input { opacity: 1; }
.swatch--custom:focus-within { outline: 2.5px solid var(--gold-hi); outline-offset: 3px; }

/* ================================================================= accueil : les cadeaux, en boules de Noël */
.tree { padding-block: 84px 30px; }
.tree-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; margin-bottom: 46px; }
.tree-head h2 { font-size: clamp(2.2rem, 5.4vw, 3.7rem); font-weight: 600; letter-spacing: -0.035em; line-height: 0.95; font-variation-settings: "SOFT" 100; }
.tree-head p { margin: 0; color: var(--mist); }
/* en flex plutôt qu'en grille : une rangée incomplète reste centrée */
.baubles { --gap: 34px; --cols: 3; list-style: none; margin: 0; padding: 26px 0 0; display: flex; flex-wrap: wrap; justify-content: center; column-gap: var(--gap); row-gap: 64px; }
.bauble { position: relative; flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
/* le fil entre deux accroches : chaque boule pend au creux du sien */
.bauble::before {
  content: ""; position: absolute; top: -26px; left: calc(var(--gap) / -2); right: calc(var(--gap) / -2); height: 26px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 26' preserveAspectRatio='none'%3E%3Cpath d='M0 1Q50 50 100 1' fill='none' stroke='%232b5a45' stroke-width='1.6' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.orb {
  --d: clamp(150px, 15.5vw, 196px);
  position: relative; display: flex; flex-direction: column; align-items: center; padding-top: var(--drop); text-decoration: none;
  transform-origin: 50% 0; animation: sway 5.6s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -1.7s);
}
.orb::before { content: ""; position: absolute; top: 0; left: 50%; width: 1.5px; height: calc(var(--drop) - 8px); margin-left: -0.75px; background: linear-gradient(var(--fir), var(--gold-lo)); }
@keyframes sway { from { transform: rotate(-1.7deg); } to { transform: rotate(1.7deg); } }
.cap { position: relative; z-index: 1; width: 30px; height: 15px; margin-bottom: -4px; border-radius: 5px 5px 3px 3px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi) 42%, var(--gold) 62%, var(--gold-lo)); }
.cap::before { content: ""; position: absolute; left: 50%; top: -9px; width: 12px; height: 12px; margin-left: -6px; border: 2px solid var(--gold); border-radius: 50%; }
.ball {
  position: relative; display: block; width: var(--d); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #e3e3e3;
  box-shadow: 0 0 0 1.5px var(--gold), 0 0 0 7px rgba(232, 184, 74, 0.12), 0 30px 46px -22px #000;
  transition: box-shadow 0.3s ease, transform 0.4s var(--ease);
}
.ball img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 0.6s var(--ease); }
.ball::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.85) 0 4%, rgba(255, 255, 255, 0) 20%), radial-gradient(circle at 50% 118%, rgba(232, 184, 74, 0.42), transparent 56%);
  box-shadow: inset 0 -22px 34px rgba(20, 32, 26, 0.26), inset 0 14px 22px rgba(255, 255, 255, 0.7);
}
.orb:hover .ball, .orb:focus-visible .ball { transform: scale(1.03); box-shadow: 0 0 0 2px var(--gold-hi), 0 0 0 9px rgba(232, 184, 74, 0.2), 0 0 60px -6px rgba(232, 184, 74, 0.55), 0 30px 46px -22px #000; }
.orb:hover .ball img { transform: scale(1.12); }
.orb-cta {
  position: absolute; left: 50%; bottom: -12px; transform: translate(-50%, 6px); z-index: 2; white-space: nowrap;
  font: 600 0.78rem var(--body); color: var(--ink); background: var(--cream); padding: 5px 12px; border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity 0.2s ease, transform 0.25s var(--ease);
}
.orb:hover .orb-cta, .orb:focus-visible .orb-cta { opacity: 1; transform: translate(-50%, 0); }
.bauble-body { display: flex; flex-direction: column; align-items: center; gap: 7px; margin-top: 26px; min-width: 0; }
.bauble .kind { justify-content: center; font-size: 0.7rem; }
.bauble h3 { font-size: 1.34rem; line-height: 1.08; font-weight: 600; letter-spacing: -0.02em; font-variation-settings: "SOFT" 100; }
.bauble h3 a { text-decoration: none; background: linear-gradient(var(--gold), var(--gold)) 50% 100% / 0 2px no-repeat; transition: background-size 0.3s var(--ease); }
.bauble h3 a:hover { background-size: 100% 2px; }
.bauble .note { font-size: 0.92rem; }
.bauble .actions { margin-top: 8px; }
@supports (animation-timeline: view()) {
  .bauble { animation: drop linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; }
  @keyframes drop { from { opacity: 0; transform: translateY(-38px); } }
}
@media (max-width: 1080px) { .orb { --d: clamp(150px, 24vw, 200px); } }
.baubles .orb { --d: clamp(150px, 19vw, 220px); }
@media (max-width: 720px) {
  .tree { padding-block: 60px 20px; }
  .tree-head { margin-bottom: 14px; }
  .baubles { --cols: 1; row-gap: 0; padding-top: 0; }
  .bauble { --drop: 16px !important; flex-direction: row; align-items: flex-start; gap: 20px; text-align: left; padding: 0 0 26px; border-top: 1.5px solid var(--fir); }
  .bauble::before { display: none; }
  .orb { --d: 116px; flex: none; margin-left: 6px; }
  .orb-cta { display: none; }
  .bauble-body { align-items: flex-start; margin-top: 24px; }
  .bauble .kind { justify-content: flex-start; }
}

/* ================================================================= pied de page : la lisière des sapins */
.foot { position: relative; margin-top: 70px; color: var(--mist); font-size: 0.88rem; }
.foot-text { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; padding-bottom: 8px; }
.foot-text p { margin: 0; }
.foot-wish { font: 400 1.7rem/1 var(--hand); color: var(--gold-hi); transform: rotate(-3deg); }
.forest { display: block; width: 100%; height: clamp(120px, 16vw, 190px); stroke: none; }

/* ================================================================= pages cadeau */
.topbar { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 86px 6px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-weight: 600; color: var(--cream); padding: 8px 14px 8px 10px; border-radius: 999px; border: 1px solid var(--hair); background: rgba(11, 27, 21, 0.6); transition: border-color 0.15s ease, color 0.15s ease; }
.back:hover { color: var(--gold-hi); border-color: var(--gold); }
.pager { display: inline-flex; align-items: center; gap: 12px; font-size: 0.9rem; color: var(--mist); }
.pager b { color: var(--cream); font: italic 600 1.15rem/1 var(--display); }
.pager a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--hair); background: rgba(11, 27, 21, 0.6); color: var(--cream); transition: border-color 0.15s ease, color 0.15s ease, transform 0.18s var(--ease); }
.pager a:hover { border-color: var(--gold); color: var(--gold-hi); transform: scale(1.08); }
.product-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); grid-template-areas: "viewer intro" "viewer details"; grid-template-rows: auto 1fr; gap: 26px 52px; padding-block: 22px 20px; align-items: start; }
.intro { grid-area: intro; display: flex; flex-direction: column; gap: 14px; padding-top: 8px; animation: rise 0.8s 0.05s var(--ease) both; }
.intro h1 { font-size: clamp(2.5rem, 4.6vw, 4.1rem); font-weight: 600; line-height: 0.94; letter-spacing: -0.035em; font-variation-settings: "SOFT" 100; }
.intro .note { font-size: 1.1rem; color: var(--cream); }
.viewer { grid-area: viewer; display: flex; flex-direction: column; gap: 14px; min-width: 0; animation: rise 0.9s var(--ease) both; }
.details { grid-area: details; display: flex; flex-direction: column; gap: 16px; padding-top: 22px; border-top: 1px solid var(--hair); animation: rise 0.8s 0.15s var(--ease) both; }
.details h2 { font: italic 500 1.3rem/1 var(--display); color: var(--gold); }
.details .place { margin: 0; color: var(--mist); padding-left: 16px; border-left: 2px solid var(--fir); }
.cta { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 6px; }
/* le studio : la seule grande surface claire, pour que les objets noirs se lisent */
.stage {
  position: relative; height: clamp(360px, 66vh, 700px); border-radius: 28px; overflow: hidden;
  background: radial-gradient(85% 80% at 50% 36%, #ffffff 0%, #f1ebdd 62%, #dfd6c2 100%);
  box-shadow: 0 0 0 1px rgba(232, 184, 74, 0.5), 0 0 0 8px rgba(245, 238, 223, 0.045), 0 0 120px -30px rgba(232, 184, 74, 0.38), 0 60px 90px -60px #000;
}
.stage model-viewer, .stage canvas { display: block; width: 100%; height: 100%; background: transparent; --poster-color: transparent; touch-action: none; }
.stage .status { color: var(--ink); background: rgba(247, 241, 227, 0.9); border-color: var(--line); }
.stage-tip { position: absolute; left: 18px; top: 16px; z-index: 2; margin: 0; padding: 5px 12px; border-radius: 999px; font-size: 0.8rem; color: var(--ink-soft); background: rgba(247, 241, 227, 0.82); border: 1px solid var(--line); pointer-events: none; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 940px) {
  .product-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "viewer" "details"; grid-template-rows: none; gap: 22px; }
  .topbar { padding-top: 82px; }
}
@media (max-width: 560px) {
  .seg { border-radius: 20px; }
  .stage-tip { right: 18px; width: fit-content; }
  .console { padding-inline: 14px; }
  .tabs button { padding-inline: 10px; }
  .tabs button[aria-selected="true"]::after { left: 10px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
