:root {
  --ink: #0d0000;
  --black: #050000;
  --paper: #f3ebe2;
  --red: #e00000;
  --orange: #ff7a00;
  --muted: #7a2a22;
  --mono: 'Space Mono', monospace;
  --pad-x: clamp(40px, 9vw, 130px);
}

html, body { margin: 0; background: var(--ink); color: var(--paper); }
* { box-sizing: border-box; }
a { color: var(--paper); text-decoration: none; }
button { font: inherit; color: inherit; }
button:disabled { cursor: not-allowed; }

.page {
  position: relative; min-height: 100vh; overflow-x: hidden;
  font-family: 'Archivo', sans-serif;
  background: var(--ink) url(assets/bg-paper.webp) center/cover fixed;
}

/* Typo */
.wide { font-stretch: 125%; font-weight: 900; }
.mono { font-family: var(--mono); font-weight: 700; letter-spacing: .12em; }

/* Header */
.hdr {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start;
  padding: 22px clamp(16px, 4vw, 40px);
}
.burger { justify-self: start; display: flex; flex-direction: column; gap: 6px; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--red); }
.hdr-mid { justify-self: center; min-height: 10px; }
.globe { display: block; transition: transform .3s; }
.globe:hover { transform: rotate(-8deg) scale(1.05); }
.globe img { display: block; width: clamp(64px, 7vw, 92px); height: auto; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.hdr-cart {
  justify-self: end; padding: 8px 0; display: flex; align-items: center; gap: 8px;
  font-stretch: 125%; font-weight: 900; font-size: 15px; letter-spacing: .02em; color: var(--red);
}
.hdr-cart:hover { color: var(--orange); }
.badge {
  min-width: 26px; height: 26px; padding: 0 6px; display: grid; place-items: center;
  background: var(--red); color: var(--ink); font-family: var(--mono); font-size: 13px; font-weight: 700;
}

/* Boutons pleins */
.btn-dark {
  border: 0; cursor: pointer; background: var(--ink); color: var(--red);
  font-stretch: 125%; font-weight: 900; letter-spacing: .02em; transition: all .15s;
}
.btn-dark:hover { background: var(--red); color: var(--ink); }

/* Accueil */
.home { position: relative; min-height: 100svh; display: flex; flex-direction: column; background: var(--ink); }
.home-bg { position: absolute; inset: 0; background: url(assets/hero.webp) center 40%/cover no-repeat; }
@media (max-width: 759px) { .home-bg { background: url(assets/hero_mobile.webp) center/cover no-repeat; } }
.home-bar {
  position: relative; z-index: 1; margin-top: auto; padding: 0 clamp(16px, 4vw, 40px) 28px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px;
}
.home-bar .mono { font-weight: 400; font-size: 12px; color: #ff5a4a; }
.home-bar .btn-dark { padding: 18px 28px; font-size: clamp(18px, 2vw, 24px); }

/* Titres de section */
.screen { min-height: 100vh; padding: clamp(130px, 16vw, 190px) var(--pad-x) 80px; }
.sec-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px;
  border-bottom: 3px solid var(--ink); padding-bottom: 12px;
}
.sec-head h1 { margin: 0; font-stretch: 125%; font-weight: 900; font-size: clamp(28px, 5vw, 64px); line-height: .9; color: var(--ink); }
.sec-head .mono { font-size: 12px; color: var(--ink); }

/* Catalogue */
.cat-head { margin-bottom: clamp(32px, 5vw, 64px); }
.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: clamp(24px, 4vw, 48px) clamp(16px, 3vw, 40px); align-items: end;
}
.card { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; cursor: pointer; color: inherit; }
.card.locked, .card.soldout { cursor: not-allowed; }
.card-img { position: relative; width: 100%; aspect-ratio: 1/1; display: grid; place-items: center; transition: transform .25s; }
.card-img:hover { transform: translateY(-6px) rotate(-1.5deg); }
.card-img > img:not(.lock) {
  grid-area: 1/1; max-width: 88%; max-height: 88%; object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,.45));
}
.card-img .back { visibility: hidden; }
.card.has-back:hover .card-img .front { visibility: hidden; }
.card.has-back:hover .card-img .back { visibility: visible; }
.lock { position: absolute; left: 50%; transform: translate(-50%, -50%); width: 22%; image-rendering: pixelated; }
.card-txt { display: flex; flex-direction: column; gap: 4px; min-height: 64px; }
.card-name { font-stretch: 112%; font-weight: 800; font-size: clamp(16px, 1.6vw, 20px); line-height: 1.15; color: var(--paper); }
.card-sub { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--paper); }
.card.locked .card-sub, .card.soldout .card-sub { color: var(--orange); }
.skeleton .card-img { background: rgba(13,0,0,.18); animation: pulse 1.2s ease-in-out infinite alternate; }
.skeleton .card-img:hover { transform: none; }
@keyframes pulse { to { background: rgba(13,0,0,.32); } }
.notice { margin: 0 0 32px; font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--ink); }

