:root {
  --bg: #0d0e11;
  --panel: #16181d;
  --panel-2: #1d2027;
  --line: #2a2e37;
  --text: #eceef2;
  --muted: #a3a9b6;
  --accent: #f2c94c;
  --accent-ink: #1a1500;
  --good: #7ee0a1;
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
a { color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(1440px, 100% - 32px); margin-inline: auto; }

/* en-tête */
.hero { padding: 48px 0 20px; }
.kicker { margin: 0 0 10px; color: var(--muted); font-size: 13px; letter-spacing: .02em; }
h1 { margin: 0; font-size: clamp(28px, 4.4vw, 52px); line-height: 1.05; letter-spacing: -.02em; }
h1 .dim { color: var(--muted); font-weight: 500; }
.lede { max-width: 760px; color: var(--muted); font-size: 16px; margin: 14px 0 0; }
.lede strong { color: var(--accent); font-weight: 600; }

/* barre collante */
.bar { position: sticky; top: 0; z-index: 10; background: rgba(13, 14, 17, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar-inner { display: flex; gap: 12px; align-items: center; padding: 12px 0 8px; flex-wrap: wrap; }
.wallet { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 210px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transition: background .2s, transform .2s; }
.dots i.used { background: var(--line); transform: scale(.8); }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; color: var(--muted); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: inherit; padding: 10px 0; outline: none; }
.sort { display: flex; gap: 8px; align-items: center; }
select, .icon-btn { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font: inherit; height: 42px; cursor: pointer; transition: border-color .2s, background .2s; }
select { padding: 0 10px; }
.icon-btn { width: 42px; display: grid; place-items: center; font-size: 18px; }
select:hover, .icon-btn:hover { border-color: #4a5060; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; }
.chip { flex: none; background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13.5px; cursor: pointer; transition: color .2s, border-color .2s, background .2s; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: #4a5060; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.chip .n { opacity: .7; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* grille masonry (colonnes CSS) */
main { padding-top: 16px; }
.count { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.grid { column-gap: 16px; columns: 1; }
@media (min-width: 640px) { .grid { columns: 2; } }
@media (min-width: 1000px) { .grid { columns: 3; } }
@media (min-width: 1320px) { .grid { columns: 4; } }

.card { break-inside: avoid; margin: 0 0 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s; }
.card:hover { border-color: #3d4250; }
.card.voted { border-color: rgba(242, 201, 76, .55); }
.shot { display: block; background: var(--panel-2); position: relative; }
.shot img { display: block; width: 100%; height: auto; }
.shot.none { aspect-ratio: 16 / 7; display: grid; place-items: center; color: #5b6170; font-size: 34px; font-weight: 700; letter-spacing: -.02em; background: linear-gradient(135deg, #1b1e25, #121419); }
.shot .tag { position: absolute; left: 10px; top: 10px; background: rgba(13, 14, 17, .78); color: var(--text); font-size: 12px; padding: 3px 8px; border-radius: 999px; backdrop-filter: blur(4px); }
.body { padding: 14px 14px 12px; }
.card h2 { margin: 0; font-size: 17px; line-height: 1.25; letter-spacing: -.01em; }
.author { color: var(--muted); font-size: 13px; margin: 2px 0 8px; }
.aka { color: var(--muted); font-size: 12px; margin: -4px 0 8px; }
.desc { margin: 0 0 10px; color: #cfd3db; font-size: 14px; overflow-wrap: anywhere; }
.missing { display: inline-block; font-size: 12px; color: #ffb3a7; border: 1px solid #5a3530; border-radius: 6px; padding: 2px 6px; margin-bottom: 8px; }
.stats { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 13px; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.stats span { display: inline-flex; align-items: center; gap: 5px; }
.links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.links a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 13px; padding: 6px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); transition: border-color .2s, color .2s; }
.links a:hover { border-color: var(--accent); color: var(--accent); }
.links a.demo { border-color: rgba(126, 224, 161, .45); color: var(--good); }

.vote { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.vote .total { font-size: 13px; color: var(--muted); }
.vote .total b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 16px; display: grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s, transform .1s; }
.stepper button:hover:not(:disabled) { border-color: var(--accent); }
.stepper button:active:not(:disabled) { transform: scale(.94); }
.stepper button.plus:not(:disabled) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.empty { color: var(--muted); text-align: center; padding: 40px 0; }
.foot { color: var(--muted); font-size: 13px; padding: 24px 0 48px; border-top: 1px solid var(--line); margin-top: 24px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); opacity: 0; background: #2a2e37; color: var(--text); padding: 10px 14px; border-radius: 10px; font-size: 14px; transition: opacity .2s, transform .2s; pointer-events: none; z-index: 20; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  .hero { padding: 28px 0 12px; }
  .wallet { min-width: 0; width: 100%; justify-content: space-between; }
  .sort { width: 100%; }
  .sort select { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* vote indisponible : la vitrine reste lisible */
.no-votes .stepper, .no-votes .dots { display: none; }

/* CTA tout en haut : barre pleine largeur, fond plus sombre que la page, texte et bouton centrés */
.topbar { display: flex; align-items: center; justify-content: center; gap: 12px 20px; flex-wrap: wrap; padding: 14px 16px; text-align: center; background: #050608; border-bottom: 1px solid var(--line); }
.topbar-text { margin: 0; font-size: 15px; color: var(--muted); }
.topbar-text strong { color: var(--text); font-weight: 600; }
.topbar-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 22px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; box-shadow: 0 4px 16px rgba(242, 201, 76, .22); }
.topbar-btn svg { font-size: 18px; }
.topbar-btn:hover { background: #ffd95e; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(242, 201, 76, .34); }
.topbar-btn:active { transform: translateY(1px); }
@media (max-width: 640px) { .topbar-btn { width: 100%; } }

/* filtres : défilement par cliquer-glisser et barre de défilement aux couleurs de la page */
.chips { cursor: grab; user-select: none; -webkit-user-select: none; padding-bottom: 10px; overscroll-behavior-x: contain; }
/* Firefox : propriétés standard ; Chrome et Safari : pseudo-éléments ci-dessous (sans flèches) */
@supports not selector(::-webkit-scrollbar) { .chips { scrollbar-width: thin; scrollbar-color: var(--accent) var(--panel-2); } }
.chips.drag { cursor: grabbing; }
.chips.drag .chip { pointer-events: none; }
.chips::-webkit-scrollbar { height: 8px; }
.chips::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.chips::-webkit-scrollbar-track { background: var(--panel-2); border-radius: 999px; }
.chips::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 999px; }
.chips::-webkit-scrollbar-thumb:hover { background: #ffd95e; }
