/* ==========================================================================
   Copieur — feuille de style « terminal »

   Direction arrêtée le 2026-08-10 : rendu type TradingView / Coinbase
   Advanced. Ce qui a été retiré du thème précédent, et pourquoi :

   - le violet #6c4ff7 et le hero en gradient 135° : c'est la signature
     visuelle des interfaces générées par IA. Sur un produit qui touche à
     l'argent de quelqu'un, ça coûte de la crédibilité ;
   - les radius de 16-20 px et les cartes flottantes : un terminal se lit en
     grille, pas en bulles. Bordures 1 px, radius 4 px ;
   - les chiffres en police système : les glyphes n'ont pas la même largeur,
     donc un P&L qui se rafraîchit fait danser la colonne. Tous les nombres
     passent en chasse fixe tabulaire.

   Règle de couleur, tenue strictement : le vert et le rouge n'ont qu'un seul
   sens, celui du résultat (P&L, statut). Une action, un lien, un onglet actif
   n'ont jamais le droit de les prendre — sinon un montant en perte se lit
   comme un bouton.
   ========================================================================== */

:root {
  /* Surfaces — presque noir, écarts volontairement faibles : la hiérarchie
     est portée par les bordures, pas par des à-plats de plus en plus clairs. */
  --bg: #0a0a0b;
  --surface: #0f1013;
  --surface-2: #16181d;
  --line: #24262e;
  --line-strong: #32353f;

  --text: #e8e9ed;
  --muted: #7c808c;
  --muted-strong: #9a9ea9;

  /* Accent : actions, liens, état actif. Jamais un résultat. */
  --accent: #2e7df7;
  --accent-dim: rgba(46, 125, 247, .12);

  /* Résultat : P&L et statuts. Jamais une action. */
  --green: #16b364;
  --red: #e5484d;
  --amber: #d99930;
  --green-dim: rgba(22, 179, 100, .13);
  --red-dim: rgba(229, 72, 77, .13);

  --radius: 4px;
  --radius-sm: 3px;
  --tabbar-h: 58px;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", "Roboto Mono", Menlo,
          Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}

body {
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  min-height: 100dvh;
}

[hidden] { display: none !important; }

/* Chiffres : chasse fixe et largeur constante. C'est ce qui distingue une
   interface de trading d'une interface générique — une valeur qui se
   rafraîchit ne doit pas déplacer ce qui l'entoure. */
.num, .mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -.01em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ------------------------------------------------------------------- boot */
.boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  z-index: 50;
}
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ views */
.view { padding: 0 14px 28px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0 12px;
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  z-index: 5;
}
.topbar h1 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  letter-spacing: .01em;
}

/* Statut de connexion : une pastille et un mot, en chasse fixe. Pas de
   gélule colorée — l'information est binaire, elle n'a pas besoin d'un fond. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted-strong);
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
.badge-on  { color: var(--green); border-color: rgba(22, 179, 100, .3); }
.badge-off { color: var(--red);   border-color: rgba(229, 72, 77, .3); }

/* ------------------------------------------------------------------- hero */
/* Le chiffre qui compte, isolé. Fond plat, bordure 1 px, aucun dégradé. */
.hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 16px;
  margin-bottom: 10px;
}
.hero-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 32px;
  font-weight: 500;
  line-height: 1.1;
  margin-top: 8px;
  letter-spacing: -.02em;
}
.hero-sub { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Bandeau de chiffres secondaires. Le fond de la grille traverse par les
   interstices de 1 px : les séparateurs sont la grille elle-même. */
.stat-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}
.stat { background: var(--surface); padding: 11px 14px; min-width: 0; }
.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  font-weight: 600;
}
.stat-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 500;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------- sections */
.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 8px;
}
.section-note {
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--muted);
  opacity: .8;
}
.section-action {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  padding: 4px 0;
  cursor: pointer;
}

/* ------------------------------------------------------------------ lists */
.list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.list:empty { display: none; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 11px 14px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .12s ease-out;
}
.row:last-child { border-bottom: 0; }
.row:active { background: var(--surface-2); }
.row.static { cursor: default; }
.row.static:active { background: none; }

