:root {
  --bg: #07080b;
  --bg-alt: #0c0e13;
  --surface: #10131a;
  --surface-hi: #161a24;
  --border: #1d2230;
  --border-hi: #2a3142;
  --text: #e4e7ef;
  --text-dim: #8c94a8;
  --text-faint: #5b6378;
  --accent: #6ee7b7;
  --accent-pos: #34d399;
  --accent-neg: #f87171;
  --accent-warn: #fbbf24;
  --accent-info: #60a5fa;
  --accent-violet: #a78bfa;
  --grad-pos: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(52, 211, 153, 0.04));
  --grad-neg: linear-gradient(135deg, rgba(248, 113, 113, 0.12), rgba(248, 113, 113, 0.04));
  --shadow-card: 0 1px 0 rgba(255,255,255,0.02), 0 8px 24px rgba(0,0,0,0.25);
  --radius: 12px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background: radial-gradient(ellipse at top, #0d1018 0%, var(--bg) 60%);
}

.bg-grid {
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(110,231,183,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110,231,183,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 10%, transparent 70%);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* ========= TOPBAR ========= */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(7, 8, 11, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 13px;
}
.brand-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: brandPulse 2.4s ease-in-out infinite;
}
@keyframes brandPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.brand-text { color: var(--text); }
.brand-text-dim { color: var(--text-faint); font-weight: 600; }

.topbar-nav {
  display: flex;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar-nav::-webkit-scrollbar { display: none; }

.nav-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.nav-btn:hover { color: var(--text); background: var(--surface); }
.nav-btn.active {
  color: var(--text);
  background: var(--surface-hi);
  border-color: var(--border-hi);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-pos);
  box-shadow: 0 0 8px var(--accent-pos);
  animation: livePulse 1.5s ease-in-out infinite;
}
.live-dot.stale { background: var(--accent-warn); box-shadow: 0 0 8px var(--accent-warn); }
.live-dot.error { background: var(--accent-neg); box-shadow: 0 0 8px var(--accent-neg); }
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ========= CONTENT ========= */
.content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

.view { display: none; animation: fadeIn 0.3s ease; }
.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========= HERO ========= */
.hero {
  margin-bottom: 28px;
  padding: 28px 0 8px;
}
.hero-line {
  font-size: clamp(20px, 3.2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}
.hero-sub {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-dim);
}
.hero-line .accent { color: var(--accent); }
.hero-line .pos { color: var(--accent-pos); }
.hero-line .neg { color: var(--accent-neg); }

/* ========= KPI ========= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.2s, transform 0.2s;
  cursor: default;
}
.kpi:hover { border-color: var(--border-hi); transform: translateY(-1px); }
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.kpi-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.kpi-value.pos { color: var(--accent-pos); }
.kpi-value.neg { color: var(--accent-neg); }
.kpi-hint {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-faint);
}
.kpi-primary {
  background: var(--grad-pos);
  border-color: rgba(52, 211, 153, 0.2);
}
.kpi-primary.neg {
  background: var(--grad-neg);
  border-color: rgba(248, 113, 113, 0.2);
}

/* ========= PANELS ========= */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.panel-wide { grid-column: span 2; }
@media (max-width: 900px) {
  .panel-wide { grid-column: span 1; }
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.panel-header h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.panel-sub {
  font-size: 11px;
  color: var(--text-faint);
  font-family: 'JetBrains Mono', monospace;
}
.panel-tabs { display: flex; gap: 4px; }
.tab-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--text);
  background: var(--surface-hi);
  border-color: var(--accent);
}
.icon-btn {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.icon-btn:hover { color: var(--text); background: var(--surface-hi); border-color: var(--border-hi); }

/* ========= CHART WRAP ========= */
.chart-wrap {
  position: relative;
  height: 260px;
  width: 100%;
}

/* ========= VERDICT LIST ========= */
.verdict-list {
  display: flex;
  flex-direction: column;
  max-height: 280px;
  overflow-y: auto;
}
.verdict-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.verdict-row:last-child { border-bottom: none; }
.verdict-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}
.verdict-badge.win { background: rgba(52, 211, 153, 0.15); color: var(--accent-pos); }
.verdict-badge.loss { background: rgba(248, 113, 113, 0.15); color: var(--accent-neg); }
.verdict-q {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.verdict-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
  text-align: right;
}
.verdict-meta .pnl.pos { color: var(--accent-pos); }
.verdict-meta .pnl.neg { color: var(--accent-neg); }

