/* ===================== Jetons ===================== */
:root {
  color-scheme: light;
  --page: #f4f3ef;
  --surface: #fcfcfb;
  --surface-2: #f0efeb;
  --surface-3: #e7e6e1;
  --border: rgba(11, 11, 11, 0.10);
  --border-strong: rgba(11, 11, 11, 0.20);
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #74726d;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --accent-soft: rgba(42, 120, 214, 0.12);
  --s1: #2a78d6;
  --s2: #eb6834;
  --s3: #1baf7a;
  --up: #006300;
  --down: #c23030;
  --up-mark: #0ca30c;
  --down-mark: #d03b3b;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --tile-up: #0b7a0b;
  --tile-down: #c03535;
  --tile-neutral: #e6e5e0;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --surface-2: #222220;
    --surface-3: #2c2c2a;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.20);
    --text: #f0efec;
    --text-2: #c3c2b7;
    --muted: #94928b;
    --grid: #2c2c2a;
    --axis: #45453f;
    --accent: #3987e5;
    --accent-ink: #86b6ef;
    --accent-soft: rgba(57, 135, 229, 0.16);
    --s1: #3987e5;
    --s2: #d95926;
    --s3: #199e70;
    --up: #2fbf3f;
    --down: #ef6b6b;
    --up-mark: #0ca30c;
    --down-mark: #e66767;
    --tile-neutral: #2a2a28;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #222220;
  --surface-3: #2c2c2a;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.20);
  --text: #f0efec;
  --text-2: #c3c2b7;
  --muted: #94928b;
  --grid: #2c2c2a;
  --axis: #45453f;
  --accent: #3987e5;
  --accent-ink: #86b6ef;
  --accent-soft: rgba(57, 135, 229, 0.16);
  --s1: #3987e5;
  --s2: #d95926;
  --s3: #199e70;
  --up: #2fbf3f;
  --down: #ef6b6b;
  --up-mark: #0ca30c;
  --down-mark: #e66767;
  --tile-neutral: #2a2a28;
  --shadow: none;
}

/* ===================== Base ===================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 15px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--muted); }
.note { color: var(--muted); font-size: 12px; margin-top: 12px; }

/* ===================== Barre du haut ===================== */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px; height: 56px;
  background: color-mix(in oklab, var(--page) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 16px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.brand b { font-weight: 700; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  position: relative; padding: 8px 12px; border-radius: 8px;
  color: var(--text-2); font-weight: 550; white-space: nowrap;
}
.tabs a:hover { background: var(--surface-2); text-decoration: none; color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -9px; height: 2px; background: var(--accent); border-radius: 2px; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; font-variant-numeric: tabular-nums; }
.clock span { font-weight: 650; font-size: 15px; }
.clock small { color: var(--muted); font-size: 11px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live.ok i { background: var(--good); box-shadow: 0 0 0 0 color-mix(in oklab, var(--good) 60%, transparent); animation: pulse 2s infinite; }
.live.err i { background: var(--critical); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--good) 55%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text-2); }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }

/* ===================== Bandeau défilant ===================== */
.tape { position: sticky; top: 56px; z-index: 20; overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--border); height: 36px; }
.tape-track { display: flex; width: max-content; height: 100%; align-items: center; animation: tape 90s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tape { overflow-x: auto; } .tape-track { animation: none; } }
.tape-item { display: inline-flex; align-items: baseline; gap: 8px; padding: 0 18px; border-right: 1px solid var(--border); font-size: 13px; white-space: nowrap; cursor: pointer; font-variant-numeric: tabular-nums; }
.tape-item b { font-weight: 600; color: var(--text-2); }

