/*  ── STYLE « TERMINAL » (16/11/2026, Arthur : « fais les 3 en full autonomie ») ─────────────────────────────────────────────
    Pour qui veut de la densité, l'allure d'une console de marché (registre générique, aucun produit imité) : police à chasse
    fixe partout, chiffres alignés, angles vifs, aucune ombre ni arrondi, intitulés ambrés, filets fins. Bâti comme Papier : Mat
    (data-style="mat") plus une couche, html[data-terminal]. Les couleurs des DONNÉES restent celles de la palette.
      1. sombre = CONSOLE : sol presque noir, texte gris clair, intitulés ambre ; clair = LISTING : papier de listing, encre noire,
         intitulés ocre ;
      2. une police à chasse fixe du système (aucun téléchargement) pour l'interface ET les graphiques ;
      3. angles de 2 px partout (les ronds deviennent des carrés, comme dans une console), plus d'ombre : des filets. */

/*  1. LES JETONS. */
:root[data-terminal][data-style] {
    --tm-sol: #05080a;
    --tm-carte: #0b1013;
    --tm-carte-2: #10171b;
    --tm-encre: #dde4e9;
    --tm-encre-2: #a9b5be;
    --tm-encre-3: #8693a0;     /* texte sourd : 5,6:1 sur les cartes */
    --tm-trait: rgba(150, 175, 190, .17);
    --tm-trait-fort: rgba(150, 175, 190, .34);
    --tm-ambre: #ffb000;
    --tm-mono: ui-monospace, "Cascadia Mono", "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
:root[data-terminal][data-style][data-theme="light"] {
    --tm-sol: #f3f3ec;
    --tm-carte: #fbfbf6;
    --tm-carte-2: #eeeee5;
    --tm-encre: #15191c;
    --tm-encre-2: #3c444a;
    --tm-encre-3: #565f66;
    --tm-trait: rgba(21, 25, 28, .16);
    --tm-trait-fort: rgba(21, 25, 28, .32);
    --tm-ambre: #9a5600;
}

/*  Jetons de Mat et de l'application : surfaces neutres, sans la teinte de marque (comme Papier). */
:root[data-terminal][data-style] {
    --mt-sol: var(--tm-sol); --mt-carte: var(--tm-carte); --mt-carte-2: var(--tm-carte-2); --mt-trait: var(--tm-trait);
    --mt-ombre: none; --mt-voile: rgba(0, 0, 0, .3); --mt-aire: .16;
    --surf-app: var(--tm-sol); --surf-1: var(--tm-carte); --surf-1b: var(--tm-carte); --surf-2: var(--tm-carte-2); --surf-3: var(--tm-carte-2);
    --surf-pop: var(--tm-carte); --modal-surf: var(--tm-carte);
    --tint-navy: var(--tm-carte); --tint-app: var(--tm-sol); --tint-glass: var(--tm-carte); --tint-gd: var(--tm-carte-2);
    --hx1: var(--tm-sol); --hx2: var(--tm-sol); --hx3: var(--tm-sol); --hx4: var(--tm-sol); --hx5: var(--tm-sol); --hx6: var(--tm-sol);
    --c1: var(--tm-carte-2); --c2: var(--tm-sol); --c3: var(--tm-carte-2); --c4: var(--tm-carte-2); --c5: var(--tm-sol);
    --dh1: var(--tm-sol); --dh2: var(--tm-sol); --dh3: var(--tm-carte-2); --dh4: var(--tm-carte-2); --dh5: var(--tm-sol); --dh6: var(--tm-sol); --dh7: var(--tm-carte-2);
    --grad-card1: linear-gradient(var(--tm-carte), var(--tm-carte)); --grad-card2: linear-gradient(var(--tm-carte-2), var(--tm-carte-2));
    --tx1: var(--tm-encre); --tx2: var(--tm-encre-2); --tx3: var(--tm-encre); --tx4: var(--tm-encre-2); --tx5: var(--tm-encre); --tx6: var(--tm-encre-2); --tx7: var(--tm-encre);
    --tb1: var(--tm-encre); --tb2: var(--tm-encre); --tb3: var(--tm-encre); --tb4: var(--tm-encre); --tb5: var(--tm-encre);
    --mut1: var(--tm-encre-3); --mut2: var(--tm-encre-3); --mut3: var(--tm-encre-3); --mut4: var(--tm-encre-3); --mut5: var(--tm-encre-3); --mut6: var(--tm-encre-3);
    --sl1: var(--tm-encre-2); --sl2: var(--tm-encre-2); --sl3: var(--tm-encre); --sl4: var(--tm-encre); --sl5: var(--tm-encre-3);
    --color-text-primary: var(--tm-encre); --color-text-secondary: var(--tm-encre-2); --color-text-muted: var(--tm-encre-3); --color-text-dim: var(--tm-encre-3);
    --color-bg-card: var(--tm-carte); --color-bg-card-soft: var(--tm-carte); --color-bg-input: var(--tm-carte-2);
    --dk1: var(--tm-sol); --dk2: var(--tm-carte-2); --dk3: var(--tm-sol); --dk4: var(--tm-carte-2); --dk5: var(--tm-carte-2); --dk6: var(--tm-carte-2); --dk7: var(--tm-carte-2); --dk8: var(--tm-sol); --dk9: var(--tm-carte-2); --dk10: var(--tm-carte-2);
    --color-border-subtle: var(--tm-trait); --color-border-light: var(--tm-trait); --color-border-medium: var(--tm-trait);
    --color-border-strong: var(--tm-trait-fort); --color-border-hover: var(--tm-trait-fort); --color-border-bright: var(--tm-trait-fort);
    --glow-mul: 0;
    --radius-sm: 2px; --radius-md: 2px; --radius-lg: 2px; --radius-xl: 2px;
    /*  2. La police de l'interface : chasse fixe (passe devant la police choisie dans Apparence tant que Terminal est actif). */
    --font-family: var(--tm-mono);
}
:root[data-terminal][data-style][data-theme="light"] {
    --bg1: var(--tm-carte-2); --bg2: var(--tm-sol); --bd1: #cfcfc4;
    --shadow-col: 21, 25, 28;
}

/*  2. LA POLICE, partout : textes, champs, boutons, graphiques. Un cran plus serré (la chasse fixe est plus large). */
html[data-terminal] body,
html[data-terminal] :is(button, input, select, textarea, .custom-dropdown-trigger),
html[data-terminal] svg text {
    font-family: var(--tm-mono) !important; font-variant-numeric: tabular-nums slashed-zero; letter-spacing: -.02em;
}
html[data-terminal] body { color: var(--tm-encre); background: var(--tm-sol) !important; }

/*  3. ANGLES VIFS ET FILETS. Tout prend 2 px d'arrondi au plus (les pastilles et les ronds deviennent des carrés) ; les roues de
    chargement gardent leur cercle. Plus aucune ombre : un filet sépare. */
html[data-terminal] *:not(svg, svg *, [class*="spin"], [class*="spinner"], [class*="loader-ring"], [class*="roue"]) { border-radius: 2px !important; }
html[data-terminal] .fec-overlay :is(.recap-bar, .kpi, .intent-card, .today-band, .hubsynth, .hg-carte, .hg-sig, .hg-seul, .hg-barre, .repc, .bsecc, .aca-carte),
html[data-terminal] :is(.apop, .memo-modal, .plo-modal, .fintree-modal, .fintree-pal-pop, .atb-card, .atb-kpi, .aex-card, .csn-card, .lbo-card, .lbo-grp,
    .overview-card, .overview-chart-card, .ov4-card, .pilotage-panel, .vl3-panel, .vl3-card, .vl3-root, .vl3-mini, .pdv-card, .aim-modal, .hub-ia-carte, .bk-modal,
    .intent-analyses-btn, .anafi-light, .memo-carte, .spc-carte, .stresspanel-flyout, .custom-dropdown-menu, .iku-toast, .sat, .rcl-modal, .cop-panel) {
    border: 1px solid var(--tm-trait) !important; box-shadow: none !important;
}
html[data-terminal] :is(.fintree-pal-pop, .fintree-tools-menu, .stresspanel-flyout, .custom-dropdown-menu, .iku-tip, .iku-toast, .cop-panel, .aim-modal) {
    border-color: var(--tm-trait-fort) !important;
}

/*  1. INTITULÉS AMBRÉS : titres de fenêtres, de cartes et de sections (même liste que Papier), jamais les chiffres. */
html[data-terminal][data-style] :is(h1, h2, h3):not(:is(input, td, th) *),
html[data-terminal][data-style] .fec-overlay :is(.intent-card-title, .repc-t),
html[data-terminal][data-style] :is(.intent-title, .intent-card-title, .intent-popup-title, .fintree-title, .csn-bar-t, .fe-bar-t, .fintree-pal-title, .recap-modal-title, .an-title, .an-card-title, .finmod-title,
    .rep-h2, .section-block-title, .view-title, .upd-title, .onb-title, .aim-title, .stresspanel-title, .vcre-title, .vcre-panel-title,
    .tcl-chart-title, .cop-chart-title, .pdvb-title, .valorisation-title, .demo-choice-title, .acct-title, .reset-confirm-title,
    .ofr-titre, .atb-card-t, .atb-h, .csn-card-t, .csn-h, .lbo-card-t, .lbo-grp-t, .lbo-h, .ov4-card-t, .rep-card-h, .rep-head-t,
    .actu-title, .share-intro-title, .scen-dlg-title, .save-dlg-title, .crea-lec-h2, .pf-drill-title, .vl3-soccer-title > span) {
    color: var(--tm-ambre) !important; -webkit-text-fill-color: var(--tm-ambre) !important; background-image: none !important;
    font-weight: 700 !important; letter-spacing: .01em !important;
}
/*  Libellés en capitales des chiffres clés : sans l'espacement des lettres (la chasse fixe est déjà large ; « TRÉSORERIE NETTE »
    était tronqué). */
html[data-terminal] .kpi-l { letter-spacing: 0 !important; }
/*  Chiffres clés du hub : un filet supérieur ambre, comme un en-tête de bloc de console. */
html[data-terminal] .fec-overlay .kpi { border-top: 2px solid var(--tm-ambre) !important; }

/*  La photo de couverture n'a pas sa place dans une console : le sol uni. */
html[data-terminal][data-fond] .fec-overlay.est-hub::before, html[data-terminal][data-fond] .fec-overlay.est-hub::after { display: none !important; }

/*  GRAPHIQUES : quadrillage en pointillés serrés, axes à l'encre secondaire, traits fins ; les couleurs des séries restent. */
html[data-terminal][data-style] .apexcharts-canvas .apexcharts-gridline { stroke: var(--tm-trait) !important; stroke-dasharray: 1 3 !important; }
html[data-terminal][data-style] .apexcharts-canvas :is(.apexcharts-xaxis-label, .apexcharts-yaxis-label) { fill: var(--tm-encre-2) !important; }
html[data-terminal][data-style] .apexcharts-canvas .apexcharts-series path.apexcharts-line:not([stroke-width="0"], [stroke-width^="0."], [stroke-width^="1"]) { stroke-width: 1.5px !important; }
html[data-terminal][data-style] .iku-tr-ax { fill: var(--tm-encre-2) !important; }
html[data-terminal][data-style] :is(.vl3-ff-grid, .mx-ff-grid) { stroke: var(--tm-trait-fort) !important; stroke-dasharray: 1 3 !important; }
html[data-terminal][data-style] :is(.vl3-ff-ax, .mx-ff-ax) { fill: var(--tm-encre-2) !important; }
html[data-terminal][data-style] :is(.vl3-ff-ve-t, .mx-ff-ve-t) { fill: var(--tm-ambre) !important; }
html[data-terminal][data-style] :is(.vl3-ff-ve, .mx-ff-ve) { stroke: var(--tm-ambre) !important; }

/*  (fin du style Terminal) */
