:root {
  --bg: #f2f2f6;
  --surface: #ffffff;
  --surface-2: #e7e7ee;
  --text: #101115;
  --muted: #6c707c;
  --line: rgba(16, 17, 21, .08);
  --accent: #ff6b00;
  --accent-2: #ff9a1f;
  --accent-soft: rgba(255, 107, 0, .12);
  --gold: #e8a400;
  --blur-bg: rgba(242, 242, 246, .82);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .04);
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  --nav-h: 50px;
  --tab-h: 54px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0d11;
    --surface: #17181e;
    --surface-2: #24262e;
    --text: #f2f3f5;
    --muted: #9296a3;
    --line: rgba(255, 255, 255, .08);
    --accent-soft: rgba(255, 107, 0, .18);
    --gold: #ffc233;
    --blur-bg: rgba(12, 13, 17, .8);
    --shadow: none;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  padding-bottom: calc(var(--tab-h) + var(--sb) + 8px);
  overscroll-behavior-y: none;
}
body.noscroll { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }
svg { display: block; }
#view { max-width: 760px; margin: 0 auto; min-height: 100vh; }

/* ---------- Titres ---------- */
.large-title { padding: calc(var(--st) + 20px) 20px 6px; }
.large-title h1 { font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -.025em; margin: 0; }
.lt-sub { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

.nav-bar {
  position: sticky; top: 0; z-index: 10;
  padding-top: var(--st);
  height: calc(var(--nav-h) + var(--st));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: var(--blur-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--line);
}
.nav-back {
  justify-self: start; display: flex; align-items: center; gap: 2px;
  border: 0; background: none; color: var(--accent); font-size: 17px; padding: 8px 10px 8px 6px;
}
.nav-back svg { width: 24px; height: 24px; }
.nav-title { font-weight: 650; font-size: 17px; max-width: 58vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }

/* ---------- Progression ---------- */
.summary {
  margin: 16px 0 4px; padding: 16px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow);
}
.set-head { padding: 14px 16px 0; }
.set-head .summary { margin: 0; }
.prog-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; color: var(--muted); font-size: 15px; }
.prog-top b { color: var(--text); font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.prog-pct { color: var(--accent); font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.bar.sm { height: 5px; }
.bar.done i { background: linear-gradient(90deg, #ffd35c, var(--gold)); }

/* ---------- Contrôles ---------- */
.controls { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.sticky-controls {
  position: sticky; top: calc(var(--st) + var(--nav-h)); z-index: 9;
  background: var(--blur-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.seg { flex: 1; display: flex; padding: 3px; border-radius: 11px; background: var(--surface-2); }
.seg button {
  flex: 1; border: 0; background: none; padding: 7px 4px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s;
}
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.pill-btn {
  display: flex; align-items: center; gap: 4px; border: 0; border-radius: 11px;
  background: var(--surface-2); padding: 9px 11px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.pill-btn svg { width: 16px; height: 16px; }
.pill-btn.icon-only { width: 38px; height: 36px; padding: 0; justify-content: center; flex: none; }
.pill-btn.icon-only svg { width: 18px; height: 18px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 99px;
  padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.chip.on { background: var(--text); color: var(--bg); border-color: transparent; }

/* ---------- Liste des séries ---------- */
.series-list { list-style: none; margin: 0; padding: 0 16px 16px; }
.series-row {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px 10px 10px; margin-bottom: 10px;
  border-radius: 18px; background: var(--surface); box-shadow: var(--shadow);
  transition: transform .15s;
}
.series-row:active { transform: scale(.98); }
/* Emplacement fixe : une carte (format carte) ou une display (image entière) s'y alignent pareil. */
.series-thumb { flex: none; width: 64px; height: 72px; display: grid; place-items: center; }
.series-thumb img { width: 52px; height: 72px; object-fit: cover; display: block; border-radius: 6px; background: var(--surface-2); }
.series-thumb.pack img { width: 64px; height: 72px; object-fit: contain; border-radius: 0; background: none; }
.series-info { flex: 1; min-width: 0; }
.series-name { font-weight: 650; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.series-meta { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin: 2px 0 8px; font-variant-numeric: tabular-nums; }
.series-meta > span { white-space: nowrap; flex: none; }
.series-meta > .series-coll { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.series-coll::before { content: "·"; margin-right: 8px; }
.code { font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: var(--muted); }
.series-pct { flex: none; min-width: 42px; text-align: right; font-weight: 750; font-size: 15px; font-variant-numeric: tabular-nums; }
.series-pct.done { color: var(--gold); display: flex; justify-content: flex-end; }
.series-pct svg { width: 22px; height: 22px; }

/* ---------- Grille de cartes ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; padding: 4px 16px 24px; }
@media (min-width: 540px) { .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }
.tile { position: relative; min-width: 0; }
.tile-img {
  position: relative; aspect-ratio: 63 / 88; border-radius: 8px; overflow: hidden;
  background: var(--surface-2); cursor: pointer;
}
.tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .25s, opacity .25s; }
.tile:not(.own) .tile-img img { filter: grayscale(1); opacity: .35; }
.tile-num { margin-top: 5px; text-align: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.own .tile-num { color: var(--text); font-weight: 600; }

.chk {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; padding: 0;
  display: grid; place-items: center; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .92); background: rgba(0, 0, 0, .25); color: transparent;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: background .15s, border-color .15s, transform .15s;
}
.chk::before { content: ""; position: absolute; inset: -10px; }
.chk svg { width: 16px; height: 16px; }
.chk:active { transform: scale(.85); }
.tile.own .chk { background: var(--accent); border-color: var(--accent); color: #fff; }
.tile.pop .chk { animation: pop .35s cubic-bezier(.2, .8, .2, 1.4); }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }

.qty {
  position: absolute; top: 7px; left: 7px; padding: 2px 7px; border-radius: 99px;
  background: rgba(0, 0, 0, .68); color: #fff; font-size: 12px; font-weight: 700;
}
.qty:empty { display: none; }
.wish-badge {
  position: absolute; left: 7px; bottom: 25px; width: 24px; height: 24px; border-radius: 50%;
  display: none; place-items: center; background: #fff; color: #e5484d; box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.wish-badge svg { width: 14px; height: 14px; }
.tile.wish:not(.own) .wish-badge { display: grid; }

/* ---------- Fiche (bottom sheet) ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .3s; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 760px;
  height: calc(100% - var(--st) - 10px);
  background: var(--bg); border-radius: 22px 22px 0 0;
  transform: translateY(100%); transition: transform .34s cubic-bezier(.2, .8, .2, 1);
  overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--sb) + 28px);
}
.sheet.open { pointer-events: auto; }
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: none; }
.grabber { width: 38px; height: 5px; border-radius: 99px; background: var(--surface-2); margin: 8px auto 0; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 0; }
.sheet-pos { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.round-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2);
  display: grid; place-items: center; color: var(--muted);
}
.round-btn svg { width: 18px; height: 18px; }
.round-btn.on { color: #e5484d; background: rgba(229, 72, 77, .14); }
.round-btn.ghost { visibility: hidden; }
.sheet-card { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 10px 6px 4px; }
.big-card {
  width: min(70vw, 320px); aspect-ratio: 63 / 88; border-radius: 14px; overflow: hidden;
  background: var(--surface-2) center / cover no-repeat; box-shadow: 0 14px 40px rgba(0, 0, 0, .3);
}
.big-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-arrow { width: 36px; height: 64px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; }
.nav-arrow svg { width: 26px; height: 26px; }
.nav-arrow:disabled { opacity: .15; }
.sheet-title { text-align: center; padding: 14px 20px 2px; }
.sheet-title h3 { margin: 0; font-size: 21px; line-height: 1.25; font-weight: 750; letter-spacing: -.01em; }
.sheet-meta { margin-top: 6px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.own-row { display: flex; gap: 10px; padding: 16px 16px 6px; }
.own-btn {
  flex: 1; height: 52px; border: 0; border-radius: 15px; background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s, background .2s;
}
.own-btn svg { width: 20px; height: 20px; }
.own-btn:active { transform: scale(.97); }
.own-btn.on { background: var(--accent-soft); color: var(--accent); }
.stepper { display: flex; align-items: center; border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.stepper button { width: 46px; height: 52px; border: 0; background: none; font-size: 24px; font-weight: 500; color: var(--accent); }
.stepper span { min-width: 22px; text-align: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.facts { margin: 12px 16px 0; padding: 2px 16px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.fact { padding: 12px 0; border-bottom: .5px solid var(--line); }
.fact:last-child { border-bottom: 0; }
.fact dt { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.fact dd { margin: 0; font-size: 15px; line-height: 1.45; }

/* ---------- Recherche ---------- */
.search-box {
  margin-top: 14px; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px 0 12px;
  border-radius: 12px; background: var(--surface-2); color: var(--muted);
}
.search-box svg { width: 18px; height: 18px; flex: none; }
.search-box input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text);
  font-size: 17px; -webkit-appearance: none; appearance: none;
}
.search-box input::-webkit-search-cancel-button { display: none; }
.clear-btn { border: 0; background: var(--muted); color: var(--surface-2); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; padding: 0; }
.clear-btn svg { width: 12px; height: 12px; }
.count { padding: 6px 20px 0; margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- Plus ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 16px 16px 4px; }
.stat { padding: 14px 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.stat b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.group-title { margin: 24px 32px 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.group { margin: 0 16px; border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.group:first-of-type { margin-top: 18px; }
.row {
  width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 0; background: none;
  text-align: left; font-size: 16px;
}
.row + .row { border-top: .5px solid var(--line); }
.row:active { background: var(--surface-2); }
.row > svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.row span { flex: 1; }
.row em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.row .chev { width: 16px; height: 16px; color: var(--muted); opacity: .6; }
.sync-field { padding: 10px 16px 4px; }
.sync-field input {
  width: 100%; height: 42px; padding: 0 12px; border: 0; outline: 0; border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-size: 16px;
}
.row .danger { color: #e5484d; }
.foot { margin: 8px 32px 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.credits { margin: 32px 32px 16px; font-size: 12px; color: var(--muted); text-align: center; opacity: .8; }

/* ---------- Divers ---------- */
.empty { text-align: center; padding: 56px 32px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 12px; opacity: .5; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }

.hint {
  margin: 12px 16px 0; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--text);
  font-size: 14px; display: flex; gap: 10px; align-items: flex-start;
}
.hint p { margin: 0; flex: 1; }
.hint button { border: 0; background: none; color: var(--muted); padding: 0 2px; font-size: 20px; line-height: 1; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tab-h) + var(--sb)); padding-bottom: var(--sb);
  display: flex; justify-content: space-around;
  background: var(--blur-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--line);
}
.tab { flex: 1; max-width: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; }
.tab svg { width: 25px; height: 25px; }
.tab.active { color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--sb) + 16px); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 10px 18px; border-radius: 99px; background: var(--text); color: var(--bg);
  font-size: 14px; font-weight: 600; white-space: nowrap; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Accueil / recherche ---------- */
.summary-note { margin: 8px 4px 0; font-size: 13px; color: var(--muted); }
.summary-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 4px 0;
  color: var(--accent); font-size: 14px; font-weight: 650;
}
.link-btn svg { width: 16px; height: 16px; }
.link-btn.center { display: flex; margin: 10px auto 0; }
.cta {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 13px 20px;
  border-radius: 14px; background: var(--accent); color: #fff; font-weight: 700; font-size: 16px;
}
.cta svg { width: 18px; height: 18px; margin: 0; opacity: 1; }
.empty .cta { display: flex; width: fit-content; margin: 20px auto 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; min-height: 52px; }
.section-head h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Série : bascule carrousel / liste ---------- */
.nav-right { justify-self: end; padding-right: 10px; }
.mode-switch { display: flex; padding: 2px; border-radius: 9px; background: var(--surface-2); }
.mode-switch button {
  width: 36px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: none;
  color: var(--muted); display: grid; place-items: center;
}
.mode-switch button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.mode-switch svg { width: 18px; height: 18px; }

/* ---------- Carrousel ---------- */
.car-wrap { --w: max(170px, min(62vw, 300px, calc((100svh - 500px) * .716))); padding-bottom: 12px; }
.carousel {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px calc((100% - var(--w)) / 2) 18px;
  scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
}
.carousel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 var(--w); scroll-snap-align: center; cursor: pointer; }
.slide-card {
  aspect-ratio: 63 / 88; border-radius: 14px; overflow: hidden; background: var(--surface-2);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25); transition: box-shadow .3s;
}
.slide-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .3s, opacity .3s; }
.slide:not(.own) .slide-card { box-shadow: none; }
.slide:not(.own) .slide-card img { filter: grayscale(1); opacity: .45; }
.car-scrub { padding: 0 32px; }
.car-scrub input { width: 100%; margin: 0; accent-color: var(--accent); }
#car-info { padding: 10px 16px 0; text-align: center; }
#car-info .own-row { padding: 14px 0 0; }
.car-pos { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.car-name { margin: 4px 0 0; font-size: 20px; line-height: 1.25; font-weight: 750; letter-spacing: -.01em; }
.square-btn {
  flex: none; width: 52px; height: 52px; border: 0; border-radius: 15px; background: var(--surface);
  box-shadow: var(--shadow); color: var(--muted); display: grid; place-items: center;
}
.square-btn svg { width: 22px; height: 22px; }
.square-btn.on { color: #e5484d; background: rgba(229, 72, 77, .14); }

/* ---------- Couverture de série (en-tête) ---------- */
.summary-main { display: flex; align-items: center; gap: 14px; }
.summary-prog { flex: 1; min-width: 0; }
.summary-cover { flex: none; width: 60px; height: 84px; display: grid; place-items: center; }
.summary-cover img { width: 60px; height: 84px; object-fit: cover; display: block; border-radius: 8px; background: var(--surface-2); }
.summary-cover.pack { width: 84px; }
.summary-cover.pack img { width: 84px; height: 84px; object-fit: contain; border-radius: 0; background: none; }

/* ---------- Total (accueil) ---------- */
.summary.total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.summary.total b { font-size: 36px; line-height: 1; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.summary.total span { font-size: 17px; color: var(--muted); }
.summary.total em { flex-basis: 100%; margin-top: 4px; font-style: normal; font-size: 13px; color: var(--muted); }

/* ---------- Liste condensée (recherche) ---------- */
.compact-list {
  list-style: none; margin: 0 16px 16px; padding: 0; border-radius: 14px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
}
.compact-list li + li .compact-row { border-top: .5px solid var(--line); }
.compact-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 14px; }
.compact-row:active { background: var(--surface-2); }
.compact-code { flex: none; min-width: 52px; font-size: 16px; font-weight: 800; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.compact-name { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compact-row .chev { flex: none; width: 14px; height: 14px; color: var(--muted); opacity: .5; }

/* ---------- Achat ---------- */
.prog-spent { margin-top: 10px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.buy { margin: 12px 16px 0; padding: 4px 16px 12px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.buy h4 { margin: 12px 0 2px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.buy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 15px; }
.buy-row.col { flex-direction: column; align-items: stretch; gap: 10px; border-top: .5px solid var(--line); }
.price-field { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--surface-2); }
.price-field input {
  width: 88px; border: 0; outline: 0; background: none; color: var(--text); text-align: right;
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.price-field em { font-style: normal; font-weight: 600; color: var(--muted); }
.buy-hint { margin: -4px 0 6px; font-size: 12px; color: var(--muted); text-align: right; }
.buy-conv { margin: -2px 0 8px; font-size: 12px; line-height: 1.4; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.buy-conv:empty { display: none; }
.place-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.place-chips .chip { padding: 8px 13px; font-size: 14px; }

/* ---------- Leader : retourner la carte ---------- */
.big-card.flippable { position: relative; cursor: pointer; }
.face-badge {
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); white-space: nowrap;
  padding: 4px 10px; border-radius: 99px; background: rgba(0, 0, 0, .62); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; pointer-events: none;
}
.big-card.flipping { animation: flip-face .38s ease; }
@keyframes flip-face { 0% { transform: perspective(900px) rotateY(0); } 50% { transform: perspective(900px) rotateY(90deg); } 100% { transform: perspective(900px) rotateY(0); } }

/* ---------- Valeur (cote) ---------- */
.value { margin: 12px 16px 0; padding: 4px 16px 12px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.value h4 { margin: 12px 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.value-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.vtile { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.vtile span { display: block; font-size: 12px; color: var(--muted); }
.vtile b { display: block; margin-top: 2px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.vtile em { display: block; margin-top: 2px; font-style: normal; font-size: 11px; line-height: 1.3; color: var(--muted); }
.vtile.hl { background: var(--accent-soft); }
.vtile.hl b { font-size: 24px; color: var(--accent); }
.chart { margin: 14px 0 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .ln { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.us { stroke: var(--accent); }
.chart .ln.jp { stroke: #4f7bd9; }
.chart .dot.us { fill: var(--accent); }
.chart .dot.jp { fill: #4f7bd9; }
.chart figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.chart .legend { display: flex; gap: 10px; }
.chart .legend i { display: inline-block; width: 10px; height: 3px; margin-right: 4px; border-radius: 2px; vertical-align: middle; }
.chart .legend i.us { background: var(--accent); }
.chart .legend i.jp { background: #4f7bd9; }
.value-foot { margin: 10px 0 0; font-size: 11px; color: var(--muted); }
.chart-empty { margin: 12px 0 0; font-size: 12px; color: var(--muted); }

/* ---------- Image manquante ---------- */
.noimg {
  display: grid; place-items: center; padding: 10%;
  background: var(--surface-2); border: 1.5px dashed var(--line); box-shadow: none !important;
}
.noimg::after {
  content: attr(data-label); color: var(--muted); text-align: center;
  font-size: 12px; font-weight: 600; line-height: 1.3; word-break: break-word;
}
.slide-card.noimg::after, .big-card.noimg::after { font-size: 17px; }
