/* Terminal de simulation : mise en page et composants propres au terminal.
   Composants de base (boutons, champs, tableaux, panneaux, toasts) : css/commun.css, partagé avec la page du pilote 1 $.
   Les jetons :root ci-dessous redéfinissent ceux de commun.css pour le terminal seulement (le pilote garde les siens).
   Palette, densité et disposition : relevé des notes de conception (captures 1280×720). Aucune marque reprise. */
@font-face { font-family: "Onest"; src: url("../assets/fonts/onest-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Big Shoulders Display"; src: url("../assets/fonts/big-shoulders-display-wght.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
/* Silkscreen : libellés SANS chiffre uniquement (0/O et 5/S se confondent) ; tout élément avec un chiffre reste en Onest ou Big Shoulders */
@font-face { font-family: "JetBrains Mono"; src: url("../assets/fonts/jetbrains-mono-latin-wght.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("../assets/fonts/silkscreen-400.woff2") format("woff2"); font-weight: 100 500; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("../assets/fonts/silkscreen-700.woff2") format("woff2"); font-weight: 600 900; font-display: swap; }

:root {
  --fond: #0a0b0d;
  --panneau: #0e0f12;
  --panneau-2: #16181c;
  --panneau-3: #1f2227;
  --champ: #1a1c21;          /* champs de saisie */
  --pill-actif: #2a2f36;     /* segment actif des contrôles en pilule */
  --accent-voile: rgba(59, 130, 246, .14);
  --bord: #1f2227;
  --bord-fort: #2a2e35;
  --texte: #f2f3f5;
  --texte-2: #9aa0a8;
  --texte-3: #5e646d;
  --texte-lbl: #8a9099;      /* micro-étiquettes en majuscules : plus lisibles que --texte-3 */
  --achat: #2ebd85;
  --vente: #e5484d;
  --achat-fond: #1c9a68;
  --vente-fond: #c93a40;
  --achat-voile: rgba(46, 189, 133, .14);
  --vente-voile: rgba(229, 72, 77, .14);
  --accent: #3b82f6;
  --accent-texte: #ffffff;
  --accent-voile: rgba(59, 130, 246, .14);
  --bleu: #3b82f6;
  --etoile: #f5b700;
  --plancher: #d9a53a;
  --alerte: #e3a03a;
  --alerte-voile: rgba(227, 160, 58, .14);
  --info: #3b82f6;
  --police: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --police-chiffres: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --chiffres-echelle: 1;
  --t-xs: 10px; --t-s: 11px; --t-m: 12px; --t-l: 13px; --t-xl: 16px; --t-xxl: 22px;
  --t-lbl: 11px; /* libellés gris en majuscules (10 px à la 1re passe du 27/11, trop petit) */
  --police-lbl: "JetBrains Mono", "Silkscreen", "Onest", system-ui, sans-serif;
  --police-hero: "Big Shoulders Display", Impact, "Arial Narrow", sans-serif;
  --btc: #f7931a;
  --r: 6px; --r-2: 0px; --r-pop: 10px;
  --h-tete-pn: 28px;
  --h-ligne: 26px;
  --h-champ: 28px;
  --h-entete: 52px;
  --l-rail: 30px;
  --h-nav: 56px;
  --pn-haut: calc(var(--h-entete) + 3px);
  --pn-bas: 3px;
  --ombre-pn: none;
  --ombre-pop: 0 20px 60px rgba(0, 0, 0, .6);
  --anim: 180ms cubic-bezier(.2, .7, .2, 1);
}
html, body { height: 100%; }
body { display: flex; flex-direction: column; overflow: hidden; font-size: var(--t-s); font-feature-settings: "tnum" 1; }
h1, h2 { margin: 0; font-weight: 600; }
.m, .chiffre { font-variant-numeric: tabular-nums; }
svg { flex: none; }
.btn-accent:hover:not(:disabled) { background: #5b96f7; border-color: #5b96f7; color: #fff; }
.lbl-maj, .champ > label, .lbl { font-size: var(--t-lbl); text-transform: uppercase; letter-spacing: .05em; font-weight: 500; color: var(--texte-3); }

/* ---------- barre du haut ---------- */
.entete {
  flex: none; height: var(--h-entete); display: flex; align-items: center; gap: 8px; padding: 0 8px 0 6px;
  background: #0d1014; border-bottom: 1px solid var(--bord); min-width: 0; position: relative; z-index: 20;
}
.logo { display: flex; align-items: center; gap: 7px; flex: none; padding-right: 4px; }
.logo svg { width: 20px; height: 20px; fill: none; stroke: var(--texte); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.logo svg rect { fill: var(--panneau-3); stroke: none; }
.nom-firme { font-weight: 700; font-size: var(--t-m); letter-spacing: .01em; color: var(--texte); }
.btn-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: var(--r); background: none; color: var(--texte-2); }
.btn-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.btn-ic:hover { color: var(--texte); background: var(--panneau-2); }
.pastille-marche {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 5px; flex: none;
  background: var(--panneau-2); border: 1px solid var(--bord); border-radius: var(--r-2); color: var(--texte);
}
.pastille-marche:hover { border-color: var(--bord-fort); }
.pastille-marche b { font-size: var(--t-l); font-weight: 600; }
.tag { display: inline-flex; align-items: center; height: 16px; padding: 0 5px; border-radius: 3px; background: var(--panneau-3); color: var(--texte-2); font-size: var(--t-xs); font-weight: 500; font-variant-numeric: tabular-nums; }
.tag-marge { background: var(--accent-voile); color: #8db6fa; }
.chev { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.4; color: var(--texte-3); }
.etoile-fav { background: none; border: 0; padding: 0 2px; font-size: 14px; line-height: 1; color: var(--texte-3); cursor: pointer; }
.etoile-fav[aria-pressed="true"] { color: var(--etoile); }
.etoile-fav:hover { color: var(--etoile); }
.entete .etoile-fav { width: 24px; height: 28px; }
.prix-milieu { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 0 10px; border-left: 1px solid var(--bord); min-width: 0; flex: none; }
.prix-milieu small { font-size: var(--t-lbl); color: var(--texte-3); text-transform: uppercase; letter-spacing: .05em; line-height: 1; }
.prix-milieu div { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; line-height: 1.2; }
.px-vif { font-size: var(--t-l); font-weight: 600; font-variant-numeric: tabular-nums; transition: color 300ms; }
.prix-milieu .var { font-size: var(--t-xs); color: var(--texte-3); font-variant-numeric: tabular-nums; }
.prix-milieu .var.gain { color: var(--achat); } .prix-milieu .var.perte { color: var(--vente); }
.prix-milieu .m { font-size: var(--t-xs); color: var(--texte-2); }
.outils-entete { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.connexion { display: flex; align-items: center; gap: 5px; font-size: var(--t-xs); color: var(--texte-3); padding-right: 4px; font-variant-numeric: tabular-nums; }
.connexion i { width: 6px; height: 6px; border-radius: 50%; background: var(--alerte); }
.connexion[data-etat="ouvert"] i { background: var(--achat); }
.connexion[data-etat="ferme"] i { background: var(--vente); }
.btn-dispo { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; background: none; border: 1px solid transparent; border-radius: var(--r); color: var(--texte); font-size: var(--t-s); }
.btn-dispo:hover { background: var(--panneau-2); }
.btn-dispo b { font-weight: 500; }
.solde-boite { display: flex; flex-direction: column; justify-content: center; gap: 1px; height: 30px; padding: 0 10px; border: 1px solid var(--bord); border-radius: var(--r-2); background: var(--panneau); line-height: 1.1; min-width: 92px; }
.solde-boite span { font-family: var(--police-chiffres); font-size: calc(var(--t-s) * var(--chiffres-echelle)); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.solde-boite small.sb-lib { font-size: 9px; letter-spacing: .04em; text-transform: uppercase; color: var(--texte-3); }
.sb-equity { margin-left: -2px; }
.pastille-compte { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 6px; border: 1px solid var(--bord); border-radius: 14px; background: var(--panneau-2); color: var(--texte); font-size: var(--t-s); max-width: 210px; }
.pastille-compte:hover { border-color: var(--bord-fort); }
.pastille-compte > svg:first-child { width: 16px; height: 16px; fill: none; stroke: var(--texte-2); stroke-width: 1.4; }
.pastille-compte span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-statut { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--achat); }
.pt-statut[data-statut="echoue"], .pt-statut[data-statut="clos"] { background: var(--vente); }
.pt-statut[data-statut="reussie_attente"] { background: var(--bleu); }
.pt-statut[data-statut="suspendu"], .pt-statut[data-statut="abandonne"] { background: var(--texte-3); }

/* jeton rond (icône générique du marché) */
.jeton { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; font-size: 10px; font-weight: 700; color: #fff; background: #f7931a; line-height: 1; }
.jeton[data-j="SOL"] { background: linear-gradient(135deg, #9945ff, #14f195); }
.jeton.ico { background: none; overflow: hidden; }
.jeton.ico img { width: 100%; height: 100%; display: block; }
.mk { display: inline-flex; align-items: center; gap: 5px; }
.mk .jeton { width: 14px; height: 14px; font-size: 8px; }
.mk b { font-weight: 600; font-family: var(--police); }

/* menu du compte */
.menu-compte { width: 250px; }
.mc-tete { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 4px; }
.badge-phase { font-size: var(--t-xs); padding: 1px 7px; border-radius: 9px; background: var(--panneau-3); color: var(--texte-2); }
[data-phase="finance"] .badge-phase { background: var(--accent-voile); color: #8db6fa; }
.sel-compte { display: block; width: calc(100% - 16px); margin: 2px 8px 6px; background: var(--panneau); color: var(--texte); border: 1px solid var(--bord-fort); border-radius: var(--r); padding: 4px; font-size: var(--t-s); }
.mc-stats { margin: 0 8px 4px; padding-bottom: 6px; border-bottom: 1px solid var(--bord); display: grid; gap: 2px; }
.mc-stats div { display: flex; justify-content: space-between; font-size: var(--t-xs); }
.mc-stats dt { color: var(--texte-3); } .mc-stats dd { margin: 0; font-variant-numeric: tabular-nums; }
.menu-ctx kbd, .menu-ctx small { color: var(--texte-3); font-size: var(--t-xs); font-family: var(--police); }

/* ---------- corps : rail + espace de travail ou vue ---------- */
.corps-app { flex: 1 1 auto; min-height: 0; display: flex; }
.rail { flex: none; width: var(--l-rail); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; background: #0d1014; border-right: 1px solid var(--bord); }
.rail button { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: var(--r); background: none; color: var(--texte-3); font-size: 10px; letter-spacing: -1px; }
.rail button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rail button:hover { color: var(--texte); background: var(--panneau-2); }
.rail button[aria-current="true"] { color: var(--texte); background: #1e232b; }
.rail .rail-bas { margin-top: auto; }
.espace { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; padding: 0; scrollbar-width: thin; }
body:not([data-ecran="trading"]) .espace { display: none; }
.pn-corps.colonne { display: flex; flex-direction: column; }
.pn.pn-max { left: calc(var(--l-rail) + 3px) !important; right: 3px !important; }

/* ---------- panneaux : en-tête en onglets ---------- */
.pn-cadre { border-radius: var(--r-2); }
.pn-tete { height: var(--h-tete-pn); padding: 0 3px 0 0; gap: 0; background: var(--panneau); }
.pn-titre.pn-onglet, .pn-tete .onglets [role="tab"] {
  align-self: stretch; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 0 8px 0 10px;
  font-size: var(--t-s); font-weight: 500; color: var(--texte); overflow: visible; border-right: 1px solid var(--bord);
}
.pn-titre.pn-onglet { background: var(--panneau-2); box-shadow: inset 0 -1px 0 var(--panneau-2); }
.pn-onglet-x { display: grid; place-items: center; width: 14px; height: 14px; padding: 0; border: 0; border-radius: 3px; background: none; color: var(--texte-3); font-size: 12px; line-height: 1; }
.pn-onglet-x:hover { color: var(--texte); background: var(--panneau-3); }
.pn-tete .onglets { margin-left: 0; flex: 0 1 auto; }
.pn-tete .onglets [role="tab"] { border-bottom: 0; color: var(--texte-3); padding: 0 10px; }
.pn-tete .onglets [role="tab"]:hover { color: var(--texte); }
.pn-tete .onglets [role="tab"][aria-selected="true"] { color: var(--texte); background: var(--panneau-2); }
.onglets [role="tab"][aria-selected="true"] { border-bottom-color: transparent; }
.cpt { font-size: var(--t-xs); color: var(--texte-3); margin-left: 2px; font-variant-numeric: tabular-nums; }
.pn-ajout { align-self: center; display: grid; place-items: center; width: 20px; height: 20px; margin-left: 4px; padding: 0; border: 0; border-radius: var(--r); background: none; color: var(--texte-3); font-size: 15px; line-height: 1; }
.pn-ajout:hover { color: var(--texte); background: var(--panneau-3); }
.pn-tete .pn-plus { gap: 4px; padding-left: 6px; }
.pn-tete .sous { font-size: var(--t-xs); }
.pn-b { width: 20px; height: 20px; }
.pn-b svg { width: 13px; height: 13px; }
/* À droite : agrandir (+ réglages selon le panneau). Fermer passe par le « × » de l'onglet ; replier est retiré (absent de la référence). */
[data-mode="bureau"] .pn-outils [data-pn-action="replier"] { display: none; }
.pn:has(.pn-onglet) .pn-outils [data-pn-action="fermer"] { display: none; }
.pn-corps { padding: 8px 10px; }
.btn { min-height: 22px; padding: 2px 8px; font-size: var(--t-xs); }
.btn-petit { min-height: 20px; padding: 1px 7px; }
.seg { border-radius: var(--r); }
.seg button { font-size: var(--t-xs); padding: 3px 6px; }
.liste-titre { font-size: var(--t-lbl); }

/* ---------- ticket d'ordre ---------- */
.ticket { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; }
.tk-haut { display: grid; grid-template-columns: 1fr 104px; gap: 6px; }
.seg-cote { padding: 2px; background: var(--panneau-2); }
.seg-cote button { padding: 4px 4px; font-size: var(--t-s); font-weight: 500; color: var(--texte-3); }
/* onglet actif : fond gris, texte coloré (vert achat, rouge vente) */
.seg-cote button[data-cote="achat"][aria-checked="true"] { background: var(--panneau-3); color: var(--achat); }
.seg-cote button[data-cote="vente"][aria-checked="true"] { background: var(--panneau-3); color: var(--vente); }
.sel { position: relative; }
.sel select { width: 100%; height: 100%; min-height: 26px; appearance: none; background: var(--panneau-2); border: 1px solid var(--bord); border-radius: var(--r); color: var(--texte); padding: 0 22px 0 8px; font-size: var(--t-s); cursor: pointer; }
.sel::after { content: ""; position: absolute; right: 9px; top: 50%; width: 5px; height: 5px; border: solid var(--texte-3); border-width: 0 1.4px 1.4px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.sel select:hover { border-color: var(--bord-fort); }
.tk-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: var(--t-xs); color: var(--texte-3); line-height: 16px; }
.tk-ligne b { font-weight: 500; color: var(--texte); font-variant-numeric: tabular-nums; }
.tk-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.champ > label { margin-bottom: 2px; }
.saisie { min-height: var(--h-champ); }
.saisie:focus-within { border-color: var(--bleu); }
.saisie input { padding: 3px 8px; font-size: var(--t-s); font-variant-numeric: tabular-nums; }
.suffixe { font-size: var(--t-xs); padding: 0 7px; border-left: 0; font-family: var(--police); }
.tk-pct { display: grid; grid-template-columns: 1fr 34px; align-items: center; gap: 8px; }
.tk-pct .m { font-size: var(--t-xs); color: var(--texte-2); text-align: right; }
.tk-cases { display: flex; gap: 14px; }
.case { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-xs); white-space: nowrap; color: var(--texte-2); }
.case input { accent-color: var(--bleu); width: 12px; height: 12px; }
.tpsl { display: grid; grid-template-columns: 1fr 74px; gap: 5px 6px; }
.tpsl .tk-pnl { grid-column: 1 / -1; }
.tk-pnl b { font-weight: 500; }
.btn-plein { min-height: 30px; padding: 6px 10px; font-size: var(--t-s); border-radius: var(--r); }
.btn-envoyer { margin-top: 2px; }
.btn-plein.achat { background: var(--achat-fond); } .btn-plein.vente { background: var(--vente-fond); }
.alerte-risque { font-size: var(--t-xs); color: var(--alerte); background: var(--alerte-voile); border-radius: var(--r); padding: 4px 7px; }
.details { margin: 0; display: grid; gap: 1px; }
.details div { display: flex; justify-content: space-between; gap: 8px; font-size: var(--t-xs); color: var(--texte-3); line-height: 15px; }
.details dd { margin: 0; color: var(--texte-2); text-align: right; font-variant-numeric: tabular-nums; }
.conv { font-size: var(--t-xs); color: var(--texte-3); margin-top: 2px; min-height: 1.2em; }
.conv.gain { color: var(--achat); } .conv.perte { color: var(--vente); }

/* curseurs : piste fine, partie remplie, poignée ronde */
.curseur { --v: 0%; appearance: none; -webkit-appearance: none; width: 100%; height: 14px; margin: 0; background: transparent; cursor: pointer; }
.curseur::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--c, var(--texte-2)) var(--v), var(--panneau-3) var(--v)); }
.curseur::-moz-range-track { height: 3px; border-radius: 2px; background: linear-gradient(to right, var(--c, var(--texte-2)) var(--v), var(--panneau-3) var(--v)); }
.curseur::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4px; border-radius: 50%; background: var(--texte); border: 2px solid var(--c, var(--texte-2)); }
.curseur::-moz-range-thumb { width: 8px; height: 8px; border-radius: 50%; background: var(--texte); border: 2px solid var(--c, var(--texte-2)); }
.curseur-levier { --c: var(--achat); }
[data-cote="vente"] .curseur { --c: var(--vente); }
[data-cote="achat"] #t-pct { --c: var(--achat); }

/* ---------- graphique ---------- */
.pn-graphique .pn-corps { background: var(--panneau); }
.gr-barre { flex: none; display: flex; align-items: center; gap: 2px; height: 28px; padding: 0 6px; border-bottom: 1px solid var(--bord); min-width: 0; overflow: hidden; }
.gr-barre .sep { flex: none; width: 1px; height: 14px; background: var(--bord); margin: 0 4px; }
.seg-iv { background: none; border: 0; padding: 0; gap: 0; }
.seg-iv button { flex: none; padding: 2px 6px; font-size: var(--t-xs); color: var(--texte-3); border-radius: 3px; }
.seg-iv button[aria-checked="true"] { background: none; color: var(--bleu); font-weight: 600; }
.gb { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 6px; border: 0; border-radius: var(--r); background: none; color: var(--texte-2); font-size: var(--t-xs); white-space: nowrap; flex: none; }
.gb svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.gb:hover { color: var(--texte); background: var(--panneau-2); }
.gb[aria-pressed="true"] { color: var(--bleu); }
.recents { display: flex; gap: 2px; min-width: 0; overflow: hidden; }
.recents button { flex: none; height: 20px; padding: 0 6px; border: 1px solid var(--bord); border-radius: 3px; background: none; color: var(--texte-3); font-size: var(--t-xs); }
.recents button[aria-pressed="true"] { color: var(--texte); border-color: var(--bord-fort); background: var(--panneau-2); }
.gb-fin { margin-left: auto; display: flex; gap: 2px; flex: none; }
.gr-milieu { flex: 1 1 auto; min-height: 0; display: flex; }
.gr-outils { flex: none; width: 34px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0; border-right: 1px solid var(--bord); overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
.gr-outils button { display: grid; place-items: center; width: 28px; height: 28px; flex: none; padding: 0; border: 0; border-radius: var(--r); background: none; color: var(--texte-3); }
.gr-outils svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.gr-outils button:hover { color: var(--texte); background: var(--panneau-2); }
.gr-outils button[aria-pressed="true"] { color: var(--bleu); background: var(--accent-voile); }
.gr-outils .sep-h { flex: none; width: 18px; height: 1px; background: var(--bord); margin: 3px 0; }
.gr-outils [data-cmd="effacer"]:hover { color: var(--vente); }
.gr-dessin[data-outil="gomme"] { cursor: cell; }
.zone-graphique { position: relative; flex: 1; min-width: 0; min-height: 0; }
.graphique { position: absolute; inset: 0; }
.graphique.sur-ligne, .graphique.glisse { cursor: ns-resize; }
.gr-legende { position: absolute; top: 4px; left: 8px; z-index: 4; display: flex; align-items: baseline; gap: 6px; font-size: var(--t-xs); pointer-events: none; white-space: nowrap; }
.gr-legende b { font-size: var(--t-s); font-weight: 600; }
#lg-ohlc { display: flex; gap: 7px; color: var(--texte-3); font-variant-numeric: tabular-nums; }
#lg-ohlc i { font-style: normal; }
.gr-dessin { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; }
.gr-dessin[data-outil]:not([data-outil="curseur"]) { cursor: crosshair; }
.gr-calque { position: absolute; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
/* zones TP (vert) / SL (rouge) entre l'entrée et le niveau */
.gr-zone { position: absolute; left: 0; top: 0; pointer-events: none; background: color-mix(in srgb, var(--c) 16%, transparent); border-block: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.gr-zone.apercu { background: color-mix(in srgb, var(--c) 9%, transparent); }
/* étiquettes d'ordres : pleines, à gauche, badge de taille et croix */
.gr-tag {
  position: absolute; left: 6px; top: 0; display: flex; align-items: stretch; height: 18px; pointer-events: auto;
  background: var(--f, var(--c)); border-radius: 3px; color: #fff; font-size: var(--t-xs); font-weight: 500;
  white-space: nowrap; will-change: transform; overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
.gr-lib { display: flex; align-items: center; padding: 0 6px; font-variant-numeric: tabular-nums; }
.gr-badge { display: flex; align-items: center; padding: 0 5px; background: rgba(0, 0, 0, .28); font-variant-numeric: tabular-nums; }
.gr-tag.deplacable { cursor: ns-resize; }
.gr-tag.attente { opacity: .6; }
.gr-tag.apercu { background: var(--panneau-3); color: var(--texte); outline: 1px dashed var(--c); outline-offset: -1px; }
.gr-tag.poignee { background: var(--panneau-2); color: var(--c); box-shadow: inset 0 0 0 1px var(--c), 0 1px 3px rgba(0, 0, 0, .4); font-weight: 600; letter-spacing: .03em; }
.gr-tag.poignee .gr-lib { padding: 0 7px; }
.gr-tag.poignee:hover { background: var(--panneau-3); }
.gr-x { border: 0; background: rgba(0, 0, 0, .2); color: #fff; padding: 0 5px; cursor: pointer; font-size: 12px; line-height: 1; }
.gr-x:hover { background: rgba(0, 0, 0, .45); }
.gr-plus { position: absolute; left: 0; top: 0; width: 18px; height: 18px; padding: 0; pointer-events: auto; border-radius: 3px; border: 1px solid var(--bord-fort); background: var(--panneau-2); color: var(--texte); font-size: 13px; line-height: 1; }
.gr-plus:hover { border-color: var(--bleu); color: var(--bleu); }
.gr-bas { flex: none; display: flex; align-items: center; height: 22px; padding: 0 6px; border-top: 1px solid var(--bord); font-size: var(--t-xs); color: var(--texte-3); }
.plages { display: flex; gap: 0; }
.plages button { padding: 1px 6px; border: 0; background: none; border-radius: 3px; color: var(--texte-3); font-size: var(--t-xs); }
.plages button:hover { color: var(--texte); background: var(--panneau-2); }
.gr-bas-fin { margin-left: auto; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
a.sb-credit { color: var(--texte-3); text-decoration: none; font-size: 9px; }
a.sb-credit:hover { color: var(--texte); }
#sb-heure { color: var(--texte-2); font-variant-numeric: tabular-nums; }
.unclic-barre { position: absolute; top: 24px; left: 8px; z-index: 4; display: flex; align-items: stretch; background: var(--panneau); border: 1px solid var(--bord-fort); border-radius: var(--r); overflow: hidden; }
.uc { border: 0; padding: 3px 9px; min-width: 84px; display: flex; flex-direction: column; align-items: center; line-height: 1.2; color: #fff; }
.uc span { font-size: var(--t-xs); opacity: .85; } .uc b { font-size: var(--t-s); font-weight: 600; font-variant-numeric: tabular-nums; }
.uc.vente { background: var(--vente-fond); } .uc.achat { background: var(--achat-fond); }
.uc:hover { filter: brightness(1.15); }
.uc-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px 6px; gap: 1px; }
.uc-mid input { width: 74px; text-align: center; background: var(--panneau-2); border: 1px solid var(--bord); border-radius: 3px; font-size: var(--t-xs); padding: 1px 2px; }
.uc-mid span { display: none; } .uc-mid small { font-size: 9px; color: var(--texte-3); }

/* ---------- carnet, profondeur, transactions ---------- */
.carnet, .transactions { overflow: hidden; padding: 4px 0 0; }
.cn-vue { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.cn-tete, .cn-l { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; padding: 0 8px; }
.cn-tete { flex: none; font-size: var(--t-lbl); line-height: 16px; color: var(--texte-3); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.cn-tete span:not(:first-child), .cn-l span:not(:first-child) { text-align: right; }
.cn-cote { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.cn-asks { justify-content: flex-end; }
.cn-l { position: relative; font-size: var(--t-xs); line-height: 14px; height: 14px; cursor: pointer; flex: none; font-variant-numeric: tabular-nums; }
/* barres de profondeur ancrées à droite : cumul bien visible (rouge / vert sombre), taille de la ligne plus dense */
.cn-l::before, .cn-l::after { content: ""; position: absolute; top: 0; bottom: 1px; right: 0; pointer-events: none; }
.cn-l::before { width: calc(var(--p, 0) * 100%); background: var(--voile); }
.cn-l::after { width: calc(var(--q, 0) * 100%); background: var(--voile-fort); }
.cn-l:hover { background: var(--panneau-2); }
.cn-asks .cn-l { --voile: rgba(240, 80, 90, .16); --voile-fort: rgba(240, 80, 90, .30); } .cn-asks .cn-l span:first-child { color: var(--vente); }
.cn-bids .cn-l { --voile: rgba(46, 189, 133, .15); --voile-fort: rgba(46, 189, 133, .28); } .cn-bids .cn-l span:first-child { color: var(--achat); }
.cn-l span { position: relative; z-index: 1; }
.cn-spread { flex: none; display: flex; justify-content: center; gap: 5px; font-size: var(--t-xs); line-height: 20px; color: var(--texte-3); background: var(--panneau-2); margin: 2px 0; font-variant-numeric: tabular-nums; }
.cn-spread b { color: var(--texte); font-weight: 600; }
.cn-prof { position: relative; }
.cn-prof canvas { flex: 1 1 auto; width: 100%; min-height: 0; display: block; }
.cn-prof-info { flex: none; font-size: var(--t-xs); color: var(--texte-3); text-align: center; line-height: 18px; }
.tr-liste { overflow: hidden; flex: 1; }
.tr-liste .cn-l { cursor: default; } .tr-liste .cn-l::before, .tr-liste .cn-l::after { display: none; }
.tr-liste .achat span:first-child { color: var(--achat); } .tr-liste .vente span:first-child { color: var(--vente); }
.tr-liste .cn-l span:last-child { color: var(--texte-3); }

/* ---------- favoris : cartes ou tableau ---------- */
.seg-vue-fav { padding: 1px; gap: 1px; }
.seg-vue-fav button { display: grid; place-items: center; width: 20px; height: 18px; padding: 0; }
.seg-vue-fav svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.fav-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 6px; padding: 6px; }
.fav-carte { display: flex; flex-direction: column; gap: 3px; padding: 7px 8px; background: var(--panneau-2); border: 1px solid var(--bord); border-radius: var(--r-2); cursor: pointer; min-width: 0; }
.fav-carte:hover { border-color: var(--bord-fort); }
.fav-carte[aria-current="true"] { border-color: var(--bord-fort); background: var(--panneau-3, var(--panneau-2)); box-shadow: inset 2px 0 0 var(--bleu); }
.fav-carte:focus-visible { outline: 1px solid var(--bleu); outline-offset: 1px; }
.fav-carte:focus:not(:focus-visible) { outline: none; }
.fc-haut { display: flex; align-items: center; gap: 5px; font-size: var(--t-s); }
.fc-haut .sous { font-size: 9px; }
.fc-haut .etoile-fav { margin-left: auto; font-size: 12px; }
.fc-prix { font-size: var(--t-l); font-weight: 700; font-variant-numeric: tabular-nums; }
.fc-bas { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: var(--t-xs); }
.spark { width: 64px; height: 20px; display: block; }
.spark polyline { fill: none; stroke: var(--texte-3); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.spark.gain polyline { stroke: var(--achat); } .spark.perte polyline { stroke: var(--vente); }
.tab-marches tr[data-marche], .rc-tab tr[data-marche] { cursor: pointer; }
.tab-marches td:first-child, .rc-tab td:first-child { display: flex; align-items: center; gap: 5px; height: var(--h-ligne); }
.tab-marches tr[aria-current="true"] td { background: var(--panneau-2); }

/* ---------- tableaux (positions, ordres, historique) ---------- */
.tab { font-size: var(--t-xs); }
.tab th { font-size: var(--t-lbl); padding: 4px 8px; letter-spacing: .05em; font-weight: 500; }
.tab td { height: var(--h-ligne); font-size: var(--t-xs); padding: 0 8px; font-variant-numeric: tabular-nums; }
.tab td:first-child { font-size: var(--t-xs); }
.tab th.tri { color: var(--texte-2); }
.tab td small { color: inherit; opacity: .75; }
.onglet-corps { min-height: 0; }
.tab tr.attente td { opacity: .55; }
.tab td.act { text-align: right; } .tab td.act button { margin-left: 4px; }
.tab .cote-long, .tab .cote-achat { color: var(--achat); } .tab .cote-short, .tab .cote-vente { color: var(--vente); }
.lien-tpsl { background: none !important; border: 0 !important; padding: 0 !important; color: var(--bleu) !important; font-size: var(--t-xs) !important; cursor: pointer; }
.lien-tpsl:hover { text-decoration: underline; }
.badge-oco { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 3px; background: var(--accent-voile); color: #8db6fa; font-size: 9px; font-weight: 600; letter-spacing: .04em; vertical-align: 1px; }
.btn-x { display: inline-grid !important; place-items: center; width: 18px; height: 18px; padding: 0 !important; border: 1px solid var(--bord-fort); border-radius: 3px; background: none; color: var(--texte-2); font-size: 12px; line-height: 1; }
.btn-x:hover { color: var(--vente); border-color: var(--vente) !important; }
.tab td button:not(.btn):not(.lien-tpsl):not(.etoile-fav) { background: var(--panneau-2); border: 1px solid var(--bord-fort); border-radius: var(--r); padding: 1px 7px; font-size: var(--t-xs); color: var(--texte-2); }
.pill { display: inline-block; padding: 1px 6px; border-radius: 8px; font-size: 9px; font-weight: 600; background: var(--panneau-3); color: var(--texte-2); }
.pill.ok, .pill.st-actif { background: var(--achat-voile); color: var(--achat); }
.pill.partiel, .pill.st-reussie_attente { background: var(--accent-voile); color: #8db6fa; }
.pill.annule, .pill.st-echoue, .pill.st-clos { background: var(--vente-voile); color: var(--vente); }
#p-positions .pn-plus .btn { min-height: 20px; }

/* ---------- portefeuille ---------- */
.compte { display: flex; flex-direction: column; padding: 4px 10px; }
.pf > div { padding: 0; min-height: 21px; align-items: center; }
.pf dt { font-size: var(--t-xs); }
.pf dt small { font-size: 9px; color: var(--texte-3); margin-left: 3px; }
.pf dd { font-size: var(--t-xs); font-variant-numeric: tabular-nums; }
.pf-regle dd { display: flex; align-items: center; gap: 6px; }
.pf-regle .barre { width: 44px; height: 3px; flex: none; order: -1; }
.jauge-plancher i { background: var(--texte-2); }
.jauge-plancher[data-niveau="moyen"] i { background: var(--alerte); }
.jauge-plancher[data-niveau="bas"] i { background: var(--vente); }
.jauge-plancher[data-niveau="bas"] ~ #j-pl-val, #j-pl-val:has(+ [data-niveau="bas"]) { color: var(--vente); }
.regles { width: 100%; border-collapse: collapse; }
.regles th, .regles td { text-align: left; padding: 4px 0; border-top: 1px solid var(--bord); font-size: var(--t-xs); vertical-align: top; }
.regles th { color: var(--texte-3); font-weight: 400; width: 40%; padding-right: 8px; }

/* ---------- vues du rail : résumé, historique ---------- */
.ecran-vue { flex: 1 1 auto; min-width: 0; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.ev-tete { display: flex; align-items: center; gap: 12px; }
.ev-tete h1 { font-size: var(--t-l); font-weight: 600; margin-right: auto; }
.ev-tete .onglets { margin-right: 8px; }
.ev-tete .onglets [role="tab"] { padding: 4px 10px; border-radius: var(--r); font-size: var(--t-s); border: 0; }
.ev-tete .onglets [role="tab"][aria-selected="true"] { background: var(--panneau-2); color: var(--texte); }
.ev-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px; }
.ev-carte { background: var(--panneau); border: 1px solid var(--bord); border-radius: var(--r-2); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; }
.ev-carte small { font-size: var(--t-lbl); color: var(--texte-3); text-transform: uppercase; letter-spacing: .05em; }
.ev-carte b { font-size: var(--t-l); font-weight: 600; }
.ev-bloc { background: var(--panneau); border: 1px solid var(--bord); border-radius: var(--r-2); overflow: auto; }
.ev-titre { font-size: var(--t-lbl); text-transform: uppercase; letter-spacing: .05em; color: var(--texte-3); font-weight: 500; padding: 8px 10px 4px; }
.ev-regles .regles { margin: 0 10px 8px; width: calc(100% - 20px); }
#res-tb tr[aria-current="true"] td { background: var(--panneau-2); }
.mini-jauge { display: flex; align-items: center; gap: 6px; }
.mini-jauge .barre { width: 60px; height: 3px; }
.mini-jauge.pl .barre i { background: var(--texte-2); }

/* ---------- tiroir Réglages ---------- */
.tiroir { position: fixed; z-index: 60; top: var(--h-entete); right: 0; bottom: 0; width: 300px; background: var(--panneau); border-left: 1px solid var(--bord-fort); box-shadow: var(--ombre); display: flex; flex-direction: column; }
.ti-tete { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--bord); }
.ti-tete h2 { font-size: var(--t-m); }
.ti-corps { flex: 1; overflow: auto; padding: 6px 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.ti-sec { margin: 10px 0 0; font-size: var(--t-lbl); color: var(--texte-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 500; }
.interrupteur.ligne { justify-content: space-between; font-size: var(--t-s); color: var(--texte); }
.interrupteur.ligne input { order: 2; }
.interrupteur input:checked { background: var(--bleu); }
.interrupteur input:checked::after { background: #fff; }
.ti-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.ti-cols .case { color: var(--texte-2); }

/* ---------- menus ---------- */
.pn-menu, .menu-ctx { background: var(--panneau-2); border-radius: var(--r-2); }
.pn-menu button, .menu-ctx button { font-size: var(--t-s); padding: 5px 8px; justify-content: space-between; gap: 16px; }
.menu-ctx .m-tete { font-size: var(--t-xs); color: var(--texte-3); padding: 4px 8px; }
.menu-ctx .achat { color: var(--achat); } .menu-ctx .vente { color: var(--vente); }
[aria-checked="true"] > .pn-case { background: var(--bleu); border-color: var(--bleu); }
[aria-checked="true"] > .pn-coche::after { background: var(--bleu); }
.pn-grille .grid-stack-placeholder > .placeholder-content { background: var(--accent-voile); border-color: var(--bleu); }

/* ---------- toasts : carte sombre, filet coloré, titre + détail, croix ---------- */
.toasts { top: calc(var(--h-entete) + 8px); bottom: auto; right: 10px; flex-direction: column; gap: 6px; width: min(300px, calc(100vw - 20px)); }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 8px; background: #1a1f27; border: 1px solid var(--bord-fort); border-left: 3px solid var(--texte-3); border-radius: var(--r-2); padding: 7px 6px 7px 10px; font-size: var(--t-s); }
.toast.ok { border-left-color: var(--achat); } .toast.erreur { border-left-color: var(--vente); } .toast.alerte { border-left-color: var(--alerte); } .toast.info { border-left-color: var(--bleu); }
.toast-corps { flex: 1; min-width: 0; }
.toast b { display: block; font-weight: 600; }
.toast small { font-family: var(--police); font-size: var(--t-xs); }
.toast-x { flex: none; border: 0; background: none; color: var(--texte-3); font-size: 13px; line-height: 1; padding: 0 3px; }
.toast-x:hover { color: var(--texte); }
@keyframes toast-entree { from { opacity: 0; transform: translateX(10px); } }

/* ---------- fenêtres : recherche, confirmation, résultat, accueil ---------- */
.fenetre { padding: 16px; border-radius: var(--r-2); }
.fenetre h2 { font-size: var(--t-l); }
.fen-recherche { width: min(560px, calc(100% - 24px)); padding: 0; margin-top: 10vh; }
.rc-saisie { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 42px; border-bottom: 1px solid var(--bord); }
.rc-saisie svg { width: 15px; height: 15px; fill: none; stroke: var(--texte-3); stroke-width: 1.5; stroke-linecap: round; }
.rc-saisie input { flex: 1; background: none; border: 0; outline: none; font-size: var(--t-m); }
.rc-saisie kbd { font-size: 9px; color: var(--texte-3); border: 1px solid var(--bord-fort); border-radius: 3px; padding: 1px 4px; }
.rc-filtres { margin: 8px 12px; width: max-content; }
.rc-filtres button { flex: none; padding: 3px 10px; }
.rc-tab { margin-bottom: 8px; }
.rc-tab tr[aria-selected="true"] td { background: var(--panneau-2); }
.fen-confirmer { width: min(360px, calc(100% - 24px)); }
.res-chiffres { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 10px 0; font-size: var(--t-s); }
.res-chiffres dt { color: var(--texte-3); } .res-chiffres dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.fenetre[data-ton="reussite"] h2 { color: var(--achat); } .fenetre[data-ton="echec"] h2 { color: var(--vente); }
.ts-grille { grid-template-columns: 1fr 1fr; margin: 10px 0; }
.raccourcis { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: var(--t-s); }
.raccourcis kbd { font-size: var(--t-xs); background: var(--panneau-3); border: 1px solid var(--bord-fort); border-radius: 3px; padding: 1px 5px; justify-self: start; }
.ecran { position: fixed; inset: 0; z-index: 80; background: rgba(8, 10, 13, .88); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 16px; overflow: auto; }
.carte-accueil { width: min(440px, 100%); background: var(--panneau); border: 1px solid var(--bord-fort); border-radius: var(--r-2); padding: 22px; box-shadow: var(--ombre); }
.sur-titre { margin: 0 0 6px; font-size: var(--t-lbl); color: var(--bleu); letter-spacing: .06em; text-transform: uppercase; }
.carte-accueil h1 { font: 600 var(--t-xxl)/1.1 var(--police); letter-spacing: -.01em; }
.chapo { color: var(--texte-2); margin: 8px 0 14px; }
.carte-accueil .regles { margin-bottom: 16px; }
#f-achat { display: flex; flex-direction: column; gap: 8px; }
#f-achat label { font-size: var(--t-lbl); color: var(--texte-3); text-transform: uppercase; letter-spacing: .05em; }
#f-achat input { background: var(--panneau-2); border: 1px solid var(--bord); border-radius: var(--r); padding: 7px 8px; }
#f-achat input:focus { border-color: var(--bleu); outline: none; }
.mention { font-size: var(--t-xs); color: var(--texte-3); margin: 0; }
.erreur { color: var(--vente); font-size: var(--t-s); margin: 0; }

.nav-mobile { display: none; }

/* ---------- écrans moyens : la barre du haut se resserre ---------- */
@media (max-width: 1240px) {
  .pm-2, .connexion span { display: none; }
}
@media (max-width: 1060px) {
  .nom-firme, .pastille-compte span { display: none; }
  .solde-boite { min-width: 0; padding: 0 6px; }
}

/* ---------- mobile : un groupe de panneaux à la fois, onglets en bas ---------- */
@media (max-width: 760px) {
  :root { --h-entete: auto; --l-rail: 0px; }
  .entete { height: auto; flex-wrap: wrap; gap: 6px; padding: 6px 8px; }
  .prix-milieu { order: 5; border-left: 0; padding: 0; }
  .outils-entete { gap: 4px; }
  #b-widgets, .btn-dispo, .connexion span { display: none; }
  .rail { display: none; }
  .tiroir { top: 0; width: 100%; }
  .toasts { top: auto; bottom: calc(var(--h-nav) + 8px + env(safe-area-inset-bottom)); left: 8px; right: 8px; width: auto; }
  .espace { padding-bottom: calc(var(--h-nav) + env(safe-area-inset-bottom)); }
  .ecran-vue { padding-bottom: calc(var(--h-nav) + 12px); }
  [data-mode="mobile"][data-vue="graphique"] .pn-grille > .pn:not([data-vues~="graphique"]),
  [data-mode="mobile"][data-vue="ordre"] .pn-grille > .pn:not([data-vues~="ordre"]),
  [data-mode="mobile"][data-vue="positions"] .pn-grille > .pn:not([data-vues~="positions"]),
  [data-mode="mobile"][data-vue="carnet"] .pn-grille > .pn:not([data-vues~="carnet"]),
  [data-mode="mobile"][data-vue="compte"] .pn-grille > .pn:not([data-vues~="compte"]) { display: none !important; }
  [data-mode="mobile"][data-vue="positions"] .pn[data-pn="positions"] > .pn-cadre { min-height: calc(100dvh - 190px); }
  .pn-ajout, .pn-onglet-x { display: none; }
  .gr-outils { display: none; }
  .recents, #gb-apercus { display: none; }
  .tpsl { grid-template-columns: 1fr 80px; }
  .nav-mobile {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--h-nav) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--panneau); border-top: 1px solid var(--bord);
  }
  .nav-mobile button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: 0; border-top: 2px solid transparent; color: var(--texte-3); font-size: var(--t-xs); }
  .nav-mobile svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .nav-mobile .cpt { position: absolute; margin: -2px 0 0 26px; }
  .nav-mobile button[aria-current="true"] { color: var(--texte); border-top-color: var(--bleu); }
  .unclic-barre { left: 50%; transform: translateX(-50%); }
  .cn-l { line-height: 20px; height: 20px; }
}

/* Correctif 23/11 : le ticket ne déborde plus en largeur, le carnet garde une marge à droite */
.ticket { overflow-x: hidden; min-width: 0; }
.ticket * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.ticket input { width: 100%; }

/* Tunnel site -> /trade/ (24/11/2026) : logo = lien vers le site, bouton « New evaluation », lien du menu compte */
a.logo { color: inherit; text-decoration: none; }
a.logo:hover .nom-firme { text-decoration: underline; }
.btn-nouvelle { text-decoration: none; display: inline-flex; align-items: center; height: 28px; white-space: nowrap; }
.menu-compte .mc-lien { display: flex; padding: 5px 8px; font-size: var(--t-s); color: var(--texte-2, inherit); text-decoration: none; border-radius: var(--r-2); }
.menu-compte .mc-lien:hover { background: var(--panneau-3); color: var(--texte); }
.carte-accueil .btn { text-decoration: none; display: inline-flex; justify-content: center; margin-top: 8px; }
@media (max-width: 760px) { .btn-nouvelle { display: none; } }

/* Hedge / Equity 24/11 : en-tête mobile sur 3 lignes nettes, légende OHLC coupée proprement */
#lg-ohlc { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .prix-milieu { flex: 1 0 100%; justify-content: space-between; }
  .outils-entete { flex: 1 0 100%; justify-content: flex-end; }
  .solde-boite { flex: 1 1 0; height: 32px; }
  .connexion { margin-right: auto; }
  #lg-ohlc i:nth-child(n+5) { display: none; }
}
@media (max-width: 760px) { #lg-ohlc > :last-child { display: none; } }
/* Mobile 24/11 : table Positions lisible sur 390 px, bouton Close toujours visible */
@media (max-width: 760px) {
  .tab-pos [data-col="entree"], .tab-pos [data-col="tpsl"], .tab-pos [data-col="valeur"], .tab-pos [data-col="plancher"] { display: none; }
  .tab-pos td, .tab-pos th { padding-left: 4px; padding-right: 4px; }
  .tab-pos td.act { position: sticky; right: 0; background: var(--panneau); }
  .pn-plus #b-annuler-tout, .pn-plus #b-export { display: none; }
  .pn-tete .onglets { overflow-x: auto; scrollbar-width: none; min-width: 0; }
  .pn-tete .onglets [role="tab"] { padding: 0 7px; white-space: nowrap; }
}
@media (max-width: 760px) { .pn-tete .onglets { flex: 1 1 0; } }

/* Fenêtre de fermeture partielle */
#fen-fermer .fp-ligne { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0 6px; color: var(--texte-2); }
#fen-fermer .fp-ligne b { color: var(--texte); font-size: var(--t-l); }
#fen-fermer .fp-pct { display: flex; align-items: center; gap: 10px; --c: var(--vente); }
#fen-fermer .fp-pct .curseur { flex: 1; }
#fen-fermer .fp-pct span { min-width: 40px; text-align: right; }
#fen-fermer .fp-crans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 12px; }
#fen-fermer .fp-crans [aria-pressed="true"] { border-color: var(--vente); color: var(--vente); }
#fen-fermer .fp-recap { margin: 0 0 10px; display: grid; gap: 6px; }
#fen-fermer .fp-recap div { display: flex; justify-content: space-between; }
#fen-fermer .fp-recap dt { color: var(--texte-2); } #fen-fermer .fp-recap dd { margin: 0; }
#fen-fermer .curseur:focus { outline: none; } #fen-fermer .curseur:focus-visible { outline: 1px solid var(--bord-fort, #444); outline-offset: 4px; border-radius: 4px; }

/* ---------- lisibilité des panneaux (24/11) : libellés (police de libellé du thème), chiffres un cran plus gros.
   Le graphique (légende, étiquettes d'ordres, axes) n'est pas touché. ---------- */
.lbl-maj, .champ > label, .lbl, .prix-milieu small, .solde-boite small.sb-lib, .cn-tete, .tab th, .ev-carte small, .ev-titre, .ti-sec,
.liste-titre, #f-achat label, .sur-titre, .champ-tete label {
  font-family: var(--police-lbl); font-weight: 500; letter-spacing: .045em;
}
.solde-boite small.sb-lib { font-size: 9.5px; }
.tab td, .tab td:first-child { font-size: var(--t-m); }
.tab td small { font-size: var(--t-s); }
.cn-l { font-size: var(--t-s); line-height: 17px; height: 17px; }
.cn-spread { font-size: var(--t-s); }
.prix-milieu .px-vif { font-size: var(--t-xl); }
.prix-milieu .m, .prix-milieu .var { font-size: var(--t-m); }
.solde-boite span { font-size: var(--t-m); }
.ev-carte b { font-size: var(--t-xl); }
.details div { font-size: var(--t-s); line-height: 17px; }

/* ---------- fenêtre TP/SL (24/11) : centrée, 400 px, mêmes jetons que « Close position » ---------- */
.fen-tpsl { width: min(400px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 0; overflow: auto; }
.fen-tpsl form { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; }
.fen-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px -6px 0 0; }
.fen-tete h2 { margin: 0; font-size: var(--t-l); }
.ts-resume { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; background: var(--panneau-2); border: 1px solid var(--bord); border-radius: var(--r); }
.ts-resume div { padding: 7px 10px; min-width: 0; }
.ts-resume div + div { border-left: 1px solid var(--bord); }
.ts-resume dt { font: 500 var(--t-lbl)/1.2 var(--police-lbl); letter-spacing: .045em; text-transform: uppercase; color: var(--texte-3); }
.ts-resume dd { margin: 3px 0 0; font-size: var(--t-m); color: var(--texte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-bloc { display: flex; flex-direction: column; gap: 5px; padding-left: 10px; border-left: 2px solid var(--achat); }
.ts-bloc[data-sens="sl"] { border-left-color: var(--vente); }
.ts-bloc-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ts-bloc-tete label { font: 600 var(--t-s)/1.2 var(--police-lbl); letter-spacing: .045em; text-transform: uppercase; color: var(--achat); }
.ts-bloc[data-sens="sl"] .ts-bloc-tete label { color: var(--vente); }
.ts-regle { font-size: var(--t-xs); color: var(--texte-3); font-variant-numeric: tabular-nums; }
.ts-regle.faux { color: var(--alerte); }
.fen-tpsl .saisie { min-height: 32px; }
.fen-tpsl .saisie input { font-size: var(--t-m); }
.fen-tpsl .saisie:has(input[aria-invalid="true"]) { border-color: var(--alerte); }
.ts-vider { cursor: pointer; font-size: 14px; border-left: 1px solid var(--bord); color: var(--texte-3); }
.ts-res { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--t-xs); color: var(--texte-3); }
.ts-res b { font-size: var(--t-m); font-weight: 600; color: var(--texte-2); }
.ts-res b.gain { color: var(--achat); } .ts-res b.perte { color: var(--vente); }
.fen-tpsl .mention { line-height: 1.45; }
.fen-tpsl .actions { margin-top: 0; display: grid; grid-template-columns: 1fr 1fr; }
.fen-tpsl .actions .btn { height: 32px; justify-content: center; }
@media (max-width: 760px) {
  .cn-l { line-height: 20px; height: 20px; }
  .fen-tpsl { width: calc(100vw - 16px); }
  .ts-resume { grid-template-columns: 1fr 1fr; }
  .ts-resume div:nth-child(3) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--bord); }
}

/* ---------- passe générale des modules (24/11, demande 5) : mêmes jetons, hiérarchie plus nette, style Breakout/Blofin.
   Un seul accent (bleu), vert/rouge réservés aux sens et aux résultats, rayons 4/6 px, aucune nouvelle couleur. ---------- */
/* panneaux : en-tête séparé du corps, onglet actif souligné d'accent */
.pn-tete { border-bottom: 1px solid var(--bord); }
.pn-tete .onglets [role="tab"], .pn-titre.pn-onglet { font-weight: 500; font-size: var(--t-s); }
.pn-tete .onglets [role="tab"][aria-selected="true"], .pn-titre.pn-onglet { box-shadow: inset 0 -2px 0 var(--accent); }
/* tableaux (positions, ordres, historique, marchés) : en-têtes fixes, survol de ligne, séparateurs discrets */
.tab th { position: sticky; top: 0; z-index: 1; background: var(--panneau); color: var(--texte-3); text-align: left; border-bottom: 1px solid var(--bord); }
.tab td { border-bottom: 1px solid color-mix(in srgb, var(--bord) 55%, transparent); }
.tab tbody tr:hover td { background: var(--panneau-2); }
.tab td.act button { min-height: 24px; padding: 2px 9px; font-size: var(--t-xs); font-weight: 500; }
.tab td.act button:hover { border-color: var(--texte-3); color: var(--texte); }
/* carnet : prix milieu plus lisible, survol plus marqué */
.cn-spread { color: var(--texte-2); }
.cn-l:hover { background: var(--panneau-3); }
/* formulaire d'ordre : champs plus hauts, focus accent */
.saisie { min-height: 32px; border-radius: var(--r); transition: border-color .12s; }
.saisie:focus-within { border-color: var(--accent); }
.seg-cote { border-radius: var(--r-2); }
.seg-cote button { min-height: 30px; font-size: var(--t-m); font-weight: 600; }
.seg-cote button[data-cote="achat"][aria-checked="true"] { background: color-mix(in srgb, var(--achat) 16%, var(--panneau-2)); }
.seg-cote button[data-cote="vente"][aria-checked="true"] { background: color-mix(in srgb, var(--vente) 16%, var(--panneau-2)); }
.btn { min-height: 26px; border-radius: var(--r); font-weight: 500; }
/* unités de temps : pastille sur l'unité active */
.seg-iv button { padding: 3px 7px; font-size: var(--t-s); }
.seg-iv button[aria-checked="true"] { background: var(--panneau-3); color: var(--texte); }
.seg-iv button:hover { color: var(--texte); }
/* fenêtres : même cadre partout (bord, ombre, voile) */
dialog.fenetre { border: 1px solid var(--bord); border-radius: var(--r-2); background: var(--panneau); box-shadow: 0 18px 48px rgba(0, 0, 0, .55); }
dialog.fenetre::backdrop { background: rgba(5, 7, 10, .62); backdrop-filter: blur(2px); }
dialog.fenetre h2 { font-size: var(--t-l); font-weight: 600; letter-spacing: 0; }
dialog.fenetre .actions .btn { min-height: 32px; }
/* toasts : légère ombre pour les détacher du graphique */
.toast { box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
/* barres de défilement fines et sombres */
.pn-corps, .tab-boite, .liste { scrollbar-width: thin; scrollbar-color: var(--panneau-3) transparent; }
@media (prefers-reduced-motion: reduce) { .saisie { transition: none; } }

/* ---------- En-tête 24/11 (soir) : P&L à côté du solde, Equity dans une zone repliable sous le solde,
   widget Net P&L fermé par défaut ---------- */
/* Ouvert : la barre gagne 22 px en bas ; tout reste aligné sur la 1re ligne, l'Equity pend sous le solde. */
html.eq-ouvert { --h-entete: 68px; --pn-haut: calc(68px + 3px); }
html.eq-ouvert .entete { padding-bottom: 22px; }
.sb-groupe { position: relative; display: flex; flex-direction: column; align-items: stretch; flex: none; }
.sb-groupe .sb-detail { position: absolute; top: 100%; left: 0; right: 0; }
button.solde-boite { font: inherit; color: var(--texte); text-align: left; cursor: pointer; align-items: flex-start; }
button.solde-boite:hover { border-color: var(--bord-fort); }
button.solde-boite:focus-visible { outline: 1px solid var(--bleu); outline-offset: 1px; }
.sb-solde small.sb-lib { display: inline-flex; align-items: center; gap: 4px; }
.sb-solde .chev { width: 8px; height: 8px; transition: transform 160ms; }
.sb-solde[aria-expanded="true"] { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; }
.sb-solde[aria-expanded="true"] .chev { transform: rotate(180deg); }
.sb-detail { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; height: 22px; padding: 0 10px; margin-top: -1px;
  border: 1px solid var(--bord); border-top: 1px solid var(--bord); border-radius: 0 0 var(--r-2) var(--r-2); background: var(--panneau-2); line-height: 20px; }
.sb-detail[hidden] { display: none; }
.sb-detail small.sb-lib { font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--texte-3); }
.sb-detail span { font-family: var(--police-chiffres); font-size: var(--t-s); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-pnl { flex-direction: row; align-items: center; gap: 12px; }
.sb-pool { justify-content: center; }
.sb-pool #h-pool { font-variant-numeric: tabular-nums; }
.sb-pnl > div { display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.solde-boite span.gain, .sb-detail span.gain { color: var(--achat); }
.solde-boite span.perte, .sb-detail span.perte { color: var(--vente); }
/* Widget Net P&L */
.net-pnl { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 10px 12px; }
.net-pnl .np-val { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.net-pnl .np-val b { font-family: var(--police-chiffres); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.net-pnl .np-val b.gain { color: var(--achat); } .net-pnl .np-val b.perte { color: var(--vente); }
.net-pnl .np-liste { display: flex; flex-direction: column; gap: 6px; }
.net-pnl .np-nom { font-size: var(--t-s, 13px); color: var(--texte-2); min-width: 9em; }
.net-pnl .np-vide { margin: 0; color: var(--texte-3); }
.net-pnl .np-aide { margin: 0; font-size: var(--t-xs); color: var(--texte-3); }
/* « + Add widget » : mobile seulement (sur bureau : bouton Panels et « + » des panneaux) */
.ajout-widget { display: none; }
[data-mode="mobile"] .pn-grille > .pn.pn-ferme[data-pn="net"] { display: none !important; }
@media (max-width: 760px) {
  html.eq-ouvert { --h-entete: auto; }
  html.eq-ouvert .entete { padding-bottom: 6px; }
  html.eq-ouvert .outils-entete { align-items: flex-start; }
  html.eq-ouvert .outils-entete > .connexion, html.eq-ouvert .outils-entete > .pastille-compte { margin-top: 2px; }
  .sb-groupe .sb-detail { position: static; }
  [data-mode="mobile"] .pn-grille > .pn[data-pn="net"] { order: 999; } /* ajouté « en bas » */
  .sb-groupe { flex: 1 1 0; min-width: 0; }
  .sb-groupe .solde-boite { width: 100%; }
  .sb-pnl { gap: 8px; }
  .sb-detail { padding: 0 6px; }
  body[data-vue="compte"][data-ecran="trading"] .ajout-widget {
    display: flex; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 12px); height: 34px; margin: 0 6px 10px;
    border: 1px solid var(--bord-fort); border-radius: var(--r-2); background: none; color: var(--texte-2); font: inherit; font-size: var(--t-s);
  }
  .ajout-widget:hover { color: var(--texte); border-color: var(--texte-3); }
  .ajout-widget span { font-size: 15px; line-height: 1; }
}

/* ===== Retouche UI 25/11 (retour de Léo) : graphique TradingView de référence + panneaux plus lisibles =====
   Sauvegarde : terminal.css.avant-ui-2511. Uniquement des ajouts ; rien de ce qui précède n'est modifié. */
/* jetons --ombre-pn / --anim : déplacés dans :root en tête de fichier (27/11, passe 2) */

/* cartes : profondeur discrète, en-têtes compacts */
.pn-cadre { box-shadow: var(--ombre-pn); }
.pn-tete { border-bottom: 1px solid var(--bord); }
.pn-tete .onglets [role="tab"][aria-selected="true"], .pn-titre.pn-onglet { box-shadow: inset 0 -2px 0 var(--accent); }
.pn-tete .onglets [role="tab"], .pn-titre.pn-onglet { transition: color var(--anim), background-color var(--anim); }
.cpt:not(:empty) { display: inline-grid; place-items: center; min-width: 16px; height: 15px; padding: 0 4px; margin-left: 4px; border-radius: 8px; background: var(--panneau-3); color: var(--texte-2); font-size: 10px; }

/* source du graphique */
.seg-source { padding: 1px; gap: 1px; background: var(--panneau-2); border: 1px solid var(--bord); }
.seg-source button { padding: 2px 8px; font-size: var(--t-xs); color: var(--texte-3); border-radius: 3px; }
.seg-source button[aria-checked="true"] { background: var(--panneau-3); color: var(--texte); }
#gb-plein svg { fill: none; stroke: currentColor; stroke-width: 1.4; }
#gb-plein[aria-pressed="true"] { color: var(--accent); }
.tv-zone { display: none; position: relative; flex: 1 1 auto; min-height: 0; background: var(--panneau); }
.tv-zone .tradingview-widget-container { position: absolute; inset: 0; }
.tv-zone iframe { display: block; border: 0; }
.tv-attente { position: absolute; inset: 0; display: none; place-items: center; margin: 0; color: var(--texte-3); font-size: var(--t-s); pointer-events: none; }
.pn-graphique[data-source="tv"] .tv-zone { display: block; }
.pn-graphique[data-source="tv"][data-tv-etat="charge"] .tv-attente { display: grid; }
.pn-graphique[data-source="tv"] .gr-barre, .pn-graphique[data-source="tv"] .gr-milieu,
.pn-graphique[data-source="tv"] .plages, .pn-graphique[data-source="tv"] .sb-credit { display: none; }
.pn-graphique:fullscreen { background: var(--fond); }
.pn-graphique:fullscreen > .pn-cadre { position: absolute; inset: 0; border-radius: 0; }

/* bandeau sous le graphique : prix Lighter en direct + niveaux du compte */
.gr-ref { flex: none; display: flex; align-items: center; gap: 12px; height: 30px; padding: 0 8px; border-top: 1px solid var(--bord); background: var(--panneau-2); font-size: var(--t-xs); color: var(--texte-3); min-width: 0; white-space: nowrap; }
.gr-ref-px { display: flex; align-items: baseline; gap: 6px; flex: none; }
.gr-ref-sym { font-family: var(--police-lbl); font-size: var(--t-lbl); font-weight: 600; letter-spacing: .04em; color: var(--texte-2); }
.gr-ref-px small { font-size: 10px; color: var(--texte-3); }
#gr-ref-px { font-size: var(--t-s); font-weight: 600; color: var(--texte); font-variant-numeric: tabular-nums; transition: color 400ms ease-out; }
#gr-ref-px[data-sens="haut"] { color: var(--achat); } #gr-ref-px[data-sens="bas"] { color: var(--vente); }
.gr-ref-niv { display: flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.gr-niv { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border: 1px solid var(--bord); border-radius: 10px; background: var(--panneau); color: var(--texte-2); flex: none; }
.gr-niv i { width: 6px; height: 6px; border-radius: 50%; background: var(--texte-2); }
.gr-niv[data-niv="tp"] i { background: var(--achat); } .gr-niv[data-niv="sl"] i { background: var(--vente); } .gr-niv[data-niv="plancher"] i { background: var(--plancher); }
.gr-niv[data-niv="ordre"] i { background: transparent; border: 1px solid var(--texte-2); }
.gr-niv b { font-weight: 600; color: var(--texte); font-variant-numeric: tabular-nums; }
.gr-niv em { font-style: normal; font-variant-numeric: tabular-nums; }
.gr-niv-vide { color: var(--texte-3); }
.gr-ref-note { flex: 1 1 0; min-width: 40px; margin-left: auto; text-align: right; overflow: hidden; text-overflow: ellipsis; color: var(--texte-3); font-size: 10px; cursor: help; }
.pn-graphique[data-source="lwc"]:not([data-tv-etat="echec"]) .gr-ref-note { display: none; }
.pn-graphique[data-tv-etat="echec"] .gr-ref-note { color: var(--alerte); }

/* portefeuille : equity en tête, objectif et perte max en jauges */
.pf > div:has(#cp-equity) { order: -3; padding: 4px 0 8px; border-bottom: 0; }
.pf > div:has(#cp-equity) dt { font-family: var(--police-lbl); font-size: var(--t-lbl); text-transform: uppercase; letter-spacing: .05em; align-self: center; }
#cp-equity { font-size: var(--t-xl); font-weight: 600; color: var(--texte); letter-spacing: -.01em; }
.pf > div:has(#cp-solde), .pf > div:has(#cp-latent) { order: -2; }
.pf > .pf-regle, .pf > #j-objectif { order: -1; display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px 10px; margin: 6px 0 2px; padding: 9px 10px 10px; background: var(--panneau-2); border: 1px solid var(--bord); border-radius: var(--r-2); }
.pf > #j-objectif { order: -1; }
.pf-regle dd { display: contents; }
.pf-regle dt { font-size: var(--t-s); color: var(--texte-2); font-weight: 500; }
.pf-regle dt small { display: block; margin: 1px 0 0; font-size: 10px; font-weight: 400; }
.pf-regle dd > span { font-size: var(--t-s); font-weight: 600; color: var(--texte); text-align: right; font-variant-numeric: tabular-nums; }
.pf-regle .barre { grid-column: 1 / -1; width: auto; height: 6px; order: 0; border-radius: 3px; background: var(--panneau-3); }
.pf-regle .barre i { border-radius: 3px; transition: width 450ms cubic-bezier(.2, .7, .2, 1), background-color var(--anim); }
#j-objectif .barre i { background: var(--achat); }
.jauge-plancher[data-niveau="ok"] i { background: var(--texte-2); }
#j-retrait:not([hidden]) { order: -1; grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 10px; padding: 10px 12px; margin-bottom: 6px; border: 1px solid var(--accent); border-radius: 8px; background: rgba(75, 135, 245, .08); }
#j-retrait dt { font-size: var(--t-s); font-weight: 600; color: var(--texte); }
#j-retrait dd { margin: 0; text-align: right; font-size: var(--t-m, 15px); font-weight: 700; font-variant-numeric: tabular-nums; }
#j-retrait .btn { grid-column: 1 / -1; width: 100%; padding: 8px 12px; }

/* tableaux : en-tête collant, lignes lisibles, côté en pastille */
.tab thead th { position: sticky; top: 0; z-index: 1; background: var(--panneau); font-family: var(--police-lbl); text-transform: uppercase; color: var(--texte-3); box-shadow: inset 0 -1px 0 var(--bord); }
.tab tbody tr { transition: background-color 120ms; }
.tab tbody tr:hover td { background: rgba(255, 255, 255, .025); }
.tab td { border-bottom: 1px solid rgba(255, 255, 255, .035); }
.tab td.cote-long, .tab td.cote-short, .tab td.cote-achat, .tab td.cote-vente { font-weight: 600; }

/* états vides : centrés, sobres */
.pn p.vide, .pn div.vide { position: sticky; left: 0; display: flex; align-items: center; gap: 8px; max-width: 100%; min-height: 56px; padding: 16px 12px; color: var(--texte-3); line-height: 1.45; }
.pn p.vide::before, .pn div.vide::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--texte-3); }
.pn .vide[hidden] { display: none; }
/* le widget a son propre sélecteur de plages et son horloge : la ligne du graphique d'origine est masquée */
.pn-graphique[data-source="tv"] .gr-bas { display: none; }
.gr-ref { font-size: var(--t-s); } .gr-ref-note { font-size: var(--t-xs); }
/* perte max : la jauge montre la marge restante avant le plancher (pleine = intacte) */
.jauge-plancher[data-niveau="ok"] i { background: color-mix(in srgb, var(--achat) 55%, var(--texte-3)); }
#j-pl-val::after { content: " left"; font-weight: 400; color: var(--texte-3); }

/* carnet : spread lisible, ligne survolée marquée */
.cn-spread { margin: 3px 0; border-top: 1px solid var(--bord); border-bottom: 1px solid var(--bord); }
.cn-l:hover { background: var(--panneau-3); }
.cn-l::before, .cn-l::after { transition: width 160ms linear; }

@media (prefers-reduced-motion: reduce) {
  .pf-regle .barre i, .cn-l::before, .cn-l::after, #gr-ref-px, .tab tbody tr, .pn-tete .onglets [role="tab"] { transition: none; }
}

/* ===== graphique Lighter enrichi (25/11, chart-2511) ===== */
/* barre : 9 intervalles + échelle auto/log, défile si étroite */
.gr-barre { overflow-x: auto; scrollbar-width: none; }
.seg-iv button { padding: 3px 5px; }
.gb-txt { font-family: var(--police-chiffres, inherit); font-size: var(--t-xs); padding: 0 5px; color: var(--texte-3); }
.gb-txt[aria-pressed="true"] { color: var(--bleu); background: var(--accent-voile); }
/* légende : indicateurs actifs sur une seconde ligne */
.gr-legende { flex-wrap: wrap; row-gap: 2px; max-width: calc(100% - 80px); }
.lg-ind { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--texte-3); font-size: 10px; }
.lg-ind:empty { display: none; }
.lg-ind span { color: var(--c); } .lg-ind i { font-style: normal; color: var(--texte-2); font-variant-numeric: tabular-nums; }
/* menu des indicateurs : case + paramètres sur la même ligne */
.menu-ctx .m-ind { display: flex; align-items: center; gap: 4px; padding-right: 6px; }
.menu-ctx .m-ind > button { flex: 1 1 auto; min-width: 0; }
.m-par { display: flex; gap: 3px; flex: none; }
.m-par input { width: 44px; height: 22px; padding: 0 4px; border: 1px solid var(--bord); border-radius: var(--r); background: var(--panneau); color: var(--texte); font: inherit; font-size: var(--t-xs); font-variant-numeric: tabular-nums; text-align: right; }
.m-par input:focus { outline: 1px solid var(--bleu); border-color: var(--bleu); }
/* couleur des dessins */
.gr-outils .gr-coul i { width: 14px; height: 14px; border-radius: 50%; background: var(--c, var(--bleu)); box-shadow: 0 0 0 1px var(--bord); }
.menu-ctx .m-coul { display: flex; gap: 6px; padding: 4px 8px 6px; }
.menu-ctx .m-coul button { width: 20px; height: 20px; padding: 0; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px var(--bord); }
.menu-ctx .m-coul button[aria-checked="true"] { box-shadow: 0 0 0 2px var(--texte); }
.menu-ctx .m-note { display: block; padding: 0 8px 6px; font-size: 10px; color: var(--texte-3); }

/* Journal / statistiques (revue-2511) */
.stats-journal { padding: 8px 12px; overflow: auto; }
.stats-journal dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; font-size: var(--t-s, 12px); }
.stats-journal dt { color: var(--texte-3); } .stats-journal dd { margin: 0; text-align: right; font-family: var(--police-chiffres); font-variant-numeric: tabular-nums; }
.stats-journal dd.gain { color: var(--achat); } .stats-journal dd.perte { color: var(--vente); }

/* ---------- Flux multi-exchanges (lot 1) : Order feed, Money flow, Liquidations, Feeds ---------- */
.fx-corps { padding: 0 !important; gap: 0; }
.fx-liste { flex: 1; min-height: 0; overflow: hidden; }
.fx-feed-tete, .fx-l { display: grid; grid-template-columns: 62px 1fr 1fr 62px; gap: 4px; padding: 0 8px; align-items: center; }
.fx-l { height: 18px; font-size: var(--t-xs); line-height: 18px; font-variant-numeric: tabular-nums; }
.fx-feed-tete span:not(:first-child), .fx-l > span:not(.fx-cote) { text-align: right; }
.fx-l.achat .fx-px, .fx-l.achat .fx-usd { color: var(--achat); } .fx-l.vente .fx-px, .fx-l.vente .fx-usd { color: var(--vente); }
.fx-l .fx-h { color: var(--texte-3); }
.fx-l.fx-moyen { background: linear-gradient(90deg, transparent, var(--panneau-2)); } .fx-l.fx-gros { background: var(--panneau-3); font-weight: 600; }
.fx-l.achat.fx-gros { background: var(--achat-voile); } .fx-l.vente.fx-gros { background: var(--vente-voile); }
.fx-b { display: inline-block; font-style: normal; font-size: 9px; line-height: 12px; padding: 0 3px; border-radius: 2px; color: var(--c); border: 1px solid currentColor; letter-spacing: .02em; }
.fx-t { display: inline-block; font-style: normal; font-size: 9px; line-height: 12px; width: 12px; text-align: center; margin-left: 2px; border-radius: 2px; background: var(--panneau-3); color: var(--texte-2); }
.fx-t.spot { background: var(--info); color: #0b0d0f; }
.fx-l:has(.fx-cote) { grid-template-columns: 62px 66px 1fr 1fr 62px; } .fx-cote { font-size: var(--t-xs); }
.fx-vide, .fx-note { margin: 0; padding: 8px 10px; font-size: var(--t-xs); color: var(--texte-3); }
.fx-note { padding-top: 6px; line-height: 1.35; }
.fx-min { display: flex; align-items: center; gap: 4px; } .fx-min select { background: var(--panneau-2); color: var(--texte); border: 1px solid var(--bord); border-radius: var(--r); font: inherit; font-size: var(--t-xs); padding: 1px 4px; }
.fx-seg { display: flex; gap: 2px; padding: 6px 8px 2px; }
.fx-seg button { background: none; border: 0; color: var(--texte-3); font: inherit; font-size: var(--t-xs); padding: 2px 7px; border-radius: 3px; cursor: pointer; }
.fx-seg button[aria-checked="true"] { background: var(--panneau-3); color: var(--texte); }
.fx-mf-tete, .fx-mf-l, .fx-liq-tete { display: grid; grid-template-columns: 84px 1fr 1fr; gap: 8px; padding: 0 8px; }
.fx-mf-tete, .fx-liq-tete { font-size: var(--t-lbl); line-height: 16px; color: var(--texte-3); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
.fx-mf-l { padding-top: 5px; padding-bottom: 5px; border-top: 1px solid var(--bord); align-items: center; }
.fx-mf-nom { font-size: var(--t-s); display: flex; flex-direction: column; line-height: 1.2; } .fx-mf-nom small { font-size: 9.5px; color: var(--texte-3); }
.fx-mf-tot { background: var(--panneau-2); font-weight: 600; }
.fx-cel { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fx-net { font-size: var(--t-s); } .fx-net.achat, .fx-liq-v.achat { color: var(--achat); } .fx-net.vente, .fx-liq-v.vente { color: var(--vente); }
.fx-ach { font-size: 9.5px; color: var(--texte-3); white-space: nowrap; }
.fx-barre { display: block; height: 4px; border-radius: 2px; background: var(--vente); overflow: hidden; } .fx-barre b { display: block; height: 100%; background: var(--achat); }
.fx-barre-liq { background: var(--achat); } .fx-barre-liq b { background: var(--vente); }
.fx-liq-tete { grid-template-columns: 32px 1fr 1.4fr 1fr; } .fx-liq-tete span:nth-child(2), .fx-liq-tete span:nth-child(4) { text-align: right; }
.fx-liq-l { display: grid; grid-template-columns: 32px 1fr 1.4fr 1fr; gap: 8px; align-items: center; padding: 5px 8px; border-top: 1px solid var(--bord); }
.fx-liq-n { font-size: var(--t-s); color: var(--texte-2); } .fx-liq-v { text-align: right; font-size: var(--t-s); }
#fx-liq { flex: none; } #fx-liq-liste { border-top: 1px solid var(--bord); }
.fx-s-l { display: grid; grid-template-columns: 10px 1fr 60px 52px 30px; gap: 8px; align-items: center; padding: 4px 8px; border-top: 1px solid var(--bord); font-size: var(--t-s); }
.fx-s-l:first-child { border-top: 0; }
.fx-pt { width: 7px; height: 7px; border-radius: 50%; background: var(--texte-3); } .fx-s-l.ok .fx-pt { background: var(--achat); } .fx-s-l.attente .fx-pt { background: var(--alerte); } .fx-s-l.off .fx-pt { background: var(--vente); }
.fx-s-nom small { margin-left: 5px; color: var(--texte-3); font-size: 9.5px; } .fx-s-etat { color: var(--texte-2); font-size: var(--t-xs); } .fx-s-n { text-align: right; color: var(--texte-3); font-size: var(--t-xs); }
.fx-s-b { background: var(--panneau-2); color: var(--texte-2); border: 1px solid var(--bord); border-radius: var(--r); font: inherit; font-size: 9.5px; padding: 1px 0; cursor: pointer; } .fx-s-b:hover { color: var(--texte); }
.fx-source { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: var(--t-xs); color: var(--texte-3); }
.fx-source select { background: var(--panneau-2); color: var(--texte); border: 1px solid var(--bord); border-radius: var(--r); font: inherit; font-size: var(--t-xs); padding: 1px 3px; max-width: 108px; }
.fx-attente { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); max-width: 70%; text-align: center; margin: 0; padding: 8px 12px; background: var(--panneau-2); border: 1px solid var(--bord); border-radius: var(--r-2); font-size: var(--t-s); color: var(--texte-2); z-index: 5; pointer-events: none; }
.fx-attente[hidden] { display: none; }

.fx-calque-cv { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2; }

/* Lot 3 : carnet avec colonne Δ et ratio Bid/Ask, bandeau funding/OI, footprint */
[data-cn-vue="carnet"] .cn-tete, [data-cn-vue="carnet"] .cn-l { grid-template-columns: 1fr 1fr 1fr .9fr; }
.cn-d { color: var(--texte-3); }
.cn-d.hausse { color: var(--achat); } .cn-d.baisse { color: var(--vente); }
.cn-ratio { flex: none; position: relative; height: 16px; margin: 2px 8px 0; background: rgba(240, 80, 90, .35); border-radius: 2px; overflow: hidden; font-size: var(--t-xs); line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.cn-ratio i { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; background: rgba(46, 189, 133, .45); }
.cn-ratio span { position: relative; color: var(--texte); }
.fx-bandeau { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 3px 8px; border-bottom: 1px solid var(--bord); font-size: var(--t-xs); line-height: 16px; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.fx-bandeau span { white-space: nowrap; } .fx-bandeau small { color: var(--texte-3); margin-right: 4px; }
.fx-bandeau b { font-weight: 600; color: var(--texte); }

/* =====================================================================================================
   Thème « crypto » (27/11) : noir profond, aplats et filets (aucune lueur), angles droits sur les panneaux,
   contrôles segmentés en pilule, étiquettes en majuscules espacées (Silkscreen, sans chiffre),
   chiffres en Onest tabulaire, gros chiffres en Big Shoulders Display.
   ===================================================================================================== */
/* jetons du thème : tous dans :root en tête de fichier */
body { background: var(--fond); letter-spacing: .005em; -webkit-font-smoothing: antialiased; }
/* étiquettes : Silkscreen, petit, majuscules, atténué */
.lbl-maj, .champ > label, .lbl, .prix-milieu small, .solde-boite small.sb-lib, .cn-tete, .tab th, .ev-carte small, .ev-titre, .ti-sec,
.liste-titre, #f-achat label, .sur-titre, .champ-tete label, .ts-resume dt, .details dt, .tk-ligne > span:first-child {
  font-family: var(--police-lbl); font-size: var(--t-lbl); font-weight: 400; letter-spacing: .05em; text-transform: uppercase; color: var(--texte-lbl);
}
.pn-titre, .pn-tete .onglets [role="tab"], .pn-titre.pn-onglet { font-family: var(--police-lbl); font-size: var(--t-lbl); font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
.pn-tete .onglets [role="tab"][aria-selected="true"], .pn-titre.pn-onglet { color: var(--texte); box-shadow: inset 0 -2px 0 var(--accent); }
.tab th { white-space: nowrap; }
/* en-tête */
.entete { background: var(--fond); border-bottom: 1px solid var(--bord); height: var(--h-entete); gap: 10px; }
.nom-firme { font-family: var(--police-lbl); font-weight: 400; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; }
.pastille-marche { background: var(--champ); border-color: var(--bord); border-radius: 999px; height: 32px; padding: 0 12px 0 8px; }
.pastille-marche b { font-size: var(--t-l); font-weight: 700; }
.tag { border-radius: 999px; background: var(--pill-actif); color: var(--texte-2); height: 17px; padding: 0 7px; font-weight: 600; }
.prix-milieu .px-vif { font-family: var(--police-hero); font-size: 30px; font-weight: 600; line-height: 1; letter-spacing: .01em; color: var(--texte); font-variant-numeric: tabular-nums; }
.prix-milieu .var { font-weight: 600; }
/* contrôles segmentés en pilule */
.seg { display: inline-flex; background: var(--champ); border: 1px solid var(--bord); border-radius: 999px; padding: 2px; gap: 1px; }
.seg > button { border: 0; background: none; border-radius: 999px; color: var(--texte-2); font-weight: 600; padding: 0 11px; }
.seg > button:hover { color: var(--texte); }
.seg > button[aria-checked="true"], .seg > button[aria-pressed="true"], .seg > button.actif { background: var(--pill-actif); color: var(--texte); }
/* boutons : 6 px, aplats */
.btn, .btn-accent, .btn-plein { border-radius: 6px; font-weight: 600; }
.btn { background: var(--champ); border: 1px solid var(--bord-fort); color: var(--texte); }
.btn:hover:not(:disabled) { background: var(--pill-actif); }
.btn-accent { background: var(--accent); border-color: var(--accent); }
/* panneaux : angles droits, filets 1 px */
.pn-cadre, .pn { border-radius: 0; }
.pn-tete { background: var(--panneau); border-bottom: 1px solid var(--bord); height: 30px; }
.pn-corps { background: var(--panneau); }
.pn-grille, .pn-grille .grid-stack { background: var(--fond); }
/* champs */
.saisie, .sel select, select { background: var(--champ); border: 1px solid var(--bord); border-radius: 6px; }
.saisie:focus-within, .sel select:focus { border-color: var(--accent); }
input, select, .saisie input { font-variant-numeric: tabular-nums; font-family: var(--police-chiffres); }
/* ---------- ticket façon desk de trading : Long / Short francs ---------- */
.seg-cote { display: grid; grid-template-columns: 1fr 1fr; border-radius: 8px; padding: 3px; flex: 1; }
.seg-cote > button { height: 34px; border-radius: 6px; font-size: var(--t-l); font-weight: 700; }
.seg-cote > button[data-cote="achat"][aria-checked="true"] { background: var(--achat-fond); color: #fff; }
.seg-cote > button[data-cote="vente"][aria-checked="true"] { background: var(--vente-fond); color: #fff; }
.btn-envoyer { height: 42px; border-radius: 8px; font-size: var(--t-l); font-weight: 800; letter-spacing: .02em; border: 0; color: #fff; }
.btn-envoyer.achat, .btn-plein.achat { background: var(--achat-fond); }
.btn-envoyer.achat:hover, .btn-plein.achat:hover:not(:disabled) { background: var(--achat); }
.btn-envoyer.vente, .btn-plein.vente { background: var(--vente-fond); }
.btn-envoyer.vente:hover, .btn-plein.vente:hover:not(:disabled) { background: var(--vente); }
.tk-ligne b, .details dd { font-variant-numeric: tabular-nums; font-weight: 600; }
.details { border-top: 1px solid var(--bord); padding-top: 8px; }
/* PnL coloré : aplat discret dans les tableaux */
.gain { color: var(--achat); } .perte { color: var(--vente); }
.tab td.gain, .tab td.perte { font-weight: 700; }
.tab tbody tr:hover td { background: var(--panneau-2); }
.tab th { border-bottom: 1px solid var(--bord); background: var(--panneau); }
.tab td { border-bottom: 1px solid #14161a; }
.cote-long, .cote-achat, .cote-short, .cote-vente { font-weight: 700; }
.tab .cote-long, .tab .cote-achat { box-shadow: inset 2px 0 0 var(--achat); }
.tab .cote-short, .tab .cote-vente { box-shadow: inset 2px 0 0 var(--vente); }
/* carnet / flux : lignes teintées, barres fines */
.vide { color: var(--texte-3); }
/* popups façon FlowX : voile sombre, rayon 10, ombre large */
dialog::backdrop, .fenetre::backdrop { background: rgba(0, 0, 0, .62); backdrop-filter: blur(2px); }
.fenetre, dialog.fenetre { background: #101318; border: 1px solid var(--bord-fort); border-radius: var(--r-pop); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.fenetre h2, .fen-tete h2 { font-family: var(--police-lbl); font-weight: 400; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.pn-menu, .menu-ctx, .menu-compte { background: #101318; border: 1px solid var(--bord-fort); border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
/* graphique : barre d'outils au trait fin */
.gr-outils { background: var(--panneau); border-right: 1px solid var(--bord); }
.gr-outils button svg { stroke-width: 1.5; }
.gr-outils button[aria-pressed="true"] { background: var(--pill-actif); color: var(--texte); border-radius: 6px; }
.gr-tag { border-radius: 4px; }
/* barres de répartition fines et arrondies */
.barre-rep, .bar-split { border-radius: 999px; height: 4px; overflow: hidden; }
@media (max-width: 760px) {
  .prix-milieu .px-vif { font-size: 20px; }
  /* en-tête mobile sur deux lignes : marché + compte, puis le prix héros sur toute la largeur (plus de défilement caché) */
  .entete { height: auto; min-height: 46px; flex-wrap: wrap; overflow: visible; row-gap: 4px; }
  .entete .prix-milieu:not(.pm-2) { order: 5; flex: 1 0 100%; flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 10px; padding: 2px 2px 0; }
  .entete .prix-milieu:not(.pm-2) small { align-self: center; }
}

/* ===== Passe 2 (27/11) : ticket façon terminal prop, liste des marchés, états vides, bandeau ===== */
/* ticket : onglets de type en ligne, soulignés */
.tk-types { display: flex; align-items: stretch; gap: 14px; margin: -2px 0 2px; border-bottom: 1px solid var(--bord); }
.tk-types [data-type] { position: relative; height: 30px; padding: 0; border: 0; background: none; color: var(--texte-3); font: 600 var(--t-m)/1 var(--police); cursor: pointer; white-space: nowrap; }
.tk-types [data-type]:hover { color: var(--texte-2); }
.tk-types [data-type][aria-selected="true"] { color: var(--texte); }
.tk-types [data-type][aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--texte); border-radius: 2px 2px 0 0; }
.ticket .seg-cote { flex: none; padding: 0; gap: 6px; background: none; border: 0; }
.ticket .seg-cote > button { height: 38px; border-radius: var(--r); background: var(--panneau-2); color: var(--texte-2); font-size: var(--t-l); font-weight: 700; letter-spacing: .01em; border: 1px solid var(--bord-fort); }
.ticket .seg-cote > button[data-cote="achat"][aria-checked="true"] { background: var(--achat-fond); border-color: var(--achat-fond); color: #fff; }
.ticket .seg-cote > button[data-cote="vente"][aria-checked="true"] { background: var(--vente-fond); border-color: var(--vente-fond); color: #fff; }
.tk-compte { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px 4px; background: var(--panneau-2); border: 1px solid var(--bord); border-radius: var(--r); }
.ticket { gap: 7px; padding: 8px 10px 10px; }
.ticket .tk-ligne { font-size: var(--t-m); line-height: 19px; }
.ticket .tk-ligne > b { color: var(--texte); font-weight: 600; }
.tk-compte .curseur-levier { margin-top: 2px; }
/* micro-étiquettes : taille et contraste remontés */
.tk-ligne > span:first-child, .tab thead th, .pf dt, .pf .lbl-maj { color: var(--texte-lbl); }
.tab thead th { font-size: var(--t-lbl); height: 26px; }
/* Portfolio : plus serré */
.pf dl > div, .pf .pf-l { padding-top: 3px; padding-bottom: 3px; }
/* état vide compact (positions, ordres…) */
.pn p.vide.vide-compact { min-height: 0; padding: 10px 12px; gap: 4px; flex-wrap: wrap; font-size: var(--t-m); color: var(--texte-2); }
.vide kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border: 1px solid var(--bord-fort); border-bottom-width: 2px; border-radius: 4px; background: var(--panneau-2); color: var(--texte); font: 600 10.5px/1 var(--police); }
/* Favoris : liste compacte façon sélecteur de marché */
#fav-tableau { width: 100%; table-layout: fixed; }
#fav-tableau th.fl-spark, #fav-tableau td.fl-spark { width: 72px; }
#fav-tableau th:last-child, #fav-tableau td:last-child { width: 104px; }
#fav-tb tr { height: 44px; cursor: pointer; }
#fav-tb tr:hover td { background: var(--panneau-2); }
#fav-tb td { padding: 4px 8px; border-bottom: 1px solid var(--bord); vertical-align: middle; }
.fl-marche { display: flex; align-items: center; gap: 8px; height: 44px; padding-top: 0 !important; padding-bottom: 0 !important; overflow: hidden; }
.fl-marche .etoile-fav { flex: none; width: 16px; padding: 0; border: 0; background: none; color: var(--texte-3); font-size: 13px; line-height: 1; cursor: pointer; }
.fl-marche .etoile-fav[aria-pressed="true"] { color: var(--etoile); }
.fl-marche .jeton { flex: none; width: 22px; height: 22px; font-size: 11px; }
.fl-nom { display: grid; grid-template-columns: auto 1fr; column-gap: 1px; align-items: baseline; min-width: 0; line-height: 1.25; }
.fl-nom b { font-size: var(--t-l); font-weight: 600; color: var(--texte); }
.fl-nom > .sous { font-size: var(--t-s); }
.fl-nom small { grid-column: 1 / -1; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-spark .spark { display: block; width: 64px; height: 22px; }
.fl-prix { text-align: right; line-height: 1.3; }
.fl-prix [data-px] { display: block; font-size: var(--t-l); font-weight: 600; color: var(--texte); }
.fl-prix .fl-var { display: block; font-size: var(--t-s); font-weight: 600; }
/* bandeau marché : les cases sans donnée sont masquées */
.fx-bandeau [hidden], .fx-bandeau[hidden] { display: none !important; }
/* popups : même rendu partout (marché, indicateurs, réglages) */
dialog.fenetre, .menu-pop, .ind-pop, .fen-ind { background: #101318; border: 1px solid var(--bord-fort); border-radius: var(--r-pop); box-shadow: var(--ombre-pop); }
/* ticket dense : marge / pouvoir d'achat en lignes, levier + curseur sur une seule ligne */
.tk-compte { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 10px; row-gap: 0; }
.tk-compte > .tk-ligne { display: contents; }
.tk-compte > .tk-ligne > span:first-child { grid-column: 1 / 3; line-height: 20px; }
.tk-compte > .tk-ligne > b { grid-column: 3; text-align: right; line-height: 20px; }
.tk-compte > .tk-levier > span:first-child { grid-column: 1; grid-row: 3; }
.tk-compte > .tk-levier > b { grid-row: 3; min-width: 30px; }
.tk-compte > .curseur-levier { grid-column: 2; grid-row: 3; margin: 0; }
/* Portfolio dense : lignes de 19 px, cartes de règles resserrées */
.pf > div:not(.pf-regle) { line-height: 19px; min-height: 19px; }
.pf > .pf-regle, .pf > #j-objectif { margin: 4px 0 2px; padding: 6px 9px 7px; gap: 4px 10px; }
/* les deux règles (perte max, objectif) côte à côte : la liste entière tient sans défilement */
.pf { display: grid; grid-template-columns: 1fr 1fr; column-gap: 6px; align-content: start; }
.pf > div { grid-column: 1 / -1; }
.pf > .pf-regle, .pf > #j-objectif { grid-column: auto; grid-template-columns: 1fr; gap: 3px; align-content: start; }
.pf > .pf-regle dd > span { text-align: left; font-size: var(--t-m); }
.pf > .pf-regle dt small { display: inline; margin-left: 4px; }
/* bascule Long/Short franche : le côté inactif garde sa couleur en texte et en filet */
.ticket .seg-cote > button[data-cote="achat"]:not([aria-checked="true"]) { color: var(--achat); border-color: rgba(46, 189, 133, .35); background: rgba(46, 189, 133, .06); }
.ticket .seg-cote > button[data-cote="vente"]:not([aria-checked="true"]) { color: var(--vente); border-color: rgba(229, 72, 77, .35); background: rgba(229, 72, 77, .06); }
.ticket .seg-cote > button:not([aria-checked="true"]):hover { filter: brightness(1.25); }
/* jauge de perte max : vert tant que le budget restant est large */
.jauge-plancher:not([data-niveau="moyen"]):not([data-niveau="bas"]) i { background: var(--achat); }
.jauge-plancher[data-niveau="moyen"] i { background: var(--alerte); }
.jauge-plancher[data-niveau="bas"] i { background: var(--vente); }
/* favoris : pas de défilement horizontal */
[data-pn="favoris"] .pn-corps { overflow-x: hidden; }
/* info-bulle des outils de dessin (le title natif reste pour les lecteurs d'écran) */
.gr-outils { overflow: visible; position: relative; z-index: 6; }
.gr-outils button[aria-label] { position: relative; }
.gr-outils button[aria-label]:hover::after { content: attr(aria-label); position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); padding: 5px 8px; border-radius: 6px; background: #16181c; border: 1px solid var(--bord-fort); color: var(--texte); font: 500 12px/1 var(--police); white-space: nowrap; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.5); z-index: 20; }
/* menu Indicateurs : rangées-cartes avec case à cocher carrée arrondie */
#menu-pop:has(.m-ind) { min-width: 300px; padding: 8px; background: #101318; border: 1px solid var(--bord-fort); border-radius: var(--r-pop); box-shadow: var(--ombre-pop); }
#menu-pop .m-tete { padding: 4px 6px 8px; margin-bottom: 4px; border-bottom: 1px solid var(--bord); font: 400 var(--t-lbl)/1.3 var(--police-lbl); letter-spacing: .05em; text-transform: uppercase; color: var(--texte-lbl); }
#menu-pop .m-ind { display: flex; align-items: center; gap: 6px; margin: 4px 0; padding: 0 6px 0 0; min-height: 38px; border: 1px solid var(--bord); border-radius: 8px; background: var(--panneau-2); }
#menu-pop .m-ind > button { flex: 1; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border: 0; background: none; color: var(--texte); font: 600 var(--t-m)/1 var(--police); text-align: left; }
#menu-pop .m-ind > button small { order: -1; display: grid; place-items: center; width: 18px; height: 18px; flex: none; border: 1.5px solid var(--bord-fort); border-radius: 5px; font-size: 11px; color: transparent; }
#menu-pop .m-ind > button[aria-checked="true"] small { background: var(--texte); border-color: var(--texte); color: #0a0b0d; }
#menu-pop .m-ind:hover { border-color: var(--bord-fort); }
#menu-pop .m-par input { width: 46px; height: 26px; border: 1px solid var(--bord); border-radius: 6px; background: var(--champ); color: var(--texte); font: 500 var(--t-s)/1 var(--police); font-variant-numeric: tabular-nums; text-align: center; }
#menu-pop .m-ind > button { justify-content: flex-start; }
#menu-pop .m-par { display: flex; justify-content: flex-end; gap: 4px; min-width: 150px; }
#menu-pop .m-tete { color: var(--texte-2); }
/* mobile : tableau Positions sans défilement horizontal (prix actuel masqué, déjà dans l'en-tête) */
@media (max-width: 760px) {
  .tab-pos [data-col="actuel"] { display: none; }
  .tab-pos [data-col="qte"] { white-space: nowrap; }
  .tab-pos td[data-col="upnl"] { white-space: normal; line-height: 1.25; min-width: 0; max-width: 92px; }
  .tab-pos [data-col="cote"] { padding-left: 8px; }
  .tab-pos td.act { padding-right: 6px; }
  [data-pn="positions"] .pn-tete .onglets { overflow-x: auto; scrollbar-width: none; }
}
/* en-tête moins chargé sous 1500 px : la fourchette du jour reste dans le bandeau du graphique */
@media (max-width: 1500px) and (min-width: 761px) { .entete .prix-milieu.pm-2 { display: none; } }
/* légende OHLC et bandeau de stats un cran plus contrastés */
.gr-legende, #fx-bandeau { color: var(--texte-2); }

/* ---------- passe 3 (28/11) ---------- */
/* AUTO / LOG : état actif visible (fond bleu voilé + liseré), inactif discret */
.gb-txt { height: 20px; border: 1px solid transparent; border-radius: 4px; letter-spacing: .02em; }
.gb-txt[aria-pressed="true"] { color: #8fb6ff; background: var(--accent-voile); border-color: rgba(59, 130, 246, .45); }
.gb-txt[aria-pressed="false"]:hover { border-color: var(--bord-fort); }

/* Fenêtre « Select coin » : voile, rayon 10 px, ombre large, recherche en tête, onglets en pilule, lignes aérées */
.fen-recherche { width: min(600px, calc(100% - 24px)); padding: 0; margin-top: 9vh; overflow: hidden; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
/* 01/12 : 19 marchés -> fenêtre limitée à la hauteur de l'écran, seule la liste défile */
.fen-recherche[open] { display: flex; flex-direction: column; max-height: calc(100vh - 9vh - 24px); max-height: calc(100dvh - 9vh - 24px); }
.fen-recherche > :not(.rc-defile) { flex: none; }
.rc-defile { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.fen-recherche .rc-tab thead th { position: sticky; top: 0; z-index: 1; background: var(--panneau, #101318); }
.fen-recherche::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
.fen-recherche .rc-saisie { margin: 12px 12px 4px; height: 38px; border: 1px solid var(--bord-fort); border-radius: 8px; background: #0b0d11; }
.fen-recherche .rc-saisie:focus-within { border-color: rgba(59, 130, 246, .6); }
.fen-recherche .rc-filtres { display: flex; gap: 6px; margin: 8px 12px 6px; padding: 0; background: none; border: 0; }
.fen-recherche .rc-filtres button { height: 26px; padding: 0 12px; border: 1px solid var(--bord-fort); border-radius: 999px; background: none; color: var(--texte-2); font-size: var(--t-xs); }
.fen-recherche .rc-filtres button[aria-checked="true"] { background: var(--texte); border-color: var(--texte); color: #0b0d11; font-weight: 600; }
.fen-recherche .rc-tab { width: 100%; margin: 0 0 6px; table-layout: fixed; }
.fen-recherche .rc-tab th { height: 26px; padding: 0 12px; font-size: 10px; color: var(--texte-3); font-weight: 500; border-bottom: 1px solid var(--bord); }
.fen-recherche .rc-tab th.rc-spark, .fen-recherche .rc-tab td.rc-spark { width: 96px; }
.fen-recherche .rc-tab th:nth-child(3), .fen-recherche .rc-tab td:nth-child(3) { width: 110px; }
.fen-recherche .rc-tab th:nth-child(4), .fen-recherche .rc-tab td:nth-child(4) { width: 80px; }
.fen-recherche .rc-tab th:last-child, .fen-recherche .rc-tab td:last-child { width: 40px; }
.fen-recherche .rc-tab td { height: 48px; padding: 0 12px; border-bottom: 1px solid rgba(255, 255, 255, .04); font-size: var(--t-s); }
.fen-recherche .rc-tab td.rc-nom { display: flex; align-items: center; gap: 10px; height: 48px; }
.rc-nom > span:not(.jeton) { display: grid; grid-template-columns: auto 1fr; column-gap: 1px; align-items: baseline; min-width: 0; }
.rc-nom b { font-weight: 600; color: var(--texte); }
.rc-nom small { grid-column: 1 / -1; font-family: var(--police-chiffres, inherit); font-size: 10px; color: var(--texte-3); white-space: nowrap; }
.rc-nom .jeton { width: 26px; height: 26px; font-size: 12px; }
.rc-spark svg { width: 80px; height: 24px; display: block; }
.rc-var { font-weight: 600; }
.fen-recherche .rc-tab tbody tr:hover td { background: rgba(255, 255, 255, .03); }
.fen-recherche .rc-tab tr[aria-selected="true"] td { background: rgba(59, 130, 246, .08); }
.fen-recherche .rc-tab tr[aria-selected="true"] td:first-child { box-shadow: inset 2px 0 0 var(--bleu); }
.fen-recherche .vide { padding: 16px; margin: 0; }
@media (max-width: 600px) { .fen-recherche .rc-tab th.rc-spark, .fen-recherche .rc-tab td.rc-spark { width: 64px; } .rc-spark svg { width: 56px; } .fen-recherche .rc-tab th:nth-child(3), .fen-recherche .rc-tab td:nth-child(3) { width: 84px; } .fen-recherche .rc-tab th:nth-child(4), .fen-recherche .rc-tab td:nth-child(4) { width: 62px; } .fen-recherche .rc-tab td, .fen-recherche .rc-tab th { padding: 0 6px; } }
.rc-tete { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 0 16px; }
.rc-tete h2 { margin: 0; }
.rc-tete .gb svg { width: 14px; height: 14px; stroke: var(--texte-2); stroke-width: 1.6; fill: none; stroke-linecap: round; }
.fen-recherche .rc-tab th.n, .fen-recherche .rc-tab td.n { text-align: right; }
.fen-recherche .rc-tab td:last-child, .fen-recherche .rc-tab th:last-child { text-align: center; padding: 0 8px; }
.fen-recherche .etoile-fav { font-size: 14px; color: var(--texte-3); }
.fen-recherche .etoile-fav[aria-pressed="true"] { color: #f5b700; }
.rc-nom small { color: var(--texte-2); }

/* Mobile (passe 3) */
@media (max-width: 760px) {
  /* le graphique occupe tout l'écran visible ; les favoris commencent sous le pli, à pleine hauteur (plus de bande écrasée) */
  [data-mode="mobile"][data-vue="graphique"] .pn-graphique { --pn-h-mob: calc(100dvh - 172px); }
  [data-mode="mobile"][data-vue="graphique"] .pn[data-pn="marches"] { min-height: 240px; margin-top: 8px; }
  [data-mode="mobile"][data-vue="graphique"] .pn[data-pn="marches"] > .pn-cadre { min-height: 240px; }
  /* bandeau du bas : prix de référence sur une ligne, niveaux de position sur la suivante, rien de tronqué */
  .gr-ref { height: auto; min-height: 30px; flex-wrap: wrap; row-gap: 2px; padding-top: 3px; padding-bottom: 3px; }
  .gr-ref .gr-ref-px small { display: none; }
  .gr-ref-niv { flex: 1 0 100%; width: 100%; max-width: none; margin-left: 0; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .gr-ref-niv .gr-niv { flex: none; }
  /* unités de temps : marge à droite, défilement sans barre */
  .gr-barre { padding-right: 10px; scroll-padding-right: 10px; scrollbar-width: none; }
  .gr-barre::after { content: ""; flex: 0 0 4px; }
}

/* En-tête allégé (passe 3) : latence en infobulle (pastille seule), « New evaluation » rangé dans le menu du compte,
   « Today » seulement sur très grand écran ; le carnet garde des barres de profondeur plus discrètes sous les chiffres */
@media (min-width: 761px) {
  .entete .connexion[data-etat="ouvert"] #c-texte { display: none; }
  .entete .btn-nouvelle { display: none; }
}
.menu-compte .mc-nouvelle { display: none; }
@media (min-width: 761px) { .menu-compte .mc-nouvelle { display: flex; } }
/* C2j 30/11 : PnL masqué seulement sous 1280 px (mesuré : l'en-tête tient à 1280 avec chiffres longs) */
@media (max-width: 1279px) and (min-width: 761px) { .entete .sb-pnl > div:last-child { display: none; } }
.cn-asks .cn-l { --voile: rgba(240, 80, 90, .10); --voile-fort: rgba(240, 80, 90, .20); }
.cn-bids .cn-l { --voile: rgba(46, 189, 133, .10); --voile-fort: rgba(46, 189, 133, .19); }
.cn-l span { text-shadow: 0 0 2px rgba(0, 0, 0, .55); }
.cn-asks .cn-l span:first-child { color: #ff6b73; }

/* Logo : même police que le site (Big Shoulders 900), sans pictogramme */
.nom-firme { font-family: var(--police-hero, "Big Shoulders Display", Impact, sans-serif); font-weight: 900; letter-spacing: .01em; text-transform: none; font-size: 26px; line-height: 1; }

/* ===== C2l 30/11 : mobile 390 px. En-tête sans débordement (ligne 1 : marché + Dashboard + compte ;
   ligne 2 : Balance | Equity | PnL | Firm pool ; ligne 3 : prix), cibles tactiles >= 40 px. Sauvegarde terminal.css.avant-c2l-2911 ===== */
@media (max-width: 760px) {
  :root { --h-tete-pn: 40px; }
  .entete { gap: 6px 4px; padding: 4px 8px 6px; height: auto; min-height: 0; }
  .entete > .outils-entete > .sb-groupe { align-self: stretch; }
  .entete .sb-groupe > .solde-boite { flex: 1 1 auto; width: 100%; }
  .entete > .outils-entete { display: contents; }
  .entete::after { content: ""; order: 2; flex: 1 0 100%; height: 0; }
  .entete > .logo { display: none; }
  .entete > #b-recherche { width: 40px; height: 40px; }
  .entete > #b-marche { height: 40px; min-width: 0; }
  .entete > #b-marche .tag-marge { display: none; }
  .entete > #b-fav { width: 40px; height: 40px; font-size: 18px; }
  .outils-entete > .connexion { order: 1; margin: 0 0 0 auto; padding: 0 4px; }
  .outils-entete > [data-retour-dashboard] { order: 1; min-height: 40px; padding: 0 10px; }
  .outils-entete > .pastille-compte { order: 1; height: 40px; border-radius: 20px; padding: 0 10px; gap: 5px; }
  .outils-entete > .sb-groupe { order: 3; flex: 1 1 0; }
  .outils-entete > .sb-pnl { order: 3; flex: 2 1 0; min-width: 0; padding: 0; gap: 0; border: 0; background: none; flex-direction: row; }
  .outils-entete > .sb-pnl > div { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 0 6px; border: 1px solid var(--bord); border-radius: var(--r-2); background: var(--panneau); }
  .outils-entete > .sb-pnl > div + div { margin-left: 4px; }
  .outils-entete > .sb-pnl { gap: 0; }
  .outils-entete > .sb-pool { order: 3; flex: 1 1 0; min-width: 0; }
  .entete .solde-boite, .entete .sb-pnl > div { height: 40px; }
  .entete .solde-boite, .entete .sb-pnl > div { padding: 0 4px; }
  .entete .solde-boite span, .entete .sb-pnl span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
  .entete > .prix-milieu:not(.pm-2) { order: 4; }
  /* en-têtes de panneau : onglets et boutons à 40 px */
  .pn-tete .onglets [role="tab"] { min-height: 40px; }
  .pn-b { width: 40px; height: 40px; }
  .pn-b svg { width: 16px; height: 16px; }
  .pn-tete .btn-petit, .pn-plus .btn, #p-positions .pn-plus .btn { min-height: 40px; padding: 0 12px; }
  .seg-source button { min-height: 40px; }
  .seg-vue-fav button { width: 40px; height: 40px; }
  /* graphique : unités de temps, barre d'outils et plages à 40 px (la rangée défile) */
  .gr-barre { height: 44px; overflow-x: auto; }
  .seg-iv button { min-height: 40px; min-width: 40px; }
  .gr-barre .gb, .gr-barre select { min-height: 40px; }
  .gr-barre .gb { min-width: 40px; }
  .plages button { min-height: 40px; min-width: 40px; }
  /* liste des marchés : étoile à 40 px */
  .pn .etoile-fav { min-width: 40px; min-height: 40px; }
  /* ticket */
  .tk-types { gap: 4px; }
  .tk-types [role="tab"], .tk-types button { min-height: 40px; padding: 0 8px; }
  .ticket .seg-cote > button { height: 44px; }
  #p-ordre .saisie input, #p-ordre .saisie .suffixe { min-height: 40px; }
  #p-ordre .saisie input { font-size: 16px; }
  #p-ordre .curseur { height: 40px; }
  .curseur::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -10px; }
  .curseur::-moz-range-thumb { width: 18px; height: 18px; }
  #p-ordre .case { min-height: 40px; padding-right: 8px; font-size: var(--t-s); }
  #p-ordre .case input { width: 18px; height: 18px; }
  #p-ordre .btn-envoyer { min-height: 44px; }
  /* tableaux : boutons de ligne (Close, Cancel, TP/SL) */
  .tab td button, .tab td .btn { min-height: 40px; min-width: 40px; }
  /* carnet / flux */
  .fx-s-b { min-width: 44px; min-height: 40px; font-size: var(--t-xs); }
  .fx-seg button, .fx-min select { min-height: 40px; min-width: 40px; }
  .ajout-widget { min-height: 44px; }
  /* boutons de ligne des tableaux (Close, Cancel, TP/SL) */
  td .btn-petit, td .btn, td button, .tab td.act button, .tab td.act .btn { min-height: 40px; min-width: 40px; }
  /* croix des étiquettes du graphique et des toasts : zone de toucher 40 px sans changer le dessin */
  .gr-tag { height: 24px; margin-top: -3px; } /* lwc.js décale de -8 px pour 18 px : recentrage */
  .gr-x { width: 32px; font-size: 16px; padding: 0; }
  .gr-x, .toast-x { position: relative; }
  .gr-x::after, .toast-x::after { content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%); }
  /* pied du graphique : plages + crédit TradingView (attribution obligatoire) ; l'horloge UTC débordait (rognée) */
  .gr-bas { height: auto; min-height: 40px; }
  .gr-bas-fin > time { display: none; }
  .rc-saisie kbd { display: none; }
  /* sélecteur de marché (fenêtre) */
  .fen-recherche .rc-tete .gb { width: 40px; height: 40px; }
  .fen-recherche .rc-saisie { height: 44px; }
  .fen-recherche #rc-q { font-size: 16px; min-height: 40px; }
  .rc-filtres button { min-height: 40px; min-width: 44px; }
  /* menus et fenêtres */
  .menu-ctx button, .menu-ctx .mc-lien, .menu-ctx select { min-height: 40px; }
}

/* 30/11 : compte financé, « Profit to withdraw » en carte jumelle de « Maximum loss » (même largeur, même style) */
.pf > #j-retrait:not([hidden]) { grid-column: auto; grid-template-columns: 1fr auto; align-content: start; align-items: baseline; gap: 3px 8px; margin: 4px 0 2px; padding: 6px 9px 7px; border: 1px solid var(--bord); border-radius: var(--r-2); background: var(--panneau-2); }
.pf > #j-retrait dt { font-size: var(--t-s); font-weight: 500; color: var(--texte-2); }
.pf > #j-retrait dd { font-size: var(--t-m); font-weight: 600; color: var(--texte); }
.pf > #j-retrait .btn { grid-column: 1 / -1; margin-top: 3px; padding: 4px 8px; font-size: var(--t-s); }
.pf > #j-retrait .btn:disabled { background: transparent; border: 1px solid var(--bord); color: var(--texte-3); opacity: 1; }

/* cartes d'exécution (01/12) : widget compact en haut à droite */
.toast.exec { position: relative; overflow: hidden; padding: 8px 6px 9px 10px; }
.toast.exec.achat { border-left-color: var(--achat); } .toast.exec.vente { border-left-color: var(--vente); }
.toast.exec .ex-l1, .toast.exec .ex-l2 { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.toast.exec .ex-cote { font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 1px 5px; border-radius: 3px; }
.toast.exec.achat .ex-cote { color: var(--achat); background: rgba(46,189,133,.14); }
.toast.exec.vente .ex-cote, .toast.exec.erreur .ex-cote { color: var(--vente); background: rgba(229,72,77,.14); }
.toast.exec .ex-qte { font-weight: 600; font-family: var(--police-chiffres, var(--police)); }
.toast.exec .ex-heure { margin-left: auto; color: var(--texte-3); font-size: var(--t-xs); font-family: var(--police-chiffres, var(--police)); }
.toast.exec .ex-l2 { margin-top: 3px; color: var(--texte-2); font-size: var(--t-xs); }
.toast.exec .ex-px { font-family: var(--police-chiffres, var(--police)); color: var(--texte); }
.toast.exec .ex-raison { color: var(--texte-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast.exec .ex-pnl { margin-top: 3px; font-weight: 600; font-size: var(--t-s); font-family: var(--police-chiffres, var(--police)); }
.toast.exec .ex-pnl.pos { color: var(--achat); } .toast.exec .ex-pnl.neg { color: var(--vente); }
.toast.exec .ex-pnl small, .toast.exec .ex-delai { display: inline; font-weight: 400; color: var(--texte-3); }
.toast.exec .ex-delai { display: block; margin-top: 3px; }
.toast.exec .ex-barre { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: currentColor; opacity: .35; transform-origin: left; animation: ex-barre linear forwards; }
.toast.exec.achat .ex-barre { color: var(--achat); } .toast.exec.vente .ex-barre, .toast.exec.erreur .ex-barre { color: var(--vente); }
.toast.exec.pause .ex-barre { animation-play-state: paused; }
@keyframes ex-barre { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* 01/12 : Breach (prix de rupture), jauge de risque, alerte 90 %, carte de gains */
.sb-risque { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 56px; }
.sb-risque .barre { height: 3px; width: 100%; }
.sb-risque .barre i { background: var(--texte-2); }
.sb-risque[data-niveau="eleve"] i, .sb-risque[data-niveau="eleve"] #h-risque-val { background: var(--alerte); color: var(--alerte); }
.sb-risque[data-niveau="critique"] i { background: var(--vente); } .sb-risque[data-niveau="critique"] #h-risque-val { color: var(--vente); }
.sb-risque #h-risque-val { background: none; }
#j-risque-txt { grid-column: 1 / -1; }
.tab-pos td.proche[data-col="plancher"] { color: var(--alerte); }
.alerte-risque { position: fixed; z-index: 60; top: calc(var(--h-entete) + 6px); left: 50%; transform: translateX(-50%); width: min(560px, calc(100vw - 20px)); display: flex; align-items: center; gap: 10px; padding: 9px 8px 9px 12px; background: #2a1d0b; border: 1px solid var(--alerte); border-left-width: 4px; border-radius: var(--r-2); color: var(--texte); font-size: var(--t-m); box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.alerte-risque[hidden] { display: none; }
.alerte-risque .ar-ico { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--alerte); color: #1a1205; font-weight: 700; text-align: center; line-height: 18px; font-size: var(--t-s); }
.alerte-risque #ar-texte { flex: 1; }
.fen-carte { width: min(660px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; }
.fen-carte canvas { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border: 1px solid var(--bord-fort); margin: 8px 0; background: var(--panneau); }
.fen-carte .actions { display: flex; gap: 8px; justify-content: flex-end; }

/* nuit-0312 : fin de la refonte ux-0112 — état du graphique, légende d'indicateurs interactive, réglages d'indicateur */
.gr-etat { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center; color: var(--texte-2); font-size: var(--t-xs); pointer-events: none; }
.gr-etat[hidden] { display: none; }
.gr-etat b { color: var(--texte); font-size: var(--t-s); font-weight: 600; }
.gr-etat span { max-width: 340px; }
.gr-etat button { pointer-events: auto; margin-top: 4px; }
.gr-etat[data-mode="erreur"] b { color: var(--vente); }
.gr-roue { width: 18px; height: 18px; border: 2px solid var(--bord-fort); border-top-color: var(--accent); border-radius: 50%; animation: gr-tourne .8s linear infinite; }
@keyframes gr-tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gr-roue { animation-duration: 2.4s; } }
.lg-ind2 span { color: inherit; }
.lg-l { display: inline-flex; align-items: center; gap: 5px; pointer-events: auto; color: var(--c); border-radius: 3px; padding: 0 2px; }
.lg-l .lg-n { font-style: normal; color: var(--c); }
.lg-l .lg-v { font-style: normal; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.lg-l .lg-note { font-style: normal; color: var(--texte-3); }
.lg-l.cache .lg-n, .lg-l.cache .lg-v, .lg-l.indispo .lg-n { opacity: .45; }
.lg-b { display: inline-flex; gap: 1px; visibility: hidden; }
.lg-l:hover .lg-b, .lg-l:focus-within .lg-b { visibility: visible; }
@media (hover: none) { .lg-b { visibility: visible; } }
.lg-b button { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 3px; background: var(--panneau-2); color: var(--texte-2); cursor: pointer; }
.lg-b button:hover { color: var(--texte); background: var(--panneau-3); }
.lg-b svg, .ind-pop svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.lg-volets { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.lg-volet { position: absolute; left: 8px; display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 10px; max-width: calc(100% - 80px); }
.ind-pop { position: fixed; z-index: 60; min-width: 220px; max-width: 280px; padding: 10px; border: 1px solid var(--bord-fort); border-radius: var(--r-2, 6px); background: var(--panneau-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .5); font-size: var(--t-xs); color: var(--texte); }
.ind-pop[hidden] { display: none; }
.ip-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ip-tete button { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 4px; background: none; color: var(--texte-2); cursor: pointer; }
.ip-tete button:hover { background: var(--panneau-3); color: var(--texte); }
.ip-groupe { display: grid; gap: 6px; padding: 6px 0; border-top: 1px solid var(--bord); }
.ip-lbl { color: var(--texte-lbl); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.ip-champ { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--texte-2); }
.ip-champ input[type="number"] { width: 72px; padding: 3px 6px; border: 1px solid var(--bord-fort); border-radius: 4px; background: var(--champ); color: var(--texte); font: inherit; font-variant-numeric: tabular-nums; }
.ip-champ input[type="color"] { width: 32px; height: 22px; padding: 0; border: 1px solid var(--bord-fort); border-radius: 4px; background: none; cursor: pointer; }
.ip-seg { display: inline-flex; gap: 2px; }
.ip-seg button { width: 24px; height: 22px; border: 1px solid var(--bord-fort); border-radius: 4px; background: var(--champ); color: var(--texte-2); font: inherit; cursor: pointer; }
.ip-seg button[aria-pressed="true"] { background: var(--pill-actif); color: var(--texte); border-color: var(--accent); }
.ip-vide { color: var(--texte-3); margin: 4px 0; }
.ip-pied { display: flex; justify-content: space-between; gap: 8px; padding-top: 8px; border-top: 1px solid var(--bord); }
.ip-retirer { color: var(--vente); }

/* nuit-0312 lot 2 : bandeau du haut plus grand (64 px, cases 40 px, valeurs plus lisibles). Mobile inchangé (déjà 40 px). */
@media (min-width: 761px) {
  :root { --h-entete: 64px; }
  html.eq-ouvert { --h-entete: 80px; --pn-haut: calc(80px + 3px); }
  .entete .solde-boite { height: 40px; gap: 2px; }
  .entete .solde-boite span { font-size: 15px; }
  .entete .solde-boite small.sb-lib { font-size: 10px; }
  .entete .pastille-marche, .entete .pastille-compte { height: 36px; }
  .entete .pastille-compte { border-radius: 18px; }
  .sb-detail { height: 24px; line-height: 22px; }
}
/* nuit-0312 lot 3 : « Withdraw profit » dans l'en-tête (financé seulement) */
.btn-retrait-h { flex: none; height: 32px; padding: 0 12px; white-space: nowrap; }
.btn-retrait-h[hidden] { display: none; }
@media (min-width: 761px) { .entete .btn-retrait-h { height: 40px; } }
/* mobile : pas de place dans l'en-tête, le bouton reste dans la carte du compte */
.btn-retrait-m { display: none; }
@media (max-width: 760px) { .entete .btn-retrait-h { display: none; } .btn-retrait-m { display: inline-flex; min-height: 40px; } }

/* nuit-0312 lot 5 : barre des favoris sous le graphique */
.gr-favs { flex: none; display: flex; align-items: center; gap: 2px; height: 28px; padding: 0 6px; border-top: 1px solid var(--bord); overflow-x: auto; scrollbar-width: none; }
.gr-favs[hidden] { display: none; }
.gr-favs::-webkit-scrollbar { display: none; }
.gf-m { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border: 0; border-radius: 4px; background: none; color: var(--texte-2); font: inherit; font-size: var(--t-xs); cursor: pointer; white-space: nowrap; }
.gf-m:hover { background: var(--panneau-2); color: var(--texte); }
.gf-m[aria-pressed="true"] { background: var(--pill-actif); color: var(--texte); }
.gf-m b { font-weight: 600; }
.gf-m .jeton { width: 14px; height: 14px; font-size: 8px; }
.gf-m span.m { font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .gr-favs { height: 40px; } .gf-m { height: 34px; } }

/* nuit-0312 lots 6b/22 : bandeau de flux décroché */
.bandeau-flux { position: fixed; top: calc(var(--h-entete) + 6px); left: 50%; transform: translateX(-50%); z-index: 70; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 24px); padding: 6px 12px; border: 1px solid var(--bord-fort); border-radius: 6px; background: var(--panneau-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); font-size: var(--t-xs); color: var(--texte); }
.bandeau-flux[hidden] { display: none; }
.bandeau-flux .bf-pt { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.bandeau-flux[data-mode="reconnexion"] .bf-pt { background: var(--vente); animation: bf-pulse 1.2s ease-in-out infinite; }
@keyframes bf-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .bandeau-flux .bf-pt { animation: none; } }

/* nuit-0312 lot 10 : calculateur de risque (dans la grille .tpsl, 2 colonnes) */
.tpsl .tk-rc-btn { align-self: end; height: 30px; padding: 0 6px; font-size: var(--t-xs); white-space: nowrap; }
.tpsl .tk-rc-info { grid-column: 1 / -1; margin: 0; font-size: var(--t-xs); line-height: 1.35; }
@media (max-width: 760px) { .tpsl .tk-rc-btn { height: 40px; } }

/* nuit-0312 lot 11 : deux boutons dans la cellule d'action des positions */
.tab-pos td.act { white-space: nowrap; }

/* nuit-0312 lot 20 : calendrier de P&L journalier (Statistics) */
.st-cal { margin-top: 10px; }
.st-cal-t { font-size: var(--t-xs); margin-bottom: 4px; }
.st-cal-g { display: grid; grid-template-columns: repeat(7, 14px); gap: 3px; }
.st-cal-g i { width: 14px; height: 14px; border-radius: 3px; background: var(--panneau-2, rgba(127,127,127,.15)); }
.st-cal-g i.g { background: color-mix(in srgb, var(--achat) calc(var(--a) * 100%), transparent); }
.st-cal-g i.p { background: color-mix(in srgb, var(--vente) calc(var(--a) * 100%), transparent); }

/* nuit-0312 lot 25 : visite guidée */
.visite { position: fixed; inset: 0; z-index: 1000; }
.vi-spot { position: fixed; border-radius: var(--r); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .62); outline: 1px solid var(--accent); pointer-events: none; transition: left .2s, top .2s, width .2s, height .2s; }
.visite:has(.vi-spot[hidden]) { background: rgba(0, 0, 0, .62); }
.vi-bulle { position: fixed; width: min(320px, calc(100vw - 16px)); padding: 14px 16px; background: #101318; border: 1px solid var(--bord-fort); border-radius: var(--r-pop); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); color: var(--texte); }
.vi-bulle h2 { margin: 2px 0 6px; font-family: var(--police-lbl); font-weight: 400; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.vi-bulle p { margin: 0; font-size: var(--t-m); line-height: 1.5; color: var(--texte-2); }
.vi-bulle .vi-pas { font-size: var(--t-xs); color: var(--texte-3); font-variant-numeric: tabular-nums; }
.vi-actions { display: flex; gap: 6px; margin-top: 12px; }
.vi-actions span { flex: 1; }
@media (prefers-reduced-motion: reduce) { .vi-spot { transition: none; } }