.row-main { flex: 1; min-width: 0; }
.row-title {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.row-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.row-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

/* Chevrons et signes : dessinés en masque SVG plutôt qu'en caractères
   typographiques (‹ › ✓ +), dont le rendu dépend de la police du système.
   Le masque prend currentColor, donc l'icône suit l'état de la ligne. */
.chev {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  font-size: 0;
  background-color: var(--muted);
  -webkit-mask: var(--icon) center / 16px 16px no-repeat;
  mask: var(--icon) center / 16px 16px no-repeat;
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
}
.chev-add {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
  background-color: var(--accent);
}
.chev-check {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-color: var(--green);
}

.pos { color: var(--green); }
.neg { color: var(--red); }

/* Sens de la position — délibérément neutre. Le colorer en vert/rouge, comme
   le font les terminaux, mettrait deux rouges de sens opposés sur la même
   ligne : « VENTE » en rouge à gauche, un P&L de −112,40 en rouge à droite.
   Le sens reste porté par le mot, la couleur reste réservée au résultat. */
.tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  color: var(--muted-strong);
  white-space: nowrap;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 2px 0;
  line-height: 1.5;
}

/* ----------------------------------------------------------------- tabbar */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
  background: var(--bg);
  border-top: 1px solid var(--line);
  z-index: 20;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: none;
  border: 0;
  border-top: 1px solid transparent;
  margin-top: -1px;
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
}
.tab svg { width: 19px; height: 19px; fill: currentColor; }
/* L'onglet actif est marqué par un trait haut, pas seulement par la couleur. */
.tab.active { color: var(--text); border-top-color: var(--accent); }

/* ----------------------------------------------------------------- sheets */
.sheet {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 30;
  overflow-y: auto;
  padding: 0 14px calc(var(--tabbar-h) + 40px);
  animation: slide .18s ease-out;
}
@keyframes slide { from { transform: translateX(12px); opacity: 0; } }

.sheet-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0 12px;
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  z-index: 2;
}
.sheet-head h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  flex: 1;
  text-align: center;
  letter-spacing: .01em;
}

.icon-btn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: background .12s ease-out;
}
.icon-btn:active { background: var(--surface-2); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.accent { color: var(--accent); border-color: rgba(46, 125, 247, .35); }
.icon-btn.ghost { background: none; border-color: transparent; pointer-events: none; }

.scope-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0 2px 14px;
  line-height: 1.5;
}

/* ------------------------------------------------------------------ panes */
.pane {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 10px;
}
.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
}
/* Valeur courante d'un réglage : lue comme un champ, pas comme un bouton. */
.pill {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text);
}
.divider { height: 1px; background: var(--line); margin: 16px -14px; }

.seg {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  gap: 3px;
  margin-top: 10px;
}
.seg.small { margin-top: 8px; }
.seg-btn {
  flex: 1;
  padding: 8px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .12s ease-out, color .12s ease-out;
}
.seg-btn.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--line-strong);
  outline: none;
  margin: 6px 0 0;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  background: var(--text);
  border: 0;
  cursor: pointer;
}
.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  background: var(--text);
  border: 0;
  cursor: pointer;
}
.slider-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}

.field { margin-top: 12px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 12px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px; /* sous 16 px, iOS zoome à la mise au point */
  font-family: inherit;
  transition: border-color .12s ease-out;
}
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--accent); }
/* Tout champ qui reçoit des chiffres passe en chasse fixe. */
.input[type="number"], .input[inputmode="numeric"], .input[type="tel"] {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.switch {
  appearance: none;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  position: relative;
  cursor: pointer;
  transition: background .16s ease-out, border-color .16s ease-out;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted-strong);
  transition: transform .16s ease-out, background .16s ease-out;
}
.switch:checked { background: var(--accent-dim); border-color: var(--accent); }
.switch:checked::after { transform: translateX(18px); background: var(--accent); }

.tp-split {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  margin-top: 4px;
}
.tp-cell { min-width: 0; }
.tp-cell label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 5px;
  font-weight: 600;
  letter-spacing: .06em;
}
.tp-cell input {
  width: 100%;
  padding: 10px 4px;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 500;
}
.tp-cell input:focus { outline: none; border-color: var(--accent); }

/* ---------------------------------------------------------------- buttons */
.btn-primary, .btn-secondary, .btn-danger {
  width: 100%;
  padding: 13px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: .01em;
  cursor: pointer;
  transition: opacity .12s ease-out, background .12s ease-out;
}
.btn-primary:active, .btn-secondary:active, .btn-danger:active { opacity: .75; }
.btn-primary  { background: var(--accent); color: #fff; }
.btn-secondary{ background: var(--surface); border-color: var(--line-strong); color: var(--text); }
/* Action destructrice : contour rouge, jamais un aplat — elle ne doit pas
   avoir plus de poids visuel que l'action principale de l'écran. */
.btn-danger   { background: none; border-color: rgba(229, 72, 77, .4); color: var(--red); }
.btn-primary[disabled], .btn-secondary[disabled], .btn-danger[disabled] {
  opacity: .4;
  cursor: default;
}
.sheet-actions { display: flex; gap: 8px; margin-top: 16px; }

/* -------------------------------------------------------------- link view */
.link-view { display: grid; place-items: center; min-height: 82dvh; }
.link-card { width: 100%; max-width: 360px; }
.link-card h1 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -.01em;
}
.muted { color: var(--muted); font-size: 13px; margin: 0 0 18px; line-height: 1.55; }
.link-card .input { margin-bottom: 10px; }
/* La clé de licence est une donnée, pas une phrase : chasse fixe et
   majuscules, pour que O et 0 se distinguent à la saisie. */
