/* ==========================================================================
   Thème « cyberdrive » — refonte du 2026-11-06 (maquette « Du Code au Web — refonte »).
   Noir chaud, crème, corail ; titres Silkscreen, texte Inter, chiffres JetBrains Mono ;
   cartes plates aux coins arrondis, sans grain ni code-barres.
   Se superpose à css/app.css + css/themes/paddock.css (même mise en page).
   Ancienne version : /var/backups/ducodeauweb/design-cyberdrive-2026-11-06/css/themes/cyberdrive.css
   Revenir en arrière : copier ce fichier à la place, ou APP_THEME=paddock dans .env + artisan optimize.
   ========================================================================== */
@font-face {
    font-family: "Silkscreen";
    src: url("../../fonts/silkscreen-700-latin.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("../../fonts/inter-latin.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

:root {
    /* Palette de la maquette. Contrastes sur --bg : texte 14:1, --ink-2 7:1, corail 6:1 */
    --bg: #1a1715;
    --bg-2: #231f1c;       /* cartes */
    --bg-3: #2b2623;       /* puces, survols */
    --cream: #f3eadb;
    --red: #f2643f;        /* corail : marque, actif, actions */
    --red-hover: #ff8a6e;
    --red-deep: #c8412a;
    --red-ink: #9e2e1b;
    --ink: var(--cream);
    --ink-2: #b3a696;
    --ink-3: #b3a696;
    --line: #3b3430;
    --line-2: #5a4e45;
    --accent: var(--red);
    --ok: #8fd16a;
    --ok-bg: #26331d;
    --warn: #f0b23e;
    --warn-bg: #3a2e1c;
    --err: #ff6a4d;
    --lock: #f0b23e;
    --water: #26394a;
    --map-bg: #201c19;
    --road: #332d29;
    --nav-w: 84px;
    --glass: #231f1c;
    --glass-2: rgba(243, 234, 219, .04);
    --tile-bg: #231f1c;
    --tile-bg-2: #2b2623;
    --radius: 10px;
    --radius-sm: 6px;
    --font: "Inter", "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --pixel: "Silkscreen", var(--mono);
    --narrow: var(--mono);
    color-scheme: dark;
}

body {
    background: var(--bg);
    background-image: none;
    color: var(--ink);
    font-family: var(--font);
}
::selection { background: var(--red); color: var(--bg); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
a { text-decoration-color: currentColor; }

/* Typographie ----------------------------------------------------------------- */
.display {
    font-family: var(--pixel);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    color: var(--red);
    font-size: clamp(30px, 4.5vw, 56px);
    line-height: 1.05;
}
.display span, .display--home span { color: var(--cream); -webkit-text-stroke: 0; }
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .12em; color: var(--ink-2); }
.h2 {
    font-family: var(--pixel);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: 1.2;
    font-size: clamp(20px, 2.4vw, 32px);
    color: var(--red);
}
.small { color: var(--ink-2); }

/* Cartes ------------------------------------------------------------------------ */
.tile, .kpi, .block, .ov, .chartbox, .tablewrap, .doc, .trip {
    border-radius: var(--radius);
    border-color: var(--line);
}
.tile, .block, .kpi { background: var(--bg-2); }
.tile--glass, .vtile { background-color: var(--bg-2); }
.tile__index {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--bg);
    background: var(--red);
    padding: 2px 7px;
    border-radius: 4px;
}
.tile__index::before { display: none; }
.tile--link { transition: border-color .2s, background-color .2s; }
.tile--link::after { border-radius: var(--radius-sm); border-color: var(--line-2); }
.tile--link:hover, .tile--link:focus-visible { background-color: var(--bg-2); border-color: var(--red); }
.tile--link:hover::after, .tile--link:focus-visible::after { background: var(--red); color: var(--bg); border-color: var(--red); }
.tile__title {
    font-family: var(--pixel);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    line-height: 1.1;
    font-size: clamp(16px, 9cqi, 24px);
    overflow-wrap: anywhere;
}
.tile__meta { color: var(--ink-2); font-size: 15px; }
.home__tiles .tile { container-type: inline-size; }
.tile--link, .home .tile--link { min-height: 0; }
.tile--public { border-color: var(--line); }
.tile--public .tile__title { font-size: clamp(18px, 6cqi, 24px); }
.home .tile--public .tile__index { background: var(--ok); }

/* Boutons ----------------------------------------------------------------------- */
.btn {
    border-radius: var(--radius-sm);
    border-color: var(--line);
    background: transparent;
    color: var(--ink);
    font-family: var(--font);
    font-weight: 600;
    letter-spacing: 0;
}
.btn:hover { border-color: var(--line-2); background: var(--bg-3); }
.btn--primary { background: var(--red); border-color: var(--red); color: var(--bg); box-shadow: none; }
.btn--primary:hover { background: var(--red-hover); border-color: var(--red-hover); color: var(--bg); }
.btn--primary:active { transform: none; background: var(--red-deep); border-color: var(--red-deep); }
.btn--danger { color: var(--err); border-color: rgba(255, 106, 77, .45); }
.btn--danger:hover { color: var(--err); border-color: var(--err); background: transparent; }

/* Formulaires ---------------------------------------------------------------------- */
.field span { color: var(--cream); font-size: 14px; font-weight: 500; }
.field input, .field select, .field textarea, .vtile__select {
    border-radius: var(--radius-sm);
    border-color: var(--line-2);
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { box-shadow: 0 0 0 3px rgba(242, 100, 63, .3); }
.check { min-height: 44px; color: var(--ink-2); }
.check input { accent-color: var(--red); }
.seg { border-radius: var(--radius-sm); border-color: var(--line); background: var(--bg); }
.seg button { border-radius: 0; font-family: var(--font); font-weight: 500; }
.seg button.is-active, .seg a.is-active, .seg [aria-current="page"] { background: var(--cream); color: var(--bg); }
.pill, .chip { border-radius: var(--radius-sm); font-family: var(--font); }
.chip { border-radius: 999px; }
.code, pre, .console__log { border-radius: var(--radius-sm); background: var(--bg); border-color: var(--line); }
.alert { border-radius: var(--radius-sm); }
.alert--ok { border-color: rgba(143, 209, 106, .35); background: var(--ok-bg); color: var(--ok); }
.alert--error, .alert--err { border-color: rgba(255, 106, 77, .4); background: rgba(255, 106, 77, .1); color: var(--err); }
.linkbtn, .kpi__link { color: var(--red); }
.linkbtn:hover, .kpi__link:hover { color: var(--red-hover); }

/* Puces d'état : texte + forme gardés, coins de 6 px comme la maquette */
.badge, .tile__top .access { border-radius: var(--radius-sm); font-family: var(--font); font-weight: 600; font-size: 12px; }
.badge--ok { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.badge--warn { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.badge--bad { background: var(--err); border-color: var(--err); color: var(--bg); }
.pill--on { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.pill--idle { color: var(--warn); background: var(--warn-bg); border-color: transparent; }
.pill--on::before, .pill--idle::before { border-radius: 2px; box-shadow: none; }
.access { border-radius: 4px; font-family: var(--font); }
.demo-badge { border-radius: var(--radius-sm); font-family: var(--font); }

/* Tableaux ---------------------------------------------------------------------- */
.dtable th { font-family: var(--mono); color: var(--ink-2); background: var(--bg-2); }
.dtable th:first-child, .dtable td:first-child,
.carnet .dtable th:first-child, .carnet .dtable td:first-child { background: var(--bg-2); }
.dtable tr.is-clickable:hover td, .dtable tr.is-cursor td { background: rgba(242, 100, 63, .1); }

/* ==========================================================================
   Maps (en direct)
   ========================================================================== */
.maps__map, .leaflet-container { background: #14110f; }
/* Carte de nuit chaude : tuiles inversées, bleutées vers les bruns de la maquette */
.leaflet-tile-pane { filter: invert(1) grayscale(1) brightness(.74) contrast(1.2) sepia(.35) hue-rotate(-18deg) saturate(1.1); }
.maps__map::after { background: linear-gradient(120deg, rgba(26, 23, 21, .3) 0%, rgba(26, 23, 21, 0) 50%, rgba(0, 0, 0, .25) 100%); }
.leaflet-bar { border-radius: var(--radius-sm) !important; border: 1px solid var(--line-2) !important; overflow: hidden; }
.leaflet-bar a { background: var(--bg-2) !important; color: var(--cream) !important; border-color: var(--line) !important; }
.leaflet-bar a:hover { background: var(--red) !important; color: var(--bg) !important; }
.leaflet-control-attribution { background: rgba(26, 23, 21, .8) !important; color: var(--ink-2) !important; }
.leaflet-control-attribution a { color: var(--cream) !important; }
.leaflet-tooltip { border-radius: var(--radius-sm); background: var(--bg-2); color: var(--cream); border-color: var(--line-2); }

.vtile { border-radius: var(--radius); border-color: var(--line); background: var(--bg-2); backdrop-filter: none; -webkit-backdrop-filter: none; overflow-x: hidden; }
.vtile__head { min-width: 0; }
.vtile__head > :first-child { min-width: 0; }
.vtile__name {
    font-family: var(--pixel);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: clamp(16px, 1.6vw, 24px);
    line-height: 1.2;
    min-width: 0;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.vtile__speed { font-family: var(--mono); font-weight: 700; letter-spacing: -.02em; line-height: 1; color: var(--cream); font-size: 72px; }
.vtile__speed small { color: var(--ink-2); font-size: 14px; font-weight: 500; }
.vtile__carnet { font-family: var(--font); font-weight: 600; font-size: 13px; border-radius: var(--radius-sm); padding: 0 12px; flex: none; }
.vtile__carnet:hover { background: var(--bg-3); border-color: var(--line-2); }
.gauge__bar { height: 8px; border-radius: 4px; background: var(--line); }
.gauge__bar span { background: var(--red); border-radius: 4px; }
.gauge__bar span.is-low { background: var(--warn); }
.vrange__val b { font-family: var(--mono); font-weight: 700; font-size: 32px; line-height: 1; color: var(--cream); }
.vrange__arrow { stroke: var(--red); }

.car-marker__dot { background: var(--red); border-color: var(--cream); box-shadow: 0 0 0 6px rgba(242, 100, 63, .2), 0 6px 20px rgba(0, 0, 0, .6); }
.car-marker__pulse { background: rgba(242, 100, 63, .35) !important; }
.locate, .vtile__expand { border-radius: var(--radius-sm) !important; }
.locate { background: var(--bg-2); color: var(--cream); border: 1px solid var(--line-2); }
.locate.is-on { background: var(--cream); color: var(--bg); }
.mapswitch { border-radius: var(--radius-sm); background: rgba(26, 23, 21, .9); }
.mapswitch a { border-radius: var(--radius-sm); font-family: var(--font); font-weight: 500; }

/* ==========================================================================
   Carnet de bord
   ========================================================================== */
.carnet__title { font-size: clamp(24px, 3.2vw, 36px); line-height: 1.1; }
.ov { background: var(--bg-2); }
.ov.is-active, .ov[aria-current="page"] { background: var(--cream); border-color: var(--cream); color: var(--bg); box-shadow: none; }
.ov.is-active .ov__sub, .ov[aria-current="page"] .ov__sub { color: rgba(26, 23, 21, .72); }
.ov.is-active .ov__index, .ov[aria-current="page"] .ov__index { color: var(--red-ink); }
.ov__title { font-family: var(--font); font-weight: 600; }
.ov__value { font-family: var(--mono); font-weight: 700; font-size: 22px; letter-spacing: -.02em; line-height: 1; }
.ov__index { color: var(--red); font-family: var(--mono); }
.kpi dt { font-family: var(--font); font-weight: 500; font-size: 12px; color: var(--ink-2); }
.kpi dd { font-family: var(--mono); font-weight: 700; font-size: 28px; letter-spacing: -.02em; line-height: 1.1; }
.kpi dd small { font-family: var(--font); font-size: 13px; font-weight: 400; color: var(--ink-2); }
.block__title { font-family: var(--mono); color: var(--ink-2); font-size: 12px; letter-spacing: .12em; }
.block__title::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 2px; background: var(--red); vertical-align: 1px; }
.block__note, .kpi__note { color: var(--ink-2); }
.cpanel__scope { color: var(--ink-2); }
.mini__value { font-family: var(--mono); font-weight: 700; font-size: 26px; letter-spacing: -.02em; line-height: 1.1; }
.maint__odo b { font-family: var(--mono); font-size: 20px; font-weight: 700; }
.block .big { font-family: var(--mono); font-weight: 700; }
.carnet__map, .carnet__mapcanvas { border-radius: var(--radius); }
.carnet__map { background: #14110f; }
.carnet__maptoggle { border-radius: var(--radius-sm); background: var(--bg-2); }
.carnet__map.is-collapsed .carnet__maptoggle { font-family: var(--font); font-weight: 600; background: var(--bg-2); }
.carnet__legend { border-radius: var(--radius-sm); background: rgba(26, 23, 21, .9); }

.wchart__hit[aria-pressed="true"] { background: rgba(242, 100, 63, .12); box-shadow: inset 0 -2px 0 var(--red); }
.wchart__lbl, .wchart__day { font-family: var(--mono); font-size: 12px; fill: var(--ink-2); }
.wchart__range.is-bad { stroke: var(--err); }
.wchart__avg { fill: var(--cream); }
.wchart__avg.is-bad { fill: var(--err); }
.chart__axis { font-family: var(--mono); font-size: 12px; }
.chart__tip { background: var(--bg); border-radius: var(--radius-sm); border-color: var(--line-2); }
.trip[aria-pressed="true"] { background: rgba(242, 100, 63, .1); border-color: var(--red); }
.lg--all { background: rgba(243, 234, 219, .5); }
.trip__time { font-family: var(--mono); font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.trip__km { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.trip-all { stroke: var(--cream); stroke-opacity: .32; }
.trip-all:hover { stroke-opacity: .75; }
.trip-line { stroke: var(--red); stroke-width: 5; }
.lg--trip { background: var(--red); }
.trip-end { fill: var(--bg); stroke: var(--cream); stroke-width: 3; }
.lg--end { background: var(--bg); box-shadow: inset 0 0 0 2px var(--cream); }
.maint__bar { border-radius: 4px; background: var(--line); }
.maint__bar span { border-radius: 4px; }
.hbar__lbl, .hbar__val { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.hbar__val { color: var(--cream); }
.hbar__track { background: var(--line); border-radius: 3px; }
.hbar__fill { background: var(--cream); border-radius: 3px; }
.hbar:hover .hbar__fill, .hbar:focus .hbar__fill { background: var(--red); }
.trips__dayhead, .docs .trips__dayhead { font-family: var(--mono); color: var(--ink-2); text-wrap: balance; }
.trips { scrollbar-color: var(--line-2) transparent; }

/* Dialogues et papiers */
.profile, .docdlg { border-radius: var(--radius); background: var(--bg-2); border-color: var(--line-2); box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
.docdlg__actions { background: var(--bg-2); }
.docdlg__fields .h2, .docdlg .h2 { font-size: clamp(16px, 1.8vw, 22px); line-height: 1.4; }
.scan__btn { border-radius: var(--radius); background: rgba(242, 100, 63, .06); }
.scan__btn:hover, .scan__btn:focus-within { background: rgba(242, 100, 63, .12); border-color: var(--red); }
.scan__btn:focus-within { box-shadow: 0 0 0 3px rgba(242, 100, 63, .3); }
.scan__icon { border-radius: var(--radius-sm); background: var(--red); color: var(--bg); }
.doc:hover, .doc:focus-visible { border-color: var(--red); background: rgba(242, 100, 63, .08); }
.doc__thumb { border-radius: var(--radius-sm); }
.doc__thumb.is-generic, .docdlg__photo img.is-generic { background: var(--bg-3); }

.csub__title { font-size: clamp(14px, 1.6vw, 18px); line-height: 1.4; color: var(--cream); }
.csub + .csub { border-top: 1px solid var(--line); background: none; }
.subnav a { font-family: var(--font); font-weight: 500; border-radius: var(--radius-sm); }
.subnav a:hover { background: var(--bg-3); }
.cpanel__head .h2[data-jp]::after {
    content: attr(data-jp) / "";
    display: inline-block;
    margin-left: 14px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 400;
    color: var(--ink-2);
    text-transform: none;
    vertical-align: middle;
}

/* ==========================================================================
   Connexion
   ========================================================================== */
.login__card { background: var(--bg-2); border-color: var(--line); border-radius: 12px; min-width: 0; }
.login__card .eyebrow { color: var(--ink-2); }
.login__card .h2 { font-size: clamp(22px, 7.4vw, 32px); overflow-wrap: anywhere; }
.page-login .login__card .h2::after { content: none; }
.login__card .btn--primary { min-height: 48px; font-size: 16px; }
.version--muted { font-family: var(--mono); }

/* Clavier : le focus reste visible sur les éléments crème et corail */
.ov:focus-visible, .sidenav__link:focus-visible, .btn--primary:focus-visible, .tile--link:focus-visible {
    outline: 2px solid var(--cream);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--red);
}
.seg button:focus, .seg a:focus { outline: none; }
.seg button:focus-visible, .seg a:focus-visible, .mapswitch a:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: -2px;
    box-shadow: none;
}

/* Le texte long ne casse pas la mise en page */
.code { overflow-wrap: anywhere; word-break: normal; }

/* Tablettes ---------------------------------------------------------------------- */
@media (min-width: 761px) and (max-width: 1100px) {
    .ov__value { font-size: 18px; }
    .home .tile__meta { min-height: 2.8em; }
}

/* Mobiles ------------------------------------------------------------------------- */
@media (max-width: 760px) {
    .display { font-size: 30px; }
    .tile__title { font-size: 18px; }
    .sidenav { border-radius: var(--radius); border-color: var(--line-2); background: rgba(26, 23, 21, .96); box-shadow: 0 -1px 0 var(--red) inset; }
    .sidenav__link.is-active { box-shadow: none; }
    .vtile__speed { font-size: 48px; }
    .vtile__name { font-size: 16px; }
    .vtile__status .pill, .vtile__status span { white-space: nowrap; }
    .vrange__val b { font-size: 26px; }
    .carnet__title.display { font-size: min(24px, 6.3vw); }
    .carnet__overview { background: rgba(26, 23, 21, .96); padding-bottom: 9px; }
    .ov { border-radius: var(--radius-sm); }
    .ov__value { font-size: 16px; }
    .ov__title { white-space: nowrap; }
    .kpi dd { font-size: 24px; }
    .wchart__day:nth-of-type(even) { display: none; }
    .trips__dayhead { font-size: 10.5px; letter-spacing: .03em; }
    .eyebrow, .cpanel__scope { letter-spacing: .04em; }
    .carnet__legend { flex-wrap: nowrap; gap: 10px; overflow: hidden; }
    .carnet__legend .lg { white-space: nowrap; }
    .carnet__overview {
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 85%, transparent);
        mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 85%, transparent);
        scroll-padding-inline: 16px;
    }
    .docdlg { box-shadow: none; }
    .docdlg__actions { display: grid; grid-template-columns: 1fr 1fr; }
    .docdlg__actions .btn--primary { grid-column: 1 / -1; order: -1; }
    .docdlg__spacer { display: none; }
    .cpanel__head .h2[data-jp]::after { display: block; margin: 6px 0 0; }
}
@media (max-width: 760px) and (max-height: 700px) {
    .docdlg__actions { grid-template-columns: 2fr 1fr 1fr; }
    .docdlg__actions .btn--primary { grid-column: auto; order: 0; }
    .docdlg__actions .btn { padding-inline: 8px; }
}
@media (max-width: 420px) {
    .carnet__tools { width: 100%; min-width: 0; }
    .carnet__period { width: 100%; }
    .carnet__period button { flex: 1 1 0; min-width: 0; padding: 0 4px; font-size: 12px; }
}

/* ==========================================================================
   Structure de la maquette « refonte » : menu à libellés, accueil, connexion, tableau de bord
   ========================================================================== */

/* Menu latéral : colonne pleine hauteur, libellé sous chaque icône ------------------ */
.sidenav__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 44px;
    border: 1px solid var(--red);
    border-radius: 0;
    background: transparent;
    color: var(--red);
    font-family: var(--pixel);
    font-size: 12px;
    letter-spacing: 0;
    text-decoration: none;
}
.sidenav__list { border: 0; padding: 0; gap: 6px; }
.sidenav__link {
    position: relative;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--ink-2);
    font: 500 11px/1 var(--font);
    text-decoration: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.sidenav__link:hover { background: var(--bg-3); color: var(--cream); border: 0; }
.sidenav__link.is-active { background: var(--cream); color: var(--bg); font-weight: 600; box-shadow: none; }
.sidenav__text { display: none; }
.sidenav__access { position: absolute; top: 6px; right: 10px; bottom: auto; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); }
.sidenav__access svg { width: 9px; height: 9px; }
.sidenav__link.is-active .sidenav__access { border-color: var(--bg); }

@media (min-width: 761px) {
    .sidenav {
        top: 0;
        bottom: 0;
        left: 0;
        width: var(--nav-w);
        height: 100vh;
        height: 100dvh;
        transform: none;
        align-items: center;
        gap: 6px;
        padding: 20px 0;
        border: 0;
        border-right: 1px solid var(--line);
        border-radius: 0;
        background: var(--bg);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .sidenav__brand { margin-bottom: 14px; }
    .sidenav__foot { margin-top: auto; }
    .sidenav__link {
        width: 68px;
        height: auto;
        min-height: 56px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
    .sidenav__text { display: block; }
    .sidenav__link svg { width: 20px; height: 20px; }
}

/* Accueil ------------------------------------------------------------------------ */
.home__head, .home__main { width: 100%; max-width: 1180px; margin-inline: auto; }
.home__brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cream); }
.home__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 40px;
    border: 1px solid var(--red);
    color: var(--red);
    font: 700 12px var(--pixel);
}
.home__main { gap: 48px; }
.home__hero { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.home__intro { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.home__intro .display--home { margin: 0; }
.home__jp { margin: 0; font: 400 14px/1.4 var(--font); color: var(--ink-2); }
.home__lede { margin: 0; max-width: 520px; font: 400 17px/1.5 var(--font); color: var(--ink-2); }
.home__sun { flex-shrink: 0; color: var(--red); }
@media (max-width: 720px) { .home__sun { display: none; } }
.home__public { display: flex; flex-direction: column; gap: 14px; }
.home__label { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; }
.home__tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.home .tile--link::after { display: none; }
.home .tile--public { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 22px; min-height: 0; container-type: normal; }
.home .tile--public .tile__body { flex: 1 1 auto; }
.tile__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tile--public .tile__title { font-size: 20px; }
.tile__arrow { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home__access {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    background: var(--bg-2);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--cream);
    transition: border-color .2s;
}
.home__access:hover, .home__access:focus-visible { border-color: var(--red); }
.home__access-body { display: flex; align-items: flex-start; gap: 16px; flex: 1 1 320px; }
.home__access-icon { width: 44px; height: 44px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--bg-3); border-radius: 8px; color: var(--red); }
.home__access-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.home__access-text { display: flex; flex-direction: column; gap: 4px; }
.home__access-text h2 { margin: 0; font: 600 17px var(--font); color: var(--cream); }
.home__access-text p { margin: 0; font: 400 15px/1.5 var(--font); color: var(--ink-2); }
.home__access-cta { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 22px; font-size: 15px; }
.home__access-cta svg, .dash__actions .btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Connexion ------------------------------------------------------------------------ */
.login__wrap { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 28px; }
.login__back { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink-2); font: 500 14px var(--font); text-decoration: none; }
.login__back:hover { color: var(--cream); }
.login__back svg, .login__head .eyebrow svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login__back svg { width: 16px; height: 16px; }
.login__head { display: flex; flex-direction: column; gap: 10px; }
.login__head .eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.login__head .eyebrow svg { width: 14px; height: 14px; stroke: var(--red); }
.login__head .h2 { margin: 0; font-size: 32px; line-height: 1.1; }
.login__card { width: 100%; display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.login__card .field { display: flex; flex-direction: column; gap: 8px; }
.login__card .field > span, .login__card .field > label > span { color: var(--cream); font: 500 14px var(--font); }
.login__card .field input { min-height: 48px; padding: 0 14px; font-size: 16px; }
.field__pass { display: flex; align-items: stretch; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius-sm); }
.field__pass:focus-within { border-color: var(--red); }
.login__card .field__pass input { flex: 1 1 auto; min-width: 0; min-height: 46px; border: 0; background: transparent; box-shadow: none; }
.field__eye { width: 48px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; border-left: 1px solid var(--line); color: var(--ink-2); cursor: pointer; }
.field__eye:hover, .field__eye[aria-pressed="true"] { color: var(--red); }
.field__eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login__card .check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.login__card .check input { width: 20px; height: 20px; margin: 0; }
.login__card .btn--primary { margin-top: 0; min-height: 48px; font-size: 16px; }
.login__note { margin: 0; font: 400 13px/1.5 var(--font); color: var(--ink-2); text-align: center; }

/* Tableau de bord ------------------------------------------------------------------- */
.dash { padding: 32px clamp(16px, 4vw, 56px) 56px calc(var(--nav-w) + clamp(16px, 4vw, 56px)); }
.dash > * { max-width: 1180px; }
.dash { display: flex; flex-direction: column; gap: 28px; }
.dash__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.dash__title { display: flex; flex-direction: column; gap: 8px; }
.dash__title .eyebrow { margin: 0; }
.dash__title .display { margin: 0; font-size: 36px; line-height: 1; }
.dash__car { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dash__car-body { padding: clamp(18px, 3vw, 28px); display: flex; flex-direction: column; gap: 20px; }
.dash__car-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.dash__car-top .h2 { margin: 0; font-size: 24px; color: var(--cream); }
.dash__status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius-sm); font: 600 13px var(--font); }
.dash__status i { width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.dash__status--ok { background: var(--ok-bg); color: var(--ok); }
.dash__status--warn { background: var(--warn-bg); color: var(--warn); }
.dash__status--off { background: var(--bg-3); color: var(--ink-2); }
.dash__where { display: flex; align-items: flex-start; gap: 10px; margin: 0; font: 500 17px/1.4 var(--font); }
.dash__where svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dash__where small { display: block; font-size: 14px; font-weight: 400; color: var(--ink-2); }
.dash__figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.dash__figures > div { display: flex; flex-direction: column; gap: 4px; }
.dash__figures dt { font: 500 12px var(--font); color: var(--ink-2); }
.dash__figures dd { margin: 0; font: 700 clamp(22px, 3vw, 28px) var(--mono); letter-spacing: -.02em; }
.dash__figures dd small { font: 400 13px var(--font); color: var(--ink-2); letter-spacing: 0; }
.dash__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.dash__actions .btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px; font-size: 15px; text-decoration: none; }
.dash__map { position: relative; min-height: 220px; background: var(--map-bg); box-shadow: inset 1px 1px 0 var(--line); overflow: hidden; }
.dash__map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dash__tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.dash__tile { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--cream); text-decoration: none; transition: border-color .2s; }
.dash__tile:hover, .dash__tile:focus-visible { border-color: var(--red); }
.dash__tile .eyebrow { margin: 0; }
.dash__tile strong { font: 600 22px/1.2 var(--font); }
.dash__tile strong.is-warn { color: var(--warn); }
.dash__tile-sub { font: 400 14px/1.4 var(--font); color: var(--ink-2); }
@media (max-width: 760px) {
    .sidenav { max-width: calc(100vw - 16px); }
    .sidenav__brand { width: 40px; height: 40px; font-size: 10px; margin: 0; flex: none; }
    .sidenav__link { width: 40px; min-height: 40px; height: 40px; }
    .sidenav__access { right: 3px; top: 3px; }
    .dash { padding: 20px 16px 96px; }
    .home { padding-bottom: 96px; }
    .dash__title .display { font-size: 28px; }
}

/* ==========================================================================
   Carte (/maps) : sélecteur En direct / Carnet, contrôles en haut à droite, carte du véhicule
   ========================================================================== */
.mapswitch, .page-maps .mapswitch {
    display: flex;
    height: auto;
    padding: 4px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.mapswitch a { min-height: 40px; padding: 0 16px; border-radius: 5px; color: var(--cream); font: 500 14px var(--font); letter-spacing: 0; }
.mapswitch a.is-active { background: var(--cream); color: var(--bg); font-weight: 600; }
@media (min-width: 761px) { .mapswitch, .page-maps .mapswitch { top: 20px; left: calc(var(--nav-w) + 20px); } }

/* Zoom et jour/nuit en une pile, en haut à droite comme la maquette */
.leaflet-top .leaflet-control { margin-top: 20px; }
.leaflet-right .leaflet-control { margin-right: 20px; }
.leaflet-top.leaflet-right .leaflet-control + .leaflet-control { margin-top: 8px; }
.leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 20px; }
.leaflet-control-mapmode a { display: flex; align-items: center; justify-content: center; }
@media (max-width: 760px) { .leaflet-bottom .leaflet-control { margin-bottom: 20px; } }

/* Carte du véhicule */
.vtile { display: flex; flex-direction: column; gap: 18px; }
.vtile__head { align-items: center; }
.vtile__id { min-width: 0; }
.vtile__id .eyebrow { margin: 0 0 4px; font-size: 11px; }
.vtile__actions { gap: 8px; flex: none; }
.vtile__live { margin-top: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; flex-wrap: nowrap; gap: 18px; }
.vtile__where { display: flex; flex-direction: column; gap: 2px; }
.vtile__addr { font: 500 16px/1.35 var(--font); color: var(--cream); }
.vtile__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font: 400 13px var(--font); color: var(--ink-2); }
.vtile__sub .vtile__ago { font: inherit; color: inherit; }
.vtile__sub .vsig { margin-left: 0; }
.vtile__stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; border-block: 1px solid var(--line); }
.vtile__stat { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 14px 0 14px 14px; border-left: 1px solid var(--line); }
.vtile__stat:first-child { padding-left: 0; border-left: 0; }
.vtile__stat dt { margin: 0; font: 500 12px var(--font); color: var(--ink-2); }
.vtile__stat dd { margin: 0; font: 700 24px/1.1 var(--mono); letter-spacing: -.02em; color: var(--cream); font-variant-numeric: tabular-nums; }
.vtile__stat dd small { margin-left: 4px; font: 400 13px var(--font); letter-spacing: 0; color: var(--ink-2); }
.vtile__stat.vrange { display: flex; margin: 0; padding: 14px 0 14px 14px; border-left: 1px solid var(--line); }
.vtile__stat[hidden], .vtile__stat.vrange[hidden] { display: none !important; }
.vrange.is-low dd { color: var(--warn); }
.vtile .gauge { margin: 0; }
.vtile__buttons { display: flex; gap: 10px; }
.vtile__buttons .btn { flex: 1 1 0; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; font-size: 14px; text-decoration: none; }
.vtile__buttons .btn[hidden] { display: none; }
.vtile__buttons svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.pill--off { color: var(--ink-2); background: var(--bg-3); border-color: transparent; }
.pill--on, .pill--idle, .pill--off { padding: 5px 10px; font: 600 13px var(--font); }

