/* Meumeubles — couleurs inspirées de meumeubles.com */
:root {
  --bg: #FFFFFF;
  --wash: #FDF0F0;
  --blush: #F8E6E6;
  --ink: #1F1919;
  --muted: #6A5D5C;
  --accent: #8E6060;
  --accent-dark: #7A4F4F;
  --line: rgba(31, 25, 25, .1);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, p { margin: 0; }
button { font: inherit; }

.app { height: 100vh; height: 100dvh; min-height: 640px; overflow: hidden; display: flex; flex-direction: column; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.serif { font-family: var(--serif); font-weight: 500; }
.btn { appearance: none; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; text-align: left; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.eyebrow { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.accent { color: var(--accent); }

.reveal { animation: rise 1s var(--ease) both; }
.d1 { animation-delay: .35s; } .d2 { animation-delay: .5s; } .d3 { animation-delay: .65s; }
.fade { animation: fadeIn .8s ease both; }
@keyframes rise { from { transform: translateY(28px); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.fsvg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Photo envoyée depuis le back-office (idéalement détourée, fond transparent) */
.fimg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; object-position: 50% 100%; }
.pick-shot.has-photo .fimg, .cart-thumb .fimg, .sel-fur .fimg { object-position: 50% 50%; }
.load-error { margin: auto; padding: 24px; color: var(--muted); }

/* ---------- Accueil : trois pages qui s’enchaînent au défilement ---------- */
.scroller { flex: 1; min-height: 0; overflow-y: auto; scroll-snap-type: y mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.page { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; position: relative; }
.leaving .scroller { overflow: hidden; }

/* Intro : une « piste » plus haute que l’écran ; la page reste fixée pendant qu’on la parcourt
   et l’armoire s’ouvre au fil du défilement (valeurs --text, --vid, --fold calculées dans app.js). */
.home .scroller { scroll-snap-type: none; }
.intro-track { position: relative; height: 260%; scroll-snap-align: start; }
.intro-track > .intro-page { position: sticky; top: 0; height: calc(100% / 2.6); scroll-snap-align: none; scroll-snap-stop: normal; }
.intro-page { overflow: hidden; --text: 1; --vid: 0; --flash: 0; --fold: 0; }
.intro-content { position: relative; z-index: 2; height: 100%; width: min(62%, 900px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 32px 40px;
  opacity: var(--text); transform: translateY(calc((1 - var(--text)) * -30px)); }
/* La photo occupe toute la largeur ; un voile blanc dégradé sur la gauche porte le texte */
.intro-photo { position: absolute; inset: 0; margin: 0; overflow: hidden; background: var(--wash); container-type: size; animation: fadeIn 1.6s var(--ease) both; }
.intro-photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: var(--text); background: linear-gradient(90deg, rgba(255,255,255,.86) 0%, rgba(255,255,255,.78) 30%, rgba(255,255,255,.5) 48%, rgba(255,255,255,.12) 62%, rgba(255,255,255,0) 70%); }
.intro-photo .intro-brand { position: absolute; z-index: 1; top: 26px; right: 92px; color: #FFFFFF; text-shadow: 0 1px 14px rgba(0,0,0,.45); opacity: var(--text); }

/* La scène a exactement les proportions de la photo et la recouvre comme « cover », cadrée sur l’armoire. */
.intro-stage { --sw: max(100cqw, calc(100cqh * 1.4903)); --sh: max(100cqh, calc(100cqw * .671)); --fx: .6;
  position: absolute; width: var(--sw); height: var(--sh); left: calc((100cqw - var(--sw)) * var(--fx)); top: calc((100cqh - var(--sh)) * .5); }
.intro-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* La vidéo de l’armoire qui s’ouvre, posée sur la photo : cadrage plus large que la photo, d’où ces valeurs
   (en % de la photo) qui superposent exactement les deux armoires. */
.st-video { position: absolute; left: -0.88%; top: -1.13%; width: 115.2%; height: 101.9%; max-width: none; object-fit: fill; display: block;
  opacity: var(--vid); pointer-events: none; }
/* Une fois l’armoire ouverte, la première page se replie vers la gauche comme un panneau d’accordéon
   (la photo reste cadrée sur l’armoire en rétrécissant) et les univers arrivent par la droite.
   --fold va de 0 à 1 (calculé dans app.js). */
.intro-track.inline { height: 340%; }
.intro-track.inline > .intro-page { height: calc(100% / 3.4); }
.intro-photo { right: calc(var(--fold, 0) * 100%); }
.panels-page.in-intro { position: absolute; top: 0; right: 0; bottom: 0; left: calc((1 - var(--fold, 0)) * 100%); z-index: 4; height: 100%;
  background: #FFFFFF; border-left: 2px solid #FFFFFF; visibility: hidden; pointer-events: none; }
.panels-page.in-intro.live { pointer-events: auto; border-left-width: 0; }
/* Pendant l’animation de l’armoire, on ne peut pas faire défiler soi-même */
.scroll-locked { overflow: hidden !important; }
.panels-page.in-intro .overlay { opacity: var(--ov, 0); }
.leaving .panels-page.in-intro .overlay { opacity: 0; }
/* Fondu final vers l’accordéon */
.intro-flash { position: absolute; inset: 0; z-index: 3; background: #FFFFFF; opacity: var(--flash); pointer-events: none; }
.intro-bg { display: none; position: absolute; inset: -20%; pointer-events: none; animation: drift 18s ease-in-out infinite alternate;
  background: radial-gradient(circle at 28% 42%, rgba(142,96,96,.16), rgba(142,96,96,0) 45%), radial-gradient(circle at 76% 68%, rgba(125,134,104,.24), rgba(125,134,104,0) 50%); }
@keyframes drift { to { transform: translate(4%, -3%) scale(1.08); } }
.intro-top, .intro-bottom { position: relative; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.intro-top { align-items: baseline; }
.intro-bottom { align-items: flex-end; }
.brand { font-size: 26px; font-style: italic; color: var(--accent); }
.brand-sm { font-size: 22px; font-style: italic; color: var(--accent); }
.intro-body { position: relative; display: flex; flex-direction: column; gap: 28px; max-width: 980px; }
.intro { font-size: clamp(48px, 5.6vw, 84px); line-height: .98; letter-spacing: -.015em; text-wrap: balance; }
.intro-lead { max-width: 640px; font-size: 16px; line-height: 1.7; color: var(--muted); }
.promises { display: flex; gap: 12px 32px; flex-wrap: wrap; }
.cue { color: var(--ink); display: flex; align-items: center; gap: 12px; }
.cue:hover { color: var(--accent); }
.cue .arrow { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* Accordéon des univers */
.panels { display: flex; height: 100%; gap: 2px; }
.panel { flex: 1; position: relative; overflow: hidden; min-width: 0; transition: flex .9s var(--ease); animation: panelIn 1s var(--ease) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.panel:hover, .panel:focus-visible { flex: 3.2; }
.panel .piece { position: absolute; left: 50%; top: 40%; width: 86%; max-width: 440px; aspect-ratio: 4 / 3; transform: translate(-50%, -50%) scale(.82); opacity: .75; transition: transform 1s var(--ease), opacity 1s; }
.panel:hover .piece, .panel:focus-visible .piece { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.panel .txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.75)); }
.panel-name { font-size: 34px; font-style: italic; line-height: 1.05; animation: rise 1.1s var(--ease) both; }
.panel .line { font-size: 13px; line-height: 1.5; max-width: 340px; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .7s var(--ease), opacity .5s; }
.panel:hover .line, .panel:focus-visible .line { max-height: 80px; opacity: .85; }
.overlay { position: absolute; left: 0; right: 0; top: 0; padding: 28px 92px 28px 40px; display: flex; justify-content: space-between; align-items: baseline; gap: 24px; pointer-events: none; background: linear-gradient(rgba(255,255,255,.92), rgba(255,255,255,0)); }
.overlay .eyebrow { color: var(--ink); }

/* Ouverture d’un univers : le panneau choisi prend tout l’écran */
.leaving .overlay { opacity: 0; transition: opacity .4s; }
.leaving .panel { flex: .0001; opacity: 0; transition: flex .85s var(--ease-io), opacity .5s; pointer-events: none; }
.leaving .panel.opening { flex: 1; opacity: 1; }
.leaving .panel.opening .line { opacity: 0; max-height: 0; transition: opacity .3s, max-height .5s; }
.leaving .panel.opening .panel-name { font-size: 52px; transition: font-size .85s var(--ease-io); }
.leaving .panel.opening .piece { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }

/* Pièces du moment */
.sel-page { --mx: 0; --my: 0; padding: 40px; overflow: hidden; }
.sel-glow { position: absolute; inset: -10%; pointer-events: none;
  background: radial-gradient(circle at 25% 70%, rgba(142,96,96,.08), rgba(142,96,96,0) 40%), radial-gradient(circle at 75% 25%, rgba(125,134,104,.12), rgba(125,134,104,0) 45%); }
.selgrid { position: relative; height: 100%; display: grid; gap: 16px;
  grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "t t t a a a b b c c c c"
    "t t t a a a b b k k k k"
    "d d e e e e e f f g g g"
    "d d e e e e e h h h h h"; }
.sel-title { grid-area: t; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-width: 0; }
.sel-title-top, .sel-title-bottom { display: flex; flex-direction: column; gap: 14px; }
.sel-title h2 { font-size: clamp(48px, 7vh, 68px); line-height: .92; letter-spacing: -.02em; }
.sel-title p { max-width: 240px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.sel { position: relative; overflow: hidden; display: block; color: var(--ink); text-decoration: none; box-shadow: 0 18px 40px rgba(31,25,25,.10); transition: opacity .6s, box-shadow .6s; }
.sel:hover { color: var(--ink); box-shadow: 0 30px 70px rgba(31,25,25,.18); }
.selgrid:not(.in) .sel { opacity: 0; }
.selgrid.in .sel { animation: selRise 1.1s var(--ease) backwards; }
@keyframes selRise { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
.selgrid:hover .sel:not(:hover) { opacity: .5; }
.sel-stage { position: absolute; inset: 0; transition: transform 1.2s var(--ease); }
.sel:hover .sel-stage { transform: scale(1.06); }
.sel-fur { position: absolute; left: 10%; right: 10%; top: 12%; bottom: 26%; transition: transform 1s var(--ease); }
.sel:hover .sel-fur { transform: scale(1.08) translateY(-2%); }
.sel-par { position: absolute; inset: 0; transform: translate(calc(var(--mx) * var(--depth) * 1px), calc(var(--my) * var(--depth) * 1px)); transition: transform .5s ease-out; }
.sel-bob { position: absolute; inset: 0; animation: selBob 7s ease-in-out infinite; }
@keyframes selBob { 50% { transform: translateY(-5px); } }
.sel-tag { position: absolute; top: 14px; left: 16px; }
.sel-num { position: absolute; top: 14px; right: 16px; font-variant-numeric: tabular-nums; }
.sel-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.85)); }
.sel-bar { height: 1px; background: var(--accent); width: 0; transition: width .7s var(--ease); }
.sel:hover .sel-bar, .sel:focus-visible .sel-bar { width: 40px; }
.sel-line { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .6s, opacity .5s; }
.sel:hover .sel-line, .sel:focus-visible .sel-line { max-height: 30px; opacity: .85; }
.sel-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.sel-name { font-style: italic; line-height: 1.05; }
.sel-price { color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sel.sm .sel-tag, .sel.wide .sel-tag { display: none; }
.sel.sm .sel-fur { top: 12%; bottom: 34%; }
.sel.wide .sel-fur { left: 4%; right: 48%; top: 10%; bottom: 10%; }
/* Pièce avec photo : la photo couvre toute la carte (légèrement débordante pour le mouvement de profondeur) */
.sel.has-photo .sel-fur, .sel.has-photo.sm .sel-fur, .sel.has-photo.wide .sel-fur { inset: -3%; }
.sel.has-photo .sel-fur .fimg { object-fit: cover; object-position: 50% 50%; }
.sel.has-photo .sel-bob { animation: none; }
.sel.has-photo:hover .sel-fur { transform: scale(1.05); }
.sel.has-photo .sel-cap, .sel.has-photo.wide .sel-cap { left: 0; right: 0; width: auto; top: auto; justify-content: flex-end; padding-top: 48px; background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.88) 55%, rgba(255,255,255,.95)); }
.sel.has-photo .sel-tag, .sel.has-photo .sel-num { color: #FFFFFF; text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.sel.wide .sel-cap { left: auto; width: 52%; top: 0; justify-content: flex-end; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.8)); }

/* ---------- Univers : la pièce à gauche, la description à droite ---------- */
.uni { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); grid-template-rows: minmax(0, 1fr); background: var(--bg); }
.uni-left { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.uni-head { position: absolute; top: 22px; left: 28px; z-index: 4; }
.back-pill, .cart-pill { background: rgba(255,255,255,.75); border: 1px solid rgba(31,25,25,.2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--ink); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; transition: border-color .3s, color .3s; }
.back-pill { display: inline-block; padding: 11px 18px; }
.back-pill:hover, .cart-pill:hover { border-color: var(--accent); color: var(--accent); }
.uni-area { position: relative; flex: 1; min-height: 0; container-type: size; overflow: hidden; }
.uni-floor { position: absolute; left: 0; right: 0; bottom: 0; height: calc(min(100cqw, 232cqh) * .2083);
  background: linear-gradient(rgba(255,255,255,.12), rgba(0,0,0,.04)), repeating-linear-gradient(90deg, #B89470 0 100px, #A6815C 100px 103px); }
.uni-stage { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; width: min(100cqw, 232cqh); aspect-ratio: 1440 / 1000; transform-origin: 50% 100%; animation: roomIn 1.3s var(--ease) both; }
@keyframes roomIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.uni-foot { position: absolute; left: 28px; bottom: 18px; z-index: 4; pointer-events: none; }
.uni-foot .eyebrow { color: var(--ink); }
.uni-bg { position: absolute; inset: 0; cursor: default; }

/* Transition depuis l’accordéon : la couleur du panneau se dissout dans la pièce */
.uni-veil { position: absolute; inset: 0; z-index: 5; pointer-events: none; animation: veilOut .9s .12s cubic-bezier(.4,0,.2,1) both; }
@keyframes veilOut { to { opacity: 0; visibility: hidden; } }
.uni-veil-piece { position: absolute; left: 50%; top: 40%; width: 86%; max-width: 440px; aspect-ratio: 4 / 3; transform: translate(-50%, -50%) scale(1.08); }

/* Univers en photo : la vraie pièce, contenue en entier, sur un fond flouté de la même photo */
.uni-area.photo-mode { display: flex; align-items: center; justify-content: center; background: #2A2424; }
.scene-blur { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) brightness(.75) saturate(1.1); }
.scene { position: relative; flex: none; width: min(100cqw, calc(100cqh * var(--r))); aspect-ratio: var(--r); overflow: hidden; animation: roomIn 1.3s var(--ease) both; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.scene-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .6s var(--ease); }

/* Repères numérotés sur la photo */
.pin { position: absolute; z-index: 2; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: flex; align-items: center; justify-content: center; border-radius: 50%; animation: pinIn .7s var(--ease) both; }
@keyframes pinIn { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.pin-dot { position: relative; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.94); color: var(--ink); font-size: 10px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; box-shadow: 0 4px 14px rgba(0,0,0,.28); transition: transform .4s var(--ease), background .3s, color .3s; }
.pin-dot::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.85); animation: pulse 2.4s ease-out infinite; pointer-events: none; }
@keyframes pulse { from { transform: scale(.75); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.pin:focus-visible { outline: none; }
.pin:focus-visible .pin-dot { outline: 2px solid #FFFFFF; outline-offset: 4px; }
.pin.hot { z-index: 4; }
.pin.hot .pin-dot { transform: scale(1.18); background: var(--accent); color: #FFFFFF; }
.pin.hot .pin-dot::after { animation: none; opacity: 0; }
.scene.hovering .pin:not(.hot) { opacity: .45; transition: opacity .4s; }
.pin-tip { position: absolute; left: 50%; bottom: calc(100% + 10px); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 16px; background: rgba(255,255,255,.94); border: 1px solid rgba(142,96,96,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); white-space: nowrap; opacity: 0; transform: translate(-50%, 8px); transition: opacity .35s, transform .45s var(--ease); pointer-events: none; }
.pin-tip.below { bottom: auto; top: calc(100% + 10px); }
.pin-tip.right { left: 0; transform: translate(0, 8px); }
.pin-tip.left { left: auto; right: 0; transform: translate(0, 8px); }
.pin.hot .pin-tip { opacity: 1; transform: translate(-50%, 0); }
.pin.hot .pin-tip.right, .pin.hot .pin-tip.left { transform: none; }
/* Le filtre : un projecteur rond sur le meuble, le reste de la photo s’assombrit */
.spot { --x: 50%; --y: 50%; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .5s var(--ease);
  background: radial-gradient(ellipse 24% 34% at var(--x) var(--y), rgba(20,15,15,0) 0%, rgba(20,15,15,0) 45%, rgba(20,15,15,.36) 100%); }
.spot.on { opacity: 1; }
.scene-hint { position: absolute; right: 14px; bottom: 14px; z-index: 2; padding: 8px 12px; background: rgba(255,255,255,.9); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink); pointer-events: none; transition: opacity .3s; }
.scene.hovering .scene-hint { opacity: 0; }
.side-row-num { display: inline-block; min-width: 26px; margin-right: 8px; font-family: var(--sans); font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .06em; color: var(--accent); }

/* Accordéon avec photo : la photo occupe tout le panneau */
.panel.has-photo { background-color: #DDD; }
.panel.has-photo .txt { background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.85)); }

/* Décor de la pièce */
.room-light { position: absolute; inset: 0; background: radial-gradient(ellipse at 22% 6%, rgba(255,240,210,.2), rgba(0,0,0,0) 55%); }
.room-panel { position: absolute; top: 8%; bottom: 32%; border: 1px solid rgba(255,255,255,.09); pointer-events: none; }
.room-painting { position: absolute; left: 53%; top: 17%; width: 14%; height: 27%; border: 7px solid #8C6A3A; background: linear-gradient(150deg, #3D4A3A, #9C8A6A 60%, #C9B48C); box-shadow: 0 16px 34px rgba(0,0,0,.4); }
.room-mirror { position: absolute; left: 74%; top: 20%; width: 9%; aspect-ratio: 1; border-radius: 50%; border: 5px solid #B8913F; box-shadow: 0 16px 34px rgba(0,0,0,.4);
  background: radial-gradient(circle at 35% 30%, rgba(255,250,235,.5), rgba(120,130,125,.35) 60%, rgba(40,45,42,.6)); }
.room-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(rgba(255,255,255,.12), rgba(0,0,0,.04)), repeating-linear-gradient(90deg, #B89470 0 7%, #A6815C 7% 7.2%); }
.room-baseboard { position: absolute; left: 0; right: 0; top: 69%; height: 1.2%; background: rgba(31,25,25,.16); }
.room-rug { position: absolute; left: 8%; right: 14%; bottom: 4%; height: 13%; border-radius: 50%; opacity: .55; }
.room-lamp { position: absolute; left: 77%; bottom: 30.5%; width: 6%; height: 15%; }
.room-plant { position: absolute; left: 88%; bottom: 14%; width: 8%; height: 34%; }

/* Meubles de la pièce */
.rf { position: absolute; pointer-events: none; animation: rise 1.1s var(--ease) both; }
.rf.hot { z-index: 3; }
.rf.picked { z-index: 6; }
.rf-art { position: absolute; inset: 0; transition: filter .5s, transform .7s var(--ease); }
.uni-stage.hovering .rf:not(.hot) .rf-art { filter: brightness(.75) saturate(.8); }
.rf.hot .rf-art { filter: drop-shadow(0 0 2px rgba(142,96,96,.9)) drop-shadow(0 0 24px rgba(142,96,96,.6)) brightness(1.08); transform: translateY(-1.5%); }
.rf.picked::after { content: ''; position: absolute; left: 30%; right: 30%; bottom: 3%; height: 3%; border-radius: 50%; background: radial-gradient(ellipse, rgba(142,96,96,.75), rgba(142,96,96,0) 70%); }
.rf-hit { position: absolute; pointer-events: auto; }
.rf-hit:focus-visible { outline: 1px solid var(--accent); }
.rf-tip { position: absolute; left: 50%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 16px; background: rgba(255,255,255,.88); border: 1px solid rgba(142,96,96,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transform: translate(-50%, 8px); transition: opacity .35s, transform .45s var(--ease); pointer-events: none; }
.rf.hot .rf-tip { opacity: 1; transform: translate(-50%, 0); }
.rf.picked .rf-tip { display: none; }
.rf-tip-name { font-size: 18px; font-style: italic; white-space: nowrap; }
.rf-tip-price { font-size: 16px; color: var(--accent); font-variant-numeric: tabular-nums; }

/* Panneau latéral */
.uni-side { min-height: 0; overflow-y: auto; padding: 92px 40px 32px; border-left: 1px solid var(--line); background: var(--wash); scrollbar-width: thin; }
.side-uni, .side-pick { display: flex; flex-direction: column; gap: 22px; }
.side-pick { gap: 20px; animation: sideIn .6s var(--ease) both; }
@keyframes sideIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.side-title { position: relative; z-index: 10; font-size: 52px; font-style: italic; line-height: .98; letter-spacing: -.01em; }
.side-line { font-size: 16px; line-height: 1.6; }
.side-desc { font-size: 14px; line-height: 1.75; color: var(--muted); }
.side-eras { display: flex; flex-direction: column; gap: 8px; }
.side-eras .serif { font-size: 19px; font-style: italic; }
.side-list { display: flex; flex-direction: column; }
.side-list > .eyebrow { padding-bottom: 10px; }
.side-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); transition: padding .4s var(--ease); }
.side-row:hover, .side-row.on { padding-left: 10px; }
.side-row.on { box-shadow: inset 2px 0 0 var(--accent); }
.side-row-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.side-row-name { font-size: 20px; font-style: italic; line-height: 1.1; }
.side-row-era { font-size: 12px; color: var(--muted); }
.side-row-price { font-size: 18px; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.side-row-price.is-sold { color: var(--muted); font-style: italic; }
.side-back { color: var(--ink); align-self: flex-start; }
.pick-shot { display: block; position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: radial-gradient(ellipse at 50% 38%, #FFFFFF, var(--blush) 82%); border: 1px solid rgba(31,25,25,.08); }
.pick-shot-fur { position: absolute; left: 8%; right: 8%; top: 10%; bottom: 6%; }
.pick-shot-tag { position: absolute; left: 14px; top: 14px; }
/* Avec une vraie photo : elle remplit tout le cadre, comme sur les cartes de l’accueil */
.pick-shot.has-photo .pick-shot-fur { inset: 0; }
.pick-shot.has-photo .fimg { object-fit: cover; }
.pick-shot.has-photo .pick-shot-tag { color: #FFFFFF; text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.pick-head { display: flex; flex-direction: column; gap: 10px; }
.pick-name { font-size: 40px; font-style: italic; line-height: 1.02; text-wrap: balance; }
.specs { display: flex; flex-direction: column; }
.side-spec { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.pick-price { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.pick-price .serif { font-size: 36px; color: var(--accent); font-variant-numeric: tabular-nums; }
.pick-note { font-size: 12px; color: var(--muted); line-height: 1.5; }

.cta { background: var(--accent); color: #FFFFFF; padding: 18px 28px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; text-align: center; transition: background .3s; }
.cta:hover { background: var(--accent-dark); }
.cta.done { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cta:disabled { opacity: .4; cursor: default; }
.side-cta { display: flex; align-items: center; justify-content: center; width: 100%; padding-left: calc(28px + .12em); }

/* ---------- Panier ---------- */
/* Icône du panier, visible sur toutes les pages, avec le nombre d’articles */
.cart-pill { position: fixed; top: 20px; right: 24px; z-index: 30; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border-radius: 50%; }
.cart-icon { width: 22px; height: 22px; display: block; }
.cart-pill .cart-count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; font-size: 11px; padding: 0 5px; box-shadow: 0 0 0 2px #FFFFFF; }
.cart-pill .cart-count.empty { background: var(--muted); }
.cart-count { min-width: 22px; height: 22px; border-radius: 11px; background: var(--accent); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; letter-spacing: 0; font-size: 12px; }
.cart-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; animation: fadeIn .4s ease both; }
.cart { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--bg); border-left: 1px solid var(--line); z-index: 41; display: flex; flex-direction: column; animation: cartIn .6s var(--ease) both; }
@keyframes cartIn { from { transform: translateX(100%); } to { transform: none; } }
.cart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 28px 28px 20px; border-bottom: 1px solid var(--line); }
.cart-head .serif { font-size: 32px; font-style: italic; }
.cart-close, .cart-continue { color: var(--ink); }
.cart-continue { align-self: center; }
.cart-body { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 28px; }
.cart-empty { margin: 32px 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.cart-row { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { position: relative; display: block; width: 96px; aspect-ratio: 4 / 3; flex: none; background: radial-gradient(ellipse at 50% 35%, var(--wash), #FFFFFF 75%); }
.cart-info { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.cart-name { font-size: 20px; font-style: italic; line-height: 1.1; }
.cart-meta { font-size: 10px; }
.cart-dims { font-size: 12px; color: var(--muted); line-height: 1.5; }
.cart-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 4px; }
.cart-price { font-size: 18px; color: var(--accent); font-variant-numeric: tabular-nums; }
.cart-remove { font-size: 12px; color: var(--muted); text-decoration: underline; }
.cart-foot { display: flex; flex-direction: column; gap: 14px; padding: 20px 28px 28px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.cart-total .serif { font-size: 30px; font-variant-numeric: tabular-nums; }

/* ---------- Page « pas encore lancé » (après « Passer commande ») ---------- */
.preorder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--bg); }
.pre-photo { position: relative; margin: 0; overflow: hidden; background: var(--wash); }
.pre-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% 50%; animation: fadeIn 1.2s ease both; }
.pre-content { position: relative; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 28px 56px 40px; background: var(--wash); }
.pre-back { position: static; align-self: flex-start; }
.pre-body { margin: auto 0; max-width: 520px; padding-top: 32px; display: flex; flex-direction: column; gap: 22px; animation: sideIn .7s var(--ease) both; }
.pre-title { font-size: clamp(40px, 4.4vw, 62px); line-height: 1; letter-spacing: -.01em; }
.pre-lead { font-size: 15px; line-height: 1.7; color: var(--muted); }
.pre-basket { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 14px; gap: 10px; }
.pre-item { display: flex; align-items: center; gap: 14px; }
.pre-thumb { position: relative; flex: none; width: 64px; aspect-ratio: 4 / 3; background: #FFFFFF; overflow: hidden; }
.pre-thumb .fimg { object-fit: cover; object-position: 50% 50%; }
.pre-item-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pre-item-name { font-size: 18px; font-style: italic; line-height: 1.1; }
.pre-item-meta { font-size: 12px; color: var(--muted); }
.pre-item-price, .pre-total .serif { color: var(--accent); font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pre-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 10px; }
.pre-form { display: flex; flex-direction: column; gap: 14px; }
.pre-field { display: flex; flex-direction: column; gap: 8px; }
.pre-field input { font: inherit; font-size: 16px; padding: 14px 16px; border: 1px solid rgba(31,25,25,.2); background: #FFFFFF; color: var(--ink); }
.pre-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.pre-submit { width: 100%; }
.pre-error { min-height: 1em; font-size: 13px; color: #A03D3D; }
.pre-legal { font-size: 12px; line-height: 1.5; color: var(--muted); }
.pre-audience { margin-top: 18px; }
.pre-optout { text-decoration: underline; text-underline-offset: 2px; }
.pre-optout:hover { color: var(--ink, #222); }
.pre-thanks { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 22px; background: #FFFFFF; border: 1px solid var(--line); animation: sideIn .6s var(--ease) both; }
.pre-thanks-title { font-size: 34px; font-style: italic; }
.pre-thanks p { font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .app { height: auto; min-height: 100svh; overflow: visible; }
  .scroller { overflow: visible; scroll-snap-type: none; }
  .page { height: auto; min-height: 100svh; }

  .intro-page { display: flex; flex-direction: column; }
  .intro-photo { height: calc(100svh - 38svh * var(--text)); bottom: auto; }
  .intro-stage { --fx: .64; }
  .intro-track { height: 260svh; }
  .intro-track > .intro-page { height: 100svh; min-height: 0; }
  .intro-track.inline { height: 340svh; }
  /* Mobile : les univers, en bandes qui tiennent dans l’écran, naissent dans l’armoire comme sur ordinateur */
  /* Mobile : l’accordéon est vertical, donc la première page se replie vers le haut et les univers montent du bas */
  .intro-photo { right: 0; height: calc((100svh - 38svh * var(--text)) * (1 - var(--fold, 0))); }
  .panels-page.in-intro { left: 0; top: calc((1 - var(--fold, 0)) * 100%); border-left: 0; border-top: 2px solid #FFFFFF; }
  .panels-page.in-intro.live { border-top-width: 0; }
  .panels-page.in-intro .overlay { opacity: 1; }
  .panels-page.in-intro { display: flex; flex-direction: column; min-height: 0; }
  .panels-page.in-intro .overlay { padding: 18px 66px 12px 16px; }
  .panels-page.in-intro .panels { flex: 1; min-height: 0; height: auto; }
  .panels-page.in-intro .panel { flex: 1 1 0; height: auto; min-height: 0; }
  .intro-photo::after { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 45%, rgba(255,255,255,.75) 72%, #FFFFFF 100%); }
  .intro-content { width: 100%; height: auto; flex: 1; justify-content: flex-end; padding: 46svh 16px 28px; gap: 24px; }
  .intro { font-size: 40px; line-height: 1.02; }
  .cue { align-self: flex-start; }

  .panels-page { display: flex; flex-direction: column; min-height: 0; }
  .overlay { position: static; order: -1; padding: 28px 66px 14px 16px; background: none; }
  .panels { flex-direction: column; height: auto; }
  .panel { flex: none; height: 150px; animation-name: fadeIn; }
  .panel:hover, .panel:focus-visible { flex: none; }
  .panel .piece, .panel:hover .piece, .panel:focus-visible .piece { left: auto; right: -2%; top: 50%; width: 50%; transform: translateY(-50%); opacity: 1; }
  .panel .txt { padding: 16px; right: 42%; background: none; }
  /* Univers avec photo : pas de dessin à droite, le dégradé et les titres prennent toute la largeur */
  .panel.has-photo .txt { right: 0; background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.88) 60%); }
  .panel.has-photo .txt > * { max-width: 85%; }
  .panel-name { font-size: 26px; }
  .panel .line { max-height: none; opacity: .85; font-size: 12px; }

  .sel-page { padding: 28px 16px; }
  .selgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 210px; grid-template-areas: none; height: auto; gap: 10px; }
  .selgrid > * { grid-area: auto !important; }
  .sel-title { grid-column: 1 / -1 !important; padding-bottom: 6px; }
  .sel-title h2 { font-size: 44px; }
  .sel.wide { grid-column: 1 / -1 !important; }
  .sel-cap { padding: 10px 12px; }
  .sel-name, .sel-price { font-size: 16px !important; }
  .sel-num { top: 10px; right: 12px; }

  .uni { display: flex; flex-direction: column; }
  .uni-head { top: 12px; left: 12px; }
  .back-pill { padding: 9px 12px; font-size: 10px; }
  .uni-area { flex: none; height: auto; container-type: normal; overflow: visible; }
  .uni-floor, .uni-foot, .rf-tip { display: none; }
  .uni-stage { position: relative; width: 100%; }
  .uni-area.photo-mode { display: block; }
  .scene-blur, .pin-tip, .scene-hint { display: none; }
  .pin { width: 36px; height: 36px; margin: -18px 0 0 -18px; }
  .pin-dot { width: 28px; height: 28px; font-size: 9px; }
  .scene { width: 100%; box-shadow: none; }
  .uni-side { border-left: 0; border-top: 1px solid var(--line); padding: 24px 16px 40px; overflow: visible; }
  .side-title { font-size: 38px; }
  .side-row { padding: 16px 0; }

  .cart-pill { top: 12px; right: 12px; width: 42px; height: 42px; }
  .intro-photo .intro-brand { top: 18px; right: 66px; font-size: 22px; }
  .cart-head, .cart-foot { padding-left: 16px; padding-right: 16px; }
  .cart-body { padding: 8px 16px; }
  .cart-thumb { width: 80px; }
  .preorder { display: flex; flex-direction: column; }
  .pre-photo { flex: none; height: 34svh; }
  .pre-content { overflow: visible; padding: 20px 16px 40px; }
  .pre-back { position: absolute; top: calc(-34svh + 12px); left: 12px; }
  .pre-body { padding-top: 6px; }
}

@media (hover: none) {
  .selgrid:hover .sel:not(:hover) { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .uni-veil { display: none; }
  .intro-track { height: auto; }
  .intro-track > .intro-page { position: relative; height: 100vh; height: 100dvh; }
  .selgrid:not(.in) .sel { opacity: 1; }
}
