:root {
    --qt-up: #22c55e;
    --qt-down: #ef4444;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #0b0f17;
    --bs-tertiary-bg: #131a26;
    --bs-border-color: #222b3a;
}

body { font-variant-numeric: tabular-nums; }

.qt-up { color: var(--qt-up) !important; }
.qt-down { color: var(--qt-down) !important; }

.qt-kpi .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.qt-kpi .value { font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.qt-kpi .sub { font-size: .8rem; color: var(--bs-secondary-color); }

.card { background: var(--bs-tertiary-bg); }
.card-header { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); background: transparent; }

.table { --bs-table-bg: transparent; font-size: .875rem; }
.table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); font-weight: 500; }

.qt-chart { position: relative; height: 280px; }
.qt-login { max-width: 380px; }

/* Nom de société sous le code : une ligne, coupé proprement si trop long */
.qt-name { max-width: 16rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Bulle d'aide « ? » à côté d'un libellé */
.qt-help {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.15em; height: 1.15em; margin-left: .3em; padding: 0;
    border: 1px solid currentColor; border-radius: 50%; background: none;
    color: var(--bs-secondary-color); font-size: .75em; font-weight: 600; line-height: 1;
    text-transform: none; letter-spacing: 0; vertical-align: text-top; cursor: help;
}
.qt-help:hover, .qt-help:focus-visible { color: var(--bs-primary); }
.popover { --bs-popover-max-width: 320px; --bs-popover-font-size: .85rem; }
