/* ============================================================================
   BARBAROS — home-command.css (Accueil · Centre de commande + Spotlight)
   Pairs with home-command.js. Every rule is scoped to #homeCmd (or #hcTip) under
   html[data-buld-theme]; colours come from --buld-* tokens only (local --hc-* aliases below).
   Class names avoid card / -card / -chip / -tag / -box / block / badge / status — the legacy
   wildcard painters in dark-fix.css / buld-theme.css / sidebar.css would repaint them.
   Collision list (the only !important rules):
     · #panel-overview.hc-on > legacy children: display:none!important — legacy inline/JS styles
       (BuldGuard, analytics-premium) set display on some of them.
     · #homeCmd button / table cells / thead: background/border/color/box-shadow/text-transform
       !important against the global `button`, `thead`, `th`, `td` and `[class*="btn"]` painters in
       orders.css / buld-theme.css (they uppercase th and paint a thead band).
   ============================================================================ */

/* ---- integration: hide the legacy overview (kept in the DOM, scripts still write to it) ---- */
html[data-buld-theme] #panel-overview.hc-on > :not(#homeCmd):not(#storeWizard):not(#onboardingHero):not(#onboardingHidden):not(script):not(style) { display: none !important; }

/* ---- local aliases ---- */
html[data-buld-theme] #homeCmd {
    --hc-pane: var(--p-card-bg, var(--buld-elevated));
    --hc-in: var(--buld-surface-2);
    --hc-btn-bg: color-mix(in srgb, var(--buld-ink-1) 8%, var(--hc-pane));
    --hc-btn-hv: color-mix(in srgb, var(--buld-ink-1) 14%, var(--hc-pane));
    --hc-acc: var(--buld-cta);
    --hc-ok: var(--buld-success);
    --hc-warn: var(--buld-warning);
    --hc-bad: var(--buld-danger);
    --hc-vio: color-mix(in oklab, var(--buld-cta) 52%, var(--buld-danger));
    --hc-line: var(--buld-divider);
    --hc-hair: var(--buld-hairline);
    --hc-row-hv: color-mix(in srgb, var(--buld-ink-1) 5%, transparent);
    --hc-map-base: color-mix(in oklab, var(--buld-ink-1) 13%, var(--hc-pane));
    --hc-map-stroke: var(--hc-pane);
    --hc-display: "SF Pro Display", "Inter Tight", "Segoe UI", system-ui, -apple-system, sans-serif;
    --hc-ease: cubic-bezier(.2, .7, .2, 1);
    --hc-r: 18px;
    display: block;
    color: var(--buld-ink-1);
    font-size: 13px;
    line-height: 1.45;
    letter-spacing: -.006em;
    margin: 0 0 28px;
    min-width: 0;
}
html[data-buld-theme="light"] #homeCmd { --hc-in: color-mix(in srgb, var(--buld-ink-1) 4%, var(--hc-pane)); --hc-map-base: color-mix(in oklab, var(--buld-ink-1) 9%, var(--hc-pane)); }
html[data-buld-theme] #homeCmd *, html[data-buld-theme] #homeCmd *::before, html[data-buld-theme] #homeCmd *::after { box-sizing: border-box; }
html[data-buld-theme] #homeCmd svg.lucide { width: 16px; height: 16px; flex: none; stroke-width: 1.75; }
html[data-buld-theme] #homeCmd i[data-lucide] { display: inline-block; width: 16px; height: 16px; flex: none; }