#key-input {
  font-family: var(--mono);
  text-align: center;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.link-card .btn-primary, .link-card .btn-secondary, .link-card .btn-danger { margin-top: 4px; }
.link-card .btn-secondary, .link-card .btn-danger { margin-top: 8px; }
.error {
  color: var(--red);
  font-size: 13px;
  margin-top: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(229, 72, 77, .3);
  border-radius: var(--radius);
  background: var(--red-dim);
}

/* -------------------------------------------------------------- trade body */
.trade-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 4px;
}
.kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); white-space: nowrap; }
.kv span:last-child {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------ toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 16px);
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  z-index: 60;
  max-width: 90vw;
  text-align: center;
}

/* --------------------------------------------- bandeau d'hébergement */
/* L'état du terminal est la première chose que le membre doit voir : tant
   qu'il n'est pas « running », rien de ce qui suit n'a de sens. */
.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left-width: 2px;
  border-radius: var(--radius);
}
.banner-main { min-width: 0; }
.banner-title { font-size: 13px; font-weight: 500; }
.banner-sub {
  margin-top: 1px;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.dot.ok      { background: var(--green); }
.dot.warn    { background: var(--amber); }
.dot.err     { background: var(--red); }
.dot.pending { background: var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* Le liseré gauche du bandeau reprend l'état : lisible d'un coup d'œil,
   sans dépendre de la seule pastille. */
.banner:has(.dot.ok)      { border-left-color: var(--green); }
.banner:has(.dot.warn)    { border-left-color: var(--amber); }
.banner:has(.dot.err)     { border-left-color: var(--red); }
.banner:has(.dot.pending) { border-left-color: var(--accent); }

/* ------------------------------------------------------------ mouvement */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Bandeau de suspension : le membre doit comprendre en une ligne pourquoi
   rien ne s'ouvre. Liseré rouge, comme les autres états d'alerte. */
.banner-halt { border-left-color: var(--red); }

/* ==========================================================================
   Performance — courbe, jauge, barres par canal

   Contrainte mesurée, pas supposée : entre le vert (#16b364) et le rouge
   (#e5484d), l'écart perçu en deutéranopie est de **ΔE 4,4** — sous le
   plancher de 6. Un lecteur daltonien ne distingue pas ces deux couleurs.
   Le vert/rouge est conservé (c'est la convention du métier, l'abandonner
   désorienterait plus qu'il n'aiderait), mais il ne porte JAMAIS seul
   l'information : partout où il apparaît, un signe (+/−), une position par
   rapport à zéro ou un libellé chiffré dit la même chose.
   ========================================================================== */

.curve-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px 8px;
  margin-bottom: 10px;
}
.curve {
  display: block;
  width: 100%;
  height: 72px;
  color: var(--muted-strong);
}
.curve.pos { color: var(--green); }
.curve.neg { color: var(--red); }

/* Ligne de données : 2 px réels malgré l'étirement du viewBox. */
.curve-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
/* Lavis, jamais un aplat saturé. */
.curve-area { fill: currentColor; opacity: .1; stroke: none; }
/* Le zéro est un repère, pas une donnée : filet plein, un cran au-dessus du
   fond. C'est lui qui rend « au-dessus / en dessous » lisible sans couleur. */
.curve-zero {
  stroke: var(--line-strong);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.curve-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}

/* --------------------------------------------------------------- jauge */
.meter-wrap { margin-bottom: 18px; }
.meter {
  display: flex;
  gap: 2px; /* le séparateur est du vide, pas un trait */
  height: 8px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.meter-win  { background: var(--green); }
.meter-loss { background: var(--red); }
.meter-legend {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  margin-top: 6px;
}

/* ------------------------------------------------------ barres par canal */
.chan-bar {
  height: 6px;
  margin-top: 6px;
  border-radius: var(--radius-sm);
  background: var(--muted-strong);
  min-width: 2px;
}
.chan-bar.pos { background: var(--green); }
.chan-bar.neg { background: var(--red); }