@media (min-width: 761px) {
    .vtile {
        top: auto;
        right: auto;
        left: calc(var(--nav-w) + 20px);
        bottom: 20px;
        width: 380px;
        max-height: calc(100% - 100px);
        padding: 22px;
        background: var(--bg);
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
    }
}
@media (max-width: 760px) {
    .vtile { gap: 12px; }
    .vtile__live { gap: 12px; }
    .vtile__addr { font-size: 15px; }
    .vtile__stat { padding: 10px 0 10px 12px; }
    .vtile__stat dd { font-size: 20px; }
    .vtile__buttons .btn { min-height: 44px; }
}

/* ==========================================================================
   Carnet de bord : en-tête, onglets, bandeau de chiffres, trajets, factures, santé
   ========================================================================== */
.carnet { padding: 32px clamp(16px, 4vw, 56px) 56px calc(var(--nav-w) + clamp(16px, 4vw, 56px)); max-width: none; }
.carnet__head { grid-template-areas: "demo demo" "titles tools"; align-items: end; row-gap: 12px; }
.carnet__head .mapswitch { display: none; }
.carnet__demo { grid-area: demo; }
.carnet__titles .eyebrow { margin: 0 0 8px; }
.carnet__title.display { font-size: clamp(28px, 3.2vw, 40px); line-height: 1; }
.carnet__tools { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 16px; }
.carnet__period { padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.carnet__period button { min-height: 40px; padding: 0 16px; border-radius: 5px; font: 500 13px var(--mono); color: var(--cream); }
.carnet__period button.is-active { background: var(--cream); color: var(--bg); font-weight: 700; }
.carnet__updated { font: 400 13px var(--font); color: var(--ink-2); }
.carnet__refresh { border-radius: var(--radius-sm); }
.carnet__custom { justify-content: flex-end; }

/* Onglets : texte souligné en corail, compteur ambre sur Santé */
.carnet__overview, .carnet__overview:not(#x) {
    display: flex;
    gap: 8px;
    margin: 28px 0 24px;
    padding: 0;
    border-bottom: 1px solid var(--line);
    background: none;
    -webkit-mask-image: none;
    mask-image: none;
    overflow-x: auto;
    scrollbar-width: none;
}
.carnet__overview::-webkit-scrollbar { display: none; }
.ov, .ov:not(#x) {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    margin-bottom: -1px;
    padding: 0 18px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--ink-2);
    font: 500 16px var(--font);
    box-shadow: none;
}
.ov:hover:not(#x) { background: transparent; color: var(--cream); border-bottom-color: var(--line-2); }
.ov.is-active:not(#x), .ov[aria-current="page"]:not(#x) { background: transparent; color: var(--cream); border-bottom-color: var(--red); font-weight: 600; box-shadow: none; }
.ov .ov__index, .ov .ov__value, .ov .ov__sub { display: none !important; }
.ov__title { font: inherit; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.ov__badge { order: 2; justify-self: auto; }
.ov__badge .badge { font-size: 11px; padding: 2px 8px; }
.ov.is-active .badge { background: var(--warn-bg); }
.ov__count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font: 700 12px var(--mono); }

/* Panneaux : le titre de section reste pour les lecteurs d'écran, la période s'affiche à droite */
#trajets > .cpanel__head .h2, #factures > .cpanel__head .h2, #infos > .cpanel__head .h2, #sante .csub__title {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
#trajets > .cpanel__head, #factures > .cpanel__head, #sante > .cpanel__head { justify-content: flex-end; }
#infos > .cpanel__head { justify-content: flex-start; }
.cpanel__scope { font: 400 13px var(--font); letter-spacing: 0; color: var(--ink-2); }
.cpanel { gap: 24px; }

/* Bandeau de chiffres : un seul cadre, cellules séparées par des filets */
.kpis, .kpis:not(#x) {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    overflow: hidden;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.kpis[hidden], .grid2[hidden] { display: none !important; }
.kpis > .kpi {
    flex: 1 1 200px;
    min-width: 0;
    margin: 0 -1px -1px 0;
    padding: 20px 20px 18px;
    border: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}
.kpi--warn, .kpi--bad { box-shadow: none; }
.kpi dt { margin: 0 0 8px; font: 500 13px var(--font); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.kpi dd { margin: 0 0 4px; font: 700 clamp(24px, 2.6vw, 32px)/1.1 var(--mono); letter-spacing: -.02em; }
.kpi dd small { margin-left: 6px; font: 500 14px var(--mono); letter-spacing: 0; color: var(--ink-2); }
.kpi__note { margin: 6px 0 0; font: 400 12px/1.4 var(--font); color: var(--ink-2); }
.kpi .badge { margin-top: 6px; }
.kpi--fine dt { display: flex; align-items: center; color: var(--cream); }
.kpi__dot { display: inline-block; flex: none; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--ok); }

/* Cartes de contenu */
.block, .block:not(#x) { padding: 22px 24px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.block__row { margin-bottom: 16px; }
.block__title { margin: 0; font: 600 17px var(--font); letter-spacing: 0; text-transform: none; color: var(--cream); }
.block__title::before { display: none; }
.trips-cols { gap: 24px; }
.docs-left { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* Kilomètres : barres crème, la plus récente en corail */
.hbar__lbl, .hbar__val { font: 500 13px var(--mono); }
.hbar__track { height: 16px; background: var(--bg-3); border-radius: 3px; }
.hbar__fill { border-radius: 3px; background: var(--cream); }
.hbar:first-child .hbar__fill { background: var(--red); }

/* Liste des trajets : l'heure et les km en gras, détail dessous */
.trips { gap: 0; }
.trips__day { display: block; }
.trips__dayhead { margin: 0; padding: 14px 8px 8px; font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.trip, .trip:not(#x) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "time time km" "dur speed cost";
    gap: 4px 0;
    align-items: baseline;
    margin: 0;
    padding: 14px 12px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
}
.trip:hover { background: var(--bg-3); }
.trip[aria-pressed="true"] { background: var(--bg-3); box-shadow: inset 3px 0 0 var(--red); }
.trip__time { grid-area: time; font: 700 16px var(--mono); letter-spacing: -.01em; }
.trip__km { grid-area: km; justify-self: end; font: 700 16px var(--mono); }
.trip__dur { grid-area: dur; font: 400 13px var(--font); color: var(--ink-2); }
.trip__dur::after { content: " · "; white-space: pre; }
.trip__speed { grid-area: speed; font: 400 13px var(--font); color: var(--ink-2); }
.trip__cost { grid-area: cost; justify-self: end; font: 400 13px var(--font); color: var(--ink-2); }

/* Papiers */
.docs { gap: 0; }
.doc, .doc:not(#x) { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 12px 8px; }
.doc__thumb { border-radius: var(--radius-sm); }
.doc__what { font: 600 15px var(--font); }
.doc__when { font: 400 13px var(--font); color: var(--ink-2); }
.doc__eur { font: 700 16px var(--mono); }
.scan, .scan:not(#x) {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 24px;
    text-align: center;
    background: transparent;
    border: 1px dashed var(--line-2);
    border-radius: var(--radius);
}
.scan__btn { width: 100%; max-width: 360px; justify-content: flex-start; text-align: left; border-style: solid; border-color: var(--line); border-radius: var(--radius-sm); background: var(--bg-2); }
.scan__text b { font: 600 15px var(--font); }
.scan__manual { font: 400 14px var(--font); color: var(--ink-2); }
.scan__status { margin: 0; }

/* Santé : verdict, points à surveiller, ce qui va bien */
.verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 24px; padding: 24px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
.verdict:empty { display: none; }
.verdict__icon { display: flex; flex: none; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 8px; background: var(--bg-3); color: var(--ink-2); }
.verdict__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.verdict__icon--ok { background: var(--ok-bg); color: var(--ok); }
.verdict__icon--warn { background: var(--warn-bg); color: var(--warn); }
.verdict__icon--bad { background: rgba(255, 106, 77, .14); color: var(--err); }
.verdict__text { flex: 1 1 320px; min-width: 0; }
.verdict__title { margin: 0; font: 600 20px/1.3 var(--font); color: var(--cream); }
.verdict__lead { margin: 4px 0 0; font: 400 15px/1.5 var(--font); color: var(--ink-2); }
.verdict__counts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; font: 600 13px var(--mono); }
.verdict__n { display: inline-flex; align-items: center; gap: 8px; }
.verdict__n::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.verdict__n--warn { color: var(--warn); }
.verdict__n--warn::before { border-radius: 2px; background: var(--warn); }
.watch__label { margin: 0 0 12px; }
.watch__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 16px; }
.watch__card { padding: 20px 22px; background: var(--bg-2); border: 1px solid rgba(240, 178, 62, .45); border-radius: var(--radius); }
.watch__card--bad { border-color: rgba(255, 106, 77, .6); }
.watch__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.watch__title { margin: 0; font: 600 16px var(--font); color: var(--cream); }
.watch__value { margin: 0; font: 700 28px var(--mono); letter-spacing: -.02em; color: var(--warn); }
.watch__card--bad .watch__value { color: var(--err); }
.watch__value small { font: 500 14px var(--mono); color: var(--ink-2); }
.watch__note { margin: 10px 0 0; font: 400 14px/1.5 var(--font); color: var(--ink-2); }
.csub { gap: 24px; }

@media (max-width: 760px) {
    .carnet { padding: 20px 16px 96px; }
    .carnet__head { grid-template-areas: "demo" "titles" "tools"; }
    .carnet__tools { justify-content: flex-start; }
    .ov { padding: 0 14px; font-size: 15px; }
    .kpis > .kpi { flex-basis: 140px; padding: 16px; }
    .trip { padding: 12px 6px; }
    .verdict { padding: 18px; }
}

/* ==========================================================================
   Bourse : même mise en page que les autres pages privées
   ========================================================================== */
.bourse, .bourse:not(#x) { padding: 32px clamp(16px, 4vw, 56px) 56px calc(var(--nav-w) + clamp(16px, 4vw, 56px)); max-width: none; gap: 24px; }
.bourse > * { max-width: 1180px; }
.bourse__head .eyebrow { margin: 0 0 8px; }
.bourse__title.display { font-size: clamp(28px, 3.2vw, 40px); line-height: 1; }
.bourse__warning { border-radius: var(--radius-sm); border-color: rgba(240, 178, 62, .45); background: var(--warn-bg); font: 400 14px/1.5 var(--font); color: var(--cream); }
.bourse__error { border-radius: var(--radius-sm); border-color: rgba(255, 106, 77, .45); background: rgba(255, 106, 77, .1); }
.bourse__count { font: 400 13px var(--font); }
.bfiche__name { font: 600 18px var(--font); }
.bsim__h { font: 600 16px var(--font); color: var(--cream); }

/* Indicateurs de la fiche : un bandeau de chiffres */
.bind, .bind:not(#x) { display: flex; flex-wrap: wrap; gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); }
.bind__item { flex: 1 1 220px; min-width: 0; margin: 0 -1px -1px 0; padding: 18px 20px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; }
.bind__item dt { font: 500 13px var(--font); letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.bind__val { font: 700 20px/1.25 var(--mono); letter-spacing: -.02em; overflow-wrap: anywhere; }
.bind__tag { font: 600 12px var(--font); color: var(--warn); }
.bind__why { font: 400 12px/1.5 var(--font); }

/* Titres suivis : sélection corail */
.bourse .bourse__table tr.is-selected td { background: var(--bg-3); }
.bourse .bourse__table tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.bourse .bourse__row:hover td { background: var(--bg-3); }
.bourse__pick[aria-pressed="true"] .bourse__tname::before { color: var(--red); }
.bourse__tname { font: 600 15px var(--font); }
.bourse__tsym { font: 500 12px var(--mono); }

@media (max-width: 1099px) { .bourse, .bourse:not(#x) { padding: 24px 16px 96px calc(var(--nav-w) + 16px); } }
@media (max-width: 760px) {
    .bourse, .bourse:not(#x) { padding: 20px 16px calc(58px + 40px + env(safe-area-inset-bottom)); }
    .bourse__title.display { font-size: 28px; }
    .bind__item { flex-basis: 100%; }
}