/* ===================== Mise en page ===================== */
main { max-width: 1480px; margin: 0 auto; padding: 20px 24px 32px; }
.view { display: flex; flex-direction: column; gap: 16px; }
.grid-live { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.col-main, .col-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col-side { position: sticky; top: 108px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card > h2 { margin-bottom: 12px; }
.pad { padding: 14px 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head.wrap { flex-wrap: wrap; }
.card-head.pad { margin: 0; }
.more { font-size: 12px; font-weight: 550; white-space: nowrap; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 4px 2px; }
.page-head .lead { max-width: 760px; margin-top: 6px; font-size: 15px; color: var(--text-2); }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.error { color: var(--muted); padding: 16px 0; }

/* ===================== Contrôles ===================== */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: 10px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--text-2); font-weight: 550; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.seg.small button { padding: 4px 10px; font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 4px 11px; font-size: 13px; cursor: pointer; color: var(--text-2); }
.chip-btn:hover { border-color: var(--border-strong); color: var(--text); }
.chip-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: color-mix(in oklab, var(--accent) 50%, transparent); color: var(--text); font-weight: 550; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 550; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.chip.open { color: var(--up); background: color-mix(in oklab, var(--good) 14%, transparent); }
.chip.closed { color: var(--muted); }
.chip.pause { color: var(--text-2); background: color-mix(in oklab, var(--warning) 18%, transparent); }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
input[type="search"], input[type="number"], input[type="text"] {
  border: 1px solid var(--border); background: var(--surface); border-radius: 9px; padding: 7px 11px; min-width: 0; width: 100%;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13px; cursor: pointer; white-space: nowrap; }
.check input, .toggles input { accent-color: var(--accent); }
.btn { border: 1px solid var(--border); background: var(--surface); border-radius: 9px; padding: 8px 14px; cursor: pointer; font-weight: 550; }
.btn:hover { border-color: var(--border-strong); }
.btn.wide { width: 100%; margin-top: 12px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.toolbar input[type="search"] { flex: 1 1 260px; }

/* ===================== Briefing ===================== */
.brief { padding: 16px 20px; background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--surface); }
.brief-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.brief-head h2 { font-size: 17px; }
.brief-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px 24px; }
.brief-item { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); }
.brief-item > span:first-child { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-2); font-size: 12px; }
.brief-item b { color: var(--text); font-weight: 600; }