/* ---- primitives ---- */
html[data-buld-theme] #homeCmd .hc-pane { background: var(--hc-pane); border: 1px solid var(--p-card-border, var(--hc-hair)); border-radius: var(--hc-r); padding: 18px 20px; min-width: 0; position: relative; color: var(--buld-ink-1); box-shadow: var(--bx-shadow-1, 0 18px 40px -24px rgba(0, 0, 0, .55)); }
html[data-buld-theme] #homeCmd .hc-g { display: grid; gap: 16px; }
html[data-buld-theme] #homeCmd .hc-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
html[data-buld-theme] #homeCmd .hc-between { justify-content: space-between; }
html[data-buld-theme] #homeCmd .hc-grow { flex: 1; min-width: 0; }
html[data-buld-theme] #homeCmd .hc-minw { min-width: 0; }
html[data-buld-theme] #homeCmd .hc-sp { flex: 1; }
html[data-buld-theme] #homeCmd .hc-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-buld-theme] #homeCmd .hc-tnum { font-variant-numeric: tabular-nums; }
html[data-buld-theme] #homeCmd .hc-strong { font-weight: 600; }
html[data-buld-theme] #homeCmd .hc-xs { font-size: 11px; }
html[data-buld-theme] #homeCmd .hc-sub { font-size: 12px; color: var(--buld-ink-3); }
html[data-buld-theme] #homeCmd .hc-mut { color: var(--buld-ink-3); }
html[data-buld-theme] #homeCmd .hc-faint { color: var(--buld-ink-4); }
html[data-buld-theme] #homeCmd .hc-lab { font: 500 11px/1.3 inherit; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--buld-ink-3); }
html[data-buld-theme] #homeCmd .hc-ph { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-height: 28px; flex-wrap: wrap; }
html[data-buld-theme] #homeCmd .hc-ttl { font-weight: 600; font-size: 13px; line-height: 1.3; color: var(--buld-ink-1); display: inline-flex; align-items: center; gap: 8px; }
html[data-buld-theme] #homeCmd .hc-ttl svg { color: var(--buld-ink-3); }
html[data-buld-theme] #homeCmd .hc-num { font: 600 28px/1.05 var(--hc-display); letter-spacing: -.025em; font-variant-numeric: tabular-nums; color: var(--buld-ink-1); }
html[data-buld-theme] #homeCmd .hc-num--sm { font-size: 20px; }
html[data-buld-theme] #homeCmd .hc-num--xl { font-size: 48px; letter-spacing: -.045em; }
html[data-buld-theme] #homeCmd .hc-num[data-tone="ok"] { color: var(--hc-ok); }
html[data-buld-theme] #homeCmd .hc-num[data-tone="warn"] { color: var(--hc-warn); }
html[data-buld-theme] #homeCmd .hc-num[data-tone="bad"] { color: var(--hc-bad); }
html[data-buld-theme] #homeCmd .hc-big { font: 600 40px/1.05 var(--hc-display); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
html[data-buld-theme] #homeCmd .hc-dl { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 999px; font-variant-numeric: tabular-nums; white-space: nowrap; }
html[data-buld-theme] #homeCmd .hc-dl svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html[data-buld-theme] #homeCmd .hc-dl.is-up { color: var(--hc-ok); background: color-mix(in srgb, var(--hc-ok) 14%, transparent); }
html[data-buld-theme] #homeCmd .hc-dl.is-down { color: var(--hc-bad); background: color-mix(in srgb, var(--hc-bad) 14%, transparent); }
html[data-buld-theme] #homeCmd .hc-dl--na { color: var(--buld-ink-3); background: var(--hc-in); font-weight: 500; }
html[data-buld-theme] #homeCmd .hc-icb { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--hc-in); color: var(--buld-ink-2); font-size: 11px; }
html[data-buld-theme] #homeCmd .hc-icb--sm { width: 28px; height: 28px; border-radius: 8px; }
html[data-buld-theme] #homeCmd .hc-icb--sm svg { width: 14px; height: 14px; }
html[data-buld-theme] #homeCmd .hc-code { font-weight: 600; font-size: 10.5px; line-height: 1; color: var(--buld-ink-3); background: var(--hc-in); border-radius: 6px; padding: 4px 6px; font-variant-numeric: tabular-nums; flex: none; }
html[data-buld-theme] #homeCmd .hc-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }
html[data-buld-theme] #homeCmd .hc-bar { display: block; height: 6px; border-radius: 999px; background: var(--hc-hair); overflow: hidden; }
html[data-buld-theme] #homeCmd .hc-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--hc-acc); transform-origin: left; animation: hc-grow .9s var(--hc-ease) both; }
html[data-buld-theme] #homeCmd .hc-hr { height: 1px; background: var(--hc-hair); margin: 14px 0; }
html[data-buld-theme] #homeCmd .hc-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 11px; color: var(--buld-ink-3); }
html[data-buld-theme] #homeCmd .hc-legend > i { display: block; width: 120px; height: 6px; border-radius: 999px; }
html[data-buld-theme] #homeCmd .hc-empty { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 18px 4px; color: var(--buld-ink-3); font-size: 12.5px; }
html[data-buld-theme] #homeCmd .hc-empty svg { color: var(--buld-ink-4); }
html[data-buld-theme] #homeCmd .hc-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 3px; border-radius: 999px; font-size: 11.5px; font-weight: 500; color: var(--buld-ink-2); background: var(--hc-in); white-space: nowrap; }
html[data-buld-theme] #homeCmd .hc-src { width: 20px; height: 20px; border-radius: 7px; display: inline-grid; place-items: center; font-weight: 700; font-size: 9px; letter-spacing: .02em; flex: none; --hue: 210; color: hsl(var(--hue) 70% 62%); background: hsl(var(--hue) 60% 55% / .16); }
html[data-buld-theme] #homeCmd .hc-fi .hc-src { width: 34px; height: 34px; border-radius: 10px; font-size: 10px; }
html[data-buld-theme] #homeCmd .hc-ava { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 11px; line-height: 1; color: #fff; flex: none; --hue: 210; background: hsl(var(--hue) 38% 46%); }
html[data-buld-theme] #homeCmd [data-hue="0"] { --hue: 0; } html[data-buld-theme] #homeCmd [data-hue="1"] { --hue: 30; } html[data-buld-theme] #homeCmd [data-hue="2"] { --hue: 60; } html[data-buld-theme] #homeCmd [data-hue="3"] { --hue: 140; }
html[data-buld-theme] #homeCmd [data-hue="4"] { --hue: 175; } html[data-buld-theme] #homeCmd [data-hue="5"] { --hue: 210; } html[data-buld-theme] #homeCmd [data-hue="6"] { --hue: 255; } html[data-buld-theme] #homeCmd [data-hue="7"] { --hue: 300; }
html[data-buld-theme] #homeCmd .hc-sl { font-weight: 600; font-size: 10.5px; line-height: 1; padding: 4px 7px; border-radius: 6px; white-space: nowrap; display: inline-flex; }
html[data-buld-theme] #homeCmd .hc-sl--info { color: var(--hc-acc); background: color-mix(in srgb, var(--hc-acc) 14%, transparent); }
html[data-buld-theme] #homeCmd .hc-sl--success { color: var(--hc-ok); background: color-mix(in srgb, var(--hc-ok) 13%, transparent); }
html[data-buld-theme] #homeCmd .hc-sl--warning { color: var(--hc-warn); background: color-mix(in srgb, var(--hc-warn) 14%, transparent); }
html[data-buld-theme] #homeCmd .hc-sl--danger { color: var(--hc-bad); background: color-mix(in srgb, var(--hc-bad) 13%, transparent); }

