/* ============================================================================
   Configurateur premium — Écrin Doré
   Palette chaude (blanc cassé · crème · doré) · Cormorant Garamond + Inter
   ============================================================================ */
:root {
  --bg: #FDFBF7;
  --topbar: #FFFFFF;
  --surface: #FFFFFF;
  --cream: #F5EFE3;
  --cream-soft: #FAF6EE;
  --bd1: #E8DFCD;
  --bd2: #DED1B8;
  --gold: #B08D57;
  --gold-deep: #8C6F3F;
  --gold-light: #C9AC7E;
  --muted: #6B6258;
  --muted2: #9C8F79;
  --ink: #2B2118;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ── Voile d'entrée (fondu doux depuis le crème) ─────────────────────────── */
#veil { position: fixed; inset: 0; background: var(--bg); z-index: 999; animation: veilOut .8s var(--ease) forwards; }
@keyframes veilOut { to { opacity: 0; visibility: hidden; } }

/* ── Boutons ─────────────────────────────────────────────────────────────── */
.btn-gold {
  background: var(--gold-deep); color: #fff; font-weight: 600; /* contraste AA */
  padding: 13px 24px; border-radius: 8px; letter-spacing: .01em;
  transition: transform .1s var(--ease), filter .15s var(--ease), box-shadow .2s var(--ease);
  box-shadow: 0 6px 20px rgba(176, 141, 87, .28);
}
.btn-gold:hover { filter: brightness(1.06); box-shadow: 0 8px 28px rgba(176, 141, 87, .4); }
.btn-gold:active { transform: translateY(1px); }
.btn-gold:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn-ghost { color: var(--gold-deep); padding: 13px 20px; border-radius: 8px; border: 1.5px solid var(--bd2); transition: border-color .2s, color .2s; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ── Porte pro ───────────────────────────────────────────────────────────── */
.gate { position: fixed; inset: 0; display: grid; place-items: center; z-index: 900; padding: 20px; }
.gate-card {
  background: var(--surface); border: 1px solid var(--bd1); border-radius: 18px;
  padding: 42px 38px; max-width: 440px; width: 100%; text-align: center;
  box-shadow: 0 30px 70px rgba(43, 33, 24, .12);
}
.gate-logo { font-family: var(--serif); font-style: italic; font-size: 1.8rem; color: var(--gold-deep); margin-bottom: 18px; }
.gate-card h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; margin-bottom: 10px; color: var(--ink); }
.gate-card p { color: var(--muted); font-size: .9rem; margin-bottom: 22px; }
.gate-card input {
  width: 100%; padding: 14px 16px; background: var(--cream-soft); border: 1.5px solid var(--bd2);
  border-radius: 8px; color: var(--ink); font: inherit; margin-bottom: 16px; text-align: center;
  letter-spacing: .1em; text-transform: uppercase;
}
.gate-card input:focus { outline: none; border-color: var(--gold); }
.gate-card .btn-gold { width: 100%; }
.gate-error { color: #b3261e; font-size: .85rem; margin-top: 14px; margin-bottom: 0; }

/* ── Topbar + stepper ────────────────────────────────────────────────────── */
.topbar {
  height: 68px; background: var(--topbar); border-bottom: 1px solid var(--bd1);
  display: flex; align-items: center; gap: 30px; padding: 0 30px;
  animation: fadeDown .8s .25s var(--ease) both;
}
@keyframes fadeDown { from { opacity: 0; transform: translateY(-14px); } }
.topbar .logo { font-family: var(--serif); font-style: italic; font-size: 1.5rem; color: var(--gold-deep); white-space: nowrap; }
.stepper { display: flex; gap: 6px; flex: 1; justify-content: center; overflow-x: auto; }
.step { color: var(--muted2); font-size: .82rem; font-weight: 500; padding: 8px 4px; position: relative;
  white-space: nowrap; letter-spacing: .03em; display: flex; align-items: center; gap: 8px; transition: color .3s; }
.step .num { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--bd2); display: grid; place-items: center; font-size: .72rem; transition: all .3s; }
.step-sep { color: var(--bd2); align-self: center; }
.step.done { color: var(--gold-deep); }
.step.done .num { border-color: var(--gold-deep); color: var(--gold-deep); }
.step.active { color: var(--gold-deep); cursor: default; }
.step.active .num { border-color: var(--gold); background: var(--gold); color: #fff; }
.step.active::after { content: ''; position: absolute; left: 34px; right: 8px; bottom: 0; height: 1.5px; background: var(--gold); animation: underline .4s var(--ease); transform-origin: left; }
@keyframes underline { from { transform: scaleX(0); } }
.topbar-right { min-width: 90px; text-align: right; font-size: .75rem; color: var(--gold-deep); letter-spacing: .08em; }

/* ── Grille 3 colonnes ───────────────────────────────────────────────────── */
.grid { height: calc(100vh - 68px); display: grid; grid-template-columns: 1.4fr 1.25fr 0.72fr; gap: 22px; padding: 22px 30px; }

/* Colonne choix */
.col-choices {
  background: var(--surface); color: var(--ink); border-radius: 18px;
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--bd1);
  box-shadow: 0 20px 50px rgba(43, 33, 24, .08);
  animation: slideLeft .9s .3s var(--ease) both;
}
@keyframes slideLeft { from { opacity: 0; transform: translateX(-40px); } }
.choices-inner { flex: 1; overflow-y: auto; padding: 34px 38px; }
.step-content { animation: stepIn .45s var(--ease); }
.step-content.out { animation: stepOut .3s var(--ease) forwards; }
@keyframes stepIn { from { opacity: 0; transform: translateX(26px); } }
@keyframes stepOut { to { opacity: 0; transform: translateX(-26px); } }
.choices-nav { display: flex; justify-content: space-between; gap: 12px; padding: 18px 34px; border-top: 1px solid var(--bd1); background: var(--cream-soft); }

.step-eyebrow { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 10px; }
.step-title { font-family: var(--serif); font-weight: 400; font-size: 2.1rem; line-height: 1.1; margin-bottom: 6px; color: var(--ink); }
.step-sub { color: var(--muted); font-size: .92rem; margin-bottom: 26px; max-width: 46ch; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .82rem; margin-bottom: 7px; color: var(--muted); }
.field input, .field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--bd1); border-radius: 10px; font: inherit; color: var(--ink); background: var(--cream-soft); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: #fff; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.card-grid { display: grid; gap: 12px; }
.card-grid.cols3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols2 { grid-template-columns: repeat(2, 1fr); }
.opt-card { border: 1.5px solid var(--bd1); border-radius: 14px; padding: 16px; cursor: pointer; background: var(--cream-soft);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .1s; position: relative; }
.opt-card:hover { border-color: var(--gold-light); transform: translateY(-2px); }
.opt-card[aria-pressed="true"] { border-color: var(--gold); background: #fff; box-shadow: 0 0 0 3px rgba(176, 141, 87, .16); }
.opt-card .oc-name { font-weight: 600; font-size: .95rem; }
.opt-card .oc-desc { font-size: .78rem; color: var(--muted); margin-top: 4px; line-height: 1.4; }
/* Miniature de palette : fines séparations pour distinguer chaque teinte
   (même quand deux sont proches, ex. thème monochrome). */
.tpl-swatch { height: 40px; border-radius: 8px; overflow: hidden; display: flex; gap: 2px; padding: 2px;
  background: var(--bd2, #E2E2E2); margin-bottom: 10px; }
.tpl-swatch span { flex: 1; border-radius: 3px; }
.oc-check { position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--bd2); display: grid; place-items: center; color: #fff; font-size: .7rem; transition: all .2s; }
.opt-card[aria-pressed="true"] .oc-check { background: var(--gold); border-color: var(--gold); }
.oc-price { font-size: 10px; color: var(--muted2); margin-top: 6px; letter-spacing: .04em; }

.accent-row { display: flex; gap: 10px; flex-wrap: wrap; }
.accent-dot { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform .12s; }
.accent-dot:hover { transform: scale(1.12); }
.accent-dot[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface); }

/* Couleur d'accent personnalisée */
.accent-custom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.accent-custom-label { font-size: .82rem; color: var(--muted2); }
.accent-picker { width: 38px; height: 34px; padding: 0; border: 1px solid var(--bd2); border-radius: 8px;
  background: none; cursor: pointer; }
.accent-picker::-webkit-color-swatch-wrapper { padding: 3px; }
.accent-picker::-webkit-color-swatch { border: none; border-radius: 5px; }
.accent-hex { width: 100px; padding: 8px 10px; border: 1px solid var(--bd2); border-radius: 8px;
  font: inherit; font-size: .9rem; text-transform: uppercase; }

.switch-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--bd1); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .sw-body { flex: 1; }
.switch-row .sw-name { font-weight: 600; font-size: .92rem; }
.switch-row .sw-desc { font-size: .78rem; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.switch-row .sw-price { font-size: 10px; color: var(--muted2); margin-top: 4px; letter-spacing: .04em; }
.switch { --w: 46px; width: var(--w); height: 26px; border-radius: 999px; background: var(--bd2); position: relative; flex-shrink: 0; transition: background .25s var(--ease); cursor: pointer; margin-top: 2px; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch[aria-pressed="true"] { background: var(--gold); }
.switch[aria-pressed="true"]::after { transform: translateX(20px); }

/* Sélecteur de quantité (clé USB) */
.qty-stepper { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-top: 2px; }
.qs-btn { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--bd2); background: #fff;
  color: var(--gold-deep); font-size: 1.1rem; line-height: 1; cursor: pointer; transition: all .15s; }
.qs-btn:hover { border-color: var(--gold); color: var(--gold); }
.qs-val { min-width: 22px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

.chk-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--bd1); font-size: .9rem; }
.chk-box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--bd2); display: grid; place-items: center; color: #fff; font-size: .7rem; cursor: pointer; flex-shrink: 0; transition: all .18s; }
.chk-box[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); }
.cat-toggle { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-pill { padding: 7px 15px; border-radius: 999px; border: 1.5px solid var(--bd1); font-size: .82rem; cursor: pointer; background: var(--cream-soft); transition: all .2s; }
.cat-pill[aria-pressed="true"] { background: var(--gold); color: #fff; border-color: var(--gold); }
.add-custom { display: flex; gap: 8px; margin-top: 14px; }
.add-custom input { flex: 1; }
.custom-list { list-style: none; margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.custom-list li { display: flex; justify-content: space-between; align-items: center; background: var(--cream); padding: 9px 13px; border-radius: 8px; font-size: .86rem; }
.custom-list button { color: #b3261e; font-size: 1rem; }

.gift-note { margin-top: 12px; padding: 9px 13px; border-radius: 10px; background: rgba(176,141,87,.1);
  color: var(--gold-deep); font-size: .82rem; font-weight: 600; }
.suboptions { margin-top: 12px; padding: 14px; background: var(--cream); border-radius: 12px; animation: stepIn .35s var(--ease); }
.suboptions .field:last-child { margin-bottom: 0; }
.variant-choose { display: flex; gap: 8px; flex-wrap: wrap; }
.variant-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px 7px 9px; border-radius: 999px;
  border: 1.5px solid var(--bd1); background: #fff; font-size: .8rem; cursor: pointer; transition: all .18s; color: var(--ink); }
.variant-chip[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(176,141,87,.16); }
.vc-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); box-shadow: inset 0 1px 2px rgba(255,255,255,.4); }

.pill-select { display: flex; gap: 8px; flex-wrap: wrap; }
.pill-select .cat-pill { font-size: .78rem; background: #fff; }
/* correctif : garder le libellé lisible quand la pastille est sélectionnée */
.pill-select .cat-pill[aria-pressed="true"] { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ── Colonne prévisualisation (crème) ────────────────────────────────────── */
.col-preview { background: var(--cream); border: 1px solid var(--bd1); border-radius: 18px; overflow: hidden; position: relative; animation: slideRight .9s .3s var(--ease) both; }
@keyframes slideRight { from { opacity: 0; transform: translateX(40px); } }
.preview { position: absolute; inset: 0; display: grid; place-items: center; padding: 22px; }
.preview-fade { animation: pvFade .5s var(--ease); }
@keyframes pvFade { from { opacity: 0; transform: scale(.96); } }

.phone { width: 288px; max-width: 82%; aspect-ratio: 9/18.5; background: #1a1512; border-radius: 32px; padding: 9px; box-shadow: 0 26px 60px rgba(43, 33, 24, .3); }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 25px; background: #fff; }

.pv-wrap { text-align: center; max-width: 400px; }
.pv-kicker { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 14px; }
.pv-title { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--gold-deep); margin-bottom: 20px; }
.pv-note { color: var(--muted); font-size: .82rem; margin-top: 18px; line-height: 1.5; }

/* Récapitulatif visuel de l'étape Commander */
.recap-visual { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.phone.phone-sm { width: 178px; }
.recap-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; max-width: 320px; }
.recap-tile { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid var(--bd1);
  border-radius: 12px; background: var(--surface); font-size: .8rem; text-align: left; }
.rt-ico { display: inline-flex; align-items: center; color: var(--gold-deep); font-size: 1.05rem; flex-shrink: 0; }
.rt-lbl { font-weight: 500; line-height: 1.2; }

/* Book ouvert qui se feuillette */
.pv-hint { font-size: .7rem; color: var(--muted2); font-style: italic; }
.book-open { position: relative; width: 380px; max-width: 92%; aspect-ratio: 3/2; margin: 0 auto; perspective: 1400px;
  display: flex; border-radius: 6px; box-shadow: 0 24px 55px rgba(43, 33, 24, .28); cursor: pointer; }
.book-open::after { /* reliure centrale */ content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  transform: translateX(-1px); background: linear-gradient(to right, rgba(0,0,0,.14), rgba(0,0,0,0) 40%, rgba(0,0,0,0) 60%, rgba(0,0,0,.14)); z-index: 3; }
.bo-page { flex: 1; background: #fdfaf3; padding: 14px; display: flex; flex-direction: column; }
.bo-left { border-radius: 6px 0 0 6px; align-items: center; justify-content: center; gap: 10px; }
.bo-right { border-radius: 0 6px 6px 0; justify-content: center; gap: 12px; background: #fbf7ee; }
.bo-photo { width: 100%; flex: 1; border-radius: 3px; background-size: cover; background-position: center;
  box-shadow: 0 3px 10px rgba(43,33,24,.2); border: 4px solid #fff; outline: 1px solid #eadfc9; }
.bo-cap { font-family: var(--serif); font-style: italic; font-size: .92rem; color: var(--gold-deep); }
.bo-msg { font-family: var(--serif); font-style: italic; font-size: .96rem; line-height: 1.4; color: var(--ink); }
.bo-sign { font-size: .72rem; color: var(--gold-deep); text-align: right; }
/* la feuille qui tourne */
.bo-leaf { position: absolute; top: 0; right: 0; width: 50%; height: 100%; transform-origin: left center;
  transform-style: preserve-3d; transition: transform 1.1s var(--ease); z-index: 2; }
.bo-leaf.flipped { transform: rotateY(-168deg); }
.bo-face { position: absolute; inset: 0; backface-visibility: hidden; padding: 14px; display: flex;
  flex-direction: column; justify-content: center; gap: 10px; background: #fdfaf3; border-radius: 0 6px 6px 0;
  box-shadow: inset 6px 0 16px rgba(43,33,24,.06); }
.bo-front { padding: 0; }
.bo-back { transform: rotateY(180deg); border-radius: 6px 0 0 6px; padding: 10px; }
.bo-back .bo-photo { flex: 1; }
/* Première de couverture (face avant de la couverture) */
.bo-coverface { background: linear-gradient(150deg, #2f2318, #43301d); border-radius: 0 6px 6px 0;
  box-shadow: inset 0 0 0 1px rgba(201,172,126,.35), inset 6px 0 16px rgba(0,0,0,.25); }
.bc-inner { margin: auto; text-align: center; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bc-eyebrow { font-size: .58rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.bc-names { font-family: var(--serif); font-style: italic; font-size: 1.35rem; color: var(--gold-light); line-height: 1.15; }
.bc-names span { display: block; font-size: .8rem; color: var(--gold-deep); margin: 2px 0; }
.bc-rule { width: 34px; height: 1px; background: var(--gold); }
.bc-date { font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); }

/* Défis cards */
.defi-stack { position: relative; width: 240px; height: 200px; margin: 0 auto; }
.defi-card { position: absolute; left: 50%; top: 50%; width: 190px; padding: 16px 18px; background: #fff; border: 1px solid var(--bd1); border-radius: 12px; color: var(--ink); font-size: .82rem; box-shadow: 0 12px 30px rgba(43, 33, 24, .14); }
.defi-card .dc-chip { font-size: .62rem; color: var(--gold-deep); letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.defi-card:nth-child(1) { transform: translate(-50%, -50%) rotate(-8deg) translateY(-24px); animation: floatA 5s ease-in-out infinite; }
.defi-card:nth-child(2) { transform: translate(-50%, -50%) rotate(3deg); z-index: 2; animation: floatB 6s ease-in-out infinite; }
.defi-card:nth-child(3) { transform: translate(-50%, -50%) rotate(9deg) translateY(24px); animation: floatA 5.5s ease-in-out infinite; }
@keyframes floatA { 50% { margin-top: -8px; } }
@keyframes floatB { 50% { margin-top: 8px; } }

/* Photo produit de la clé USB dans son écrin */
.usb-photo { width: 340px; max-width: 92%; margin: 0 auto; border-radius: 16px; overflow: hidden;
  background: #fff; border: 6px solid #fff; box-shadow: 0 22px 48px rgba(43, 33, 24, .24); }
.usb-photo img { display: block; width: 100%; height: auto; }

/* Photo produit QR (uploadée en admin) */
.qr-photo { width: 300px; max-width: 100%; margin: 0 auto; border-radius: 16px; overflow: hidden; background: #fff;
  box-shadow: 0 22px 48px rgba(43,33,24,.24); border: 6px solid #fff; }
.qr-photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.qr-clickable { cursor: zoom-in; }

/* Rangée aperçu + flèches de coloris */
.qr-prevrow { display: flex; align-items: center; justify-content: center; gap: 12px; }
.pv-arrow { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid var(--bd2);
  background: #fff; color: var(--gold-deep); font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: all .15s var(--ease); box-shadow: 0 4px 14px rgba(43,33,24,.12); }
.pv-arrow:hover { border-color: var(--gold); color: var(--gold); transform: scale(1.06); }
.pv-zoom { margin-top: 14px; padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--bd2);
  background: #fff; color: var(--gold-deep); font-size: .84rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.pv-zoom:hover { border-color: var(--gold); color: var(--gold); }

/* Lightbox galerie */
.lightbox2 { position: fixed; inset: 0; z-index: 1300; background: rgba(43,33,24,.82); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 40px; animation: pvFade .25s var(--ease); }
.lightbox2 .lb-img { max-width: min(88vw, 900px); max-height: 82vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.5); background: #fff; }
.lightbox2 .lb-close { position: absolute; top: 22px; right: 26px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; font-size: 1.2rem; cursor: pointer; }
.lightbox2 .lb-close:hover { background: rgba(255,255,255,.26); }
.lightbox2 .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.lightbox2 .lb-nav:hover { background: rgba(255,255,255,.26); }
.lightbox2 .lb-prev { left: 24px; }
.lightbox2 .lb-next { right: 24px; }
.lightbox2 .lb-count { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font-size: .82rem; letter-spacing: .1em; }
/* QR dématérialisé : image entière visible, pas de recadrage */
.qr-photo.qr-digital { width: 300px; }
.qr-photo.qr-digital img { aspect-ratio: auto; object-fit: contain; }

/* Rendu support QR */
.qr-support { width: 260px; height: 260px; margin: 0 auto; border-radius: 16px; position: relative; display: grid; place-items: center; box-shadow: 0 20px 44px rgba(43, 33, 24, .22); transition: background .5s var(--ease); }
.qr-support .qr-chip { width: 108px; height: 108px; background: #fff; border-radius: 8px; padding: 8px; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.qr-support .qr-chip svg, .qr-support .qr-chip img { width: 100%; height: 100%; }
.qr-support .qr-caption { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-family: var(--serif); font-style: italic; font-size: .82rem; }
.mat-papier { background: repeating-linear-gradient(45deg, #f3ecdd, #f3ecdd 6px, #e9e0cd 6px, #e9e0cd 12px); color: #4a3520; }
.mat-bois { background: linear-gradient(160deg, #a06a3c, #7a4f2a); color: #f5e7d5; }
.mat-bois .qr-caption { color: #f5e7d5; }
.mat-metal { background: linear-gradient(160deg, #d3d6db, #a4a8b0 55%, #c4c7cd); color: #33363b; }
.mat-plexi { background: linear-gradient(160deg, rgba(200,220,232,.55), rgba(160,190,210,.4)); border: 1px solid rgba(255,255,255,.6); color: #2a4658; }
.mat-digital { background: linear-gradient(160deg, #fff, #f0e6d3); border: 1px solid var(--bd1); color: var(--gold-deep); }

/* ── Colonne panier ──────────────────────────────────────────────────────── */
.col-cart { display: flex; flex-direction: column; justify-content: flex-end; gap: 16px; animation: fadeUp 1s .45s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } }
.cart-detail { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; max-height: 42vh; padding-right: 4px; }
.cart-line { display: flex; justify-content: space-between; gap: 10px; font-size: .82rem; padding: 6px 0; color: var(--ink); border-bottom: 1px solid var(--bd1); animation: lineIn .4s var(--ease); }
.cart-line .cl-amt { color: var(--gold-deep); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-line.muted { color: var(--muted2); }
.cart-line.muted .cl-amt { color: var(--muted2); }
@keyframes lineIn { from { opacity: 0; transform: translateX(14px); } }
.cart-total { border: 1.5px solid var(--gold); background: var(--surface); border-radius: 16px; padding: 20px; box-shadow: 0 18px 44px rgba(176, 141, 87, .2); }
.cart-label { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted2); }
.cart-price { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 3rem; color: var(--gold-deep); line-height: 1.1; margin: 2px 0; font-variant-numeric: tabular-nums; }
.cart-vat { font-size: .7rem; color: var(--muted2); margin-bottom: 14px; }
.btn-commander { width: 100%; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--cream); padding: 13px 22px; border-radius: 999px; z-index: 1000; font-size: .88rem; box-shadow: 0 12px 30px rgba(43, 33, 24, .3); }
.toast.err { background: #b3261e; color: #fff; }

/* Conseil mobile (plein écran, à la première ouverture sur téléphone) */
.mobile-hint { position: fixed; inset: 0; z-index: 1200; background: rgba(43, 33, 24, .55);
  display: grid; place-items: center; padding: 24px; backdrop-filter: blur(2px); }
.mobile-hint .mh-card { background: var(--surface); border-radius: 18px; padding: 32px 26px; max-width: 360px;
  text-align: center; box-shadow: 0 30px 70px rgba(43, 33, 24, .35); }
.mh-icon { font-size: 2rem; margin-bottom: 12px; }
.mh-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; color: var(--ink); margin-bottom: 12px; }
.mh-card p { color: var(--muted); font-size: .92rem; line-height: 1.5; margin-bottom: 10px; }
.mh-card .mh-sub { font-size: .82rem; color: var(--muted2); margin-bottom: 22px; }
.mh-card .btn-gold { width: 100%; }

/* Bascule du détail (visible seulement sur mobile) */
.cart-toggle { display: none; }

/* Récap final */
.recap-lines { display: flex; flex-direction: column; gap: 6px; margin: 18px 0; }
.recap-lines .rl { display: flex; justify-content: space-between; font-size: .9rem; padding: 7px 0; border-bottom: 1px solid var(--bd1); color: var(--ink); }
.recap-lines .rl span:last-child { color: var(--gold-deep); font-weight: 600; }
.recap-lines .rl-discount span { color: #2e7d4f !important; }

/* Champ coupon */
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; }
.coupon-row .btn-ghost { padding: 11px 16px; white-space: nowrap; }
.coupon-msg { font-size: .82rem; margin-top: 6px; }
.coupon-msg.ok { color: #2e7d4f; }
.coupon-msg.err { color: #b3261e; }

/* Consentement CGV */
.cgv-field { margin-top: 10px; }
.cgv-check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: .88rem; cursor: pointer; }
.cgv-check input { width: auto; margin-top: 3px; }
.cgv-check a { color: var(--gold-deep); }
.retract-note { font-size: .74rem; color: var(--muted2); line-height: 1.5; margin-top: 8px; }

/* ── Responsive : tablette & téléphone ───────────────────────────────────── */
@media (max-width: 1080px) {
  body { overflow: auto; }
  .topbar { position: sticky; top: 0; z-index: 30; padding: 0 18px; gap: 16px; }
  .topbar .logo { font-size: 1.3rem; }
  .grid { height: auto; display: flex; flex-direction: column; gap: 14px; padding: 14px; padding-bottom: 24px; }

  /* Aperçu mis en avant, en haut */
  .col-preview { order: -1; height: 46vh; min-height: 320px; position: relative; }
  .col-choices { order: 0; }
  .choices-inner { max-height: none; padding: 26px 22px; }
  .card-grid.cols3 { grid-template-columns: 1fr 1fr; }

  /* Panier compact et repliable, sans recouvrir le contenu */
  .col-cart { order: 1; animation: none; }
  .cart-toggle { display: block; width: 100%; text-align: center; padding: 9px; font-size: .78rem;
    font-weight: 600; color: var(--gold-deep); background: var(--cream-soft); border: 1px solid var(--bd1);
    border-radius: 10px; margin-bottom: 8px; }
  .cart-detail { display: none; max-height: none; }
  .col-cart.expanded .cart-detail { display: flex; margin-bottom: 10px; max-height: 44vh; }
  .cart-total { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; }
  .ct-head { display: flex; align-items: baseline; gap: 8px; }
  .cart-label { font-size: 9px; letter-spacing: .2em; }
  .cart-price { font-size: 1.6rem; margin: 0; }
  .cart-vat { display: none; }
  .btn-commander { width: auto; padding: 12px 20px; white-space: nowrap; flex-shrink: 0; }
}

@media (max-width: 560px) {
  .stepper .step { font-size: 0; gap: 0; }        /* garde seulement les pastilles numérotées */
  .stepper .step .num { font-size: .72rem; }
  .stepper .step.active::after { display: none; }
  .step-sep { display: none; }
  .card-grid.cols3, .card-grid.cols2 { grid-template-columns: 1fr; }
  .step-title { font-size: 1.7rem; }
  .choices-nav { padding: 14px 20px; }
  .col-preview { height: 42vh; min-height: 280px; }
}
