/* Listes Warhammer : direction artistique Souverain Systems (jetons partagés avec la page des promos) */
:root {
    --bg: #060813;
    --bg-deep: #04060d;
    --surface: #0b0f1d;
    --surface-2: #0d1527;
    --surface-3: #121c33;
    --border: #1e293b;
    --border-accent: rgba(6, 182, 212, 0.30);
    --text: #f1f5f9;
    --text-2: #cbd5e1;
    --muted: #94a3b8;
    --faint: #64748b;
    --accent: #22d3ee;
    --accent-strong: #06b6d4;
    --accent-dim: rgba(8, 145, 178, 0.18);
    --indigo: #818cf8;
    --good: #34d399;
    --good-dim: rgba(16, 185, 129, 0.16);
    --warn: #fbbf24;
    --warn-dim: rgba(245, 158, 11, 0.16);
    --bad: #fb7185;
    --bad-dim: rgba(244, 63, 94, 0.16);
    --radius: 16px;
    --radius-sm: 10px;
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
body { font-family: var(--font); background: var(--bg); color: var(--text-2); min-height: 100vh; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }

/* En-tête */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(6, 8, 19, 0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(22, 78, 99, 0.35); }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.brand-logo { width: 44px; height: 54px; flex: none; border-radius: 12px; overflow: hidden; background: var(--bg); border: 1px solid rgba(34, 211, 238, 0.4); box-shadow: 0 0 25px -5px rgba(56, 189, 248, 0.25); }
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-title { font-weight: 800; color: #fff; font-size: 1.05rem; letter-spacing: -0.01em; line-height: 1.2; }
.brand-sub { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
.topbar-right { display: none; align-items: center; gap: 10px; }
@media (min-width: 768px) { .topbar-right { display: flex; } }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; font-family: var(--mono); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--border); color: var(--text-2); background: var(--surface); white-space: nowrap; }
.chip strong { color: var(--text); font-weight: 600; }
.chip-accent { border-color: rgba(34, 211, 238, 0.4); background: rgba(8, 51, 68, 0.4); color: #67e8f9; }
.chip-indigo { border-color: rgba(129, 140, 248, 0.4); background: rgba(30, 27, 75, 0.45); color: #a5b4fc; }
.chip-good { border-color: rgba(52, 211, 153, 0.4); background: var(--good-dim); color: var(--good); }
.chip-warn { border-color: rgba(251, 191, 36, 0.4); background: var(--warn-dim); color: var(--warn); }
.chip-bad { border-color: rgba(251, 113, 133, 0.4); background: var(--bad-dim); color: var(--bad); }
.chip-muted { color: var(--muted); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* Bandeau */
.hero { position: relative; overflow: hidden; padding: 44px 0 28px; border-bottom: 1px solid rgba(22, 78, 99, 0.35); background: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(6, 182, 212, 0.16), rgba(255, 255, 255, 0)), var(--bg); }
.hero::after { content: ""; position: absolute; left: 50%; top: 20%; width: 800px; height: 360px; transform: translateX(-50%); background: linear-gradient(to top right, rgba(8, 145, 178, 0.10), rgba(99, 102, 241, 0.10), transparent); filter: blur(60px); pointer-events: none; }
.hero .container { position: relative; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; color: #fff; max-width: 820px; }
.hero h1 .gradient { background: linear-gradient(to right, #22d3ee, #7dd3fc, #818cf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin-top: 12px; max-width: 720px; color: var(--muted); font-size: 1rem; }
.hero p strong { color: var(--text-2); font-weight: 600; }

/* Tuiles */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 24px 0 8px; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--accent); }
.stat.indigo::before { background: var(--indigo); }
.stat.good::before { background: var(--good); }
.stat-label { font-size: 0.8rem; color: var(--muted); }
.stat-value { font-size: 2rem; font-weight: 600; color: #fff; line-height: 1.1; margin-top: 4px; letter-spacing: -0.02em; }
.stat.hero-figure .stat-value { font-size: 3rem; }
.stat-delta { font-size: 0.78rem; color: var(--muted); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Filtres */
.toolbar { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 20px 0 10px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
@media (min-width: 720px) { .toolbar { grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); } }
.toolbar label { display: flex; flex-direction: column; gap: 4px; font-size: 0.7rem; color: var(--faint); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.toolbar input, .toolbar select { font-family: var(--font); font-size: 0.92rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 12px; width: 100%; min-height: 40px; transition: border-color 0.2s; }
.toolbar select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2394a3b8' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.toolbar input::placeholder { color: var(--faint); }
.toolbar input:hover, .toolbar select:hover { border-color: #334155; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--accent-strong); outline: none; box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18); }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 18px; }
.meta-info { font-size: 0.85rem; color: var(--muted); }
.meta-info strong { color: var(--text-2); font-weight: 600; }
.view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle button { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 7px 12px; background: var(--surface); color: var(--muted); border: 0; cursor: pointer; }
.view-toggle button[aria-pressed="true"] { background: var(--accent-dim); color: #67e8f9; }

/* Sections par faction */
.faction { margin-bottom: 28px; }
.faction-head { position: sticky; top: 64px; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0 10px; margin-bottom: 12px; background: linear-gradient(to bottom, var(--bg) 70%, rgba(6, 8, 19, 0)); }
.faction-head h2 { font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.faction-head h2 .count { font-family: var(--mono); font-size: 0.75rem; font-weight: 600; color: var(--accent); background: var(--accent-dim); border: 1px solid rgba(34, 211, 238, 0.35); border-radius: 6px; padding: 2px 8px; }
.faction-sum { display: flex; flex-wrap: wrap; gap: 6px; }

/* Cartes */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; } }
.card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s; }
.card:hover { border-color: var(--border-accent); box-shadow: 0 0 30px -8px rgba(6, 182, 212, 0.25); transform: translateY(-2px); }
.card-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; border-radius: var(--radius-sm); background: radial-gradient(circle at top, var(--surface-3), var(--bg-deep)); border: 1px solid var(--border); overflow: hidden; padding: 8px; }
.card-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.no-image { font-size: 0.75rem; color: var(--faint); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.card-title { font-size: 0.92rem; font-weight: 600; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-title a { color: #fff; text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.price { font-family: var(--mono); font-size: 1.05rem; font-weight: 600; color: #fff; }

/* Tableau */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 48px; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 600; background: var(--surface-2); }
td { color: var(--text-2); }
td.num, th.num { text-align: right; }
td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
td.title-cell { white-space: normal; min-width: 260px; font-weight: 600; }
td.title-cell a { color: #fff; text-decoration: none; }
td.title-cell a:hover { color: var(--accent); }

/* États, boutons, pied de page */
.state { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty { border: 1px dashed var(--border); border-radius: var(--radius); margin-bottom: 48px; }
.btn { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-family: var(--font); font-weight: 600; font-size: 0.82rem; text-decoration: none; padding: 8px 14px; border-radius: var(--radius-sm); color: #67e8f9; background: var(--accent-dim); border: 1px solid rgba(34, 211, 238, 0.35); transition: background 0.2s, border-color 0.2s; }
.btn:hover { background: rgba(8, 145, 178, 0.32); border-color: rgba(34, 211, 238, 0.6); }
main { padding-bottom: 24px; }
footer { background: var(--bg-deep); border-top: 1px solid rgba(8, 51, 68, 0.6); padding: 32px 0 40px; color: var(--muted); font-size: 0.85rem; }
footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer .foot-brand { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
footer p { max-width: 640px; }
footer a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid rgba(34, 211, 238, 0.35); }
footer a:hover { color: #fff; border-bottom-color: var(--accent); }
.foot-links { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }

/* Téléphone : chiffres plus compacts pour tenir dans les tuiles */
@media (max-width: 480px) {
    .stat-value { font-size: 1.45rem; }
    .stat.hero-figure .stat-value { font-size: 2.2rem; }
    .card-title { min-height: 0; }
}
