/* AltScan — encre froide, accent ambre (funding), teal/rose pour long/short */
:root {
  --ink: #11151c;
  --panel: #1a2029;
  --panel-2: #202833;
  --line: #2a3340;
  --text: #e8edf2;
  --muted: #8c99a8;
  --long: #2dd4a7;
  --short: #f0689a;
  --amber: #f5b748;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; background: var(--ink); color: var(--text);
  font-family: Inter, system-ui, sans-serif; font-size: 14px;
}
a { color: inherit; text-decoration: none; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }

/* ------- Header ------- */
header {
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(17,21,28,.92);
  backdrop-filter: blur(8px); z-index: 10;
}
.logo {
  font-family: "Space Grotesk", sans-serif; font-size: 20px;
  font-weight: 700; letter-spacing: .02em;
}
.logo b { color: var(--amber); font-weight: 700; }
nav { display: flex; gap: 14px; }
nav a { color: var(--muted); padding: 4px 2px; border-bottom: 2px solid transparent; }
nav a.active, nav a:hover { color: var(--text); border-color: var(--amber); }
.spacer { flex: 1; }
.clock { color: var(--muted); font-size: 12px; }
.clock b { color: var(--text); }

/* ------- Stat strip ------- */
.stats {
  display: flex; gap: 12px; flex-wrap: wrap; padding: 14px 22px;
}
.stat {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 16px; min-width: 150px;
}
.stat .k { color: var(--muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: .08em; }
.stat .v { font-family: "Space Grotesk", sans-serif; font-size: 20px;
  font-weight: 600; margin-top: 2px; }

/* ------- Controls ------- */
.controls {
  display: flex; gap: 10px; align-items: center; padding: 0 22px 12px;
  flex-wrap: wrap;
}
input[type=search], select {
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px; font: inherit; outline: none;
}
input[type=search]:focus, select:focus { border-color: var(--amber); }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px;
  color: var(--muted); cursor: pointer; background: none; font: inherit;
}
.chip.on { color: var(--ink); background: var(--amber); border-color: var(--amber); font-weight: 600; }

/* ------- Table ------- */
.wrap { padding: 0 22px 40px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th {
  text-align: right; color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .07em; font-weight: 600;
  padding: 9px 10px; border-bottom: 1px solid var(--line);
  cursor: pointer; user-select: none; white-space: nowrap;
}
th:first-child, td:first-child { text-align: left; }
th.sorted { color: var(--amber); }
td {
  padding: 9px 10px; text-align: right; border-bottom: 1px solid #1c232e;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
tr.row { cursor: pointer; }
tr.row:hover { background: var(--panel); }
.sym { font-weight: 600; font-family: "Space Grotesk", sans-serif; }
.up { color: var(--long); } .dn { color: var(--short); }
.dim { color: var(--muted); }

/* Jauge funding bipolaire — élément signature */
.gauge {
  display: inline-flex; align-items: center; gap: 8px; min-width: 170px;
  justify-content: flex-end;
}
.gauge .bar {
  position: relative; width: 90px; height: 8px; border-radius: 4px;
  background: var(--panel-2); overflow: hidden;
}
.gauge .bar::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px; background: var(--line);
}
.gauge .fill { position: absolute; top: 0; bottom: 0; }
.gauge .fill.pos { left: 50%; background: var(--long); border-radius: 0 4px 4px 0; }
.gauge .fill.neg { right: 50%; background: var(--short); border-radius: 4px 0 0 4px; }
.gauge .fill.hot { background: var(--amber); }

.badge {
  display: inline-block; padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
}
.badge.long { background: rgba(45,212,167,.16); color: var(--long); }
.badge.short { background: rgba(240,104,154,.16); color: var(--short); }
.badge.watch { background: rgba(245,183,72,.14); color: var(--amber); }

.lsbar { display: inline-flex; width: 80px; height: 8px; border-radius: 4px; overflow: hidden; }
.lsbar i { display: block; height: 100%; }
.lsbar .l { background: var(--long); } .lsbar .s { background: var(--short); }

/* ------- Coin page ------- */
.coinhead { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding: 18px 22px 6px; }
.coinhead h1 { font-family: "Space Grotesk", sans-serif; margin: 0; font-size: 26px; }
.grid {
  display: grid; gap: 14px; padding: 14px 22px 40px;
  grid-template-columns: 2fr 1fr;
}
@media (max-width: 980px) { .grid { grid-template-columns: 1fr; } .gauge { min-width: 0; } }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
}
.card h2 {
  margin: 0 0 10px; font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
.chart { height: 380px; }
.subchart { height: 140px; }
.liqrow { display: grid; grid-template-columns: 80px 1fr 90px; gap: 8px;
  align-items: center; padding: 3px 0; font-size: 12px; }
.liqrow .bar { height: 8px; border-radius: 4px; }
.tbl { width: 100%; font-size: 12px; min-width: 0; }
.tbl td, .tbl th { padding: 5px 6px; }
.note { color: var(--muted); font-size: 11px; margin-top: 8px; line-height: 1.5; }
footer { padding: 14px 22px 30px; color: var(--muted); font-size: 11px;
  border-top: 1px solid var(--line); }
.empty { color: var(--muted); padding: 26px; text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  tr.row { transition: background .12s; }
}

/* --- v3 : flux / CVD / verdict (page coin) --- */
.verdict { margin: 14px 0 4px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--border, #2a3340); background: #141a22; }
.verdict .vlabel { font-family: "Space Grotesk", sans-serif; font-weight: 600;
  font-size: 16px; }
.verdict ul { margin: 8px 0 0; padding-left: 18px; }
.verdict li { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.verdict.danger { border-color: var(--short); background: rgba(240,104,154,.08); }
.verdict.danger .vlabel { color: var(--short); }
.verdict.good { border-color: var(--long); background: rgba(45,212,167,.08); }
.verdict.good .vlabel { color: var(--long); }
.verdict.warn { border-color: var(--amber); background: rgba(245,183,72,.08); }
.verdict.warn .vlabel { color: var(--amber); }
.verdict.neutral .vlabel { color: var(--text, #cdd6e0); }

.cvdlegend { display: flex; gap: 16px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.cvdlegend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px;
  margin-right: 5px; vertical-align: middle; }

.statrow { display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; border-bottom: 1px solid #1c232e; font-size: 13px; }
.statrow span { color: var(--muted); }
.statline { display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 8px 0; font-size: 12px; }
.tgauge { position: relative; flex: 1; max-width: 180px; height: 18px;
  background: #1c232e; border-radius: 9px; overflow: hidden; }
.tgauge .gfill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 9px; opacity: .85; }
.tgauge .glabel { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 10.5px; font-family: "JetBrains Mono", monospace; color: var(--ink, #0c0f14); font-weight: 600; }
