/* zevent.mortseb.com — feuille unique, thème sombre assumé : on regarde ça
   la nuit, à côté d'un stream. */

:root {
  --bg: #0a0b12;
  --bg-soft: #10121d;
  --panel: #0f111c;
  --line: #262a3d;
  --line-soft: #1d2032;
  --text: #eef0f8;
  --muted: #969ab5;
  --dim: #6d7191;
  --accent: #7c5cff;
  --accent-2: #22d3ee;
  --live: #ff3b5c;
  --up: #2ee27a;
  --gold: #ffc44d;
  --silver: #cbd3e3;
  --bronze: #d99259;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px -18px rgba(0,0,0,.9);
  --serie-1: #7c5cff;
  --serie-2: #22d3ee;
  --serie-3: #ffc44d;
  --serie-4: #ff7ac6;
  --serie-5: #6ee7a0;
  --serie-6: #ff9f5a;
}

* { box-sizing: border-box; }
/* Nos règles de classe l'emporteraient sur le display:none du navigateur. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 10% -12%, #221a4d 0%, transparent 60%),
    radial-gradient(820px 520px at 94% -4%, #0d3b45 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
main { padding: 22px 0 64px; }

/* ------------------------------------------------------------------ topbar */

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 11, 18, .8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar-inner { display: flex; align-items: center; gap: 18px; padding: 11px 0; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(140deg, var(--accent), #4b2fd6);
  font-weight: 800; font-size: 18px; box-shadow: 0 6px 18px -8px var(--accent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 16px; letter-spacing: -0.02em; }
.brand-text span { font-size: 12px; color: var(--muted); }

.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a {
  padding: 7px 14px; border-radius: 999px; text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--muted);
}
.nav a:hover { color: var(--text); background: #ffffff0a; }
.nav a.is-active { color: var(--text); background: #262a44; }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.status { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.dot[data-state="live"] { background: var(--up); animation: pulse 2.4s infinite; }
.dot[data-state="stale"] { background: var(--gold); }
.dot[data-state="down"] { background: var(--live); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46,226,122,.5); }
  70% { box-shadow: 0 0 0 8px rgba(46,226,122,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,226,122,0); }
}

/* ------------------------------------------------------------------ boutons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font: inherit; font-size: 14px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); border-color: #3a4060; }
.btn-primary { background: linear-gradient(135deg, var(--accent), #5b3ce6); border-color: transparent; box-shadow: 0 8px 22px -12px var(--accent); }
.btn-block { width: 100%; }
.btn.is-fav { color: var(--gold); border-color: #4a3d17; }

.chip {
  appearance: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line-soft); background: #0d0f1a; color: var(--muted);
  transition: color .12s, background .12s, border-color .12s;
}
.chip:hover:not(:disabled) { color: var(--text); }
.chip.is-active { background: #262a44; color: var(--text); border-color: #33385a; }
.chip:disabled { opacity: .4; cursor: default; }
.chip-live { color: var(--accent-2); border-color: #1d4a55; background: rgba(34,211,238,.1); }

.segmented { display: inline-flex; padding: 3px; gap: 2px; background: #0d0f1a; border: 1px solid var(--line-soft); border-radius: 999px; }
.segmented button {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  padding: 6px 13px; border-radius: 999px; transition: color .12s, background .12s;
}
.segmented button:hover { color: var(--text); }
.segmented button.is-active { background: #262a44; color: var(--text); }

input[type="search"], select {
  appearance: none; font: inherit; font-size: 14px; color: var(--text);
  background: #0d0f1a; border: 1px solid var(--line-soft); border-radius: 999px;
  padding: 8px 14px; min-width: 170px;
}
select {
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right 16px center, right 11px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------------- cartes */

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { font-size: 16px; }
.card-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* --------------------------------------------------------------- en-tête HP */

.hero { padding: 22px; border-color: #2a2a56; background: linear-gradient(160deg, rgba(124,92,255,.14), rgba(34,211,238,.05) 55%, transparent); }
.hero-top { display: grid; grid-template-columns: minmax(240px, 1.1fr) minmax(220px, 1fr) auto; gap: 24px; align-items: center; margin-bottom: 18px; }
.hero-total h1 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.hero-total .value {
  margin: 6px 0 4px; font-size: clamp(38px, 6vw, 62px); font-weight: 750; letter-spacing: -0.03em; line-height: 1;
  background: linear-gradient(100deg, #fff, #c3b6ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-total .sub { margin: 0; font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.delta { color: var(--up); font-weight: 700; background: rgba(46,226,122,.12); border-radius: 999px; padding: 2px 9px; animation: rise .5s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }

.hero-goal .goal-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.hero-goal .goal-head strong { font-size: 19px; color: var(--text); }
.gauge { height: 8px; border-radius: 999px; background: #1b1e30; overflow: hidden; }
.gauge i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .8s ease; }
.hero-goal .sub { margin: 8px 0 0; font-size: 13px; color: var(--dim); }

.hero-mini { display: flex; gap: 26px; margin: 0; }
.hero-mini dt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.hero-mini dd { margin: 4px 0 0; font-size: 21px; font-weight: 700; }

/* ---------------------------------------------------------------- graphique */

.chart-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.chart-host { position: relative; height: 320px; touch-action: none; }
.chart-host-lg { height: min(46vh, 420px); min-height: 280px; }
.chart-host-sm { height: 170px; margin: 12px 0; }
.chart { display: block; width: 100%; height: 100%; overflow: visible; cursor: crosshair; user-select: none; }
.chart.is-drag { cursor: grabbing; }
.chart .ax { fill: var(--dim); font-size: 11px; }
.chart line { stroke-width: 1; }

.chart-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; margin: 0; padding: 0 20px; color: var(--dim); font-size: 14px; pointer-events: none; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none;
  background: rgba(13, 15, 26, .97); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 11px; font-size: 13px; white-space: nowrap;
  box-shadow: 0 10px 30px -12px #000; transform: translate(-50%, -100%);
}
.chart-tip[data-cote="gauche"] { transform: translate(-100%, -100%); }
.chart-tip[data-cote="droite"] { transform: translate(0, -100%); }
.chart-tip .t { display: block; color: var(--dim); font-size: 12px; margin-bottom: 3px; }
.chart-tip .row { display: flex; align-items: center; gap: 7px; }
.chart-tip .row.muted { color: var(--muted); }
.chart-tip .swatch { width: 8px; height: 8px; border-radius: 2px; flex: none; }

.chart-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-hint { margin: 0; font-size: 12.5px; color: var(--dim); }

/* ------------------------------------------------------ choix des chaînes */

.selection { background: #0c0e18; border: 1px solid var(--line-soft); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.sel-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sel-head input[type="search"] { min-width: 200px; flex: 0 1 260px; }
.sel-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sel-count { margin: 0 0 0 auto; font-size: 12.5px; color: var(--dim); }
.sel-list {
  margin-top: 10px; max-height: 152px; overflow-y: auto; padding-right: 4px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 2px;
}
.sel-row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.sel-row:hover { background: #ffffff08; }
.sel-row.is-on { background: rgba(124, 92, 255, .15); }
.sel-row input { accent-color: var(--accent); flex: none; }
.sel-rang { color: var(--dim); font-size: 12px; min-width: 36px; }
.sel-nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-montant { color: var(--muted); white-space: nowrap; }

/* Période plus longue que ce que le serveur a en magasin. */
.segmented button.is-court { opacity: .45; }

/* ---------------------------------------------------------------- tendances */

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-3 .card { margin-bottom: 18px; }

.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.mini-list li { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 10px; cursor: pointer; }
.mini-list li:hover { background: #ffffff08; }
.mini-list li.vide { color: var(--dim); font-size: 13.5px; cursor: default; padding: 12px 6px; }
.mini-list img { width: 30px; height: 30px; border-radius: 50%; background: #222; object-fit: cover; flex: none; }
.mini-list .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.mini-list .val { font-weight: 700; font-size: 14px; white-space: nowrap; }
.mini-list .val.up { color: var(--up); }
.mini-list .val em { font-style: normal; font-weight: 500; color: var(--dim); font-size: 12.5px; }
.mini-list .pastille { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; flex: none; font-weight: 800; background: #1b1e30; }
.mini-list .pastille.or { color: var(--gold); background: rgba(255,196,77,.14); }
.milestones .val { color: var(--dim); font-weight: 500; }

/* ----------------------------------------------------------------- records */

.records { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.records dt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.records dd { margin: 6px 0 0; font-size: 19px; font-weight: 700; }

/* ------------------------------------------------------------------ podium */

.podium { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr); }
.podium li { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; cursor: pointer; transition: transform .12s, border-color .12s; }
.podium li:hover { transform: translateY(-2px); border-color: #3a4060; }
.podium img { width: 52px; height: 52px; border-radius: 50%; flex: none; background: #222; object-fit: cover; }
.podium .medal { font-size: 20px; font-weight: 800; width: 24px; text-align: center; flex: none; }
.podium li:nth-child(1) { border-color: #4a3d17; background: linear-gradient(140deg, rgba(255,196,77,.12), var(--panel) 60%); }
.podium li:nth-child(1) .medal { color: var(--gold); }
.podium li:nth-child(2) .medal { color: var(--silver); }
.podium li:nth-child(3) .medal { color: var(--bronze); }
.podium .who { min-width: 0; }
.podium .who strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .who span { font-size: 18px; font-weight: 700; color: var(--accent-2); }

/* ------------------------------------------------------------------- liste */

.list { display: flex; flex-direction: column; }
.row {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: 28px 38px 40px minmax(0, 1fr) auto auto auto;
  padding: 8px 6px; border-radius: 12px; border-bottom: 1px solid var(--line-soft);
  transition: background .12s;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: #ffffff08; }
.row .star { appearance: none; border: 0; background: none; cursor: pointer; color: #363b57; font-size: 17px; padding: 2px; line-height: 1; }
.row .star:hover { color: var(--gold); }
.row.is-fav .star { color: var(--gold); }
.row .rank { color: var(--dim); font-size: 13px; text-align: right; }
.row img { width: 40px; height: 40px; border-radius: 50%; background: #222; object-fit: cover; }
.row .who { min-width: 0; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.row .who strong { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .who .meta { font-size: 12.5px; color: var(--dim); display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .trend { font-size: 13px; font-weight: 600; min-width: 78px; text-align: right; }
.row .trend .up { color: var(--up); }
.row .amount { font-size: 15px; font-weight: 700; min-width: 92px; text-align: right; }
.row .viewers { font-size: 13px; color: var(--muted); min-width: 92px; text-align: right; }
.row.is-offline img { filter: grayscale(1); opacity: .55; }
.row.is-offline .who strong { color: var(--muted); }

.tag-live { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--live); background: rgba(255,59,92,.12); border-radius: 999px; padding: 1px 8px; flex: none; }
.tag-live::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--live); }
.empty { padding: 26px 8px; text-align: center; color: var(--dim); }

/* ------------------------------------------------------------------ tiroir */

.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(5,6,12,.72); backdrop-filter: blur(3px); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(470px, 100%); background: var(--bg-soft); border-left: 1px solid var(--line); padding: 24px; overflow-y: auto; animation: slide .22s ease; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-close { position: absolute; top: 14px; right: 14px; border: 0; background: none; color: var(--muted); font-size: 16px; cursor: pointer; padding: 6px; }
.drawer-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.drawer-head img { width: 72px; height: 72px; border-radius: 50%; background: #222; object-fit: cover; }
.drawer-head h3 { font-size: 20px; }
.drawer-head p { margin: 5px 0 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.drawer-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.drawer-stats div { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 12px; padding: 11px; }
.drawer-stats dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); margin: 0; }
.drawer-stats dd { margin: 5px 0 0; font-size: 16px; font-weight: 700; }
.drawer-serie { margin-top: 16px; }
.drawer-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ toasts */

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100% - 36px)); }
.toast {
  background: rgba(16,18,29,.97); border: 1px solid #33385a; border-left: 3px solid var(--gold);
  border-radius: 12px; padding: 11px 14px; font-size: 13.5px; box-shadow: 0 16px 40px -20px #000;
  animation: rise .3s ease;
}
.toast.sort { opacity: 0; transition: opacity .4s ease; }

/* ------------------------------------------------------------------- pied */

.footer { color: var(--dim); font-size: 13px; text-align: center; margin-top: 30px; }
.footer p { margin: 6px 0; }
.footer a { color: var(--muted); }

/* -------------------------------------------------------------- multi-vue */

.page-multi { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.multi { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 0; }
.players { display: flex; flex-direction: column; min-width: 0; padding: 14px 16px; position: relative; }
.multi-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

.grid { flex: 1; display: grid; gap: 10px; min-height: 0; overflow-y: auto; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); grid-auto-rows: minmax(170px, 1fr); }
.grid[data-cols="1"] { --n: 1; }
.grid[data-cols="2"] { --n: 2; }
.grid[data-cols="3"] { --n: 3; }

.player { display: flex; flex-direction: column; background: #000; border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; min-height: 0; }
.player-video { position: relative; flex: 1; min-height: 140px; background: #000; }
.player-video > div, .player-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-erreur { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 16px; color: var(--muted); font-size: 13px; }
.player-bar { display: flex; align-items: center; gap: 8px; padding: 7px 9px; background: var(--panel); border-top: 1px solid var(--line-soft); font-size: 12.5px; }
.player-bar button { appearance: none; border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; padding: 3px 5px; border-radius: 8px; }
.player-bar button:hover { color: var(--text); background: #ffffff10; }
.player-bar .p-nom { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar .p-stats { color: var(--dim); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar .p-solo { border: 1px solid var(--line-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.player-bar .p-vol { width: 74px; accent-color: var(--accent); }
.player.is-muet .p-son { color: var(--dim); }
.player.is-offline .player-video::after { content: "hors ligne"; position: absolute; inset: auto 8px 8px auto; font-size: 11px; color: var(--muted); background: #000a; padding: 2px 7px; border-radius: 999px; }
.multi-empty { position: absolute; inset: 60px 16px auto; text-align: center; color: var(--dim); }

.picker { border-left: 1px solid var(--line-soft); background: rgba(10,11,18,.6); display: flex; flex-direction: column; min-height: 0; }
.picker-head { padding: 14px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line-soft); }
.picker-head input[type="search"] { width: 100%; }
.picker-list { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.pick { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 8px; border-radius: 10px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.pick:hover { background: #ffffff0a; }
.pick.is-on { background: rgba(124,92,255,.16); }
.pick img { width: 32px; height: 32px; border-radius: 50%; background: #222; object-fit: cover; flex: none; }
.pick.is-offline img { filter: grayscale(1); opacity: .5; }
.pick-who { min-width: 0; flex: 1; }
.pick-who strong { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-who span { font-size: 12px; color: var(--dim); }
.pick-act { color: var(--muted); font-weight: 700; }

/* --------------------------------------------------------- carte des flux */

.page-carte { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.carte { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 336px; min-height: 0; }
.toile-hote { display: flex; flex-direction: column; min-width: 0; padding: 12px 14px; }
.carte-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }

.toile-cadre {
  position: relative; flex: 1; min-height: 0; overflow: hidden;
  border: 1px solid var(--line-soft); border-radius: 14px;
  background: radial-gradient(1200px 700px at 50% 40%, #12142200, #0a0b12 75%), #0b0c14;
}
#toile { display: block; touch-action: none; cursor: grab; }

.carte-tip {
  position: absolute; z-index: 4; pointer-events: none; max-width: 220px;
  background: rgba(13, 15, 26, .97); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 11px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 10px 30px -12px #000;
}
.carte-tip .muted { color: var(--dim); }
.carte-tip .up, .pan-chiffres .up { color: var(--up); }
.carte-tip .down, .pan-chiffres .down { color: var(--live); }

.carte-vide { position: absolute; left: 16px; right: 16px; bottom: 52px; margin: 0; text-align: center; color: var(--dim); font-size: 13.5px; pointer-events: none; }
.carte-legende {
  position: absolute; left: 12px; bottom: 10px; display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); background: rgba(10, 11, 18, .66);
  border: 1px solid var(--line-soft); border-radius: 999px; padding: 6px 12px; pointer-events: none;
}
.carte-legende span { display: inline-flex; align-items: center; gap: 6px; }
.carte-legende .pt { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
.carte-legende .pt.gros { width: 14px; height: 14px; }
.carte-legende .pt.chaud { background: #ff6b4a; }
.carte-legende .pt.froid { background: #22a5ee; }
.carte-legende .tr { width: 18px; height: 2px; background: rgba(150, 140, 255, .8); display: inline-block; border-radius: 2px; }
.carte-legende .tr.or { background: var(--gold); }

.curseur { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.curseur input { width: 96px; accent-color: var(--accent); }
.curseur output { color: var(--text); font-weight: 600; min-width: 18px; text-align: right; }

.panneau { border-left: 1px solid var(--line-soft); background: rgba(10, 11, 18, .55); overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 16px; }
.pan-bloc h2 { font-size: 14px; }
.pan-bloc h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin: 14px 0 6px; }
.pan-vide { color: var(--dim); font-size: 13px; margin: 6px 0 0; }
.pan-tete { display: flex; align-items: center; gap: 12px; }
.pan-tete img { width: 44px; height: 44px; border-radius: 50%; background: #222; object-fit: cover; }
.pan-tete h2 { font-size: 16px; }
.pan-tete p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pan-chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; }
.pan-chiffres div { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 10px; padding: 9px; }
.pan-chiffres dt { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.pan-chiffres dd { margin: 4px 0 0; font-size: 15px; font-weight: 700; }
.pan-flux, .raids { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.pan-flux li, .raids li { display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 8px; font-size: 13px; cursor: pointer; }
.pan-flux li:hover, .raids li:hover { background: #ffffff08; }
.pan-flux .nom, .raids .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pan-flux .val, .raids .val { color: var(--muted); font-weight: 600; white-space: nowrap; }
.pan-flux .val.up { color: var(--up); }
.raids .val em { font-style: normal; font-weight: 400; color: var(--dim); margin-left: 4px; }
.pan-actions { display: flex; gap: 8px; margin-top: 14px; }

.methode { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.methode summary { cursor: pointer; color: var(--text); font-weight: 600; font-size: 13px; }
.methode p, .methode ol { margin: 8px 0; }
.methode ol { padding-left: 18px; }
.methode li { margin: 4px 0; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .hero-top { grid-template-columns: 1fr 1fr; }
  .hero-mini { grid-column: span 2; }
  .grid-3 { grid-template-columns: 1fr; }
  .records { grid-template-columns: repeat(2, 1fr); }
  .multi { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 40%; }
  .picker { border-left: 0; border-top: 1px solid var(--line-soft); }
  .carte { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) 44%; }
  .panneau { border-left: 0; border-top: 1px solid var(--line-soft); }
}
@media (max-width: 720px) {
  .wrap { width: calc(100% - 24px); }
  .nav { order: 3; width: 100%; justify-content: center; }
  .topbar-right .status span:not(.dot) { display: none; }
  .hero-top { grid-template-columns: 1fr; gap: 16px; }
  .hero-mini { grid-column: auto; gap: 20px; }
  .podium { grid-template-columns: 1fr; }
  .records { grid-template-columns: 1fr 1fr; gap: 12px; }
  .row { grid-template-columns: 24px 32px 36px minmax(0, 1fr) auto; gap: 9px; }
  .row .viewers, .row .trend { display: none; }
  .chart-host-lg { height: 300px; }
  .controls { width: 100%; }
  input[type="search"] { flex: 1 1 100%; }
  .drawer-panel { padding: 20px 16px; }
  .drawer-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}