/* buttons + segmented controls (collision: global button painters) */
html[data-buld-theme] #homeCmd .hc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 9px; background: var(--hc-btn-bg) !important; color: var(--buld-ink-1) !important; border: 1px solid transparent !important; box-shadow: none !important; font: inherit; font-weight: 500; font-size: 12.5px; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; min-width: 0; }
html[data-buld-theme] #homeCmd .hc-btn:hover { background: var(--hc-btn-hv) !important; }
html[data-buld-theme] #homeCmd .hc-btn:disabled { opacity: .45; cursor: default; }
html[data-buld-theme] #homeCmd .hc-btn--p { background: var(--hc-acc) !important; color: #fff !important; }
html[data-buld-theme] #homeCmd .hc-btn--p:hover { background: var(--buld-cta-hover, var(--hc-acc)) !important; }
html[data-buld-theme] #homeCmd .hc-btn--sm { height: 26px; font-size: 12px; border-radius: 7px; padding: 0 10px; }
html[data-buld-theme] #homeCmd .hc-btn svg { width: 15px; height: 15px; }
html[data-buld-theme] #homeCmd .hc-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--hc-in); flex: none; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
html[data-buld-theme] #homeCmd .hc-seg::-webkit-scrollbar { display: none; }
html[data-buld-theme] #homeCmd .hc-seg button { border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--buld-ink-3) !important; padding: 4px 10px; height: auto; border-radius: 7px; font: inherit; font-size: 12px; font-weight: 500; white-space: nowrap; cursor: pointer; }
html[data-buld-theme] #homeCmd .hc-seg button:hover { color: var(--buld-ink-1) !important; }
html[data-buld-theme] #homeCmd .hc-seg button[aria-pressed="true"] { background: var(--hc-btn-hv) !important; color: var(--buld-ink-1) !important; }
html[data-buld-theme="light"] #homeCmd .hc-seg button[aria-pressed="true"] { background: var(--hc-pane) !important; box-shadow: 0 1px 2px rgba(15, 27, 51, .12) !important; }
html[data-buld-theme] #homeCmd .hc-ibtn { width: 30px; height: 30px; border-radius: 9px; border: 0 !important; background: var(--hc-btn-bg) !important; box-shadow: none !important; color: var(--buld-ink-2) !important; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 0; font: inherit; font-size: 12px; font-weight: 500; flex: none; }
html[data-buld-theme] #homeCmd .hc-ibtn:hover { background: var(--hc-btn-hv) !important; color: var(--buld-ink-1) !important; }
html[data-buld-theme] #homeCmd .hc-pin { width: auto; padding: 0 10px; }
html[data-buld-theme] #homeCmd .hc-pin.is-on { background: color-mix(in srgb, var(--hc-acc) 18%, transparent) !important; color: var(--hc-acc) !important; }
html[data-buld-theme] #homeCmd .hc-link { border: 0 !important; background: none !important; box-shadow: none !important; padding: 0; font: inherit; font-weight: 600; font-size: 13px; color: var(--buld-ink-1) !important; text-align: left; cursor: pointer; }
html[data-buld-theme] #homeCmd .hc-link:hover { color: var(--hc-acc) !important; }
html[data-buld-theme] #homeCmd :is(button, [tabindex]):focus-visible { outline: 2px solid var(--hc-acc); outline-offset: 2px; }

/* lists + tables */
html[data-buld-theme] #homeCmd .hc-lst { display: flex; flex-direction: column; margin: 0 -8px; }
html[data-buld-theme] #homeCmd .hc-lr { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; text-align: left; width: auto; color: inherit !important; font: inherit; }
html[data-buld-theme] #homeCmd .hc-lr--tight { padding: 5px 8px; }
html[data-buld-theme] #homeCmd button.hc-lr { cursor: pointer; }
html[data-buld-theme] #homeCmd button.hc-lr:hover { background: var(--hc-row-hv) !important; }
html[data-buld-theme] #homeCmd .hc-lr.is-on { background: color-mix(in srgb, var(--hc-acc) 12%, transparent) !important; }
html[data-buld-theme] #homeCmd .hc-rk { width: 16px; font-size: 11px; }
html[data-buld-theme] #homeCmd .hc-tscroll { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
html[data-buld-theme] #homeCmd .hc-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; background: transparent !important; }
html[data-buld-theme] #homeCmd .hc-tbl th { font-weight: 500; font-size: 11px; line-height: 1; color: var(--buld-ink-3) !important; text-align: left; padding: 0 10px 10px; letter-spacing: .02em; white-space: nowrap; background: transparent !important; border: 0 !important; text-transform: none !important; }
html[data-buld-theme] #homeCmd .hc-tbl thead, html[data-buld-theme] #homeCmd .hc-tbl tr { background: transparent !important; }
html[data-buld-theme] #homeCmd .hc-tbl td { padding: 10px; border: 0 !important; border-top: 1px solid var(--hc-hair) !important; white-space: nowrap; background: transparent !important; color: var(--buld-ink-1) !important; vertical-align: middle; }
html[data-buld-theme] #homeCmd .hc-tbl td .hc-ell { max-width: 200px; }
html[data-buld-theme] #homeCmd .hc-tbl tr.hc-hv { cursor: pointer; }
html[data-buld-theme] #homeCmd .hc-tbl tr.hc-hv:hover td { background: var(--hc-row-hv) !important; }
html[data-buld-theme] #homeCmd .hc-r { text-align: right !important; }