/* ===================== Sessions ===================== */
.sessions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.session { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 3px; }
.session .name { font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.session .local { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 12px; }
.session .cd { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline { margin-top: 14px; position: relative; }
.tl-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tl-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; height: 22px; }
.tl-row .lbl { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track { position: relative; height: 10px; border-radius: 5px; background: var(--surface-2); }
.tl-bar { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: color-mix(in oklab, var(--accent) 45%, var(--surface-2)); }
.tl-bar.on { background: var(--accent); }
.tl-axis { position: relative; margin-left: 118px; height: 18px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-axis span { position: absolute; transform: translateX(-50%); top: 2px; }
.tl-now { position: absolute; top: 18px; bottom: 18px; width: 2px; background: var(--text); border-radius: 1px; pointer-events: none; }
.tl-now::before { content: "maintenant"; position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text-2); white-space: nowrap; }
.tl-overlay { position: absolute; top: 18px; bottom: 18px; background: color-mix(in oklab, var(--warning) 16%, transparent); border-left: 1px dashed color-mix(in oklab, var(--warning) 70%, transparent); border-right: 1px dashed color-mix(in oklab, var(--warning) 70%, transparent); pointer-events: none; }

/* ===================== Tableau des cours ===================== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 550; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.quotes tbody tr { cursor: pointer; }
.quotes tbody tr:hover { background: var(--surface-2); }
.quotes tbody tr[aria-selected="true"] { background: var(--accent-soft); }
.quotes td { font-variant-numeric: tabular-nums; }
.inst { display: flex; flex-direction: column; min-width: 140px; }
.inst b { font-weight: 600; }
.inst small { color: var(--muted); font-size: 11.5px; }
.inst-row { display: flex; align-items: center; gap: 8px; }
.rm { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; font-size: 15px; line-height: 1; }
.rm:hover { color: var(--down); background: var(--surface-3); }
.price { font-weight: 600; }
.pct { font-weight: 600; white-space: nowrap; }
.spark { display: block; }
.range { position: relative; width: 120px; height: 4px; background: var(--surface-3); border-radius: 2px; }
.range i { position: absolute; top: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--text-2); border: 2px solid var(--surface); transform: translateX(-50%); }
.range-lbl { display: flex; justify-content: space-between; width: 120px; font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.flash-up { animation: flashUp 1.2s; }
.flash-down { animation: flashDown 1.2s; }
@keyframes flashUp { from { background: color-mix(in oklab, var(--good) 22%, transparent); } }
@keyframes flashDown { from { background: color-mix(in oklab, var(--critical) 22%, transparent); } }
.search { position: relative; flex: 0 1 340px; }
.search-results { position: absolute; z-index: 25; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); max-height: 320px; overflow: auto; }
.search-results li { padding: 7px 10px; border-radius: 7px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
.search-results li:hover, .search-results li[aria-selected="true"] { background: var(--surface-2); }
.search-results small { color: var(--muted); white-space: nowrap; }

/* ===================== Graphique ===================== */
.chart-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chart-title h2 { font-size: 18px; }
.sym { color: var(--muted); font-size: 13px; }
.chart-price { display: flex; align-items: baseline; gap: 12px; margin-top: 4px; font-variant-numeric: tabular-nums; }
#chart-price { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
#chart-chg { font-size: 15px; font-weight: 600; }
.chart-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.toggles { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); }
.toggles label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-2); min-height: 18px; margin-bottom: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px) !important; }
.chart-box, .rsi-box, .curve-box { position: relative; width: 100%; }
.chart-box svg, .rsi-box svg, .curve-box svg { display: block; width: 100%; overflow: visible; }
.chart-box text, .rsi-box text, .curve-box text { font: 11px var(--font); fill: var(--muted); font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 9px 12px; }
.stat small { display: block; color: var(--muted); font-size: 11.5px; }
.stat b { font-weight: 600; font-variant-numeric: tabular-nums; }
.tooltip { position: fixed; z-index: 50; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); padding: 8px 10px; font-size: 12px; min-width: 150px; font-variant-numeric: tabular-nums; }
.tooltip .t { color: var(--muted); margin-bottom: 4px; }
.tooltip .r { display: flex; justify-content: space-between; gap: 14px; }
.tooltip .r span:first-child { color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.tooltip .r i { width: 10px; height: 3px; border-radius: 2px; }

/* ===================== Carte des performances ===================== */
.hm-group { margin-bottom: 12px; }
.hm-group:last-child { margin-bottom: 0; }
.hm-group h3 { font-size: 12px; color: var(--muted); font-weight: 550; margin-bottom: 6px; }
.hm-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 2px; }
.hm-tile { border: 0; text-align: left; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--text); background: var(--tile-neutral); min-height: 54px; display: flex; flex-direction: column; justify-content: space-between; }
.hm-tile:hover { outline: 2px solid var(--text); outline-offset: -2px; }
.hm-tile .n { font-size: 12px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-tile .v { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hm-tile.strong { color: #fff; }

/* ===================== Sentiment ===================== */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tiles.two { margin-top: 10px; }
.tile { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tile small { color: var(--muted); font-size: 11.5px; }
.tile .big { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tile .sub { font-size: 12px; color: var(--text-2); }
.tile.wide { grid-column: 1 / -1; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--st, var(--muted)); }
.status.good { --st: var(--good); }
.status.warning { --st: var(--warning); }
.status.serious { --st: var(--serious); }
.status.critical { --st: var(--critical); }
.gauge { position: relative; height: 6px; border-radius: 3px; margin-top: 6px; background: linear-gradient(90deg, var(--critical), var(--serious) 25%, var(--warning) 45%, var(--surface-3) 50%, color-mix(in oklab, var(--good) 60%, var(--surface-3)) 60%, var(--good)); }
.gauge.vix { background: linear-gradient(90deg, var(--good), var(--good) 28%, var(--warning) 42%, var(--serious) 62%, var(--critical)); }
.gauge i { position: absolute; top: -4px; width: 4px; height: 14px; border-radius: 2px; background: var(--text); transform: translateX(-50%); box-shadow: 0 0 0 2px var(--surface-2); }

/* ===================== Événements & news (mini) ===================== */
.events-mini, .news-mini { list-style: none; margin: 0; padding: 0; }
.events-mini li { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.events-mini li:last-child { border-bottom: 0; }
.events-mini .when { font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.events-mini .when small { display: block; color: var(--muted); font-size: 11px; }
.events-mini .ttl { font-size: 13px; line-height: 1.3; }
.events-mini .cd { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cur { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); margin-right: 6px; letter-spacing: 0.02em; }
.news-mini { max-height: 560px; overflow-y: auto; margin-right: -8px; padding-right: 8px; }
.news-mini li { padding: 9px 0; border-bottom: 1px solid var(--border); }
.news-mini li:last-child { border-bottom: 0; }
.news-mini a { color: var(--text); font-size: 13.5px; line-height: 1.35; font-weight: 500; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.meta .src { color: var(--text-2); font-weight: 600; }
.new-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; }
.urgent { color: var(--critical); font-weight: 700; letter-spacing: 0.02em; }

/* ===================== Actualités ===================== */
.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.news-layout > aside { position: sticky; top: 108px; }
.news-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.news-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; display: grid; grid-template-columns: 58px 1fr; gap: 14px; }
.news-item.is-new { border-color: color-mix(in oklab, var(--accent) 55%, transparent); }
.news-item .time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.news-item .time small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.news-item h3 a { color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.35; }
.news-item p { color: var(--text-2); font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.sources { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.sources li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.sources li:last-child { border-bottom: 0; }
.sources .ok { color: var(--up); }
.sources .ko { color: var(--down); }

/* ===================== Calendrier ===================== */
.next-banner { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; max-width: 520px; }
.next-banner b { font-variant-numeric: tabular-nums; }
.cal td { font-size: 13px; }
.cal .day td { background: var(--surface-2); font-weight: 650; font-size: 12.5px; color: var(--text-2); padding: 7px 10px; position: sticky; top: 0; }
.cal tr.past td:not(.dayc) { color: var(--muted); }
.cal tr.next-ev td { background: var(--accent-soft); }
.cal tr.clickable { cursor: pointer; }
.cal tr.clickable:hover td { background: var(--surface-2); }
.cal .t { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal .explain-row td { background: var(--surface-2); color: var(--text-2); font-size: 13px; padding: 10px 14px 12px 24px; }
.impact { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; white-space: nowrap; color: var(--text-2); }
.bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.bars i { width: 4px; border-radius: 1px; background: var(--surface-3); }
.bars i:nth-child(1) { height: 5px; } .bars i:nth-child(2) { height: 8px; } .bars i:nth-child(3) { height: 12px; }
.impact.High .bars i { background: var(--critical); }
.impact.Medium .bars i:nth-child(-n+2) { background: var(--serious); }
.impact.Low .bars i:nth-child(1) { background: var(--warning); }
.info { color: var(--accent-ink); font-size: 12px; margin-left: 4px; }

/* ===================== Macro ===================== */
.rates { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.rate { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.rate .bank { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rate .val { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 8px; }
.rate .val .cur { font-size: 10.5px; }
.rate .mv { font-size: 12px; color: var(--text-2); }
.macro td { font-variant-numeric: tabular-nums; font-size: 13px; }
.macro th[data-k] { cursor: pointer; user-select: none; }
.macro th[data-k]:hover { color: var(--text); }
.macro th[aria-sort="ascending"]::after { content: " ↑"; }
.macro th[aria-sort="descending"]::after { content: " ↓"; }
.macro sup { color: var(--muted); font-size: 10px; margin-left: 3px; }
.macro .bar-cell { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.macro .mbar { width: 48px; height: 6px; position: relative; background: var(--surface-2); border-radius: 3px; }
.macro .mbar i { position: absolute; top: 0; bottom: 0; border-radius: 3px; }
.explain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.explain b { color: var(--text); }

/* ===================== Académie ===================== */
.toc { display: flex; flex-wrap: wrap; gap: 6px; }
.toc a { padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-size: 13px; }
.toc a:hover { color: var(--text); border-color: var(--border-strong); text-decoration: none; }
.rules { margin: 0; padding-left: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; color: var(--text-2); }
.rules b { color: var(--text); }
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.calc label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; }
.results div { background: var(--surface-2); border-radius: 10px; padding: 9px 12px; }
.results dt { font-size: 11.5px; color: var(--muted); }
.results dd { margin: 0; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.results div.key { background: var(--accent-soft); }
.warn-box { margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: color-mix(in oklab, var(--warning) 16%, transparent); color: var(--text); font-size: 13px; }
.loss-table td { font-variant-numeric: tabular-nums; }
.loss-table .lbar { display: flex; align-items: center; gap: 10px; }
.loss-table .lbar i { height: 8px; border-radius: 0 4px 4px 0; background: var(--down-mark); min-width: 2px; }
.psy { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.psy > div { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.psy p { color: var(--text-2); font-size: 13px; margin-top: 4px; }
.psy .fix { color: var(--text); }
.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.progress i { display: block; height: 100%; background: var(--good); width: 0; transition: width 0.3s; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; color: var(--text-2); }
.checklist input { margin-top: 3px; accent-color: var(--good); width: 16px; height: 16px; flex: none; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }
.plan { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.plan b { color: var(--text); }
table.plain td { font-size: 13px; vertical-align: top; color: var(--text-2); }
table.plain td b { color: var(--text); }
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; margin: 0; }
.glossary div { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.glossary dt { font-weight: 650; }
.glossary dd { margin: 3px 0 0; color: var(--text-2); font-size: 13px; }
.card-head input[type="search"] { max-width: 260px; }
.disclaimer { border-color: color-mix(in oklab, var(--warning) 45%, transparent); }
.disclaimer p { color: var(--text-2); }

.footer { max-width: 1480px; margin: 0 auto; padding: 8px 24px 40px; font-size: 12px; color: var(--text-2); display: flex; flex-direction: column; gap: 4px; }

/* ===================== Responsive ===================== */
@media (max-width: 1180px) {
  .grid-live { grid-template-columns: 1fr; }
  .col-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col-side #live-news-card { grid-column: 1 / -1; }
  .news-layout { grid-template-columns: 1fr; }
  .news-layout > aside { position: static; }
}
@media (max-width: 860px) {
  .topbar { gap: 12px; padding: 0 16px; }
  .clock small, .live span { display: none; }
  .brand span { display: none; }
  main { padding: 16px 16px 28px; }
  .footer { padding: 8px 16px 32px; }
  .grid-2, .col-side { grid-template-columns: 1fr; }
  .rules { grid-template-columns: 1fr; }
  .hide-md { display: none; }
  .chart-controls { align-items: flex-start; }
}
@media (max-width: 560px) {
  h1 { font-size: 20px; }
  .hide-sm { display: none; }
  .clock { display: none; }
  .card { padding: 14px; }
  .tl-row { grid-template-columns: 80px 1fr; }
  .tl-axis { margin-left: 88px; }
  .news-item { grid-template-columns: 1fr; gap: 4px; }
  .news-item .time { display: flex; gap: 8px; align-items: baseline; }
  .tiles { grid-template-columns: 1fr 1fr; }
  #chart-price { font-size: 24px; }
  .inst { min-width: 110px; }
}