/* ========= CHAMPION LIST ========= */
.champion-list { display: flex; flex-direction: column; gap: 8px; }
.champion-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.champion-row:hover { border-color: var(--border-hi); }
.champion-rank {
  display: inline-flex;
  width: 28px; height: 28px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-hi);
  color: var(--text-dim);
}
.champion-row:first-child .champion-rank { background: rgba(251, 191, 36, 0.2); color: var(--accent-warn); }
.champion-row:nth-child(2) .champion-rank { background: rgba(226, 232, 240, 0.12); color: #e2e8f0; }
.champion-row:nth-child(3) .champion-rank { background: rgba(217, 119, 6, 0.15); color: #d97706; }
.champion-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.champion-id {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.champion-hypo {
  font-size: 11px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.champion-pnl {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
}
.champion-pnl.pos { color: var(--accent-pos); }
.champion-pnl.neg { color: var(--accent-neg); }

/* ========= ALERT LIST ========= */
.alert-list { display: flex; flex-direction: column; gap: 10px; }
.alert-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
}
.alert-row.warn { border-color: rgba(251, 191, 36, 0.3); }
.alert-row.danger { border-color: rgba(248, 113, 113, 0.3); }
.alert-row.info { border-color: rgba(96, 165, 250, 0.3); }
.alert-icon {
  font-size: 18px;
  line-height: 1;
}
.alert-text {
  font-size: 12px;
  color: var(--text);
  line-height: 1.55;
}
.alert-text strong { color: var(--accent); }

/* ========= MODELS TABLE ========= */
.models-table-wrap { overflow-x: auto; }
.models-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.models-table th,
.models-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.models-table th {
  color: var(--text-faint);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.models-table td.num,
.models-table th.num {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}
.models-table td:first-child {
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

/* ========= GENERIC DATA TABLE ========= */
.view-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.search {
  flex: 1;
  min-width: 240px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.15s;
}
.search:focus {
  outline: none;
  border-color: var(--accent);
}
.filter-group {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
}
.filter-label { color: var(--text-faint); font-size: 11px; }
.filter-group label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.filter-group input[type="checkbox"] { accent-color: var(--accent); }
.filter-group select {
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  max-height: calc(100vh - 260px);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.data-table thead {
  position: sticky; top: 0;
  background: var(--surface-hi);
  z-index: 2;
}
.data-table th,
.data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table th {
  color: var(--text-faint);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}
.data-table th:hover { color: var(--text); }
.data-table th.num,
.data-table td.num {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}
.data-table tbody tr:hover { background: var(--surface-hi); }
.data-table td.pos { color: var(--accent-pos); }
.data-table td.neg { color: var(--accent-neg); }
.data-table .pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.pill.BUY { background: rgba(96, 165, 250, 0.15); color: var(--accent-info); }
.pill.SELL { background: rgba(167, 139, 250, 0.15); color: var(--accent-violet); }
.pill.SETTLE { background: rgba(251, 191, 36, 0.15); color: var(--accent-warn); }
.pill.active { background: rgba(52, 211, 153, 0.15); color: var(--accent-pos); }
.pill.archived { background: var(--surface-hi); color: var(--text-faint); }

/* ========= STAT STRIP (markets view) ========= */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.stat-strip .stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.stat-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.stat-value {
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

/* ========= CONCENTRATION ========= */
.conc-big {
  font-family: 'JetBrains Mono', monospace;
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  margin: 20px 0 8px;
  color: var(--text);
}
.conc-label {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.conc-markets {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}
.conc-market {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}
.conc-market .q { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conc-market .share {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
}
.conc-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 3px;
  grid-column: 1 / -1;
}
.conc-bar-fill {
  height: 100%;
  background: var(--accent-info);
  border-radius: 2px;
}
.conc-bar-fill.warn { background: var(--accent-warn); }
.conc-bar-fill.danger { background: var(--accent-neg); }

/* ========= SIMULATED TOP-K (benchmark isolé) ========= */
.simulated-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 12px;
}
@media (max-width: 720px) {
  .simulated-body { grid-template-columns: 1fr; }
}
.sim-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.sim-card h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.sim-kpi {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.sim-kpi .lbl { color: var(--text-faint); font-size: 10px; letter-spacing: 0.05em; }
.sim-kpi .val { color: var(--text); font-weight: 600; font-size: 16px; margin-top: 2px; }
.sim-kpi .val.pos { color: var(--accent-pos); }
.sim-kpi .val.neg { color: var(--accent-neg); }
.sim-note {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
  padding-top: 8px;
}
.sim-topn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}
.sim-topn-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.sim-topn-row:last-child { border-bottom: none; }

/* ========= REPORT ========= */
.report-body {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  padding: 8px;
}

/* ========= FOOTER ========= */
.footer {
  max-width: 1440px;
  margin: 40px auto 24px;
  padding: 0 24px;
  font-size: 11px;
  color: var(--text-faint);
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.footer code {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
}
.dot-sep { color: var(--text-faint); }

/* ========= LOADING ========= */
.loading-row {
  padding: 20px 10px;
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
  font-style: italic;
}

/* ========= BOTTOM NAV (mobile only) ========= */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: rgba(7, 8, 11, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom)) 6px;
}
.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  max-width: 640px;
  margin: 0 auto;
}
.bottom-nav .nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  min-height: 48px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 8px;
  color: var(--text-faint);
  background: transparent;
  border: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav .nav-btn .nav-ico {
  font-size: 18px;
  line-height: 1;
}
.bottom-nav .nav-btn.active {
  color: var(--accent);
  background: rgba(110, 231, 183, 0.08);
}
.bottom-nav .nav-btn:active {
  transform: scale(0.94);
}

/* ========= RESPONSIVE — tablet ≤ 900px ========= */
@media (max-width: 900px) {
  .panel-wide { grid-column: span 1; }
  .content { padding: 20px 18px; }
}

/* ========= RESPONSIVE — phone ≤ 768px ========= */
@media (max-width: 768px) {
  html { font-size: 13px; }

  /* topbar : compact, on cache la nav top (remplacée par bottom-nav) */
  .topbar {
    padding: 10px 14px;
    padding-top: calc(10px + env(safe-area-inset-top));
    gap: 10px;
    justify-content: space-between;
  }
  .topbar-nav { display: none; }
  .topbar-meta { font-size: 10px; }
  .brand { font-size: 12px; }

  /* bottom nav devient visible */
  .bottom-nav { display: block; }

  /* main content : padding-bottom pour ne pas être masqué par la bottom nav */
  .content {
    padding: 16px 14px 100px;
    max-width: 100%;
  }
  body { padding-bottom: 0; }

  /* hero compact */
  .hero { padding: 12px 0 4px; margin-bottom: 16px; }
  .hero-line { font-size: 18px; line-height: 1.3; }
  .hero-sub { font-size: 12px; margin-top: 6px; }

  /* KPI : 2 colonnes, compact */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 18px;
  }
  .kpi { padding: 12px; }
  .kpi-label { font-size: 10px; margin-bottom: 6px; }
  .kpi-value { font-size: 18px; }
  .kpi-hint { font-size: 10px; margin-top: 4px; }

  /* panels stack + compact */
  .panel-grid { grid-template-columns: 1fr; gap: 12px; }
  .panel { padding: 14px; }
  .panel-header { margin-bottom: 10px; padding-bottom: 10px; }
  .panel-header h2 { font-size: 13px; }

  /* charts plus petits */
  .chart-wrap { height: 200px; }

  /* tables : forcer scroll horizontal tactile-friendly, sans max-height fixe */
  .table-wrap {
    max-height: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }
  .data-table { font-size: 11px; min-width: 560px; }
  .data-table th, .data-table td { padding: 8px 10px; }
  /* sticky première colonne (agent id / marché) sur mobile */
  .data-table th:first-child, .data-table td:first-child {
    position: sticky; left: 0;
    background: var(--surface);
    z-index: 1;
  }
  .data-table thead th:first-child { background: var(--surface-hi); }
  .data-table tbody tr:hover td:first-child { background: var(--surface-hi); }

  /* toolbar : full width, champs plus gros */
  .view-toolbar { gap: 8px; }
  .search {
    min-width: 0;
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
  }
  .filter-group {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
  }
  .filter-group select { padding: 8px 12px; min-height: 36px; }

  /* verdict / champion / alert : meta plus petite */
  .verdict-list { max-height: none; }
  .verdict-row { grid-template-columns: auto 1fr; grid-auto-rows: auto; }
  .verdict-meta { grid-column: 2 / 3; text-align: left; font-size: 11px; margin-top: 2px; }
  .verdict-badge { padding: 2px 6px; font-size: 9px; }

  .champion-row { padding: 8px; }
  .champion-rank { width: 24px; height: 24px; font-size: 11px; }
  .champion-id { font-size: 12px; }
  .champion-hypo { font-size: 10px; }
  .champion-pnl { font-size: 13px; }

  /* stat strip : 2 cols */
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-value { font-size: 15px; }

  /* concentration : plus petit */
  .conc-big { font-size: 32px; margin: 12px 0 6px; }

  /* simulated */
  .simulated-body { gap: 12px; padding-top: 8px; }
  .sim-card { padding: 12px; }
  .sim-kpi .val { font-size: 14px; }

  /* report */
  .report-body { font-size: 11px; max-height: none; }

  /* footer : invisible sur mobile (info dans bottom nav) */
  .footer { display: none; }

  /* touch targets : tout clickable passe à 40px+ */
  .tab-btn, .icon-btn { min-height: 32px; }
  .nav-btn { min-height: 40px; }
}

/* ========= RESPONSIVE — small phone ≤ 380px ========= */
@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
  .kpi { padding: 10px; }
  .kpi-value { font-size: 16px; }
  .bottom-nav .nav-btn { font-size: 9px; padding: 5px 1px; }
  .bottom-nav .nav-btn .nav-ico { font-size: 16px; }
  .hero-line { font-size: 16px; }
}

/* ========= MOTION — respect user preference ========= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========= FLASH ON UPDATE ========= */
@keyframes flashPos {
  0% { background: rgba(52, 211, 153, 0.15); }
  100% { background: transparent; }
}
@keyframes flashNeg {
  0% { background: rgba(248, 113, 113, 0.15); }
  100% { background: transparent; }
}
.flash-pos { animation: flashPos 1.2s ease-out; }
.flash-neg { animation: flashNeg 1.2s ease-out; }
