/* ==========================================================================
   The Officin · Atelier d'hiver
   Charte reprise de theofficin.com (main.css du thème "the-officin") :
   - titres   : AutreDisplay (regular + italic)
   - texte    : Suisse Neue Light 300
   - couleurs : noir #000, blanc #fff, beige #f3f2ea, kaki #70795a,
                gris doux #9b9b9b, filet #dcdcdc
   - bouton   : fond noir, capitales 11px, angles droits, padding 14/24
   - lien     : souligné, offset 4px
   - easing   : cubic-bezier(.2,.7,.2,1)
   ⚠ Les polices sont chargées depuis theofficin.com (CORS ouvert). Les noms de
   fichiers sont hashés par leur build : en production, héberger les woff2
   avec le jeu (sous réserve de la licence des fontes).
   ========================================================================== */

@font-face { font-family: "Suisse Neue"; src: url("https://theofficin.com/wp-content/themes/the-officin/assets/dist/SuisseNeue-Light-WebS.btq37ZiT.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Suisse Neue"; src: url("https://theofficin.com/wp-content/themes/the-officin/assets/dist/SuisseNeue-Regular-WebS.CygYdLZy.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Suisse Neue"; src: url("https://theofficin.com/wp-content/themes/the-officin/assets/dist/SuisseNeue-Medium-WebS.B_RH6lFN.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "AutreDisplay"; src: url("https://theofficin.com/wp-content/themes/the-officin/assets/dist/AutreDisplay-Regular.Bn4PS5n5.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "AutreDisplay"; src: url("https://theofficin.com/wp-content/themes/the-officin/assets/dist/AutreDisplay-Italic.Cz5C59yr.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --black: #000;
  --ink: #121313;
  --white: #fff;
  --beige: #f3f2ea;
  --paper: #fbf6ec;
  --khaki: #70795a;
  --gray: #9b9b9b;
  --line: #dcdcdc;
  --muted: #5e5e5e;
  --art-ink: #4a4036;           /* trait des illustrations (provisoire) */

  --font-primary: "Suisse Neue", "Helvetica Neue", -apple-system, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --font-secondary: "AutreDisplay", Georgia, "Times New Roman", Times, serif;
  --ease-officin: cubic-bezier(.2, .7, .2, 1);

  --app-w: 480px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; }
body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 16px;
  line-height: 26px;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------- Cadre : mobile plein écran, desktop centré ---------- */
.stage { position: relative; height: 100%; display: flex; justify-content: center; }
.app {
  position: relative;
  width: 100%;
  max-width: var(--app-w);
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  /* fond papier blanc cassé, uni (la texture d'aquarelle est réservée aux objets) */
  background: var(--paper);
}
.desk { display: none; }

/* Desktop / tablette : pleine page, l'information centrée (voir bloc RESPONSIVE en fin de fichier) */

/* ---------- Écran ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: max(env(safe-area-inset-top), 16px) var(--gutter) max(env(safe-area-inset-bottom), 24px);
  /* l'entrée se fait élément par élément (voir « Transitions » en fin de fichier) */
}
.screen.is-leaving { pointer-events: none; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-out { to { opacity: 0; } }

/* En-tête : l'accueil à gauche, le logo centré, l'étape dessous */
.top {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  justify-items: center;
  row-gap: 4px;
}
.top__home {
  grid-column: 1; grid-row: 1; justify-self: start;
  width: 44px; height: 44px; margin-left: -11px;
  display: grid; place-items: center;
  color: inherit; opacity: .65;
  transition: opacity .2s;
}
.top__home:hover { opacity: 1; }
.top__logo { grid-column: 2; grid-row: 1; display: block; }
.top__logo img { display: block; width: 124px; height: auto; }

/* Libellé capitales espacées, comme les surtitres du site */
.label {
  font-family: var(--font-secondary);
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
}
.top .label { grid-column: 1 / -1; grid-row: 2; }
.top .label--brand { display: none; }

.art {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  touch-action: none;
}
.art > svg, .art > .art__inner { width: min(100%, 430px, 55dvh); height: auto; overflow: visible; }
.art--wide > svg, .art--wide > .art__inner { width: min(100%, 470px, 60dvh); }
.art canvas.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.copy { flex: 0 0 auto; text-align: center; padding: 8px 0 4px; }
.title {
  margin: 0;
  font-family: var(--font-secondary);
  font-weight: 400;
  font-size: 32px;
  line-height: 38px;
}
.title:empty { min-height: 38px; }
.sub {
  margin: 6px 0 0;
  font-family: var(--font-secondary);
  font-style: italic;
  font-size: 18px;
  line-height: 24px;
  color: var(--muted);
}
.hint { margin: 6px 0 0; font-size: 14px; line-height: 21px; color: var(--muted); }
.option-name { margin: 10px 0 0; font-size: 14px; line-height: 21px; color: var(--muted); min-height: 21px; }

.actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding-top: 20px;
  min-height: 108px;
  justify-content: flex-end;
}

/* ---------- Boutons (charte site) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  min-height: 48px;
  padding: 14px 24px;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-primary);
  font-weight: 400;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .25s, opacity .25s;
}
.btn:hover { background: #252525; }
.btn:disabled { opacity: .25; cursor: not-allowed; }
/* Précédent : le même bouton, en trait */
.btn--ghost { background: transparent; color: var(--black); box-shadow: inset 0 0 0 1px var(--black); }
.btn--ghost:hover { background: rgba(0, 0, 0, .05); }
.actions__nav { display: flex; justify-content: center; gap: 12px; width: 100%; }
.actions__nav > .btn { flex: 1 1 0; min-width: 0; max-width: 220px; }
/* le son : coupé / actif, en haut à droite */
.snd {
  position: absolute; z-index: 20;
  top: max(env(safe-area-inset-top), 16px); right: calc(var(--gutter) - 11px);
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; padding: 0; color: var(--black); opacity: .65; cursor: pointer;
  transition: opacity .2s, color .6s;
}
.snd:hover { opacity: 1; }
.snd .snd__off { display: none; }
.snd[aria-pressed="false"] .snd__on { display: none; }
.snd[aria-pressed="false"] .snd__off { display: inline; }
.btn:focus-visible, .link:focus-visible, .opt:focus-visible, .top__home:focus-visible, .snd:focus-visible { outline: 1px solid var(--black); outline-offset: 4px; }

.link {
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 16px;
  line-height: 24px;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity .2s;
}
.link:hover { opacity: .6; }
.link--small { font-size: 14px; }

/* ---------- Sélecteurs d'options ---------- */
.opts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.opt {
  position: relative;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.18);
  transition: transform .3s var(--ease-officin);
}
.opt::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid transparent;
  transition: border-color .25s;
}
.opt[aria-checked="true"]::after { border-color: var(--black); }
.opt:active { transform: scale(.92); }
.opt--icon { width: 48px; height: 48px; background: #fbf8f2; display: grid; place-items: center; }
.opt--icon svg { width: 34px; height: 34px; }

.dots { display: flex; justify-content: center; margin-top: 8px; }
.dot { position: relative; width: 28px; height: 28px; }
.dot::before { content: ""; position: absolute; inset: 10.5px; border-radius: 50%; background: var(--line); transition: background .25s; }
.dot[aria-current="true"]::before { background: var(--black); }

/* ---------- Champ texte ---------- */
.field {
  display: block;
  width: min(100%, 280px);
  margin: 14px auto 0;
  padding: 6px 0 8px;
  border: 0;
  border-bottom: 1px solid var(--black);
  background: transparent;
  text-align: center;
  font-family: var(--font-secondary);
  font-style: italic;
  font-size: 22px;
  line-height: 30px;
  outline: none;
  border-radius: 0;
}
.field::placeholder { color: var(--gray); }
.counter { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ---------- Jauge (souffle) ---------- */
.gauge { width: 170px; height: 1px; background: var(--line); margin: 14px auto 0; position: relative; }
.gauge i { position: absolute; left: 0; top: -1px; height: 3px; background: var(--black); width: 0; transition: width .12s linear; }

/* ---------- Accueil ---------- */
.home { overflow-y: auto; }
.home__logo { width: 168px; margin: 28px auto 0; }
.home__intro { text-align: center; margin: 36px 0 28px; }
.home__intro .title { font-size: 40px; line-height: 44px; }
.home__label { margin-top: 16px; }
.rule { width: 48px; height: 1px; background: var(--black); margin: 18px auto; border: 0; }
.cards { display: grid; gap: 14px; }
.card {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--beige);
  text-decoration: none;
  transition: background-color .25s;
}
.card:hover { background: #ebe9de; }
.card svg { width: 76px; height: 76px; }
.card__k { font-family: var(--font-secondary); font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; }
.card__t { font-family: var(--font-secondary); font-size: 24px; line-height: 30px; margin: 2px 0; }
.card__d { font-size: 14px; line-height: 21px; color: var(--muted); }
.home__foot { margin: auto 0 0; padding-top: 28px; text-align: center; font-size: 12px; line-height: 18px; color: var(--muted); }
.home__foot img { width: 26px; margin: 0 auto 10px; }

/* ---------- Index des écrans (revue) ---------- */
.index { overflow-y: auto; }
.index h2 { font-family: var(--font-secondary); font-weight: 400; font-size: 24px; line-height: 30px; margin: 28px 0 8px; }
.index ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.index li a { display: grid; grid-template-columns: 34px 1fr; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 15px; }
.index li a:hover { opacity: .6; }
.index li b { font-family: var(--font-secondary); font-style: italic; font-weight: 400; color: var(--khaki); }

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  left: 50%; bottom: 120px;
  transform: translate(-50%, 10px);
  max-width: calc(100% - 48px);
  padding: 12px 18px;
  background: var(--black);
  color: var(--white);
  font-size: 13px;
  line-height: 19px;
  text-align: center;
  opacity: 0;
  transition: opacity .3s, transform .3s var(--ease-officin);
  pointer-events: none;
  z-index: 10;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Animations des illustrations ---------- */
.art__inner svg { width: 100%; height: auto; overflow: visible; }
.swing { transform-origin: 50% 3%; animation: swing 3.2s ease-in-out infinite; }
@keyframes swing { 0%,100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.float { animation: float 4s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.shake { animation: shake .5s ease-in-out; transform-origin: 50% 58%; }
@keyframes shake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-7deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(2deg); } }
.pop { animation: pop .7s var(--ease-officin) both; transform-box: fill-box; transform-origin: center; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.spin-slow { transform-origin: 120px 120px; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.draw path, .draw line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.6s var(--ease-officin) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.petal { transform-origin: 120px 120px; transition: transform .8s var(--ease-officin), opacity .5s; }
.fade-in { animation: fadein 1.2s .2s var(--ease-officin) both; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.lid-off { animation: lidoff 1s var(--ease-officin) forwards; }
@keyframes lidoff { to { transform: translate(40px, -90px) rotate(18deg); opacity: 0; } }
.slide-arrow { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateX(0); opacity: .5; } 50% { transform: translateX(10px); opacity: 1; } }
.pull-arrow { animation: pull 1.8s ease-in-out infinite; }
@keyframes pull { 0%,100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(10px); opacity: 1; } }

/* ==========================================================================
   RESPONSIVE — tablette et desktop : pleine page, information centrée.
   Pas de cadre « téléphone » : l'en-tête reprend celui du site (logo à
   gauche), le contenu est centré dans une colonne de lecture plus large,
   illustrations et titres prennent de l'ampleur.
   ========================================================================== */
@media (min-width: 768px) {
  :root { --gutter: 48px; }
  .app { max-width: none; }
  .screen { padding: 28px var(--gutter) 48px; align-items: center; }
  .screen > * { width: 100%; max-width: 760px; }
  .screen > .top { max-width: none; }

  .top { grid-template-columns: 1fr auto 1fr; row-gap: 8px; }
  .top__logo img { width: 150px; }
  .snd { top: 28px; }
  .actions__nav { width: auto; gap: 18px; }
  .actions__nav > .btn { flex: 0 0 auto; min-width: 200px; max-width: none; }

  .art > svg, .art > .art__inner { width: min(100%, 480px, 54dvh); }
  .art--wide > svg, .art--wide > .art__inner { width: min(100%, 560px, 62dvh); }

  .title { font-size: 48px; line-height: 54px; }
  .title:empty { min-height: 54px; }
  .sub { font-size: 22px; line-height: 30px; margin-top: 10px; }
  .hint, .option-name { font-size: 15px; }
  .opts { gap: 16px; margin-top: 22px; }
  .opt { width: 36px; height: 36px; }
  .opt--icon { width: 56px; height: 56px; }
  .opt--icon svg { width: 40px; height: 40px; }
  .field { width: 360px; font-size: 26px; line-height: 34px; }

  .actions { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 28px; padding-top: 28px; min-height: 96px; }
  .actions > span { flex-basis: 100%; justify-content: center; }
  .actions > span[data-after] { flex-direction: row !important; flex-basis: auto; gap: 28px !important; }
  .toast { bottom: 140px; }

  /* Accueil */
  .home { justify-content: flex-start; }
  .home__logo { width: 190px; margin-top: 8px; }
  .home__intro { margin: 7dvh 0 5dvh; }
  .home__intro .title { font-size: 64px; line-height: 68px; }
  .home .cards { max-width: 920px; grid-template-columns: 1fr 1fr; gap: 24px; }
  .card { grid-template-columns: 1fr; justify-items: center; align-items: start; align-content: start; text-align: center; gap: 18px; padding: 40px 32px 36px; }
  .card svg { width: 180px; height: 180px; }
  .card__t { font-size: 32px; line-height: 38px; margin: 6px 0; }
  .card__d { font-size: 15px; }
  .home__foot { padding-bottom: 8px; }

  /* Index des écrans : deux colonnes */
  .index { display: block; }
  .index > * { margin-left: auto; margin-right: auto; }
  .index .top { max-width: none; }
  .index > .hint { max-width: 920px; text-align: center; }
  .index .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 920px; margin: 0 auto; }
}

@media (min-width: 768px) and (max-height: 720px) {
  .home__intro { margin: 3dvh 0; }
  .card svg { width: 130px; height: 130px; }
  .card { padding: 24px; }
}

/* ==========================================================================
   CRAFT — rendu dessiné à la main (voir js/craft.js et l'en-tête d'art.js)
   ========================================================================== */
/* Le trait tremble : trois filtres en alternance, ~9 images par seconde */
/* (les règles sont dans le <style> de chaque SVG, voir art.js : une url(#…) y est résolue dans la page partout) */
/* Grain du papier, posé sur tout l'écran */
/* Calques de geste (tracé du doigt, déchirure, vibrations) : par-dessus le dessin, jamais remplacés */
.art__inner { position: relative; }
/* Objets 3D : le canvas remplace le dessin 2D, même cadre carré ; le trait tremble aussi */
.art__inner.is-3d { aspect-ratio: 1; }
.art__inner.is-3d > svg:not(.overlay) { display: none; }
.art__inner canvas.gl { display: block; width: 100%; height: 100%; filter: url(#cbh0); }
[data-boil="1"] .art__inner canvas.gl { filter: url(#cbh1); }
[data-boil="2"] .art__inner canvas.gl { filter: url(#cbh2); }
.art__inner > svg.overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.art > svg.burst, .art > svg.overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }

/* Téléphone simulé sur ordinateur (voir le début de js/app.js) */
.phone { position: fixed; top: 50%; left: 50%; box-sizing: border-box; width: 410px; height: 864px; margin: -432px 0 0 -205px; padding: 10px; border-radius: 54px; background: #111; box-shadow: 0 30px 80px rgba(0, 0, 0, .18); }
.phone iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 44px; background: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   SCÈNE 3D PERSISTANTE (js/gift3d.js) : un seul canvas pour tout le jeu, sous les écrans ;
   il glisse vers l'emplacement [data-3d] de l'écran courant.
   ========================================================================== */
.app > canvas.stage3d { position: absolute; left: 0; top: 0; width: 420px; height: 420px; transform-origin: 0 0; pointer-events: none; filter: url(#cbh0); }
[data-boil="1"] .app > canvas.stage3d { filter: url(#cbh1); }
[data-boil="2"] .app > canvas.stage3d { filter: url(#cbh2); }
.art__inner.is-3d { touch-action: none; cursor: grab; }
.art__inner.is-3d > [data-pic] { visibility: hidden; }   /* le dessin 2D de secours, caché sous la 3D */

/* ==========================================================================
   TRANSITIONS — courtes, souples, interruptibles ; un seul geste signature par élément.
   L'écran entrant pose ses éléments l'un après l'autre (--i), le titre mot à mot (--w),
   les pastilles en petite cascade (--c) ; l'écran sortant s'efface vers le haut.
   ========================================================================== */
.screen > * { animation: enter .8s var(--ease-officin) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes enter { from { opacity: 0; transform: translateY(18px); } }
.title .w { display: inline-block; animation: word .85s cubic-bezier(.2, .9, .25, 1.12) both; animation-delay: calc(140ms + var(--w, 0) * 55ms); }
@keyframes word { from { opacity: 0; transform: translateY(.5em) rotate(2deg); filter: blur(3px); } }
.opts .opt { animation: chip .55s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(280ms + var(--c, 0) * 38ms); }
@keyframes chip { from { opacity: 0; transform: scale(.4); } }
.opt.is-tap { animation: tap .42s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes tap { 40% { transform: scale(.82); } }
.screen.is-leaving > * { animation: leave .32s cubic-bezier(.5, 0, .75, 0) both; animation-delay: calc(var(--i, 0) * 22ms); }
@keyframes leave { to { opacity: 0; transform: translateY(-14px); filter: blur(2px); } }
.btn { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), background-color .25s, opacity .25s; }
.btn:active { transform: scale(.95); }

/* Le coup de crayon sous le titre (ajouté par Craft.words) */
.title .tstroke { display: block; width: 92px; height: 8px; margin: 8px auto 0; overflow: visible; opacity: .5; }
.title .tstroke path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .55s .3s var(--ease-officin) forwards; }

/* Le mot écrit à la plume (Craft.penWrite) */
.pen { opacity: 0; animation: penin .32s var(--ease-officin) forwards; }
@keyframes penin { from { opacity: 0; filter: blur(2px); } to { opacity: 1; filter: none; } }

/* Le coup de crayon qui balaie l'écran au changement (Craft.hatchSweep) */
.hatchsweep { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 45; pointer-events: none; opacity: .08; }
.hatchsweep path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: hatchdraw .4s cubic-bezier(.5, 0, .3, 1) forwards; }
@keyframes hatchdraw { 55% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }

/* la boule (verre, calotte, socle) est plus haute que large : emplacement en portrait */
.art > .art__inner.is-3d.is-tall { aspect-ratio: 4 / 5; width: min(100%, 440px, 50dvh); }

/* le grand sapin : un fond vert profond, comme un mur de salon, la lumière de la spirale y chante */
.app { transition: background-color .6s ease; }
.app.app--sapin { background: #360810; }   /* le fond est peint par la scène 3D (plein écran) : bordeaux #62131A, lumière au centre, bords plus sombres */
.app--sapin .title, .app--sapin .sub, .app--sapin .hint, .app--sapin .label, .app--sapin .top, .app--sapin .top a, .app--sapin .top button { color: #efe6d2 !important; }
.app--sapin .sub span { color: #f6e7bf; }
.app--sapin .btn { background: #efe6d2; color: #62131A; border-color: #efe6d2; }
.app--sapin .btn--ghost { background: transparent; color: #efe6d2; box-shadow: inset 0 0 0 1px #efe6d2; }
.app--sapin .snd { color: #efe6d2; }
.app--sapin .hint--focus { color: #f3d58e !important; font-style: italic; letter-spacing: .02em; }
/* les textes du sapin restent lisibles quand la scène plein écran passe dessous (zoom sur une boule) */
.app--sapin .copy, .app--sapin .top { text-shadow: 0 1px 14px rgba(40, 4, 8, .85), 0 0 3px rgba(40, 4, 8, .6); }

/* ---------- le slider d'emballage : un rail qui se remplit, un cachet de cire pour curseur, trois crans ---------- */
.wslider { position: relative; width: min(100%, 320px); margin: 0 auto 6px; padding: 10px 0 22px; transition: opacity .5s ease, transform .5s ease; }
.wslider--done { opacity: 0; transform: translateY(10px) scale(.96); pointer-events: none; }
.wslider input { -webkit-appearance: none; appearance: none; width: 100%; height: 40px; margin: 0; background: transparent; cursor: grab; touch-action: none; position: relative; z-index: 2; }
.wslider input:active { cursor: grabbing; }
.wslider input::-webkit-slider-runnable-track { height: 8px; border-radius: 8px;
  background: linear-gradient(90deg, #62131A 0, #8a2a30 var(--p), rgba(98, 19, 26, .12) var(--p)); box-shadow: inset 0 1px 2px rgba(40, 6, 10, .18); }
.wslider input::-moz-range-track { height: 8px; border-radius: 8px; background: rgba(98, 19, 26, .12); }
.wslider input::-moz-range-progress { height: 8px; border-radius: 8px; background: linear-gradient(90deg, #62131A, #8a2a30); }
.wslider input::-webkit-slider-thumb { -webkit-appearance: none; width: 36px; height: 36px; margin-top: -14px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #b0434a 0, #7d1b23 45%, #62131A 70%, #4a0d13 100%);
  border: 2px solid #c9a45c; box-shadow: 0 3px 10px rgba(60, 8, 14, .35), inset 0 -2px 4px rgba(0, 0, 0, .25); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.wslider input::-moz-range-thumb { width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle at 34% 30%, #b0434a 0, #7d1b23 45%, #62131A 70%, #4a0d13 100%); border: 2px solid #c9a45c; box-shadow: 0 3px 10px rgba(60, 8, 14, .35); }
.wslider input:active::-webkit-slider-thumb { transform: scale(1.12); }
.wslider--notch input::-webkit-slider-thumb { animation: wsl-notch .42s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes wsl-notch { 0% { transform: scale(1); } 40% { transform: scale(1.28) rotate(-8deg); } 100% { transform: scale(1); } }
.wslider__ticks { position: absolute; left: 18px; right: 18px; top: 26px; height: 8px; pointer-events: none; z-index: 1; }
.wslider__ticks i { position: absolute; top: -3px; width: 2px; height: 14px; margin-left: -1px; background: #c9a45c; border-radius: 1px; opacity: .8; }
.wslider__labels { display: flex; justify-content: space-between; padding: 0 2px; margin-top: -4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.wslider__labels span:nth-child(2) { margin-left: 10%; }
/* grand écran : le slider d'emballage a sa ligne, au centre ; le logo s'éclaire sur le fond bordeaux du sapin */
@media (min-width: 768px) {
  .actions:has(> .wslider) { flex-direction: column; gap: 10px; }
  .actions > .wslider { width: min(100%, 440px); margin: 0 auto; }
}
.app--sapin .top__logo img { filter: brightness(0) invert(.93) sepia(.25); }

/* ---------- PC large : le titre à gauche, l'objet en grand au centre, les options à droite ; Précédent / Suivant centrés dessous.
   Le bloc texte couvre toute la largeur (même colonnes que l'écran), sans capter le doigt au centre : la boule reste manipulable.
   Le sapin garde sa mise en page plein écran. ---------- */
@media (min-width: 1100px) and (min-aspect-ratio: 5/4) {
  .app:not(.app--sapin) .screen:has(> .art):has(> .copy) {
    --artw: min(62dvh, 42vw);
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--artw) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    column-gap: 4vw;
    padding-left: max(var(--gutter), 5vw); padding-right: max(var(--gutter), 5vw);
  }
  .app:not(.app--sapin) .screen:has(> .art):has(> .copy) > * { width: auto; max-width: none; }
  .app:not(.app--sapin) .screen:has(> .art):has(> .copy) > .top { grid-column: 1 / -1; grid-row: 1; }
  .app:not(.app--sapin) .screen:has(> .art):has(> .copy) > .art { grid-column: 2; grid-row: 2; min-height: 0; }
  .app:not(.app--sapin) .screen:has(> .art):has(> .copy) > .copy {
    grid-column: 1 / -1; grid-row: 2; align-self: center; z-index: 1;
    display: grid; grid-template-columns: minmax(0, 1fr) var(--artw) minmax(0, 1fr); column-gap: 4vw; grid-auto-flow: dense; align-content: center;
    padding: 0; pointer-events: none;
  }
  .app:not(.app--sapin) .screen:has(> .art):has(> .copy) > .copy > * { grid-column: 3; pointer-events: auto; text-align: right; justify-self: end; max-width: 420px; }
  .app:not(.app--sapin) .screen:has(> .art):has(> .copy) > .copy > :is(.title, .sub, .hint) { grid-column: 1; text-align: left; justify-self: start; }
  .app:not(.app--sapin) .screen:has(> .art):has(> .copy) .copy .opts { justify-content: flex-end; }
  .app:not(.app--sapin) .screen:has(> .art):has(> .copy) .title .tstroke { margin-left: 0; }
  .app:not(.app--sapin) .screen:has(> .art):has(> .copy) > .actions { grid-column: 1 / -1; grid-row: 3; }
  .app:not(.app--sapin) .screen:has(> .art):has(> .copy) .art > svg, .app:not(.app--sapin) .screen:has(> .art):has(> .copy) .art > .art__inner { width: min(100%, 62dvh); }
  .app:not(.app--sapin) .screen:has(> .art):has(> .copy) .art > .art__inner.is-3d.is-tall { width: min(100%, 56dvh); }
}
