/* TrailAdapt — Bauhaus tokens (palette + spacing + Bootstrap overrides)
 * Calque SheetGarde tokens.css. Source : 03-UI-SPEC.md §Color, §Spacing Scale, §Typography.
 * P3 = posé. P5+ = étendu (couches carte, panneaux).
 */

:root {
    /* === Palette Bauhaus (UI-SPEC §Color lignes 142-151) === */
    --bauhaus-noir: #0d0d0d;
    --bauhaus-near-black: #1a1a1a;
    --bauhaus-dark-grey: #333333;
    --bauhaus-mid-grey: #595959;
    --bauhaus-light-grey: #e5e5e5;
    --bauhaus-off-white: #f5f5f5;
    --bauhaus-blanc: #ffffff;
    --bauhaus-vermillon: #D9381E;
    --bauhaus-vermillon-dark: #a82710;
    --bauhaus-vermillon-deep: #861f0d;
    /* P5 UI-SPEC §Color : token réservé exclusivement à `placement_status=manual`
     * (border marker vidéo + badge popup). Contrast 5.24:1 sur blanc → AA.
     * Ne PAS réutiliser pour success generic — distinction sémantique forte. */
    --bauhaus-success-green: #2D7A4F;

    /* === P6 annotations — 2 nouveaux tokens sémantiques (06-CONTEXT D-59) === */
    /* Réservé aux 5 catégories Annotation. Réutilisable P7 commentaires (warning
     * = "à valider", info = "discussion"). NE PAS réutiliser hors composants
     * graphiques (border 2px+, badge fond rempli) — contraste body insuffisant
     * sur warning-orange. Voir 06-UI-SPEC §Color caveats.
     *
     * P16 Plan 16-08 (STAGING-04) — reserved-for élargi : annotation 'verify' (P6)
     * + staging banner (P16). Domaines sémantiquement compatibles (attention/warning
     * UX). Pattern P15 D15-XX moindre prolifération nouveaux tokens. */
    --bauhaus-warning-orange: #E89B1A;  /* catégorie "vérifier" ❓ + staging banner */
    --bauhaus-info-blue: #3A6EA5;       /* catégorie "contournement" ↪️ */

    /* === P7 commentaires — 2 nouveaux tokens sémantiques (07-CONTEXT Claude's Discretion) === */
    /* État résolu : opacité globale 0.4 sur pin + halo + entrée panel ; couleur grise pour
     * halo polyline (Leaflet hardcoded JS-side leçon P05-04, mais token CSS pour cohérence
     * Bauhaus dans .comment-pin--resolved + .comment-panel-item--resolved). Choix `#595959`
     * (= --bauhaus-mid-grey existant) plutôt que `#9B9B9B` initialement envisagé : fallback
     * WCAG recommandé par checker UI-SPEC reviewed_at 2026-04-30 (§FLAG WCAG opacity).
     * Aliasing intentionnel — `--bauhaus-mid-grey` reste la source canonique, `--bauhaus-comment-resolved`
     * documente l'intent sémantique côté composants commentaires. */
    --bauhaus-comment-resolved: var(--bauhaus-mid-grey);     /* alias #595959 */
    --bauhaus-comment-resolved-opacity: 0.4;

    /* === Familles typographiques (UI-SPEC §Typography lignes 129-130) === */
    --bauhaus-font-body: "Inter", system-ui, -apple-system, sans-serif;
    --bauhaus-font-display: "Jost", "Inter", system-ui, sans-serif;

    /* === Spacing 8pt grid (UI-SPEC §Spacing Scale lignes 105-111) === */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* === Overrides Bootstrap CSS vars (UI-SPEC §Color lignes 157-164) === */
    --bs-primary: #D9381E;
    --bs-primary-rgb: 217, 56, 30;
    --bs-body-color: #0d0d0d;
    --bs-body-bg: #ffffff;
    --bs-body-font-family: var(--bauhaus-font-body);
    --bs-success: #2a5f2a;
    --bs-danger: #a82710;

    /* Neutralise tous arrondis Bootstrap (UI-SPEC §Color ligne 163) */
    --bs-border-radius: 0;
    --bs-border-radius-sm: 0;
    --bs-border-radius-lg: 0;
    --bs-border-radius-xl: 0;
    --bs-border-radius-2xl: 0;
    --bs-border-radius-pill: 0;

    /* Neutralise toutes ombres Bootstrap (UI-SPEC §Color ligne 164) */
    --bs-box-shadow: none;
    --bs-box-shadow-sm: none;
    --bs-box-shadow-lg: none;
    --bs-box-shadow-inset: none;
}

/* === Règles globales body + headings (UI-SPEC §Typography lignes 123-130) === */
body {
    font-family: var(--bauhaus-font-body);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.6;
    color: var(--bauhaus-noir);
    background-color: var(--bauhaus-blanc);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--bauhaus-font-display);
    font-weight: 500;
    line-height: 1.2;
}
