/* CadStatusBar — « Barre B » ancrée 2 lignes (refonte UX CAD V2). Carte 2D. */

.cad-barre-b {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 1250;
    user-select: none;
    font-family: 'Public Sans', system-ui, sans-serif;
    pointer-events: auto;
}

/* ---- Ligne 1 : ligne de commande ---- */
.cad-bb-cmd {
    display: flex; align-items: center; gap: 9px;
    height: 30px; padding: 0 13px;
    background: #141618;
    border-top: 1px solid #2c2f33;
    font: 600 11.5px/1 'IBM Plex Mono', monospace;
    color: #9aa0a6;
    white-space: nowrap; overflow: hidden;
}
.cad-bb-prompt { font-weight: 700; color: #23b4d8; }
.cad-bb-mode { color: #fff; }
.cad-bb-sep { color: #5b6166; }
.cad-bb-invite { color: #9aa0a6; overflow: hidden; text-overflow: ellipsis; }
.cad-bb-options { color: #cfd3d6; }
.cad-bb-options b { color: #23b4d8; }

.cad-bb-mirror { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.cad-bb-d-l, .cad-bb-a-l { color: #7d848a; }
.cad-bb-d-v, .cad-bb-a-v {
    color: #fff; background: #26292d; border: 1px solid #34383d;
    padding: 3px 8px; border-radius: 5px;
}
.cad-bb-absrel {
    color: #23b4d8; background: rgba(35, 180, 216, .14);
    padding: 3px 6px; border-radius: 5px; font-size: 9.5px;
}

/* ---- Ligne 2 : barre d'état ---- */
.cad-bb-status {
    display: flex; align-items: stretch;
    height: 27px;
    background: #191b1e;
    border-top: 1px solid #2c2f33;
    color: #cfd3d6;
}
.cad-bb-coords {
    display: flex; align-items: center; gap: 6px;
    padding: 0 13px; border-right: 1px solid #2a2d31;
    font: 600 10.5px/1 'IBM Plex Mono', monospace; color: #7d848a;
}
.cad-bb-coords b { color: #cfd3d6; font-weight: 600; }
.cad-bb-mid {
    flex: 1; display: flex; align-items: center; gap: 9px;
    padding: 0 13px; font: 500 10.5px/1 'Public Sans', sans-serif;
    color: #6b7177; white-space: nowrap; overflow: hidden;
}
.cad-bb-constraint { font-weight: 700; }
.cad-bb-hints { color: #6b7177; }

.cad-bb-toggles { display: flex; align-items: stretch; border-left: 1px solid #2a2d31; }
.cad-bb-tg {
    display: flex; align-items: center; gap: 5px;
    padding: 0 10px; border: 0; background: transparent;
    color: #8a9097; font: 700 11px/1 'Public Sans', sans-serif; cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .1s, background .1s, border-color .1s;
}
.cad-bb-tg:hover { color: #cfd3d6; }
.cad-bb-tg.on {
    background: rgba(35, 180, 216, .18); color: #eaf7fb; border-bottom-color: #23b4d8;
}
.cad-bb-tg.cad-bb-disabled { opacity: .38; cursor: not-allowed; }

/* Boutons d'action par mode (CRUD sommets / transform). */
.cad-bb-actions { display: flex; align-items: stretch; border-left: 1px solid #2a2d31; }
.cad-bb-act {
    display: flex; align-items: center;
    padding: 0 10px; border: 0; background: transparent;
    color: #cfd3d6; font: 700 11px/1 'Public Sans', sans-serif; cursor: pointer;
    border-bottom: 2px solid transparent;
}
.cad-bb-act:hover { background: rgba(255, 255, 255, .06); }
.cad-bb-act.on { background: #2c3035; border-bottom-color: #23b4d8; color: #fff; }

.cad-bb-needle {
    display: flex; align-items: center; gap: 6px;
    padding: 0 13px; border: 0; border-left: 1px solid #2a2d31;
    background: transparent; cursor: pointer;
    font: 700 10.5px/1 'Public Sans', sans-serif; color: #e6a23c;
}
.cad-bb-needle-svg { transition: transform .2s ease-out; }
.cad-bb-needle.off { color: #6b7177; }
.cad-bb-needle.off .cad-bb-needle-svg polygon:first-child { fill: #6b7177; }

/* Accent par mode : préfixe :> + libellé + bord supérieur de la ligne cmd. */
.cad-barre-b[data-mode="edition"] .cad-bb-prompt { color: #7a52d6; }
.cad-barre-b[data-mode="edition"] .cad-bb-cmd { border-top-color: #7a52d6; }
.cad-barre-b[data-mode="edition"] .cad-bb-options b { color: #9a7bff; }
.cad-barre-b[data-mode="transform"] .cad-bb-prompt { color: #1f8a5b; }
.cad-barre-b[data-mode="transform"] .cad-bb-cmd { border-top-color: #1f8a5b; }
.cad-barre-b[data-mode="transform"] .cad-bb-options b { color: #2ea877; }
.cad-barre-b[data-mode="trace"] .cad-bb-cmd { border-top-color: #23b4d8; }

@media (prefers-reduced-motion: reduce) {
    .cad-bb-needle-svg, .cad-bb-tg { transition: none; }
}

/* ===== W11 — menu contextuel CAD (clic-droit) — inchangé ===== */
.cad-context-menu {
    position: fixed;
    z-index: 3000;
    min-width: 180px;
    background: rgba(28, 30, 34, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    padding: 4px;
    font-size: 13px;
    color: #e8e8e8;
    user-select: none;
}
.cad-context-item {
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}
.cad-context-item:hover { background: #4a90d9; color: #fff; }
