/* Boutique Valorant — style inspiré de l'écran « Store » du jeu */
:root {
  --navy: #0f1923;
  --deep: #0a141d;
  --red: #ff4655;
  --red-dark: #d93645;
  --cream: #ece8e1;
  --text: #ece8e1;
  --muted: #9aa5ad;
  --faint: #66737d;
  --line: rgba(236, 232, 225, .28);
  --line-strong: rgba(236, 232, 225, .6);
  --glass: rgba(10, 20, 29, .72);
  --gold: #f0d27a;
  --display: "Anton", "Impact", sans-serif;
  --label: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --cut: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
  /* icône VP de secours, remplacée par l'officielle dès que le catalogue est chargé */
  --vp-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5a10.5 10.5 0 1 0 0 21 10.5 10.5 0 0 0 0-21zm0 2.2a8.3 8.3 0 1 1 0 16.6 8.3 8.3 0 0 1 0-16.6zM6.6 7.5l4.3 8.6h2.2l4.3-8.6h-2.5L12 13.4 9.1 7.5z'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--text); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(64, 140, 190, .28), transparent 70%),
    radial-gradient(900px 500px at 85% 110%, rgba(40, 120, 150, .18), transparent 70%),
    linear-gradient(180deg, #13304a 0%, #0e2233 45%, #0a1620 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
body::before { /* hachures fines, comme le fond du jeu */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .7;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 18px);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000, transparent 85%);
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cream); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.mono { font-family: var(--label); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.muted { color: var(--muted); font-size: 14px; }
code, kbd { font-family: ui-monospace, Consolas, monospace; font-size: .88em; background: rgba(236, 232, 225, .1); padding: 1px 5px; border-radius: 2px; }

/* ---------- boutons ---------- */
.btn-red, .btn-line {
  font-family: var(--label); font-weight: 700; font-size: 15px; letter-spacing: .12em; text-transform: uppercase;
  height: 44px; padding: 0 26px; border: 0; clip-path: var(--cut); transition: background .15s, color .15s, opacity .15s;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-red:disabled { opacity: .45; cursor: default; }
.btn-line { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1px var(--line-strong); clip-path: none; }
.btn-line:hover { background: rgba(236, 232, 225, .1); }
.btn-line.sm, .btn-red.sm { height: 34px; padding: 0 16px; font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- connexion ---------- */
body.locked { overflow: hidden; }
body.locked .app { visibility: hidden; }
#gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px 16px; }
.gate-card {
  width: 100%; max-width: 400px; padding: 40px 34px 30px; background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  display: grid; gap: 14px; text-align: center; animation: rise .5s cubic-bezier(.2, .7, .2, 1);
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.gate-mark { width: 54px; height: 54px; color: var(--red); margin: 0 auto 4px; }
.gate-card h1 { font: 44px/1 var(--display); letter-spacing: .04em; margin: 0; }
.gate-sub { color: var(--muted); margin: 0 0 10px; font-size: 14px; }
.gate-err { color: var(--red); font-size: 14px; margin: -4px 0 0; }
.gate-card .btn-red, .gate-card .btn-line { width: 100%; }

.field { display: grid; gap: 6px; text-align: left; }
.field > span { font: 600 12px var(--label); letter-spacing: .12em; color: var(--muted); }
.field input {
  height: 44px; padding: 0 14px; background: rgba(0, 0, 0, .35); border: 0; outline: 0;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .15s; font-size: 15px;
}
.field input:focus { box-shadow: inset 0 0 0 1px var(--cream); }
.check { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; cursor: pointer; text-align: left; }
.check input { position: absolute; opacity: 0; }
.check i { width: 16px; height: 16px; box-shadow: inset 0 0 0 1px var(--line-strong); display: grid; place-items: center; flex: none; }
.check input:checked + i { background: var(--red); box-shadow: none; }
.check input:checked + i::after { content: ""; width: 8px; height: 4px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.check input:focus-visible + i { outline: 2px solid var(--cream); outline-offset: 2px; }

/* ---------- structure ---------- */
.app { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 24px 48px; }
.demo-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 14px 0 0; padding: 10px 12px 10px 16px; background: rgba(255, 70, 85, .12);
  box-shadow: inset 3px 0 0 var(--red), inset 0 0 0 1px rgba(255, 70, 85, .35); font-size: 14px;
}
.demo-bar b { font-family: var(--label); letter-spacing: .1em; color: var(--red); }

/* ---------- barre du haut ---------- */
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 64px; }
.crumb { font: 600 14px var(--label); letter-spacing: .14em; color: var(--muted); display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.crumb b { color: var(--cream); font-weight: 700; }
.crumb-back { background: none; border: 0; padding: 0; color: var(--muted); letter-spacing: inherit; font: inherit; }
.crumb-back:hover { color: var(--cream); }
.mainnav { display: flex; align-items: center; gap: 4px; }
.nav-ico { position: relative; width: 44px; height: 40px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); transition: color .15s; }
.nav-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-ico:hover, .nav-ico.on { color: var(--cream); }
.nav-ico.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--cream); }
.nav-dot { position: absolute; top: 7px; right: 9px; width: 7px; height: 7px; background: var(--red); border-radius: 50%; }
.tip {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translate(-50%, -4px); opacity: 0; pointer-events: none;
  font: 600 11px var(--label); letter-spacing: .12em; white-space: nowrap; padding: 5px 9px; background: var(--deep);
  box-shadow: inset 0 0 0 1px var(--line); transition: .15s; z-index: 5;
}
.nav-ico:hover .tip, .nav-ico:focus-visible .tip { opacity: 1; transform: translate(-50%, 0); }
.nav-play {
  height: 44px; min-width: 170px; margin: 0 10px; padding: 0 30px; border: 0; background: var(--red); color: #fff;
  font: 30px/1 var(--display); letter-spacing: .06em; clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%); transition: background .15s;
}
.nav-play:hover { background: var(--red-dark); }
.nav-play:not(.on) { background: rgba(255, 70, 85, .75); }
.top-right { justify-self: end; display: flex; align-items: center; gap: 10px; }
.refresh.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.wallet { justify-self: end; display: flex; gap: 18px; align-items: center; font: 600 15px var(--label); letter-spacing: .04em; }
.coin { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.coin.vp { color: var(--cream); }
.coin img { width: 18px; height: 18px; }

/* ---------- lot en vedette ---------- */
.featured {
  position: relative; margin-top: 18px; aspect-ratio: 16 / 6.2; min-height: 300px; overflow: hidden;
  background: var(--deep); box-shadow: inset 0 0 0 1px var(--line-strong), 0 30px 60px -30px rgba(0, 0, 0, .8);
}
.f-art { position: absolute; inset: 0; }
.f-art img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; opacity: 0; transition: opacity .6s; }
.f-art img.ready { opacity: 1; }
.f-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 20, 29, .92) 0%, rgba(10, 20, 29, .55) 32%, transparent 62%), linear-gradient(0deg, rgba(10, 20, 29, .85), transparent 30%); }
.f-info { position: absolute; left: 30px; top: 26px; max-width: 42%; }
.f-meta { font: 600 13px var(--label); letter-spacing: .14em; display: flex; gap: 8px; color: var(--cream); }
.f-meta i { color: var(--red); font-style: normal; }
.f-meta .mono { color: var(--gold); }
.f-name { font: 54px/.95 var(--display); letter-spacing: .01em; text-transform: uppercase; margin: 12px 0 10px; text-shadow: 0 2px 20px rgba(0, 0, 0, .5); }
.f-sub { display: flex; gap: 12px; align-items: center; font: 700 14px var(--label); letter-spacing: .14em; }
.f-badge { display: inline-block; margin-top: 12px; padding: 3px 10px; font: 700 12px var(--label); letter-spacing: .14em; color: #1c1405; background: linear-gradient(90deg, #d8b25a, #f3dc8e); }
.f-desc { color: rgba(236, 232, 225, .85); font-size: 14px; margin: 12px 0 0; max-width: 360px; }
.f-buy { position: absolute; right: 26px; bottom: 58px; display: flex; gap: 8px; }
.pricebox {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 22px; border: 0; background: var(--cream); color: var(--navy);
  font: 700 22px var(--label); letter-spacing: .04em; outline: 1px solid var(--cream); outline-offset: 4px; transition: background .15s;
}
.pricebox:hover { background: #fff; }
.pricebox .strike { font-size: 15px; color: #7b7f84; text-decoration: line-through; font-weight: 600; }
.f-open { width: 44px; height: 44px; display: grid; place-items: center; background: rgba(10, 20, 29, .6); border: 0; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--cream); outline: 1px solid var(--line-strong); outline-offset: 4px; }
.f-open svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.f-open:hover { background: rgba(236, 232, 225, .12); }
.f-tabs { position: absolute; left: 30px; right: 30px; bottom: 16px; display: flex; gap: 12px; }
.f-tab { flex: 1; max-width: 210px; background: none; border: 0; padding: 0 0 8px; text-align: center; color: var(--muted); font: 600 12px var(--label); letter-spacing: .12em; text-transform: uppercase; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.f-tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(236, 232, 225, .22); }
.f-tab.on { color: #5ee6c3; }
.f-tab.on::before { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: #5ee6c3; z-index: 1; animation: fill var(--dur, 9s) linear forwards; }
@keyframes fill { to { width: 100%; } }
.featured.empty .f-name { font-size: 36px; }

/* ---------- séparateurs ---------- */
.divider { display: flex; align-items: center; gap: 14px; margin: 30px 0 14px; font: 700 14px var(--label); letter-spacing: .16em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.divider b { color: var(--gold); font-weight: 700; }
.page-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin: 26px 0 18px; }
.page-head h2 { font: 44px/1 var(--display); letter-spacing: .03em; margin: 0; }
.page-head .mono { color: var(--gold); font-size: 18px; font-weight: 700; }

/* ---------- cartes ---------- */
.offers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.offers.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.offers.six.small { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.offers.results { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin-top: 16px; }
.card {
  --tier: #5a9fe2; position: relative; display: flex; flex-direction: column; min-width: 0; text-align: left; padding: 0; border: 0;
  background:
    radial-gradient(120% 90% at 50% 30%, color-mix(in srgb, var(--tier) 38%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--tier) 30%, #0f1923), #0d1822 75%);
  box-shadow: inset 0 0 0 1px var(--line); transition: transform .2s, box-shadow .2s; overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 14px); pointer-events: none; }
.card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--cream), 0 18px 34px -18px color-mix(in srgb, var(--tier) 70%, #000); }
.c-stage { position: relative; aspect-ratio: 16 / 8.5; display: grid; place-items: center; padding: 14px 16px; }
.c-stage img { max-height: 100%; width: auto; max-width: 92%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .55)); opacity: 0; transform: scale(.96); transition: opacity .4s, transform .4s; }
.c-stage img.ready { opacity: 1; transform: none; }
.card:hover .c-stage img { transform: scale(1.05); }
.c-foot { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(8, 15, 22, .72); border-top: 1px solid rgba(236, 232, 225, .12); }
.c-name { flex: 1; min-width: 0; font: 600 14px var(--label); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-price { display: inline-flex; align-items: center; gap: 6px; font: 700 15px var(--label); letter-spacing: .04em; white-space: nowrap; }
.c-price s { color: var(--faint); font-weight: 600; font-size: 13px; }
.c-tier { position: absolute; top: 10px; left: 10px; width: 22px; height: 22px; z-index: 1; }
.c-star { position: absolute; top: 8px; right: 8px; z-index: 1; width: 30px; height: 30px; display: grid; place-items: center; background: rgba(8, 15, 22, .55); border: 0; color: var(--muted); }
.c-star svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.c-star.on { color: var(--gold); }
.c-star.on svg { fill: currentColor; }
.c-star:hover { color: var(--cream); }
.c-disc { position: absolute; top: 0; left: 0; z-index: 1; padding: 6px 12px 6px 10px; background: var(--red); color: #fff; font: 700 16px var(--label); letter-spacing: .06em; clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%); }
.c-flag { position: absolute; bottom: 52px; right: 10px; z-index: 1; padding: 2px 8px; background: var(--gold); color: #1c1405; font: 700 11px var(--label); letter-spacing: .12em; }
.small .c-foot { padding: 7px 10px; }
.small .c-name, .small .c-price { font-size: 12px; }
.card.skeleton .c-stage { background: linear-gradient(90deg, transparent, rgba(236, 232, 225, .06), transparent) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.vp-ico { display: inline-block; width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--vp-mask) center / contain no-repeat; mask: var(--vp-mask) center / contain no-repeat; }
.small .vp-ico { width: 14px; height: 14px; }
.vp-inline { display: inline-flex; align-items: center; gap: 6px; }
.notice { color: var(--muted); text-align: center; padding: 28px 16px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); margin: 0; }

/* ---------- sous-navigation (boutons inclinés) ---------- */
.subnav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 34px auto 0; max-width: 900px; }
.subnav button {
  height: 44px; border: 0; background: rgba(10, 20, 29, .7); box-shadow: inset 0 0 0 1px var(--line); color: var(--cream);
  font: 700 14px var(--label); letter-spacing: .14em; transform: skewX(-14deg); transition: background .15s, box-shadow .15s;
}
.subnav button:hover { background: rgba(255, 70, 85, .18); box-shadow: inset 0 0 0 1px var(--red); }

/* ---------- historique ---------- */
.h-day { margin-bottom: 24px; }
.h-date { display: flex; justify-content: space-between; gap: 12px; font: 700 14px var(--label); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.h-date span { color: var(--muted); }

/* ---------- souhaits ---------- */
.search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px var(--line); }
.search:focus-within { box-shadow: inset 0 0 0 1px var(--cream); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 15px; }
.wish-mine { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 6px 0 12px; background: rgba(10, 20, 29, .7); box-shadow: inset 0 0 0 1px var(--line); font: 600 13px var(--label); letter-spacing: .08em; text-transform: uppercase; }
.chip.hit { box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold); }
.chip button { width: 24px; height: 24px; border: 0; background: none; color: var(--muted); }
.chip button:hover { color: var(--red); }

/* ---------- réglages ---------- */
.panel { padding: 24px; margin-bottom: 16px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.panel h3 { font: 28px/1 var(--display); letter-spacing: .04em; margin: 0 0 14px; }
.riot-state { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 20px; background: rgba(0, 0, 0, .3); font-size: 14px; }
.riot-state i { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.riot-state.ok i { background: #3ee08f; box-shadow: 0 0 0 3px rgba(62, 224, 143, .18); }
.riot-state.warn i { background: var(--gold); }
.riot-state.err i { background: var(--red); }
.steps { display: grid; gap: 18px; list-style: none; margin: 0 0 22px; padding: 0; }
.step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.step p { margin: 4px 0 10px; }
.step-n { width: 34px; height: 34px; display: grid; place-items: center; font: 20px var(--display); background: var(--red); color: #fff; clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%); }
.seg { display: inline-flex; margin: 0 0 20px; box-shadow: inset 0 0 0 1px var(--line); max-width: 100%; }
.seg button { height: 36px; padding: 0 14px; border: 0; background: none; color: var(--muted); font: 700 13px var(--label); letter-spacing: .1em; }
.seg button em { font-style: normal; font-weight: 500; letter-spacing: .02em; text-transform: none; opacity: .8; margin-left: 4px; }
.seg button[aria-selected="true"] { background: var(--cream); color: var(--navy); }
.howto { margin: 0; padding-left: 20px; color: rgba(236, 232, 225, .88); font-size: 14px; display: grid; gap: 6px; }
.detect { font: 600 13px var(--label); letter-spacing: .08em; color: var(--muted); min-height: 20px; margin: 8px 0 10px; }
.detect.good { color: #5ee6c3; }
.detect.bad { color: var(--red); }
.msg { font-size: 14px; color: var(--muted); min-height: 21px; margin: 10px 0 0; }
.msg.err { color: var(--red); }
.msg.good { color: #5ee6c3; }

/* ---------- détail ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; background: rgba(4, 9, 14, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal-card { position: relative; width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #0d1a25; box-shadow: inset 0 0 0 1px var(--line-strong); animation: rise .25s ease-out; }
.modal-x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border: 0; background: rgba(10, 20, 29, .8); color: var(--cream); font-size: 16px; }
.modal-x:hover { background: var(--red); }
.m-hero { position: relative; aspect-ratio: 16 / 7; background: var(--deep); overflow: hidden; }
.m-hero img { width: 100%; height: 100%; object-fit: cover; }
.m-hero.skin { display: grid; place-items: center; padding: 26px; background: radial-gradient(90% 90% at 50% 40%, color-mix(in srgb, var(--tier, #5a9fe2) 40%, transparent), transparent 70%), #0f1923; }
.m-hero.skin img { object-fit: contain; width: auto; max-width: 90%; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .6)); }
.m-body { padding: 22px 24px 26px; }
.m-body h3 { font: 40px/1 var(--display); text-transform: uppercase; margin: 0 0 8px; letter-spacing: .02em; }
.m-sub { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font: 600 14px var(--label); letter-spacing: .12em; color: var(--muted); margin-bottom: 18px; }
.m-sub b { color: var(--cream); }
.m-items { display: grid; gap: 8px; }
.m-item { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: 14px; padding: 8px 12px 8px 8px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px rgba(236, 232, 225, .12); }
.m-item .thumb { height: 48px; display: grid; place-items: center; }
.m-item .thumb img { max-height: 48px; max-width: 96px; object-fit: contain; }
.m-item .n { font: 600 14px var(--label); letter-spacing: .06em; text-transform: uppercase; }
.m-item .k { display: block; font-size: 12px; color: var(--muted); text-transform: none; letter-spacing: 0; font-family: var(--body); font-weight: 400; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; padding: 12px 18px; background: var(--cream); color: var(--navy); font: 600 14px var(--body); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); animation: rise .2s ease-out; max-width: calc(100% - 32px); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .f-name { font-size: 42px; }
  .offers.six.small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .app { padding: 0 12px calc(84px + env(safe-area-inset-bottom)); }

  /* barre du haut collante, compacte */
  .topbar {
    /* pas de backdrop-filter ici : il ferait de la barre le repère de la navigation « fixed » du bas */
    position: sticky; top: 0; z-index: 20; grid-template-columns: 1fr auto; height: 52px; margin: 0 -12px; padding: 0 6px 0 14px;
    background: #0f2130; box-shadow: 0 1px 0 var(--line);
  }
  .crumb-back, .sep { display: none !important; }
  .wallet .coin:not(.vp) { display: none; }
  .top-right { gap: 2px; }

  /* navigation en bas, avec libellés */
  .mainnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: rgba(8, 15, 22, .96); box-shadow: 0 -1px 0 var(--line);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .mainnav .nav-ico { width: auto; height: 54px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
  .mainnav .nav-ico.on::after { top: 0; bottom: auto; left: 30%; right: 30%; background: var(--red); }
  .mainnav .tip { position: static; transform: none; opacity: 1; background: none; box-shadow: none; padding: 0; font-size: 10px; letter-spacing: .08em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .nav-dot { right: calc(50% - 16px); }
  .nav-play { order: 0; grid-column: 3; grid-row: 1; align-self: center; justify-self: center; min-width: 0; width: 100%; height: 46px; margin: 0; padding: 0 6px; font-size: 14px; letter-spacing: .03em; clip-path: polygon(0 0, 100% 0, 90% 100%, 10% 100%); }
  .mainnav [data-view="history"] { grid-column: 1; grid-row: 1; }
  .mainnav [data-view="wishlist"] { grid-column: 2; grid-row: 1; }
  .mainnav [data-view="night"] { grid-column: 4; grid-row: 1; }
  .mainnav [data-view="settings"] { grid-column: 5; grid-row: 1; }

  /* lot en vedette : image + infos par-dessus, balayable */
  .featured { aspect-ratio: auto; min-height: 0; margin-top: 12px; display: flex; flex-direction: column; touch-action: pan-y; }
  .f-art { position: relative; aspect-ratio: 16 / 9; cursor: pointer; }
  .f-art::after { background: linear-gradient(0deg, #0a141d 2%, rgba(10, 20, 29, .35) 45%, transparent 70%); }
  .f-info { position: relative; left: 0; top: 0; max-width: none; padding: 0 16px; margin-top: -64px; }
  .f-meta { font-size: 12px; }
  .f-name { font-size: 32px; margin: 6px 0 4px; }
  .f-sub, .f-desc { display: none; }
  .f-badge { margin-top: 4px; }
  .f-buy { position: relative; right: 0; bottom: 0; padding: 14px 16px 0; }
  .pricebox { flex: 1; justify-content: center; height: 48px; }
  .f-open { width: 48px; height: 48px; }
  .f-tabs { position: relative; left: 0; right: 0; bottom: 0; justify-content: center; gap: 6px; padding: 16px 16px 14px; }
  .f-tab { flex: 0 0 28px; font-size: 0; padding: 0; height: 12px; }
  .f-tab::after, .f-tab.on::before { height: 4px; }

  /* offres : pleine largeur, lisibles */
  .divider { margin: 24px 0 12px; font-size: 13px; }
  .offers { grid-template-columns: 1fr; gap: 10px; }
  .c-stage { aspect-ratio: 16 / 6.5; }
  .c-name { font-size: 15px; }
  .c-price { font-size: 16px; }
  .c-star { width: 40px; height: 40px; top: 4px; right: 4px; }
  .c-flag { bottom: 50px; }
  .offers.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offers.six .c-stage { aspect-ratio: 16 / 10; }
  .offers.six .c-name { font-size: 12px; }
  .offers.six .c-price { font-size: 13px; }
  .offers.results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offers.results .c-stage { aspect-ratio: 16 / 10; }
  .offers.results .c-name { font-size: 12px; }

  /* rangées secondaires (Night Market, historique) : défilement horizontal */
  .offers.small, .offers.six.small {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -12px; padding: 0 12px 6px; scrollbar-width: none;
  }
  .offers.small::-webkit-scrollbar { display: none; }
  .offers.small .card { flex: 0 0 62%; scroll-snap-align: start; }
  .offers.small .c-stage { aspect-ratio: 16 / 8; }

  .subnav { display: none; }
  .page-head { margin: 18px 0 14px; gap: 6px 14px; }
  .page-head h2 { font-size: 32px; }
  .panel { padding: 18px 16px; }
  .panel h3 { font-size: 24px; }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1; padding: 0 8px; font-size: 12px; }
  .seg button em { display: block; margin: 0; font-size: 11px; line-height: 1; }
  .seg button { height: 46px; }
  .field input, .search input { font-size: 16px; } /* évite le zoom automatique sur iPhone */
  .row > button { flex: 1; }
  .btn-red, .btn-line { height: 48px; }
  .h-date { font-size: 13px; }
  .chip { height: 38px; }

  /* détail : panneau qui monte du bas */
  .modal { align-items: end; padding: 0; }
  .modal-card { width: 100%; max-height: 88vh; animation: sheet .25s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom); }
  @keyframes sheet { from { transform: translateY(100%); } }
  .m-body { padding: 18px 16px 22px; }
  .m-body h3 { font-size: 28px; }
  .m-body .btn-red, .m-body .btn-line { width: 100%; }
  .m-item { grid-template-columns: 64px 1fr auto; gap: 10px; }
  .m-item .thumb img { max-width: 64px; }

  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .demo-bar { margin-top: 10px; font-size: 13px; }
  .demo-bar .btn-line { width: 100%; }
}
/* écrans tactiles : pas d'effet de survol qui reste « collé » après un appui */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: inset 0 0 0 1px var(--line); }
  .card:hover .c-stage img { transform: none; }
  .card:active { box-shadow: inset 0 0 0 1px var(--cream); }
}
@media (max-width: 480px) {
  .crumb { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- connexion Google ---------- */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 48px; border: 0;
  background: var(--cream); color: var(--navy); font: 700 15px var(--label); letter-spacing: .12em; clip-path: var(--cut);
  transition: background .15s;
}
.btn-google:hover { background: #fff; }
.btn-google:disabled { opacity: .6; cursor: progress; }
.btn-google svg { width: 20px; height: 20px; }
.gate-foot { margin: 4px 0 0; color: var(--faint); font-size: 13px; }

/* ---------- installation comme app ---------- */
.install-bar {
  display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding: 10px 8px 10px 12px;
  background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; line-height: 1.35;
}
.install-bar img { flex: none; }
.install-bar span { flex: 1; min-width: 0; }
.install-bar b { font-family: var(--label); letter-spacing: .06em; }
.install-bar .btn-red { flex: none; }
.install-x { flex: none; width: 32px; height: 32px; border: 0; background: none; color: var(--muted); }
@media (max-width: 860px) {
  .install-bar .btn-red { height: 36px; padding: 0 12px; }
  .row > .install-x { flex: none; }
}
/* app installée sur téléphone : la barre du haut passe sous la barre d'état */
@media (display-mode: standalone) and (max-width: 860px) {
  .topbar { padding-top: env(safe-area-inset-top); height: calc(52px + env(safe-area-inset-top)); }
}