/* ---- header ---- */
html[data-buld-theme] #homeCmd .hc-top { display: flex; align-items: flex-end; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 22px; }
html[data-buld-theme] #homeCmd .hc-eyebrow { font-weight: 500; font-size: 12px; line-height: 1.3; color: var(--buld-ink-3); margin: 0 0 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
html[data-buld-theme] #homeCmd .hc-h1 { font: 600 26px/1.15 var(--hc-display); letter-spacing: -.03em; margin: 0; color: var(--buld-ink-1); padding: 0; border: 0; background: none; }
html[data-buld-theme] #homeCmd .hc-h1::before { content: none; display: none; }

/* ---- KPI tiles ---- */
html[data-buld-theme] #homeCmd .hc-kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
html[data-buld-theme] #homeCmd .hc-kpi .hc-num { margin: 10px 0 4px; font-size: 26px; }
html[data-buld-theme] #homeCmd .hc-spark { display: block; width: 100%; height: 36px; overflow: visible; }

/* ---- main ---- */
html[data-buld-theme] #homeCmd .hc-main { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); margin-top: 16px; align-items: start; }
html[data-buld-theme] #homeCmd .hc-side { display: grid; gap: 16px; min-width: 0; }
html[data-buld-theme] #homeCmd .hc-mapwrap .hc-map { --map-mh: 580px; }
html[data-buld-theme] #homeCmd .hc-bottom { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); margin-top: 16px; align-items: start; }