/* Produit */
.screen.product { padding-top: clamp(130px, 14vw, 170px); }
.back-link { display: inline-block; margin-bottom: 24px; font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .1em; color: var(--ink); }
.back-link:hover { color: var(--paper); }
.pdp { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: clamp(24px, 5vw, 72px); align-items: center; }
.pdp-media { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.pdp-img { width: 100%; aspect-ratio: 1/1; display: grid; place-items: center; }
.pdp-img img { max-width: 92%; max-height: 92%; object-fit: contain; filter: drop-shadow(0 20px 26px rgba(0,0,0,.5)); }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.tab {
  border: 0; cursor: pointer; padding: 10px 18px; font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .1em;
  background: transparent; color: var(--ink);
}
.tab.on { background: var(--ink); color: var(--paper); }
.pdp-info { display: flex; flex-direction: column; gap: 28px; max-width: 480px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--ink); }
.pdp-title { margin: 0; font-stretch: 125%; font-weight: 900; font-size: clamp(34px, 4.6vw, 60px); line-height: .92; color: var(--paper); }
.nw { white-space: nowrap; }
.pdp-price {font-stretch: 112%; font-weight: 800; font-size: 20px; color: var(--paper); }
.pdp-price s { opacity: .55; font-weight: 600; margin-left: 10px; }
.pdp-desc { font-size: 15px; line-height: 1.55; color: var(--paper); }
.pdp-desc p { margin: 0 0 .6em; }
.pdp-desc :last-child { margin-bottom: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt {
  min-width: 58px; height: 52px; padding: 0 10px; border: 3px solid var(--ink); cursor: pointer;
  font-stretch: 125%; font-weight: 900; font-size: 16px; background: transparent; color: var(--ink); transition: background .12s;
}
.opt:hover:not(:disabled) { border-color: var(--paper); }
.opt.on { background: var(--ink); color: var(--red); }
.opt:disabled { opacity: .45; text-decoration: line-through; }
.add {
  border: 0; cursor: pointer; padding: 22px 24px; background: var(--ink); color: var(--red);
  font-stretch: 125%; font-weight: 900; font-size: clamp(16px, 1.6vw, 20px); letter-spacing: .02em;
  text-align: left; display: flex; justify-content: space-between; gap: 16px;
}
.add:hover { background: #1e0000; }
.add:disabled { color: var(--muted); }
.err { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--orange); }

/* Panier */
.cart-wrap { max-width: 980px; margin: 0 auto; }
.cart-wrap .sec-head { margin-bottom: 32px; }
.empty { padding: 60px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.empty > span { font-stretch: 125%; font-weight: 900; font-size: clamp(22px, 3vw, 36px); color: var(--paper); }
.empty .btn-dark { display: inline-block; padding: 18px 26px; font-size: 18px; }
.cart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px; align-items: start; }
.line {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 18px 0; border-bottom: 2px solid rgba(13,0,0,.6);
}
.line.busy { opacity: .5; pointer-events: none; }
.thumb { width: 96px; height: 96px; background: rgba(13,0,0,.35); display: grid; place-items: center; }
.thumb img { max-width: 84%; max-height: 84%; object-fit: contain; }
.line-mid { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.line-name { font-stretch: 112%; font-weight: 800; font-size: 17px; color: var(--paper); }
.line-opt { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--ink); }
.qty { display: flex; align-items: center; }
.qty button { width: 34px; height: 34px; border: 2px solid var(--ink); background: transparent; cursor: pointer; font-weight: 900; color: var(--ink); }
.qty button:hover { background: var(--ink); color: var(--red); }
.qty span { width: 40px; text-align: center; font-family: var(--mono); font-weight: 700; color: var(--paper); }
.line-end { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.line-price { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--paper); }
.remove { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--ink); text-decoration: underline; }
.remove:hover { color: var(--paper); }
.summary { background: var(--ink); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 13px; color: var(--paper); }
.row.dim { color: #c9a9a0; }
.row.dim span:last-child { text-align: right; }
.rule { height: 2px; background: var(--red); margin: 6px 0; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-stretch: 125%; font-weight: 900; font-size: 22px; color: var(--paper); }
.pay {
  margin-top: 10px; border: 0; cursor: pointer; background: var(--red); color: var(--ink); padding: 20px;
  font-stretch: 125%; font-weight: 900; font-size: 18px; display: flex; justify-content: space-between;
}
.pay:hover:not(:disabled) { background: var(--orange); }
.pay:disabled { opacity: .5; }

/* Menu latéral */
.overlay { position: fixed; inset: 0; z-index: 40; display: flex; }
.nav { position: relative; width: min(520px, 88vw); height: 100%; background: var(--black); display: flex; }
.nav-main { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 40px clamp(20px, 4vw, 48px) 36px; }
.nav-links { display: flex; flex-direction: column; align-items: center; gap: clamp(20px, 5vh, 56px); padding-top: 10px; }
.nav-links a, .nav-links span { font-stretch: 125%; font-weight: 900; font-size: clamp(24px, 3.2vw, 36px); color: var(--red); }
.nav-links a:hover { color: var(--paper); }
.nav-links span { cursor: not-allowed; opacity: .9; }
.nav-links span:hover { color: var(--orange); }
.nav-foot { text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: #8c1a12; }
.strip { width: clamp(48px, 6vw, 64px); background: var(--red) url(assets/motif-strip.svg) center top/100% auto repeat-y; opacity: .55; }
.scrim { flex: 1; background: rgba(5,0,0,.45); cursor: pointer; }
.nav-close { display: none; position: absolute; top: 22px; left: 16px; z-index: 1; width: 54px; height: 54px; background: none; border: 0; padding: 0; cursor: pointer; }
.nav-close span { position: absolute; top: 50%; left: 8px; width: 38px; height: 5px; margin-top: -2.5px; border-radius: 3px; background: var(--red); }
.nav-close span:first-child { transform: rotate(45deg); }
.nav-close span:last-child { transform: rotate(-45deg); }
@media (max-width: 759px) {
  .nav { width: 100%; }
  .scrim { display: none; }
  .nav-close { display: block; }
  .nav-main { padding-top: 96px; }
}