/* ---- map ---- */
html[data-buld-theme] #homeCmd .hc-map { position: relative; --m-hi: var(--hc-acc); user-select: none; -webkit-user-select: none; }
html[data-buld-theme] #homeCmd .hc-map svg { display: block; width: 100%; height: auto; overflow: hidden; max-height: var(--map-mh, 460px); margin: 0 auto; }
html[data-buld-theme] #homeCmd .hc-map path.hc-w { fill: var(--hc-map-base); stroke: var(--hc-map-stroke); stroke-width: .8; vector-effect: non-scaling-stroke; stroke-linejoin: round; cursor: pointer; transition: fill .5s var(--hc-ease), opacity .2s, stroke .2s; }
html[data-buld-theme] #homeCmd .hc-map path.hc-w:hover { stroke: var(--buld-ink-1); stroke-width: 1.4; }
html[data-buld-theme] #homeCmd .hc-map path.hc-w.is-sel, html[data-buld-theme] #homeCmd .hc-map path.hc-w.is-filter { stroke: var(--buld-ink-1); stroke-width: 2; }
html[data-buld-theme] #homeCmd .hc-map .hc-bub { fill: color-mix(in srgb, var(--m-hi) 55%, transparent); stroke: var(--m-hi); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }
html[data-buld-theme] #homeCmd .hc-map .hc-bub.is-sel { fill: color-mix(in srgb, var(--m-hi) 85%, transparent); stroke: var(--buld-ink-1); }
html[data-buld-theme] #homeCmd .hc-map .hc-lbl { font-weight: 600; fill: var(--buld-ink-1); pointer-events: none; paint-order: stroke; stroke: var(--hc-pane); stroke-linejoin: round; }
html[data-buld-theme] #homeCmd .hc-map .hc-pg { fill: none; stroke: var(--m-hi); stroke-width: 2; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: hc-ping 2.2s var(--hc-ease) forwards; pointer-events: none; }
html[data-buld-theme] #homeCmd .hc-map .hc-pgc { fill: var(--m-hi); stroke: none; pointer-events: none; transform-box: fill-box; transform-origin: center; animation: hc-pgc 2.2s ease forwards; }
html[data-buld-theme] #homeCmd .hc-map .hc-pulse { fill: none; stroke: var(--m-hi); stroke-width: 1.5; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; animation: hc-pulse 2.8s ease-out infinite; pointer-events: none; }
html[data-buld-theme] #homeCmd .hc-map.z-north svg { -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent); }
html[data-buld-theme] #homeCmd .hc-mbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
@keyframes hc-ping { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes hc-pgc { 0% { transform: scale(0); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hc-pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(2.6); opacity: 0; } }
@keyframes hc-grow { from { transform: scaleX(0); } }
@keyframes hc-growy { from { transform: scaleY(0); } }

/* tooltip (lives on body) */
html[data-buld-theme] #hcTip { position: fixed; z-index: 9000; pointer-events: none; min-width: 190px; background: color-mix(in srgb, var(--buld-elevated-2) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--buld-hairline); border-radius: 12px; padding: 10px 12px; color: var(--buld-ink-1); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; font-size: 12px; }
html[data-buld-theme="dark"] #hcTip { background: color-mix(in srgb, var(--buld-page) 92%, transparent); }
html[data-buld-theme] #hcTip.is-on { opacity: 1; transform: none; }
html[data-buld-theme] #hcTip .hc-tip-h { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 7px; font-size: 13px; }
html[data-buld-theme] #hcTip .hc-tip-h span { font-weight: 600; font-size: 10px; line-height: 1; color: var(--buld-ink-3); background: var(--buld-hairline); padding: 3px 5px; border-radius: 5px; }
html[data-buld-theme] #hcTip .hc-tip-r { display: flex; justify-content: space-between; gap: 16px; color: var(--buld-ink-2); line-height: 1.75; }
html[data-buld-theme] #hcTip .hc-tip-r b { color: var(--buld-ink-1); font-weight: 600; font-variant-numeric: tabular-nums; }
html[data-buld-theme] #hcTip .hc-tip-r b.is-bad { color: var(--buld-danger); }
html[data-buld-theme] #hcTip .hc-tip-f { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--buld-hairline); color: var(--buld-ink-4); font-size: 11px; }

/* wilaya detail */
html[data-buld-theme] #homeCmd .hc-dt-h { display: flex; align-items: center; gap: 12px; }
html[data-buld-theme] #homeCmd .hc-dt-n { font: 600 20px/1.1 var(--hc-display); letter-spacing: -.025em; }
html[data-buld-theme] #homeCmd .hc-dt-g { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 14px; }
html[data-buld-theme] #homeCmd .hc-dt-k { padding: 11px 12px; background: var(--hc-in); border-radius: 12px; min-width: 0; }
html[data-buld-theme] #homeCmd .hc-dt-k .hc-num { font-size: 19px; margin-top: 4px; }
html[data-buld-theme] #homeCmd .hc-split { display: flex; height: 8px; border-radius: 999px; overflow: hidden; gap: 2px; }
html[data-buld-theme] #homeCmd .hc-split i { display: block; height: 100%; }
html[data-buld-theme] #homeCmd .hc-cleg { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 9px; font-size: 11.5px; color: var(--buld-ink-3); }
html[data-buld-theme] #homeCmd .hc-cleg span { display: inline-flex; align-items: center; gap: 6px; }
html[data-buld-theme] #homeCmd .hc-cleg b { color: var(--buld-ink-1); font-weight: 600; }

/* charts */
html[data-buld-theme] #homeCmd .hc-chart { position: relative; }
html[data-buld-theme] #homeCmd .hc-chart svg { display: block; width: 100%; overflow: visible; }
html[data-buld-theme] #homeCmd .hc-xl { display: flex; justify-content: space-between; font-size: 11px; color: var(--buld-ink-4); margin-top: 8px; }
html[data-buld-theme] #homeCmd .hc-yl { position: absolute; left: 0; font-size: 10.5px; color: var(--buld-ink-4); transform: translateY(-50%); }
html[data-buld-theme] #homeCmd .hc-cx { position: absolute; top: 0; bottom: 22px; width: 1px; background: var(--hc-line); pointer-events: none; opacity: 0; }
html[data-buld-theme] #homeCmd .hc-ctip { position: absolute; top: -6px; transform: translateX(-50%); background: var(--buld-elevated-2); color: var(--buld-ink-1); border-radius: 8px; padding: 6px 9px; font-size: 11.5px; white-space: nowrap; pointer-events: none; opacity: 0; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
html[data-buld-theme] #homeCmd .hc-chart:hover .hc-cx, html[data-buld-theme] #homeCmd .hc-chart:hover .hc-ctip { opacity: 1; }

/* ---- spotlight ---- */
html[data-buld-theme] #homeCmd .hc-spot { margin-top: 16px; padding-top: 16px; overflow: hidden; }
html[data-buld-theme] #homeCmd .hc-spot-h { display: flex; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; }
html[data-buld-theme] #homeCmd .hc-spot-eye { margin: 0; }
html[data-buld-theme] #homeCmd .hc-spot-eye svg { width: 14px; height: 14px; color: var(--hc-acc); }
html[data-buld-theme] #homeCmd .hc-spot-eye [data-spot="name"] { color: var(--buld-ink-1); font-weight: 600; }
html[data-buld-theme] #homeCmd .hc-why { margin: 4px 0 0; font-size: 12px; color: var(--buld-ink-3); min-height: 17px; }
html[data-buld-theme] #homeCmd .hc-why.is-attn { color: var(--hc-warn); font-weight: 500; }
html[data-buld-theme] #homeCmd .hc-spot-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
html[data-buld-theme] #homeCmd .hc-dots { display: flex; align-items: center; gap: 2px; margin-right: 4px; }
html[data-buld-theme] #homeCmd .hc-dt { width: 22px; height: 22px; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0; cursor: pointer; display: grid; place-items: center; border-radius: 6px; }
html[data-buld-theme] #homeCmd .hc-dt::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: var(--buld-ink-4); opacity: .55; transition: width .3s var(--hc-ease), background .2s, opacity .2s; }
html[data-buld-theme] #homeCmd .hc-dt:hover::before { opacity: 1; }
html[data-buld-theme] #homeCmd .hc-dt.is-on::before { width: 16px; background: var(--hc-acc); opacity: 1; }
html[data-buld-theme] #homeCmd .hc-dt.is-on { width: 28px; }
html[data-buld-theme] #homeCmd .hc-prog { height: 2px; background: var(--hc-hair); border-radius: 2px; margin: 12px 0 18px; overflow: hidden; }
html[data-buld-theme] #homeCmd .hc-prog i { display: block; height: 100%; width: 0; background: var(--hc-acc); border-radius: inherit; transition: width .2s linear; }
html[data-buld-theme] #homeCmd .hc-spot.is-static .hc-prog i { width: 0 !important; }
html[data-buld-theme] #homeCmd .hc-spot-b { min-height: 360px; }
html[data-buld-theme] #homeCmd .hc-slide { min-width: 0; }
html[data-buld-theme] #homeCmd .hc-in-r { animation: hc-in-r .5s var(--hc-ease) both; }
html[data-buld-theme] #homeCmd .hc-in-l { animation: hc-in-l .5s var(--hc-ease) both; }
@keyframes hc-in-r { from { opacity: 0; transform: translateX(24px); } }
@keyframes hc-in-l { from { opacity: 0; transform: translateX(-24px); } }
html[data-buld-theme] #homeCmd .hc-spot .hc-pane { box-shadow: none; background: var(--hc-in); border-color: transparent; }

/* view · Aujourd'hui */
html[data-buld-theme] #homeCmd .hc-hero h2 { font: 600 34px/1.06 var(--hc-display); letter-spacing: -.04em; margin: 0 0 20px; color: var(--buld-ink-1); padding: 0; border: 0; }
html[data-buld-theme] #homeCmd .hc-hero h2 em { font-style: normal; color: var(--buld-ink-3); }
html[data-buld-theme] #homeCmd .hc-acts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html[data-buld-theme] #homeCmd .hc-act { display: flex; flex-direction: column; gap: 12px; min-height: 230px; overflow: hidden; }
html[data-buld-theme] #homeCmd .hc-act-l { font-size: 15px; font-weight: 500; margin-top: 4px; }
html[data-buld-theme] #homeCmd .hc-glow { position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--tone) 22%, transparent), transparent); pointer-events: none; }

/* view · Flux en direct */
html[data-buld-theme] #homeCmd .hc-v-live { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
html[data-buld-theme] #homeCmd .hc-fl { max-height: 420px; overflow-y: auto; scrollbar-width: thin; }
html[data-buld-theme] #homeCmd .hc-fi { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 10px 6px; border: 0 !important; border-top: 1px solid var(--hc-hair) !important; background: transparent !important; box-shadow: none !important; align-items: center; width: 100%; text-align: left; color: inherit !important; font: inherit; cursor: pointer; border-radius: 0; }
html[data-buld-theme] #homeCmd .hc-fi:hover { background: var(--hc-row-hv) !important; }
html[data-buld-theme] #homeCmd .hc-fi.is-new { animation: hc-fin .7s var(--hc-ease) both; }
@keyframes hc-fin { from { opacity: 0; transform: translateY(-14px); } }
html[data-buld-theme] #homeCmd .hc-fr { text-align: right; }
html[data-buld-theme] #homeCmd .hc-live { width: 8px; height: 8px; border-radius: 50%; background: var(--hc-ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--hc-ok) 60%, transparent); animation: hc-ld 1.8s infinite; display: inline-block; }
@keyframes hc-ld { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
html[data-buld-theme] #homeCmd .hc-ctr { display: flex; gap: 12px 28px; flex-wrap: wrap; margin-bottom: 12px; }
html[data-buld-theme] #homeCmd .hc-live-r .hc-mbar { margin-bottom: 8px; }
html[data-buld-theme] #homeCmd .hc-mapc .hc-map { --map-mh: 380px; max-width: 640px; margin: 0 auto; }

/* view · Analytique */
html[data-buld-theme] #homeCmd .hc-v-ana { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; }
html[data-buld-theme] #homeCmd .hc-fun { display: grid; gap: 10px; }
html[data-buld-theme] #homeCmd .hc-fs { display: grid; grid-template-columns: 86px minmax(0, 1fr) 48px; gap: 10px; align-items: center; }
html[data-buld-theme] #homeCmd .hc-fb { height: 30px; border-radius: 8px; background: var(--hc-hair); position: relative; overflow: hidden; display: block; }
html[data-buld-theme] #homeCmd .hc-fb i { position: absolute; inset: 0 auto 0 0; border-radius: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--hc-acc) 70%, transparent), var(--hc-acc)); transform-origin: left; animation: hc-grow 1s var(--hc-ease) both; }
html[data-buld-theme] #homeCmd .hc-fb span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-weight: 600; font-size: 12px; line-height: 1; color: var(--buld-ink-1); font-variant-numeric: tabular-nums; }
html[data-buld-theme] #homeCmd .hc-fconv { font-size: 11px; color: var(--buld-ink-3); text-align: right; }
html[data-buld-theme] #homeCmd .hc-ring { flex: none; }

/* view · Risque */
html[data-buld-theme] #homeCmd .hc-v-risk { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px; align-items: start; }
html[data-buld-theme] #homeCmd .hc-v-risk .hc-map, html[data-buld-theme] #homeCmd .hc-v-todo .hc-map { --map-mh: 400px; }
html[data-buld-theme] #homeCmd .hc-mini { grid-template-columns: 1fr 1fr; gap: 10px; }
html[data-buld-theme] #homeCmd .hc-mk { background: var(--hc-in); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; justify-items: start; min-width: 0; }
html[data-buld-theme] #homeCmd .hc-mk .hc-num { font-size: 24px; }
html[data-buld-theme] #homeCmd .hc-reco { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--hc-hair); }
html[data-buld-theme] #homeCmd .hc-why2 { font-size: 11.5px; color: var(--buld-ink-3); margin-top: 3px; }

/* view · Carte immersive */
html[data-buld-theme] #homeCmd .hc-v-imm { position: relative; min-height: 470px; border-radius: 14px; overflow: hidden; margin: 0 -6px; background: radial-gradient(900px 500px at 60% 40%, color-mix(in srgb, var(--hc-acc) 10%, transparent), transparent 60%), radial-gradient(600px 400px at 90% 90%, color-mix(in srgb, var(--hc-vio) 9%, transparent), transparent 60%); }
html[data-buld-theme] #homeCmd .hc-imm-map { padding: 52px 8px 64px 270px; }
html[data-buld-theme] #homeCmd .hc-imm-map .hc-map { --map-mh: 420px; max-width: 760px; margin: 0 auto; }
html[data-buld-theme] #homeCmd .hc-imm-l { position: absolute; left: 10px; top: 8px; width: 240px; display: grid; gap: 8px; z-index: 2; }
html[data-buld-theme] #homeCmd .hc-imm-t { font: 600 24px/1.08 var(--hc-display); letter-spacing: -.035em; margin: 4px 0 6px; color: var(--buld-ink-1); padding: 0; border: 0; }
html[data-buld-theme] #homeCmd .hc-glass { background: color-mix(in srgb, var(--hc-pane) 74%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); border: 1px solid var(--hc-hair) !important; border-radius: 12px; padding: 10px 12px; color: var(--buld-ink-1) !important; box-shadow: none !important; }
html[data-buld-theme] #homeCmd .hc-glass .hc-num { font-size: 20px; margin-top: 4px; }
html[data-buld-theme] #homeCmd .hc-imm-tools { position: absolute; right: 10px; top: 8px; z-index: 2; max-width: calc(100% - 280px); }
html[data-buld-theme] #homeCmd .hc-imm-tools .hc-mbar { justify-content: flex-end; }
html[data-buld-theme] #homeCmd .hc-tk { position: absolute; left: 270px; right: 10px; bottom: 10px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; z-index: 2; }
html[data-buld-theme] #homeCmd .hc-tk::-webkit-scrollbar { display: none; }
html[data-buld-theme] #homeCmd .hc-tki { flex: none; display: inline-flex; gap: 8px; align-items: center; padding: 7px 11px; font: inherit; font-size: 12px; cursor: pointer; background: color-mix(in srgb, var(--hc-pane) 74%, transparent) !important; }
html[data-buld-theme] #homeCmd .hc-tki:hover { background: var(--hc-btn-hv) !important; }

/* view · Bento */
html[data-buld-theme] #homeCmd .hc-bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(160px, auto); gap: 12px; }
html[data-buld-theme] #homeCmd .hc-bt { background: var(--hc-in); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; min-width: 0; }
html[data-buld-theme] #homeCmd .hc-bt-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
html[data-buld-theme] #homeCmd .hc-w2 { grid-column: span 2; }
html[data-buld-theme] #homeCmd .hc-hours { display: flex; align-items: flex-end; gap: 3px; height: 78px; }
html[data-buld-theme] #homeCmd .hc-hours i { flex: 1; background: color-mix(in srgb, var(--hc-acc) 35%, transparent); border-radius: 3px 3px 1px 1px; transform-origin: bottom; animation: hc-growy .8s var(--hc-ease) both; }
html[data-buld-theme] #homeCmd .hc-hours i.is-pk { background: var(--hc-acc); }
html[data-buld-theme] #homeCmd .hc-fun4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: auto; }
html[data-buld-theme] #homeCmd .hc-fcol { height: 70px; display: flex; align-items: flex-end; }
html[data-buld-theme] #homeCmd .hc-fcol i { display: block; width: 100%; border-radius: 6px; transform-origin: bottom; animation: hc-growy .8s var(--hc-ease) both; }

/* view · Carte + À faire */
html[data-buld-theme] #homeCmd .hc-v-todo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
html[data-buld-theme] #homeCmd .hc-prog2 { display: flex; align-items: center; gap: 14px; }
html[data-buld-theme] #homeCmd .hc-todo { max-height: 380px; overflow-y: auto; scrollbar-width: thin; }
html[data-buld-theme] #homeCmd .hc-grp h3 { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12px; line-height: 1; color: var(--buld-ink-2); margin: 18px 0 6px; padding: 0; border: 0; background: none; }
html[data-buld-theme] #homeCmd .hc-grp h3 svg { width: 14px; height: 14px; }
html[data-buld-theme] #homeCmd .hc-td { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 10px; cursor: pointer; border: 0 !important; background: transparent !important; box-shadow: none !important; text-align: left; width: calc(100% + 16px); color: inherit !important; font: inherit; }
html[data-buld-theme] #homeCmd .hc-td:hover { background: var(--hc-row-hv) !important; }
html[data-buld-theme] #homeCmd .hc-cb { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in srgb, currentColor 14%, transparent); }
html[data-buld-theme] #homeCmd .hc-cb svg { width: 12px; height: 12px; }

/* entrance */
html[data-buld-theme] #homeCmd .hc-rv { animation: hc-rv .7s var(--hc-ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes hc-rv { from { opacity: 0; transform: translateY(10px); } }

/* ---- responsive ---- */
@media (max-width: 1280px) {
    html[data-buld-theme] #homeCmd .hc-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
    html[data-buld-theme] #homeCmd .hc-main, html[data-buld-theme] #homeCmd .hc-bottom, html[data-buld-theme] #homeCmd .hc-v-live, html[data-buld-theme] #homeCmd .hc-v-ana, html[data-buld-theme] #homeCmd .hc-v-risk, html[data-buld-theme] #homeCmd .hc-v-todo { grid-template-columns: minmax(0, 1fr); }
    html[data-buld-theme] #homeCmd .hc-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html[data-buld-theme] #homeCmd .hc-v-imm { min-height: 0; }
    html[data-buld-theme] #homeCmd .hc-imm-map { padding: 0 0 8px; }
    html[data-buld-theme] #homeCmd .hc-imm-l, html[data-buld-theme] #homeCmd .hc-imm-tools, html[data-buld-theme] #homeCmd .hc-tk { position: relative; left: auto; right: auto; top: auto; bottom: auto; width: auto; max-width: none; margin: 8px 0; }
    html[data-buld-theme] #homeCmd .hc-imm-l { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html[data-buld-theme] #homeCmd .hc-imm-t { grid-column: 1 / -1; }
    html[data-buld-theme] #homeCmd .hc-v-imm { display: flex; flex-direction: column; }
    html[data-buld-theme] #homeCmd .hc-imm-tools { order: -2; }
    html[data-buld-theme] #homeCmd .hc-imm-l { order: -1; }
    html[data-buld-theme] #homeCmd .hc-imm-tools .hc-mbar { justify-content: flex-start; }
}
@media (max-width: 860px) {
    html[data-buld-theme] #homeCmd .hc-acts { grid-template-columns: minmax(0, 1fr); }
    html[data-buld-theme] #homeCmd .hc-act { min-height: 0; }
    html[data-buld-theme] #homeCmd .hc-hero h2 { font-size: 26px; }
}
@media (max-width: 600px) {
    html[data-buld-theme] #homeCmd .hc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    html[data-buld-theme] #homeCmd .hc-kpi:last-child { grid-column: span 2; }
    html[data-buld-theme] #homeCmd .hc-kpi { padding: 14px; }
    html[data-buld-theme] #homeCmd .hc-kpi .hc-num { font-size: 19px; }
    html[data-buld-theme] #homeCmd .hc-pane { padding: 16px 14px; }
    html[data-buld-theme] #homeCmd .hc-tscroll { margin: 0 -14px; padding: 0 14px; }
    html[data-buld-theme] #homeCmd .hc-top .hc-grow { flex-basis: 100%; }
    html[data-buld-theme] #homeCmd .hc-top .hc-seg { flex-basis: 100%; }
    html[data-buld-theme] #homeCmd .hc-top .hc-seg button { flex: 1; }
    html[data-buld-theme] #homeCmd .hc-top .hc-btn { flex: 1 1 0; }
    html[data-buld-theme] #homeCmd .hc-kpi .hc-between > .hc-xs { display: none; }
    html[data-buld-theme] #homeCmd .hc-act .hc-between { flex-wrap: wrap; gap: 8px; }
    html[data-buld-theme] #homeCmd .hc-h1 { font-size: 22px; }
    html[data-buld-theme] #homeCmd .hc-bento { grid-template-columns: minmax(0, 1fr); }
    html[data-buld-theme] #homeCmd .hc-w2 { grid-column: span 1; }
    html[data-buld-theme] #homeCmd .hc-imm-l { grid-template-columns: minmax(0, 1fr); }
    html[data-buld-theme] #homeCmd .hc-mini { grid-template-columns: minmax(0, 1fr); }
    html[data-buld-theme] #homeCmd .hc-num--xl { font-size: 38px; }
    html[data-buld-theme] #homeCmd .hc-spot-nav { width: 100%; }
    html[data-buld-theme] #homeCmd .hc-pin { margin-left: auto; }
    html[data-buld-theme] #homeCmd .hc-spot-b { min-height: 0; }
}

/* ---- reduced motion: no rotation (JS), no animated transitions ---- */
@media (prefers-reduced-motion: reduce) {
    html[data-buld-theme] #homeCmd *, html[data-buld-theme] #homeCmd *::before, html[data-buld-theme] #homeCmd *::after, html[data-buld-theme] #hcTip { animation: none !important; transition: none !important; }
    html[data-buld-theme] #homeCmd .hc-prog { display: none; }
}
