/* DESIGN SYSTEM: MARTHY HUD GLOBAL THEME */
:root {
    --hud-cyan: #00f0ff;
    --hud-cyan-dim: rgba(0, 240, 255, 0.3);
    --hud-cyan-bg: rgba(0, 240, 255, 0.05);
    
    --hud-gold: #fbbf24;
    --hud-gold-dim: rgba(251, 191, 36, 0.3);
    
    --hud-red: #ef4444;
    --hud-red-dim: rgba(239, 68, 68, 0.3);
    --hud-red-bg: rgba(239, 68, 68, 0.08);
    
    --hud-green: #22c55e;
    --hud-green-dim: rgba(34, 197, 94, 0.3);

    --hud-bg: #020813;
    --hud-panel-border: rgba(0, 240, 255, 0.25);
    --hud-panel-bg: rgba(3, 11, 28, 0.55);
    
    --font-header: 'Orbitron', sans-serif;
    --font-panel: 'Rajdhani', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;

    /* Composants pratiques (taches, agenda, courriel) : disponibles dans TOUS
       les themes depuis la refonte. Le theme Entreprise les redefinit en opaque. */
    --ent-text: #cbd1dc;
    --ent-text-dim: #767e8c;
    --ent-surface: rgba(255, 255, 255, 0.035);
    --ent-surface-2: rgba(255, 255, 255, 0.065);
    --ent-border: rgba(255, 255, 255, 0.10);

    --ent-urgente: #ef5555;
    --ent-haute: #e0913c;
    --ent-normale: #5b8cff;
    --ent-basse: #6b7785;
}

/* RESET & LAYOUT */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body.sci-fi-hud {
    background-color: var(--hud-bg);
    color: var(--hud-cyan);
    font-family: var(--font-panel);
    font-size: 16px;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* GRID BACKGROUND */
.grid-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    pointer-events: none;
    z-index: 1;
}

/* OVERLAYS: SCANLINES & VIGNETTE */
.hud-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
}

.vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 50%, rgba(2, 6, 15, 0.8) 100%);
    z-index: 9998;
    pointer-events: none;
}

/* CONTAINER */
.hud-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 15px;
    position: relative;
    z-index: 10;
}

/* HEADER */
.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--hud-panel-border);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-family: var(--font-header);
    background: linear-gradient(to bottom, rgba(0, 240, 255, 0.05), transparent);
}

.header-left, .header-right {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 14px;
}

.status-glow {
    text-shadow: 0 0 8px var(--hud-cyan);
    animation: pulse 2s infinite alternate;
}

.protocol-tag {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--hud-cyan-dim);
    padding: 2px 8px;
    font-size: 11px;
    letter-spacing: 1px;
}

.hud-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 6px;
    text-align: center;
}

.hud-clock {
    font-size: 18px;
    font-weight: bold;
    color: var(--hud-gold);
    text-shadow: 0 0 6px var(--hud-gold-dim);
}

.hud-date {
    font-family: var(--font-mono);
    color: var(--hud-cyan-dim);
}

.glass-morphism {
    background: var(--hud-panel-bg);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.1);
}

.panel-title {
    font-family: var(--font-header);
    font-size: 16px;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--hud-panel-border);
    padding-bottom: 5px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 6px var(--hud-cyan-dim);
}

.icon-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--hud-cyan);
    box-shadow: 0 0 8px var(--hud-cyan);
    animation: core-pulse 1s infinite alternate;
}

/* LOG WINDOW */
.sys-log-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 240, 255, 0.15);
    background: rgba(0, 0, 0, 0.4);
    padding: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
}

.sys-log-title {
    color: var(--hud-gold);
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
    padding-bottom: 3px;
    margin-bottom: 5px;
}

.sys-log-output {
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--hud-cyan-dim);
}

/* CENTER PANEL: REAC / GRAPH */
.center-panel {
    border: none;
    align-items: center;
    justify-content: center;
    position: relative;
}

.arc-reactor-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arc-reactor {
    width: 220px;
    height: 220px;
    z-index: 2;
    filter: drop-shadow(0 0 15px var(--hud-cyan-dim));
}

.reactor-ring {
    fill: none;
    stroke: var(--hud-cyan);
    stroke-width: 1.5;
}

.reactor-ring.outer {
    stroke-width: 2.5;
}

.reactor-ring.dashed {
    stroke-dasharray: 2 4;
    animation: rotate-reverse 20s linear infinite;
    transform-origin: center;
}

.reactor-triangle {
    fill: none;
    stroke: var(--hud-cyan);
    stroke-width: 2;
    stroke-linejoin: round;
    opacity: 0.8;
}

.reactor-ring.inner {
    stroke-width: 1.5;
}

.reactor-ring.core-ring {
    stroke-width: 2.5;
    stroke-dasharray: 5 2;
}

.reactor-core {
    fill: var(--hud-cyan);
    box-shadow: 0 0 10px var(--hud-cyan);
}

.reactor-node {
    stroke: var(--hud-cyan);
    stroke-width: 3;
}

.voice-ring {
    position: absolute;
    width: 250px;
    height: 250px;
    border: 2px solid var(--hud-cyan);
    border-radius: 50%;
    opacity: 0;
    transition: transform 0.1s ease-out, opacity 0.1s ease-out;
    pointer-events: none;
    z-index: 1;
}

/* VISUALIZER */
.visualizer-container {
    width: 100%;
    height: 100px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    border-radius: 4px;
}

#visualizer-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* BUTTONS & CONTROLS */
.control-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.hud-btn {
    font-family: var(--font-header);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 12px;
    border: 1px solid var(--hud-panel-border);
    border-radius: 3px;
    background: rgba(0, 240, 255, 0.05);
    color: var(--hud-cyan);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hud-btn:hover {
    background: var(--hud-cyan);
    color: var(--hud-bg);
    box-shadow: 0 0 15px var(--hud-cyan);
    transform: scale(1.02);
}

.hud-btn:active {
    transform: scale(0.98);
}

.primary-btn.active-state {
    background: var(--hud-cyan);
    color: var(--hud-bg);
    box-shadow: 0 0 15px var(--hud-cyan);
}

.hud-btn.cyan-btn {
    border-color: var(--hud-cyan);
    color: var(--hud-cyan);
}

.hud-btn.red-btn {
    border-color: var(--hud-red);
    color: var(--hud-red);
    background: rgba(239, 68, 68, 0.05);
}

.hud-btn.red-btn:hover {
    background: var(--hud-red);
    color: #fff;
    box-shadow: 0 0 15px var(--hud-red);
}

/* NETWORKS STATUS */
.nodes-status {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 25px;
}

.nodes-title, .config-title {
    font-family: var(--font-header);
    font-size: 12px;
    color: var(--hud-gold);
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
    padding-bottom: 3px;
    margin-bottom: 8px;
}

.node-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 13px;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 10px;
    border: 1px solid rgba(0, 240, 255, 0.08);
}

.node-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.node-stat {
    font-size: 11px;
}

/* CONFIGURATION AREA */
.voice-selectors {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
}

.hud-select {
    flex-grow: 1;
    background: var(--hud-bg);
    border: 1px solid var(--hud-panel-border);
    color: var(--hud-cyan);
    padding: 5px;
    font-family: var(--font-panel);
    font-size: 12px;
    border-radius: 3px;
}

/* BOTTOM CONSOLE: CHAT */
.hud-console {
    height: 150px;
    border: 1px solid var(--hud-panel-border);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    padding: 10px 15px;
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    border-bottom: 1px solid rgba(0, 240, 255, 0.15);
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.console-label {
    font-family: var(--font-header);
    color: var(--hud-gold);
}

.status-badge {
    font-family: var(--font-mono);
    font-size: 12px;
}

.chat-history {
    flex-grow: 1;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 5px 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.msg {
    line-height: 1.4;
}

.msg.user {
    color: var(--hud-gold);
}

.msg.system {
    color: var(--hud-cyan);
}

.msg.alert {
    color: var(--hud-red);
}

.console-input-area {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(0, 240, 255, 0.1);
    padding-top: 5px;
}

.prompt-symbol {
    font-family: var(--font-mono);
    color: var(--hud-gold);
    font-weight: bold;
}

#text-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 14px;
}

#text-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.send-btn {
    padding: 5px 15px;
    font-size: 11px;
}

/* ANIMATIONS */
@keyframes pulse {
    0% { opacity: 0.6; text-shadow: 0 0 2px var(--hud-cyan-dim); }
    100% { opacity: 1; text-shadow: 0 0 10px var(--hud-cyan); }
}

@keyframes core-pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.1); opacity: 1; }
}

@keyframes rotate-reverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

.animate-spin-slow {
    animation: rotate 15s linear infinite;
    transform-origin: center;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* GLOW UTILITIES */
.text-glow-cyan {
    text-shadow: 0 0 10px var(--hud-cyan), 0 0 20px rgba(0, 240, 255, 0.5);
}

.text-glow-gold {
    text-shadow: 0 0 10px var(--hud-gold);
}

.cyan-glow { background-color: var(--hud-cyan); box-shadow: 0 0 8px var(--hud-cyan); }
.gold-glow { background-color: var(--hud-gold); box-shadow: 0 0 8px var(--hud-gold); }
.red-glow { background-color: var(--hud-red); box-shadow: 0 0 8px var(--hud-red); }
.green-glow { background-color: var(--hud-green); box-shadow: 0 0 8px var(--hud-green); }

.pulse-cyan {
    color: var(--hud-cyan);
    animation: pulse 1s infinite alternate;
}

.pulse-red {
    color: var(--hud-red);
    animation: pulse 0.5s infinite alternate;
    text-shadow: 0 0 10px var(--hud-red);
}

/* RED ALERT PROTOCOL OVERLAY */
.red-alert-active {
    --hud-cyan: var(--hud-red);
    --hud-cyan-dim: var(--hud-red-dim);
    --hud-cyan-bg: var(--hud-red-bg);
    --hud-panel-border: rgba(239, 68, 68, 0.4);
    --hud-panel-bg: rgba(20, 2, 5, 0.75);
    background-color: #0b0204 !important;
}

/* ============================================================= */
/* THÈME DELOREAN — "Retour vers le futur" (commutable)          */
/* ============================================================= */

/* Bouton de bascule de thème */
.theme-toggle {
    font-family: var(--font-header);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 10px;
    cursor: pointer;
    background: var(--hud-cyan-bg);
    color: var(--hud-cyan);
    border: 1px solid var(--hud-panel-border);
    border-radius: 3px;
    transition: all 0.25s ease;
}
.theme-toggle:hover {
    background: var(--hud-cyan);
    color: var(--hud-bg);
    box-shadow: 0 0 12px var(--hud-cyan);
}

/* Panneau Time Circuits — masqué par défaut (thème HUD) */
/* Boîtier extérieur : plaque métal foncé avec cadre alu (façon prop DeLorean) */
.time-circuits {
    display: none;
    flex-direction: column;
    align-items: center;          /* rangées compactes et centrées (pas étirées) */
    gap: 10px;
    padding: 14px 18px;
    margin-bottom: 14px;
    border-radius: 8px;
    background: linear-gradient(180deg, #2b2b2b, #131313);
    border: 1px solid #000;
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.9),
                0 0 0 3px #3a3a3a,            /* liseré métal */
                0 0 0 4px #1a1a1a,
                0 8px 22px rgba(0, 0, 0, 0.75);
}

/* Chaque rangée = un boîtier ALUMINIUM BROSSÉ (façon prop), en colonne :
   écrans en haut, plaque de nom gravée en bas. */
.tc-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: linear-gradient(180deg, #eaeae4 0%, #c4c4bc 45%, #a4a49c 55%, #d4d4cc 100%);
    padding: 8px 14px 7px;
    border-radius: 7px;
    border: 1px solid #8f8f88;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7),
                inset 0 -2px 4px rgba(0, 0, 0, 0.28),
                0 2px 5px rgba(0, 0, 0, 0.55);
}
.tc-destination { --tc-color: #ff2d2d; }
.tc-present     { --tc-color: #2bff54; }
.tc-last        { --tc-color: #ffb52d; }

/* Libellé en bas façon RUBAN ÉTIQUETEUSE DYMO : ruban plastique noir brillant,
   lettres blanches EN RELIEF (embossées) — l'effet "bricolage manuel" du prop. */
.tc-label {
    order: 3;
    width: auto;
    text-align: center;
    font-family: var(--font-header);
    font-size: 9px;
    letter-spacing: 2.5px;
    color: #f2f2f2;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.9), 0 -1px 0 rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, #3a3a3a 0%, #111 45%, #000 100%);
    border: 1px solid #000;
    border-radius: 4px;
    padding: 3px 14px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18),
                inset 0 -1px 2px rgba(0, 0, 0, 0.8),
                0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Zone d'affichage NOIRE encastrée dans le métal */
.tc-cells {
    order: 1;
    display: flex;
    align-items: flex-end;
    gap: 7px;
    flex-wrap: nowrap;
    overflow-x: auto;
    background: #090909;
    padding: 6px 8px 7px;
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.95), inset 0 0 0 1px #000;
}

.tc-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
/* Étiquette MONTH/DAY/… sur petit RUBAN DYMO coloré (couleur de la rangée),
   lettres blanches embossées + léger vernis brillant. */
.tc-cap {
    font-family: var(--font-header);
    font-size: 6px;
    letter-spacing: 1px;
    color: #ffffff;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 45%), var(--tc-color);
    padding: 1px 5px;
    border-radius: 2px;
    white-space: nowrap;
    box-shadow: inset 0 -1px 1px rgba(0, 0, 0, 0.4);
}
.tc-ampm .tc-cap { background: transparent; box-shadow: none; }   /* pas de ruban vide pour AM/PM */

.tc-val {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 26px;
    line-height: 1;
    color: var(--tc-color);
    background: #050505;
    padding: 4px 9px;
    border-radius: 3px;
    min-width: 46px;
    text-align: center;
    text-shadow: 0 0 9px var(--tc-color), 0 0 18px var(--tc-color);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.95), 0 0 4px var(--tc-color);
    border: 1px solid rgba(0, 0, 0, 0.7);
}
.tc-colon {
    align-self: flex-end;
    margin-bottom: 6px;
    color: var(--tc-color);
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 0 8px var(--tc-color);
    animation: tc-blink 1s steps(1) infinite;
}
.tc-lamp {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 13px;
    color: var(--tc-color);
    text-shadow: 0 0 8px var(--tc-color);
    padding: 3px 5px;
}
@keyframes tc-blink { 50% { opacity: 0.25; } }

/* --- Bascule de palette globale pour le thème DeLorean --- */
body.theme-delorean {
    --hud-cyan: #ff9f1c;
    --hud-cyan-dim: rgba(255, 159, 28, 0.35);
    --hud-cyan-bg: rgba(255, 159, 28, 0.06);
    --hud-gold: #ffcf6b;
    --hud-panel-border: rgba(255, 159, 28, 0.28);
    --hud-panel-bg: rgba(12, 8, 3, 0.62);
    --hud-bg: #060402;
    background-color: #060402;
}

body.theme-delorean .time-circuits {
    display: flex;
    order: 10;              /* passe tout en bas de la colonne */
    margin-bottom: 0;
    margin-top: 12px;
    flex-shrink: 0;
}

/* Réacteur recoloré façon condensateur de flux (bleu/blanc) */
body.theme-delorean .reactor-ring,
body.theme-delorean .reactor-triangle,
body.theme-delorean .reactor-node { stroke: #7fd4ff; }
body.theme-delorean .reactor-core { fill: #ffffff; }
body.theme-delorean .arc-reactor { filter: drop-shadow(0 0 18px rgba(79, 191, 255, 0.7)); }
body.theme-delorean .voice-ring { border-color: #7fd4ff; }

/* Grille de fond ambrée + lueur bleue du plancher (LED footwell) */
body.theme-delorean .grid-background {
    background-image:
        linear-gradient(rgba(255, 159, 28, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 159, 28, 0.03) 1px, transparent 1px);
}
body.theme-delorean::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    background: radial-gradient(ellipse at 50% 125%, rgba(40, 120, 255, 0.18), transparent 70%);
    pointer-events: none;
    z-index: 3;
}

/* --- FLUX CAPACITOR / convertisseur temporel --- */
.flux-capacitor {
    display: none;
    width: 210px;
    z-index: 2;
    --flux-dur: 1.4s;      /* vitesse du courant (idle) */
    --flux-bright: 0.8;    /* intensité du courant (idle) */
}
.flux-capacitor svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 7px rgba(140, 210, 255, 0.55));
    transition: filter 0.3s ease;
}
body.theme-delorean .arc-reactor { display: none; }
body.theme-delorean .flux-capacitor { display: block; }

/* Tubes de verre (base sombre) */
.flux-tube line {
    stroke: #14304a;
    stroke-width: 11;
    stroke-linecap: round;
}
/* Lueur permanente bleu clair du Y */
.flux-core-line line {
    stroke: #9fdcff;
    stroke-width: 3.5;
    stroke-linecap: round;
    opacity: 0.55;
}
/* Courant blanc qui file vers le centre */
.flux-beam {
    stroke: #f2ffff;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 8 62;
    opacity: var(--flux-bright);
    animation: flux-travel var(--flux-dur) linear infinite;
}
@keyframes flux-travel {
    0%   { stroke-dashoffset: 70; }
    100% { stroke-dashoffset: 0; }
}

/* Bougies (spark plugs) */
.flux-plug circle { fill: #3a1414; }
.flux-plug .flux-plug-in { fill: #86312c; }

/* Noyau central pulsant */
.flux-hub {
    fill: #ffffff;
    transform-box: fill-box;
    transform-origin: center;
    animation: flux-hub-pulse var(--flux-dur) ease-in-out infinite;
}
@keyframes flux-hub-pulse {
    0%, 65%  { opacity: 0.4; transform: scale(0.8); }
    82%      { opacity: 1;   transform: scale(1.35); }
    100%     { opacity: 0.4; transform: scale(0.8); }
}

/* Étiquettes rouges */
.flux-warn {
    fill: #ff3b3b;
    font-family: var(--font-mono), monospace;
    font-size: 8px;
    letter-spacing: 0.5px;
}

/* EMBALLEMENT : Marthy réfléchit ou parle -> plus de force demandée */
body.flux-charging .flux-capacitor {
    --flux-dur: 0.42s;
    --flux-bright: 1;
}
body.flux-charging .flux-capacitor svg {
    filter: drop-shadow(0 0 18px rgba(159, 228, 255, 0.95));
}
body.flux-charging .flux-core-line line { opacity: 0.9; }

/* --- Correction de mise en page en mode DeLorean --- */
/* Le bloc circuits temporels + clavier ajoute beaucoup de hauteur. On laisse la PAGE
   défiler normalement (au lieu de tout comprimer dans 100vh), pour que les circuits
   temporels aient leur PROPRE bloc en bas, sans que le terminal vocal les chevauche. */
body.theme-delorean.sci-fi-hud {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
}
body.theme-delorean .hud-container {
    height: auto;
    min-height: 100vh;
    overflow-y: visible;
}
body.theme-delorean .hud-console {
    flex-shrink: 0;
    height: auto;
    min-height: 130px;
    order: 9;               /* le terminal vocal se place JUSTE AVANT les circuits temporels */
}
/* Les circuits temporels : bloc distinct, centré et compact, tout en bas */
body.theme-delorean .time-circuits {
    margin-top: 22px;
    margin-left: auto;
    margin-right: auto;
    align-self: center;
    max-width: 640px;
    width: fit-content;
}
/* Time circuits un peu plus compacts pour gagner de la place */
body.theme-delorean .tc-val {
    font-size: 22px;
    min-width: 40px;
    padding: 3px 7px;
}
body.theme-delorean .arc-reactor-wrapper {
    margin-bottom: 10px;
}

/* --- CADRANS VINTAGE (VOLTS / ROENTGENS / PLUTONIUM CHAMBER) --- */
.vintage-gauges { display: none; }
body.theme-delorean .vintage-gauges {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 6px;
}
/* Le visualiseur audio laisse la place aux cadrans en mode DeLorean */
body.theme-delorean .visualizer-container { display: none; }

.vg {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 96px;
}
.vg-face { width: 96px; height: auto; }
.vg-bezel { fill: #101010; }
.vg-plate { fill: #d8d2c0; }
.vg-arc { fill: none; stroke: #3a3a3a; stroke-width: 1.2; }
.vg-tick { stroke: #333; stroke-width: 1.5; }
.vg-needle {
    stroke: #c0342b;
    stroke-width: 2.4;
    stroke-linecap: round;
    transform-box: view-box;
    transform-origin: 50px 58px;
    transition: transform 0.6s ease;
}
.vg-pin { fill: #1a1a1a; }
.vg-caption {
    fill: #555;
    font-family: var(--font-mono), monospace;
    font-size: 6px;
    letter-spacing: 0.5px;
}
.vg-roentgens { fill: #7a2a12; font-size: 7px; }
.vg-label {
    font-family: var(--font-header);
    font-size: 9px;
    letter-spacing: 0.5px;
    color: var(--hud-cyan);
    margin-top: 3px;
    text-align: center;
    white-space: nowrap;
}
.vg-chamber {
    background: #e8e2d0;
    color: #111;
    padding: 1px 5px;
    border-radius: 2px;
    font-size: 7px;
}
.vg-read {
    font-family: var(--font-mono), monospace;
    font-size: 12px;
    color: #ffcf6b;
    margin-top: 2px;
}

/* ============================================================= */
/* THÈME KITT — "K2000 / Knight Rider" (commutable)              */
/* ============================================================= */

/* Bascule de palette globale : tout passe en rouge KITT */
body.theme-kitt {
    --hud-cyan: #ff2b2b;
    --hud-cyan-dim: rgba(255, 43, 43, 0.35);
    --hud-cyan-bg: rgba(255, 43, 43, 0.06);
    --hud-gold: #ff6b6b;
    --hud-gold-dim: rgba(255, 107, 107, 0.35);
    --hud-panel-border: rgba(255, 43, 43, 0.30);
    --hud-panel-bg: rgba(15, 2, 2, 0.65);
    --hud-bg: #070202;
    background-color: #070202;
}

/* En mode KITT : on masque le réacteur Iron-Man et le condensateur DeLorean,
   on montre le scanner. Le visualiseur reste (recoloré rouge par la variable). */
body.theme-kitt .arc-reactor,
body.theme-kitt .flux-capacitor,
body.theme-kitt .voice-ring { display: none; }

body.theme-kitt .arc-reactor-wrapper {
    width: 100%;
    height: auto;
    margin-bottom: 16px;
}

/* Grille de fond rouge sombre */
body.theme-kitt .grid-background {
    background-image:
        linear-gradient(rgba(255, 43, 43, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 43, 43, 0.03) 1px, transparent 1px);
}

/* --- LE SCANNER (barre de LED qui balaie, façon capot de KITT) --- */
.kitt-scanner {
    display: none;               /* visible seulement en thème KITT */
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    --kitt-dur: 1.4s;            /* vitesse du balayage (idle) */
}
body.theme-kitt .kitt-scanner { display: block; }

.kitt-badge {
    display: block;
    text-align: center;
    font-family: var(--font-header);
    font-size: 10px;
    letter-spacing: 3px;
    color: #ff4d4d;
    text-shadow: 0 0 8px rgba(255, 43, 43, 0.7);
    margin-bottom: 8px;
}

.kitt-strip {
    position: relative;
    display: flex;
    gap: 4px;
    height: 40px;
    padding: 7px 9px;
    background: linear-gradient(#160404, #070101);
    border: 1px solid rgba(255, 43, 43, 0.25);
    border-radius: 6px;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.9),
                0 0 0 3px #140303,
                0 6px 20px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}

/* Les segments LED éteints (rouge très sombre) */
.kitt-cell {
    flex: 1 1 0;
    border-radius: 2px;
    background: #360606;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.8);
}

/* L'"œil" : la lueur rouge vive qui se déplace par-dessus les LED.
   mix-blend-mode: screen -> il allume les segments qu'il survole. */
.kitt-eye {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 0;
    width: 26%;
    border-radius: 6px;
    background: radial-gradient(ellipse at center,
                rgba(255, 90, 80, 1) 0%,
                rgba(255, 40, 30, 0.9) 38%,
                rgba(255, 0, 0, 0) 80%);
    /* Lueur en box-shadow (statique) au lieu de filter:blur + mix-blend animés,
       qui font planter les GPU fragiles. Même rendu lumineux, sans la charge. */
    box-shadow: 0 0 14px 4px rgba(255, 45, 35, 0.85);
    pointer-events: none;
    animation: kitt-sweep var(--kitt-dur) cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

@keyframes kitt-sweep {
    from { left: 0%; }
    to   { left: 74%; }
}

/* Quand Marthy parle : le scanner s'emballe (modulateur de voix de KITT) */
body.kitt-speaking .kitt-scanner { --kitt-dur: 0.5s; }
body.kitt-speaking .kitt-strip {
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.9),
                0 0 0 3px #140303,
                0 0 22px rgba(255, 40, 40, 0.55);
}

/* --- COCKPIT K.I.T.T. : modulateur de voix + jauges + modes --- */
.kitt-cockpit { display: none; width: 100%; max-width: 460px; margin: 14px auto 0; }
body.theme-kitt .kitt-cockpit { display: block; }

/* ================= CONSOLE CENTRALE K.I.T.T. (façon photo) =================
   Colonnes de boutons | modulateur de voix vertical jumeau + modes | colonnes de boutons.
   Toutes les lueurs sont en box-shadow/text-shadow (pas de filter:blur animé). */
.kitt-console {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 12px;
    background:
        radial-gradient(120% 80% at 50% 0%, #1a1a1d, #050506 70%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 14px rgba(0,0,0,0.85), 0 8px 26px rgba(0,0,0,0.6);
}

/* --- Colonnes de boutons latérales --- */
.kitt-col-btns {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    width: 74px;
}
.kitt-btn-sm {
    font-family: 'Rajdhani', 'Share Tech Mono', monospace;
    font-weight: 700;
    font-size: 0.55rem;
    letter-spacing: 0.06em;
    line-height: 1;
    text-align: center;
    padding: 7px 3px;
    min-height: 30px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.7);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0) 45%),
        var(--kb-off);
    color: var(--kb-text-off);
    text-shadow: 0 1px 1px rgba(0,0,0,0.6);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.18),
        inset 0 -3px 6px rgba(0,0,0,0.55),
        0 2px 3px rgba(0,0,0,0.6);
    transition: box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease, transform 0.06s ease;
}
.kitt-btn-sm:hover { filter: brightness(1.12); }
.kitt-btn-sm:active { transform: translateY(1px); }
.kitt-btn-sm.is-on {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.32), rgba(255,255,255,0) 48%),
        var(--kb-on);
    color: var(--kb-text-on);
    text-shadow: 0 0 6px var(--kb-glow), 0 1px 1px rgba(0,0,0,0.4);
    border-color: var(--kb-on);
    box-shadow:
        inset 0 1px 2px rgba(255,255,255,0.5),
        0 0 8px var(--kb-glow),
        0 0 16px var(--kb-glow);
}

/* --- Module central --- */
.kitt-core { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 0 0 auto; }

/* Boîtier sombre encadrant les deux barres verticales */
.kitt-modulator {
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    height: 168px;
    border-radius: 6px;
    background: linear-gradient(#120303, #050101);
    border: 1px solid rgba(255, 60, 30, 0.18);
    box-shadow: inset 0 0 22px rgba(0,0,0,0.95), 0 0 0 3px #0c0303;
}
.kitt-mod-col {
    display: flex;
    flex-direction: column-reverse;   /* 1er enfant = segment du BAS */
    gap: 3px;
    width: 20px;
}
/* Segment LED éteint */
.kitt-mod-seg {
    flex: 1 1 0;
    border-radius: 1px;
    background: #2a0a04;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.8);
    transition: background 0.05s linear, box-shadow 0.05s linear;
}
/* Segments allumés : ambre (bas) -> orange (milieu) -> rouge (haut), avec halo */
.kitt-mod-seg.on.z-lo  { background: linear-gradient(90deg,#ff9a2e,#ffb347); box-shadow: 0 0 6px rgba(255,150,40,0.9), 0 0 12px rgba(255,120,20,0.5); }
.kitt-mod-seg.on.z-mid { background: linear-gradient(90deg,#ff6a1e,#ff8a3a); box-shadow: 0 0 7px rgba(255,90,25,0.95), 0 0 14px rgba(255,70,15,0.55); }
.kitt-mod-seg.on.z-hi  { background: linear-gradient(90deg,#ff2f1e,#ff5a3a); box-shadow: 0 0 8px rgba(255,50,30,1), 0 0 16px rgba(255,30,10,0.6); }

/* Bas du module : sliders gris + boîte de modes */
.kitt-core-lower { display: flex; align-items: stretch; justify-content: center; gap: 8px; width: 100%; }
.kitt-slider {
    position: relative;
    width: 9px;
    border-radius: 4px;
    background: linear-gradient(90deg,#242427,#3a3a3e,#242427);
    box-shadow: inset 0 0 4px rgba(0,0,0,0.8);
}
.kitt-slider-knob {
    position: absolute;
    left: -2px; right: -2px;
    top: 40%;
    height: 12px;
    border-radius: 3px;
    background: linear-gradient(180deg,#cfcfd4,#7d7d82);
    box-shadow: 0 1px 2px rgba(0,0,0,0.7), inset 0 1px 1px rgba(255,255,255,0.6);
}
.kitt-modebox {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 5px;
    border-radius: 4px;
    background: #05100a;
    border: 1px solid rgba(60, 220, 90, 0.25);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}
/* Dans la boîte : le mode actif est VERT vif (comme la photo) */
.kitt-modebox .kitt-mode { margin: 0; text-align: center; }
.kitt-modebox .kitt-mode.is-active {
    background: linear-gradient(180deg,#3ff06a,#1fbf4a);
    color: #032a10;
    border-color: #2fd24a;
    box-shadow: 0 0 10px rgba(60,220,90,0.8), 0 0 20px rgba(60,220,90,0.45);
    text-shadow: none;
}
@media (max-width: 720px) {
    .kitt-col-btns { width: 62px; }}

.kitt-cockpit-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Modulateur de voix KITT : barre rouge HORIZONTALE (façon scanner du capot).
   Les LED s'allument du centre vers les bords selon le volume quand Marthy parle. */
.kitt-voicebox {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 3px;
    flex: 1 1 auto;
    min-width: 150px;
    height: 34px;
    padding: 6px 8px;
    background: linear-gradient(#160404, #070101);
    border: 1px solid rgba(255, 43, 43, 0.25);
    border-radius: 6px;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.9),
                0 0 0 3px #140303,
                0 6px 18px rgba(0, 0, 0, 0.65);
    overflow: hidden;
}
/* Chaque segment LED : éteint = rouge très sombre */
.kitt-vb-bar {
    flex: 1 1 0;
    height: 100%;
    border-radius: 2px;
    background: #360606;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.8);
    transition: background 0.06s linear, box-shadow 0.06s linear;
}
/* Segment allumé : rouge vif KITT + halo */
.kitt-vb-bar.on {
    background: linear-gradient(180deg, #ff7a4a, #ff2b2b 60%, #d40f0f);
    box-shadow: 0 0 6px rgba(255, 60, 40, 0.9),
                0 0 12px rgba(255, 40, 40, 0.55);
}

/* Jauges à segments (VOLTS DC, COMPRESSOR TEMP, HYD SYST STRESS, FUEL FLOW) */
.kitt-gauges { display: flex; flex-direction: column; gap: 6px; }
.kitt-gauge { display: flex; flex-direction: column; gap: 2px; }
.kitt-g-label {
    font-family: var(--font-mono), monospace;
    font-size: 7px;
    letter-spacing: 0.5px;
    color: #ff6b4d;
    white-space: nowrap;
}
.kitt-g-bar { display: flex; gap: 2px; }
.kitt-seg {
    width: 5px;
    height: 9px;
    border-radius: 1px;
    background: #360606;                 /* segment éteint */
    box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.7);
}
.kitt-seg.on { background: #2fd24a; box-shadow: 0 0 4px rgba(60, 220, 90, 0.8); }      /* vert */
.kitt-seg.on.warn { background: #ffb52d; box-shadow: 0 0 4px rgba(255, 181, 45, 0.8); } /* ambre */
.kitt-seg.on.hot { background: #ff2b2b; box-shadow: 0 0 4px rgba(255, 43, 43, 0.85); }  /* rouge */

/* Indicateurs de mode (AUTO CRUISE / NORMAL CRUISE / PURSUIT) */
.kitt-modes {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.kitt-mode {
    font-family: var(--font-header);
    font-size: 9px;
    letter-spacing: 1px;
    padding: 5px 10px;
    border-radius: 3px;
    background: rgba(90, 20, 10, 0.5);
    color: #ff7a5a;
    border: 1px solid rgba(255, 90, 50, 0.3);
    opacity: 0.55;
}
.kitt-mode.is-active { opacity: 1; box-shadow: 0 0 10px rgba(255, 120, 60, 0.5); }
.kitt-mode-pursuit { background: rgba(120, 15, 15, 0.55); color: #ff4d4d; border-color: rgba(255, 43, 43, 0.4); }
/* PURSUIT s'allume quand Marthy parle ou en alerte rouge */
body.kitt-speaking .kitt-mode-pursuit,
body.red-alert-active .kitt-mode-pursuit {
    opacity: 1;
    background: #c81616;
    color: #fff;
    box-shadow: 0 0 14px rgba(255, 43, 43, 0.8);
    animation: pulse 0.5s infinite alternate;
}

/* --- BOUTONS DU TABLEAU DE BORD K.I.T.T. (cliquables on/off) --- */
.kitt-buttons {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    margin-top: 14px;
    padding: 12px 10px;
    /* Panneau noir façon capot de KITT */
    background:
        linear-gradient(180deg, rgba(30, 30, 32, 0.9), rgba(8, 8, 10, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255,255,255,0.04);
}

.kitt-btn {
    position: relative;
    font-family: 'Rajdhani', 'Share Tech Mono', monospace;
    font-weight: 700;
    font-size: 0.62rem;
    line-height: 1.05;
    letter-spacing: 0.04em;
    text-align: center;
    padding: 10px 4px;
    min-height: 46px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.7);
    /* Capuchon plastique éteint : couleur sombre + reflet du haut */
    background:
        linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0) 42%),
        var(--kb-off);
    color: var(--kb-text-off);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.18),
        inset 0 -3px 6px rgba(0, 0, 0, 0.55),
        0 2px 3px rgba(0, 0, 0, 0.6);
    transition: box-shadow 0.12s ease, background 0.12s ease,
                color 0.12s ease, transform 0.06s ease, text-shadow 0.12s ease;
}

.kitt-btn:hover { filter: brightness(1.12); }

/* Enfoncement au clic */
.kitt-btn:active {
    transform: translateY(1px);
    box-shadow:
        inset 0 2px 5px rgba(0, 0, 0, 0.7),
        0 1px 1px rgba(0, 0, 0, 0.5);
}

/* État ALLUMÉ : le capuchon s'éclaire de l'intérieur + halo */
.kitt-btn.is-on {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.3), rgba(255,255,255,0) 45%),
        var(--kb-on);
    color: var(--kb-text-on);
    text-shadow: 0 0 6px var(--kb-glow), 0 1px 1px rgba(0, 0, 0, 0.4);
    border-color: var(--kb-on);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.5),
        inset 0 -2px 6px rgba(0, 0, 0, 0.25),
        0 0 10px var(--kb-glow),
        0 0 20px var(--kb-glow);
}

/* Flash bref des boutons "poussoir" (BOOST, EJECT) */
.kitt-btn.is-flash { animation: kb-flash 0.6s ease-out; }
@keyframes kb-flash {
    0%, 40% { filter: brightness(1.5); }
    100%    { filter: brightness(1); }
}

/* Palettes de couleur (éteint sombre -> allumé vif) */
.kb-green  { --kb-off:#123a1c; --kb-on:#2fd24a; --kb-glow:rgba(60,220,90,0.85);  --kb-text-off:#5f8f6d; --kb-text-on:#03210b; }
.kb-red    { --kb-off:#3d1414; --kb-on:#ff2f2f; --kb-glow:rgba(255,55,55,0.85);  --kb-text-off:#9a5c5c; --kb-text-on:#2a0505; }
.kb-amber  { --kb-off:#3d2a0e; --kb-on:#ff9d1f; --kb-glow:rgba(255,160,40,0.85); --kb-text-off:#9c7b4a; --kb-text-on:#2a1802; }
.kb-yellow { --kb-off:#3a3a10; --kb-on:#ffe23a; --kb-glow:rgba(255,225,60,0.85); --kb-text-off:#98965a; --kb-text-on:#2a2802; }

@media (max-width: 720px) {
    .kitt-buttons { grid-template-columns: repeat(3, 1fr); }}

/* ============================================================= */
/* VUE MOBILE — mise en page adaptative (téléphones / tablettes) */
/* ============================================================= */
@media (max-width: 820px) {
    /* IMPORTANT : le body de base est en height:100vh + overflow:hidden (bien sur PC),
       ce qui COUPE tout le contenu mobile. On rétablit le défilement vertical. */
    html { overflow-x: hidden; }
    body.sci-fi-hud {
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    /* La page défile verticalement au lieu de tout tasser sur un écran fixe */
    .hud-container {
        height: auto;
        min-height: 100vh;
        padding: 10px;
    }

    /* En-tête empilé : titre en haut sur toute la largeur, infos centrées dessous */
    .hud-header {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        gap: 6px;
        padding-bottom: 8px;
        margin-bottom: 12px;
    }
    .header-center { order: -1; flex-basis: 100%; }
    .hud-title { font-size: 20px; letter-spacing: 3px; }
    .header-left, .header-right {
        flex-basis: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        font-size: 11px;
    }
    .hud-clock { font-size: 15px; }

    /* Les order: 1/2/3 d ici visaient les trois colonnes de l ancienne grille
       (center/right/left-panel). Ces colonnes n existent plus, et .hud-stage
       porte encore la classe .center-panel : la regle renvoyait la scene
       APRES le bandeau d onglets et le terminal. Supprimee. */

    /* Réacteur un peu réduit pour les petits écrans */
    .arc-reactor-wrapper { width: 200px; height: 200px; margin-bottom: 15px; }
    .arc-reactor { width: 180px; height: 180px; }
    .voice-ring { width: 200px; height: 200px; }

    /* Terminal de conversation : hauteur libre, historique limité et scrollable */
    .hud-console { height: auto; }
    .chat-history { max-height: 40vh; }

    /* Cockpit KITT et circuits temporels : ne débordent pas horizontalement */
    .kitt-cockpit, .time-circuits { max-width: 100%; overflow-x: auto; }}

/* Très petits écrans (< 400px) : on resserre encore un peu */
@media (max-width: 400px) {
    .hud-title { font-size: 17px; letter-spacing: 2px; }
    .header-left, .header-right { font-size: 10px; }
    .arc-reactor-wrapper { width: 170px; height: 170px; }
    .arc-reactor { width: 155px; height: 155px; }
    .voice-ring { width: 170px; height: 170px; }
    .hud-btn { font-size: 12px; }}

/* ============================================================= */
/* MOBILE — thème Entreprise : moins de décor, textes plus gros  */
/* ============================================================= */
@media (max-width: 820px) {
    body.theme-entreprise .grid-background { display: none; } /* un décor de moins, place au contenu */

    body.theme-entreprise .ent-panel-title { font-size: 15px; }
    body.theme-entreprise .ent-count { font-size: 13px; padding: 2px 10px; }

    body.theme-entreprise .ent-input,
    body.theme-entreprise .ent-select,
    body.theme-entreprise .ent-textarea {
        font-size: 16px; /* évite le zoom automatique d'iOS Safari sur les champs < 16px */
        padding: 10px 12px;
    }
    body.theme-entreprise .ent-btn { font-size: 15px; padding: 12px; }

    body.theme-entreprise .ent-task-item { padding: 10px 12px; }
    body.theme-entreprise .ent-task-text { font-size: 15px; }
    body.theme-entreprise .ent-task-meta { font-size: 12.5px; gap: 10px; }
    body.theme-entreprise .ent-priority-tag { font-size: 11px; padding: 2px 8px; }
    body.theme-entreprise .ent-task-check { width: 20px; height: 20px; }
    body.theme-entreprise .ent-task-del { font-size: 16px; padding: 4px 6px; }

    body.theme-entreprise .ent-cal-label { font-size: 16px; }
    body.theme-entreprise .ent-cal-weekdays { font-size: 12px; }
    body.theme-entreprise .ent-cal-daynum { font-size: 13px; }
    body.theme-entreprise .ent-cal-day { min-height: 38px; padding: 5px 6px; }
    body.theme-entreprise .ent-cal-dot { width: 6px; height: 6px; }
    body.theme-entreprise .ent-cal-nav { width: 32px; height: 32px; font-size: 18px; }
    body.theme-entreprise .ent-cal-today { font-size: 13px; padding: 6px 11px; }

    body.theme-entreprise .ent-tab { font-size: 14px; padding: 10px; }
    body.theme-entreprise .ent-comms-status { font-size: 13px; }}

/* ============================================================= */
/* VOYAGE TEMPOREL — commande des circuits (réglage + PARTIR)     */
/* ============================================================= */
.tc-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(127, 212, 255, 0.25);
}
.tc-ctl-label {
    font-family: var(--font-mono, monospace);
    font-size: 11px;
    letter-spacing: 1px;
    color: #7fd4ff;
}
.tc-ctl-input {
    background: #06131f;
    border: 1px solid rgba(127, 212, 255, 0.4);
    color: #eaffff;
    font-family: var(--font-mono, monospace);
    font-size: 12px;
    padding: 5px 8px;
    border-radius: 4px;
}
.tc-travel-btn {
    font-family: var(--font-header, sans-serif);
    font-size: 12px;
    letter-spacing: 1px;
    color: #fff;
    background: linear-gradient(180deg, #ff8a3d, #d81f1f);
    border: 1px solid #ffb27a;
    border-radius: 5px;
    padding: 7px 14px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 80, 40, 0.5);   /* lueur STATIQUE (léger GPU) */
}
.tc-travel-btn:hover { filter: brightness(1.1); }
.tc-travel-btn:active { transform: translateY(1px); }

/* Animation « voyage » : clignotement des chiffres — OPACITÉ seulement (pas de blur, GPU-friendly) */
@keyframes tc-flicker {
    0%, 100% { opacity: 1; }
    10% { opacity: 0.18; }
    22% { opacity: 1; }
    34% { opacity: 0.4; }
    48% { opacity: 1; }
    62% { opacity: 0.12; }
    76% { opacity: 1; }
    88% { opacity: 0.5; }
}
.time-circuits.tc-traveling .tc-val,
.time-circuits.tc-traveling .tc-lamp {
    animation: tc-flicker 1.4s steps(1, end) 3;
}

/* --- Clavier numérique de voyage temporel (façon prop DeLorean) --- */
.tc-keypad-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed rgba(127, 212, 255, 0.25);
}
.tc-lamps { display: flex; flex-direction: column; gap: 8px; }
.tc-led {
    width: 14px; height: 14px; border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.5);
}
/* Lueurs STATIQUES (box-shadow) — léger pour le GPU */
.led-red   { background: radial-gradient(circle at 35% 30%, #ff8a8a, #c40000); box-shadow: 0 0 8px rgba(255, 40, 40, 0.8); }
.led-amber { background: radial-gradient(circle at 35% 30%, #ffd98a, #d98a00); box-shadow: 0 0 8px rgba(255, 170, 40, 0.8); }
.led-green { background: radial-gradient(circle at 35% 30%, #9dffa0, #17b524); box-shadow: 0 0 8px rgba(50, 220, 90, 0.85); }

.tc-keypad {
    display: grid;
    grid-template-columns: repeat(3, 46px);
    gap: 6px;
    background: #b9b9b4;
    padding: 8px;
    border-radius: 6px;
    box-shadow: inset 0 0 0 2px #8f8f89, 0 4px 10px rgba(0, 0, 0, 0.5);
}
.tc-key {
    height: 40px;
    font-family: var(--font-mono, monospace);
    font-size: 16px;
    font-weight: bold;
    color: #222;
    background: linear-gradient(180deg, #fdfdfb, #cfcfc8);
    border: 1px solid #9a9a92;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 0 #9a9a92;
}
.tc-key:active { transform: translateY(2px); box-shadow: none; }
.tc-key-clr { color: #b00; font-size: 12px; }
.tc-key-go  { color: #fff; background: linear-gradient(180deg, #ff8a3d, #d81f1f); border-color: #ffb27a; }
.tc-keypad-hint {
    font-family: var(--font-mono, monospace);
    font-size: 10px;
    letter-spacing: 0.5px;
    color: #7fd4ff;
    max-width: 150px;
    line-height: 1.4;
}

/* ============================================================
   THEME: ENTREPRISE — sombre, sobre, pratique (pas de sci-fi)
   Pas d'effets GPU lourds : pas de blur animé, pas de mix-blend,
   uniquement des couleurs plates et des box-shadow statiques.
   ============================================================ */
body.theme-entreprise {
    --hud-cyan: #5b8cff;
    --hud-cyan-dim: rgba(91, 140, 255, 0.35);
    --hud-cyan-bg: rgba(91, 140, 255, 0.07);
    --hud-gold: #e0a83c;
    --hud-gold-dim: rgba(224, 168, 60, 0.3);
    --hud-red: #ef5555;
    --hud-red-dim: rgba(239, 85, 85, 0.3);
    --hud-red-bg: rgba(239, 85, 85, 0.08);
    --hud-green: #35c47a;
    --hud-green-dim: rgba(53, 196, 122, 0.3);
    --hud-bg: #0a0d13;
    --hud-panel-border: rgba(255, 255, 255, 0.08);
    --hud-panel-bg: #12151d;

    --ent-text: #cbd1dc;
    --ent-text-dim: #767e8c;
    --ent-surface: #171b25;
    --ent-surface-2: #1e232f;
    --ent-border: rgba(255, 255, 255, 0.08);

    --ent-urgente: #ef5555;
    --ent-haute: #e0913c;
    --ent-normale: #5b8cff;
    --ent-basse: #6b7785;
}

body.theme-entreprise.sci-fi-hud { color: var(--ent-text); }
body.theme-entreprise .hud-header { background: none; border-bottom-color: var(--ent-border); }
body.theme-entreprise .hud-title { text-shadow: none; }
body.theme-entreprise .icon-pulse { animation: none; box-shadow: 0 0 4px var(--hud-cyan); }

/* Remplace le glow pulsant par un petit anneau qui tourne (façon réacteur Iron Man,
   version discrète) : transform: rotate uniquement, aucun blur/filter = léger pour le GPU. */
body.theme-entreprise .status-glow {
    animation: none;
    text-shadow: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
body.theme-entreprise .status-glow::before {
    content: '';
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2px solid var(--hud-cyan-dim);
    border-top-color: var(--hud-cyan);
    flex-shrink: 0;
    animation: ent-spin 1.4s linear infinite;
}
@keyframes ent-spin { to { transform: rotate(360deg); } }
body.theme-entreprise .hud-overlay,
body.theme-entreprise .vignette { display: none; } /* pas de scanlines/vignette : rendu net */
body.theme-entreprise .grid-background { opacity: 0.3; }

body.theme-entreprise .glass-morphism {
    background: var(--ent-surface);
    backdrop-filter: none;
    box-shadow: none;
}

body.theme-entreprise .hud-btn { transition: background 0.15s ease, border-color 0.15s ease; }
body.theme-entreprise .hud-btn:hover { transform: none; box-shadow: none; }

/* Masque les éléments décoratifs sci-fi pour laisser place aux panneaux pratiques */
body.theme-entreprise .arc-reactor-wrapper,
body.theme-entreprise .visualizer-container,
body.theme-entreprise .vintage-gauges,
body.theme-entreprise #time-circuits,
body.theme-entreprise .sys-log-container,
body.theme-entreprise .nodes-status {
    display: none !important;
}

body.theme-entreprise .center-panel {
    justify-content: flex-start;
    align-items: stretch;
}

.ent-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ent-panel-title {
    font-family: var(--font-header);
    font-size: 13px;
    letter-spacing: 1.5px;
    color: var(--hud-cyan);
}

.ent-count {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ent-text-dim);
    background: var(--ent-surface-2);
    border: 1px solid var(--ent-border);
    border-radius: 10px;
    padding: 1px 8px;
}

/* --- Champs de formulaire communs --- */
.ent-input, .ent-select, .ent-textarea {
    background: var(--ent-surface-2);
    border: 1px solid var(--ent-border);
    color: var(--ent-text);
    font-family: var(--font-panel);
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 4px;
    width: 100%;
}

.ent-input::placeholder, .ent-textarea::placeholder { color: var(--ent-text-dim); }
.ent-input:focus, .ent-select:focus, .ent-textarea:focus {
    outline: none;
    border-color: var(--hud-cyan);
}

.ent-textarea { resize: vertical; font-family: var(--font-panel); }

.ent-btn {
    font-family: var(--font-panel);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.3px;
    padding: 9px 12px;
    border: 1px solid var(--hud-cyan-dim);
    border-radius: 4px;
    background: var(--hud-cyan-bg);
    color: var(--hud-cyan);
    cursor: pointer;
}

.ent-btn:hover { background: var(--hud-cyan); color: #0a0d13; }
.ent-btn:active { opacity: 0.85; }

/* --- Panneau Tâches --- */
.ent-task-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ent-border);
}

.ent-task-form-row { display: flex; gap: 6px; }
.ent-task-form-row .ent-select { flex: 1.2; }
.ent-task-form-row .ent-date { flex: 1; }
.ent-task-form-row .ent-time { flex: 0.7; }

.ent-task-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    flex-grow: 1;
}

.ent-task-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: var(--ent-surface-2);
    border: 1px solid var(--ent-border);
    border-left: 3px solid var(--ent-normale);
    border-radius: 4px;
    padding: 8px 10px;
}

.ent-task-item.pr-urgente { border-left-color: var(--ent-urgente); }
.ent-task-item.pr-haute   { border-left-color: var(--ent-haute); }
.ent-task-item.pr-normale { border-left-color: var(--ent-normale); }
.ent-task-item.pr-basse   { border-left-color: var(--ent-basse); }

.ent-task-item.is-done { opacity: 0.5; }
.ent-task-item.is-done .ent-task-text { text-decoration: line-through; }

.ent-task-check {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: var(--hud-cyan);
    cursor: pointer;
    flex-shrink: 0;
}

.ent-task-body { flex-grow: 1; min-width: 0; }

.ent-task-text {
    font-size: 13px;
    color: var(--ent-text);
    word-break: break-word;
}

.ent-task-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 3px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--ent-text-dim);
}

.ent-priority-tag {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 9.5px;
}
.ent-priority-tag.pr-urgente { background: rgba(239, 85, 85, 0.15); color: var(--ent-urgente); }
.ent-priority-tag.pr-haute   { background: rgba(224, 145, 60, 0.15); color: var(--ent-haute); }
.ent-priority-tag.pr-normale { background: rgba(91, 140, 255, 0.15); color: var(--ent-normale); }
.ent-priority-tag.pr-basse   { background: rgba(107, 119, 133, 0.18); color: var(--ent-basse); }

.ent-task-del {
    background: none;
    border: none;
    color: var(--ent-text-dim);
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
    padding: 2px 4px;
}
.ent-task-del:hover { color: var(--hud-red); }

.ent-task-empty {
    color: var(--ent-text-dim);
    font-size: 12px;
    text-align: center;
    padding: 20px 0;
}

/* --- Panneau Agenda --- */
.ent-agenda-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.ent-cal-nav {
    background: var(--ent-surface-2);
    border: 1px solid var(--ent-border);
    color: var(--ent-text);
    width: 26px;
    height: 26px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
}
.ent-cal-nav:hover { border-color: var(--hud-cyan); color: var(--hud-cyan); }

.ent-cal-label {
    font-family: var(--font-header);
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--ent-text);
    flex-grow: 1;
    text-align: center;
}

.ent-cal-today {
    background: none;
    border: 1px solid var(--ent-border);
    color: var(--ent-text-dim);
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 4px;
    cursor: pointer;
}
.ent-cal-today:hover { color: var(--hud-cyan); border-color: var(--hud-cyan-dim); }

.ent-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-family: var(--font-mono);
    font-size: 10.5px;
    color: var(--ent-text-dim);
    margin-bottom: 4px;
}

.ent-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 1fr;
    gap: 4px;
    flex-grow: 1;
    min-height: 0;
}

.ent-cal-day {
    background: var(--ent-surface-2);
    border: 1px solid var(--ent-border);
    border-radius: 4px;
    padding: 4px 5px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    min-height: 44px;
}
.ent-cal-day:hover { border-color: var(--hud-cyan-dim); }
.ent-cal-day.other-month { opacity: 0.35; }
.ent-cal-day.is-today { border-color: var(--hud-cyan); box-shadow: inset 0 0 0 1px var(--hud-cyan); }
.ent-cal-day.is-selected { background: var(--hud-cyan-bg); }

.ent-cal-daynum {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ent-text);
}

.ent-cal-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-top: auto;
}

.ent-cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
}
.ent-cal-dot.pr-urgente { background: var(--ent-urgente); }
.ent-cal-dot.pr-haute   { background: var(--ent-haute); }
.ent-cal-dot.pr-normale { background: var(--ent-normale); }
.ent-cal-dot.pr-basse   { background: var(--ent-basse); }

.ent-day-detail {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ent-border);
    display: none;
    flex-direction: column;
    gap: 6px;
    max-height: 30%;
    overflow-y: auto;
}
.ent-day-detail.is-open { display: flex; }

.ent-day-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-header);
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--ent-text);
}

.ent-day-detail-close {
    background: none;
    border: none;
    color: var(--ent-text-dim);
    cursor: pointer;
    font-size: 13px;
}
.ent-day-detail-close:hover { color: var(--hud-red); }

/* --- Panneau Communications --- */
.ent-comms-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.ent-tab {
    flex: 1;
    background: var(--ent-surface-2);
    border: 1px solid var(--ent-border);
    color: var(--ent-text-dim);
    font-family: var(--font-panel);
    font-size: 12px;
    padding: 7px;
    border-radius: 4px;
    cursor: pointer;
}
.ent-tab.is-active { color: var(--hud-cyan); border-color: var(--hud-cyan-dim); background: var(--hud-cyan-bg); }

.ent-comms-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ent-comms-status {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 11.5px;
    min-height: 14px;
}
.ent-comms-status.is-ok { color: var(--hud-green); }
.ent-comms-status.is-err { color: var(--hud-red); }
.ent-comms-status.is-pending { color: var(--ent-text-dim); }

/* ===== FLOTTE : les PC de la maison ===== */
/* Effets lumineux en dégradés + box-shadow uniquement : pas de filter:blur ni de
   mix-blend animé (cette machine n'aime pas — voir les plantages du visualiseur). */
.fleet-container {
    margin-top: 10px;
    border: 1px solid rgba(0, 240, 255, 0.15);
    background: rgba(0, 0, 0, 0.4);
    padding: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    flex-shrink: 0;
}

.fleet-title {
    color: var(--hud-gold);
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
    padding-bottom: 3px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 1px;
}

.fleet-count {
    color: var(--hud-cyan-dim);
    font-size: 10px;
}

.fleet-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 190px;
    overflow-y: auto;
}

.fleet-empty {
    color: var(--hud-cyan-dim);
    font-style: italic;
}

.fleet-node {
    border-left: 2px solid var(--hud-green);
    padding: 4px 6px;
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.08), transparent 70%);
}

.fleet-node.is-offline {
    border-left-color: rgba(239, 68, 68, 0.6);
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.07), transparent 70%);
    opacity: 0.65;
}

.fleet-node-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.fleet-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hud-green);
    box-shadow: 0 0 5px var(--hud-green);
    flex-shrink: 0;
}

.fleet-node.is-offline .fleet-dot {
    background: var(--hud-red);
    box-shadow: 0 0 5px var(--hud-red-dim);
}

.fleet-name {
    color: var(--hud-cyan);
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fleet-role {
    margin-left: auto;
    font-size: 9px;
    color: var(--hud-gold);
    border: 1px solid var(--hud-gold-dim);
    padding: 0 4px;
    flex-shrink: 0;
}

.fleet-node.is-offline .fleet-role {
    color: var(--hud-red);
    border-color: var(--hud-red-dim);
}

.fleet-gauges {
    display: flex;
    gap: 8px;
    margin-bottom: 3px;
}

.fleet-gauge {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fleet-gauge-label {
    color: var(--hud-cyan-dim);
    font-size: 9px;
    width: 22px;
    flex-shrink: 0;
}

.fleet-gauge-track {
    flex-grow: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(0, 240, 255, 0.1);
}

.fleet-gauge-fill {
    height: 100%;
    background: var(--hud-cyan);
    box-shadow: 0 0 4px var(--hud-cyan-dim);
    transition: width 0.6s ease-in-out;
}

.fleet-gauge-fill.is-warn { background: var(--hud-gold); box-shadow: 0 0 4px var(--hud-gold-dim); }
.fleet-gauge-fill.is-crit { background: var(--hud-red); box-shadow: 0 0 4px var(--hud-red-dim); }

.fleet-gauge-val {
    color: var(--hud-cyan-dim);
    font-size: 9px;
    width: 26px;
    text-align: right;
    flex-shrink: 0;
}

.fleet-disks {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    font-size: 9px;
    color: var(--hud-cyan-dim);
}

.fleet-disk.is-warn { color: var(--hud-gold); }
.fleet-disk.is-crit { color: var(--hud-red); text-shadow: 0 0 4px var(--hud-red-dim); }

.fleet-meta {
    font-size: 9px;
    color: rgba(0, 240, 255, 0.25);
    margin-top: 2px;
}

/* ===== PANNEAU PROJETS (visible tous thèmes) ===== */
.projects-container {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--hud-panel-border);
}

.projects-title {
    font-family: var(--font-header);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--hud-cyan);
    text-shadow: 0 0 6px var(--hud-cyan-dim);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.projects-count {
    background: rgba(0, 240, 255, 0.12);
    color: var(--hud-cyan);
    font-family: var(--font-mono);
    font-size: 9px;
    padding: 1px 6px;
    border: 1px solid var(--hud-cyan-dim);
}

.projects-list {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--hud-cyan-dim) transparent;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.proj-card {
    background: rgba(0, 240, 255, 0.04);
    border: 1px solid rgba(0, 240, 255, 0.12);
    padding: 6px 8px;
    cursor: default;
    transition: border-color 0.2s, background 0.2s;
}

.proj-card:hover {
    border-color: var(--hud-cyan-dim);
    background: rgba(0, 240, 255, 0.08);
}

.proj-card-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.proj-name {
    font-family: var(--font-panel);
    font-size: 11px;
    font-weight: 600;
    color: #e2e8f0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proj-type {
    font-family: var(--font-mono);
    font-size: 8px;
    padding: 1px 5px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.proj-type.is-php {
    background: rgba(136, 80, 226, 0.2);
    border: 1px solid rgba(136, 80, 226, 0.4);
    color: #a78bfa;
}

.proj-type.is-nextjs {
    background: rgba(0, 240, 255, 0.12);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--hud-cyan);
}

.proj-git-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.proj-git-dot.has-git {
    background: var(--hud-green);
    box-shadow: 0 0 4px var(--hud-green-dim);
}

.proj-git-dot.no-git {
    background: rgba(255, 255, 255, 0.15);
}

.proj-meta {
    font-size: 9px;
    color: rgba(0, 240, 255, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proj-commit {
    font-size: 9px;
    color: rgba(0, 240, 255, 0.22);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

/* Thème Entreprise : couleurs neutres */
.theme-entreprise .proj-card {
    background: rgba(100, 116, 139, 0.06);
    border-color: rgba(100, 116, 139, 0.18);
}

.theme-entreprise .proj-card:hover {
    background: rgba(100, 116, 139, 0.12);
    border-color: rgba(100, 116, 139, 0.3);
}

.theme-entreprise .projects-title {
    color: #94a3b8;
    text-shadow: none;
}

.theme-entreprise .projects-count {
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(100, 116, 139, 0.3);
    color: #94a3b8;
}

/* Thème KITT : tons rouges */
.theme-kitt .proj-card {
    background: rgba(255, 60, 40, 0.04);
    border-color: rgba(255, 60, 40, 0.12);
}

.theme-kitt .proj-card:hover {
    border-color: rgba(255, 60, 40, 0.3);
    background: rgba(255, 60, 40, 0.08);
}

.theme-kitt .projects-title {
    color: #ff6b5a;
    text-shadow: 0 0 6px rgba(255, 60, 40, 0.3);
}

.theme-kitt .projects-count {
    background: rgba(255, 60, 40, 0.12);
    border-color: rgba(255, 60, 40, 0.3);
    color: #ff6b5a;
}

/* Thème DeLorean : tons ambrés */
.theme-delorean .proj-card {
    background: rgba(251, 191, 36, 0.04);
    border-color: rgba(251, 191, 36, 0.12);
}

.theme-delorean .proj-card:hover {
    border-color: rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.08);
}


/* === TEMPLATE V2 === */
/* =====================================================================
   TEMPLATE V2 — refonte complete
   ---------------------------------------------------------------------
   . DIAGNOSTICS NOYAU remonte dans la barre du haut (compact sur mobile,
     mini-jauges sur PC)
   . La scene centrale garde le decor du theme : reacteur Iron Man,
     convecteur temporel, cockpit KITT
   . En mode DeLorean le convecteur et les circuits de destination sont
     dans LE MEME cadre
   . Un bandeau a onglets (taches / agenda / courriel / flotte / projets /
     systeme) : meme structure sur mobile et sur PC, tous themes confondus
   . Le bouton micro est mis en avant sous la scene
   Contrainte GPU : aucune animation continue ajoutee, pas de filter:blur
   anime ni de mix-blend-mode (voir la note du projet sur ce point).
   ===================================================================== */

/* --- La page defile : la scene + le bandeau + le terminal ne tiennent
       pas dans 100vh figes, sur aucun format. --------------------------- */
body.sci-fi-hud { height: auto; min-height: 100vh; overflow-y: auto; }
.hud-container  { height: auto; min-height: 100vh; }

/* =====================================================================
   1. BARRE DU HAUT — statut + diagnostics noyau
   ===================================================================== */
.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    min-width: 0;
}

.hdr-diags {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.5px;
}

.hdr-diag {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.hdr-diag-label { color: var(--hud-cyan-dim); }
.hdr-diag-val   { color: var(--hud-cyan); }

/* Mobile : valeurs seules, pas de barre — on economise la hauteur. */
.hdr-diag-track { display: none; }

.hdr-diag-fill {
    display: block;
    height: 100%;
    transition: width 0.5s ease-in-out;
}

/* PC : les mini-jauges apparaissent, la place ne manque pas. */
@media (min-width: 821px) {
    .hdr-diag-track {
        display: block;
        width: 58px;
        height: 5px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(0, 240, 255, 0.15);
        overflow: hidden;
    }}

/* =====================================================================
   2. SCENE CENTRALE — le decor du theme
   ===================================================================== */
.hud-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px 0 0;
    flex: 0 0 auto;
}

/* Cadre commun reacteur / convecteur / circuits temporels */
.stage-core {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Actions principales : le micro doit sauter aux yeux */
.stage-actions {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 14px;
}

.stage-actions .control-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 0;
    width: 100%;
    max-width: 760px;
}

.stage-actions .hud-btn { flex: 1 1 190px; }

/* Le micro : plus gros et plus haut que ses voisins */
.stage-actions #btn-mic {
    flex: 1 1 240px;
    font-size: 14px;
    padding: 15px 18px;
}

/* =====================================================================
   3. MODE DELOREAN
   Le centre se comporte comme les autres themes : convecteur temporel puis
   modulateur de voix, sans cadre particulier. Les circuits temporels sont
   de la DECORATION : ils passent dessous, afficheurs et clavier cote a cote.
   ===================================================================== */

/* Pas de cadre autour du centre : identique aux autres themes */
body.theme-delorean .stage-core {
    flex-direction: column;
    gap: 0;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    width: 100%;
}

/* Le bloc decoratif, sous le centre */
body.theme-delorean .time-circuits {
    /* annule le order:10 herite de l ancienne mise en page (ils etaient alors
       enfants de .hud-container) : dans la scene en colonne il les renverrait
       APRES les boutons d action. */
    order: 0;
    margin: 18px auto 0;
    width: fit-content;
    max-width: 100%;
}

/* Les trois afficheurs restent empiles (comme le prop d'origine) */
.tc-readouts {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* PC : le clavier se met a COTE de l'affichage des dates */
@media (min-width: 821px) {
    body.theme-delorean .time-circuits {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 18px;
    }

    body.theme-delorean .tc-keypad-panel { margin: 0; }}

/* Mobile : tout reste empile */
@media (max-width: 820px) {
    body.theme-delorean .time-circuits { flex-direction: column; }}

/* =====================================================================
   4. BANDEAU DE TRAVAIL — onglets, meme structure mobile et PC
   ===================================================================== */
.workbench {
    display: flex;
    flex-direction: column;
    margin-top: 16px;
    border: 1px solid var(--hud-panel-border);
    border-radius: 6px;
    background: var(--hud-panel-bg);
    min-height: 0;
}

.wb-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    border-bottom: 1px solid var(--hud-panel-border);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.wb-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;                 /* cible tactile confortable */
    padding: 11px 16px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--hud-cyan-dim);
    font-family: var(--font-header);
    font-size: 12px;
    letter-spacing: 1px;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.wb-tab:hover { color: var(--hud-cyan); background: var(--hud-cyan-bg); }

.wb-tab.is-active {
    color: var(--hud-cyan);
    border-bottom-color: var(--hud-cyan);
    background: var(--hud-cyan-bg);
}

.wb-tab:focus-visible { outline: 2px solid var(--hud-cyan); outline-offset: -2px; }

.wb-badge {
    display: none;
    min-width: 18px;
    padding: 1px 6px;
    border-radius: 9px;
    background: var(--hud-cyan);
    color: var(--hud-bg);
    font-family: var(--font-mono);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}
.wb-badge.is-visible { display: inline-block; }

.wb-panels { padding: 14px; }

.wb-panel { display: none; }
.wb-panel.is-active { display: block; }

/* L'onglet Systeme repartit ses blocs en colonnes quand il y a la place */
.wb-panel-cols.is-active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    align-items: start;
}

/* Les blocs deplaces dans le bandeau n'ont plus besoin de leurs marges
   de l'ancienne colonne laterale. */
.wb-panel .fleet-container,
.wb-panel .projects-container { margin-top: 0; }
.wb-panel .nodes-status,
.wb-panel .voice-config { margin-bottom: 0; }

.wb-panel .fleet-list,
.wb-panel .projects-list { max-height: 320px; }
.wb-panel .sys-log-output { max-height: 260px; }

/* =====================================================================
   5. THEME ENTREPRISE — le bandeau reste utile
   ===================================================================== */
/* Le journal et le reseau vivent maintenant dans un onglet qu'on ouvre
   expres : plus de raison de les masquer ici (le decor sci-fi, lui, reste
   masque par la regle d'origine). */
body.theme-entreprise .sys-log-container,
body.theme-entreprise .nodes-status { display: flex !important; }

body.theme-entreprise .workbench { background: var(--hud-panel-bg); }

/* =====================================================================
   6. MOBILE — ajustements du nouveau template
   ===================================================================== */
@media (max-width: 820px) {
    .hud-container { padding: 10px; }

    .header-left { gap: 10px; }
    .hdr-diags { gap: 10px; font-size: 10.5px; }

    .hud-stage { padding-top: 4px; }

    .stage-actions .control-actions { gap: 10px; }
    .stage-actions .hud-btn,
    .stage-actions #btn-mic { flex: 1 1 100%; }

    .wb-tab { padding: 11px 13px; font-size: 11px; }
    .wb-panels { padding: 11px; }

    .wb-panel .fleet-list,
    .wb-panel .projects-list { max-height: 240px; }
    .wb-panel .sys-log-output { max-height: 200px; }

    body.theme-delorean .stage-core { padding: 12px; gap: 14px; }}


/* === NOYAU IA (THEME ENTREPRISE) === */
/* =====================================================================
   NOYAU IA — sphere de donnees du theme Entreprise.
   Rendu "labo" : cadran gradue, anneaux contra-rotatifs, sphere filaire,
   balayage radar, noyau qui respire avec la voix.

   CONTRAINTE GPU (voir la note projet) : uniquement transform et opacity,
   qui sont composites. Aucun filter:blur anime, aucun mix-blend-mode,
   aucun redessin canvas. Les lueurs sont des degrades statiques.
   ===================================================================== */

/* Masque partout sauf en Entreprise */
.ai-orb {
    --orb-level: 0;                 /* 0..1, pilote par app.js selon la voix */
    display: none;
}

body.theme-entreprise .ai-orb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    position: relative;
    padding: 8px 0 4px;
}

.orb-svg {
    width: 300px;
    max-width: 78vw;
    height: auto;
    display: block;
    overflow: visible;
}

/* Lueur d'ambiance : degrade statique, son opacite seule bouge */
.orb-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 340px;
    height: 340px;
    max-width: 88vw;
    max-height: 88vw;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle,
                rgba(91, 140, 255, 0.20) 0%,
                rgba(91, 140, 255, 0.07) 42%,
                rgba(91, 140, 255, 0) 70%);
    opacity: calc(0.5 + var(--orb-level) * 0.5);
    pointer-events: none;
}

/* --- Cadran gradue ------------------------------------------------------ */
.orb-ticks line {
    stroke: rgba(145, 175, 235, 0.30);
    stroke-width: 1.2;
}
.orb-ticks .orb-tick-long {
    stroke: rgba(160, 195, 255, 0.55);
    stroke-width: 1.6;
}

/* --- Anneaux contra-rotatifs -------------------------------------------- */
.orb-ring-a,
.orb-ring-b {
    fill: none;
    stroke: rgba(120, 160, 240, 0.45);
}
.orb-ring-a { stroke-width: 1.3; stroke-dasharray: 3 9; }
.orb-ring-b { stroke-width: 2;   stroke-dasharray: 34 16; stroke-linecap: round; }

/* Toutes les rotations tournent autour du centre du viewBox */
.orb-spin-cw,
.orb-spin-ccw,
.orb-spin-sweep,
.orb-spin-orbit,
.orb-lon {
    transform-box: view-box;
    transform-origin: 110px 110px;
    will-change: transform;
}

.orb-spin-cw    { animation: orb-rot  26s linear infinite; }
.orb-spin-ccw   { animation: orb-rot  19s linear infinite reverse; }
.orb-spin-sweep { animation: orb-rot   6s linear infinite; }
.orb-spin-orbit { animation: orb-rot  11s linear infinite; }

@keyframes orb-rot {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* --- Balayage radar ----------------------------------------------------- */
.orb-sweep {
    fill: url(#orb-sweep-grad);
    opacity: calc(0.30 + var(--orb-level) * 0.35);
}

/* --- Sphere filaire ----------------------------------------------------- */
.orb-wire ellipse,
.orb-wire circle {
    fill: none;
    stroke: rgba(130, 170, 245, 0.38);
    stroke-width: 1.1;
}

/* Les longitudes s'aplatissent puis se rouvrent : illusion d'un globe
   qui tourne, obtenue avec un simple scaleX (composite, tres peu couteux). */
.orb-lon { animation: orb-globe 16s ease-in-out infinite; }

@keyframes orb-globe {
    0%   { transform: scaleX(1); }
    50%  { transform: scaleX(-1); }
    100% { transform: scaleX(1); }
}

/* --- Noyau -------------------------------------------------------------- */
.orb-glow {
    opacity: calc(0.45 + var(--orb-level) * 0.55);
    transform-box: view-box;
    transform-origin: 110px 110px;
    transform: scale(calc(1 + var(--orb-level) * 0.10));
}

.orb-core {
    transform-box: view-box;
    transform-origin: 110px 110px;
    transform: scale(calc(1 + var(--orb-level) * 0.16));
    will-change: transform;
}

.orb-sat {
    fill: rgba(180, 210, 255, 0.9);
}

/* --- Etat affiche sous la sphere ---------------------------------------- */
.orb-readout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-family: var(--font-mono);
    text-align: center;
}

.orb-state {
    font-family: var(--font-header);
    font-size: 12px;
    letter-spacing: 3px;
    color: #9dbcff;
}

.orb-sub {
    font-size: 10.5px;
    letter-spacing: 1.5px;
    color: var(--ent-text-dim);
}

/* --- Marthy parle : tout s'anime plus vite ------------------------------- */
body.theme-entreprise .ai-orb.is-speaking .orb-spin-cw    { animation-duration: 9s; }
body.theme-entreprise .ai-orb.is-speaking .orb-spin-ccw   { animation-duration: 7s; }
body.theme-entreprise .ai-orb.is-speaking .orb-spin-sweep { animation-duration: 2.2s; }
body.theme-entreprise .ai-orb.is-speaking .orb-spin-orbit { animation-duration: 4.5s; }
body.theme-entreprise .ai-orb.is-speaking .orb-ring-a,
body.theme-entreprise .ai-orb.is-speaking .orb-ring-b { stroke: rgba(165, 200, 255, 0.75); }
body.theme-entreprise .ai-orb.is-speaking .orb-state  { color: #d6e5ff; }

/* --- Mobile ------------------------------------------------------------- */
@media (max-width: 820px) {
    .orb-svg  { width: 230px; }
    .orb-halo { width: 260px; height: 260px; }
    .orb-state { font-size: 11px; letter-spacing: 2px; }}

/* Respect du reglage systeme "moins d'animations" */
@media (prefers-reduced-motion: reduce) {
    .orb-spin-cw, .orb-spin-ccw, .orb-spin-sweep, .orb-spin-orbit, .orb-lon {
        animation: none;
    }}


/* === MOBILE : MODULATEUR EN HAUT === */
/* =====================================================================
   MOBILE — la barre du visualiseur (le "modulateur") passe en tete de la
   scene : c'est l'element qui bouge avec la voix, il doit etre visible
   sans faire defiler.
   .hud-stage est une colonne flex : un simple order suffit, aucun
   changement de structure HTML.
   ===================================================================== */
@media (max-width: 820px) {
    .visualizer-container {
        order: -1;
        margin-bottom: 14px;
    }

    /* En KITT le bandeau scanner reste la signature du theme : il garde
       la premiere place, le modulateur se glisse juste apres. */
    body.theme-kitt .kitt-scanner { order: -2; }}

/* =====================================================================
   MODE ENTREPRISE — PASSE DE FINITION « LOGICIEL PRO »
   ---------------------------------------------------------------------
   Purement cosmetique : aucun ajout dans index.html ni dans app.js, tout
   est obtenu par surcharge ici. Objectif : que le mode Entreprise ne
   ressemble plus a un HUD de science-fiction repeint en bleu, mais a un
   vrai logiciel de bureau sombre (echelle de surfaces, rayons unifies,
   anneaux de focus, chiffres alignes).

   CONTRAINTE GPU (voir les plantages de cette machine) : aucun filter:blur
   anime, aucun mix-blend, aucun redessin canvas. Les seules animations
   sont opacity/transform, et elles sont coupees si l'utilisateur a demande
   « moins d'animations ».
   ===================================================================== */

body.theme-entreprise {
    /* --- Typographie -------------------------------------------------
       On quitte Orbitron / Rajdhani / Share Tech Mono (polices sci-fi) pour
       la pile systeme : Segoe UI Variable sur Windows 11, San Francisco sur
       iPhone. Rendu natif, zero chargement reseau (utile sur telephone),
       et surtout : ca ressemble enfin a une application, pas a un jeu. */
    --font-header: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-panel:  "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono:   "Cascadia Mono", ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;

    /* --- Echelle de surfaces (du fond vers l'avant) ------------------- */
    --hud-bg:           #0a0d13;
    --ent-surface:      #12161f;   /* panneaux */
    --ent-surface-2:    #171c27;   /* champs, lignes de liste */
    --ent-surface-3:    #1e2534;   /* survol, segment actif */
    --hud-panel-bg:     #12161f;

    /* --- Bordures : une hairline discrete, une plus marquee pour les
       elements cliquables (un bouton doit se voir sans etre criard) ---- */
    --ent-border:        rgba(255, 255, 255, 0.07);
    --ent-border-strong: rgba(255, 255, 255, 0.13);
    --ent-border-hover:  rgba(255, 255, 255, 0.22);
    --hud-panel-border:  rgba(255, 255, 255, 0.07);

    /* --- Texte : trois niveaux, pas deux (titre / courant / secondaire) */
    --ent-text-strong: #eef1f7;
    --ent-text:        #c3cad7;
    --ent-text-dim:    #7d8798;

    /* --- Accent : une teinte pour le texte et les bordures, une version
       plus dense pour les aplats (le blanc doit rester lisible dessus) -- */
    --hud-cyan:               #6c9bff;
    --hud-cyan-dim:           rgba(108, 155, 255, 0.38);
    --hud-cyan-bg:            rgba(108, 155, 255, 0.10);
    --ent-accent-solid:       #3f6fe6;
    --ent-accent-solid-hover: #4d7cf5;
    --ent-accent-solid-press: #3562cf;

    --ent-normale: #6c9bff;

    /* --- Rayons : une echelle, au lieu du melange 3/4/6/8/9/10px actuel */
    --ent-r-sm: 6px;    /* champs, boutons, puces */
    --ent-r-md: 8px;    /* lignes de liste, cellules */
    --ent-r-lg: 10px;   /* panneaux */

    /* --- Une seule ombre, pour poser les elements sans les faire briller */
    --ent-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);

    color-scheme: dark;              /* selects, calendriers natifs et
                                        ascenseurs en sombre : le detail qui
                                        trahit le plus une page bricolee */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0;
}

body.theme-entreprise ::selection { background: rgba(108, 155, 255, 0.28); color: #fff; }

/* Anneau de focus unique pour tout ce qui se pilote au clavier. */
body.theme-entreprise :focus-visible {
    outline: 2px solid var(--hud-cyan);
    outline-offset: 2px;
}

/* Ascenseurs fins et sombres, y compris dans les listes internes. */
body.theme-entreprise * { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.16) transparent; }
body.theme-entreprise *::-webkit-scrollbar { width: 10px; height: 10px; }
body.theme-entreprise *::-webkit-scrollbar-track { background: transparent; }
body.theme-entreprise *::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border: 3px solid transparent;
    background-clip: padding-box;
    border-radius: 8px;
}
body.theme-entreprise *::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.26);
    border: 3px solid transparent;
    background-clip: padding-box;
}

/* =====================================================================
   BARRE DU HAUT
   ===================================================================== */
body.theme-entreprise .hud-header {
    border-bottom: 1px solid var(--ent-border);
    padding-bottom: 12px;
    margin-bottom: 18px;
    font-family: var(--font-panel);
}

/* Le mot-marque : plus de 900 / 6px facon affiche de film, une graisse
   moyenne avec une petite pastille d'accent en guise de logo. */
body.theme-entreprise .hud-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-header);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 3.5px;
    color: var(--ent-text-strong);
}
body.theme-entreprise .hud-title::before {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 2.5px;
    background: var(--hud-cyan);
    box-shadow: 0 0 0 3px rgba(108, 155, 255, 0.14);
    flex-shrink: 0;
}

/* « SYSTEM STATUS: ACTIVE » : la roue qui tournait en boucle donnait
   l'impression d'une page bloquee en chargement. Une pastille verte avec
   un halo qui respire dit « en service » sans mentir. */
body.theme-entreprise .status-glow {
    gap: 9px;
    font-family: var(--font-panel);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--ent-text-dim);
}
body.theme-entreprise .status-glow::before {
    width: 8px;
    height: 8px;
    border: none;
    border-radius: 50%;
    background: var(--hud-green);
    box-shadow: 0 0 0 3px rgba(53, 196, 122, 0.16);
    animation: ent-live 2.6s ease-in-out infinite;
}
@keyframes ent-live { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* Diagnostics : de vraies mini-jauges (piste arrondie, remplissage mat,
   valeurs a chasse fixe pour qu'elles ne sautillent pas a chaque tick). */
body.theme-entreprise .hdr-diags {
    gap: 16px;
    font-family: var(--font-panel);
    font-size: 11px;
    letter-spacing: 0;
}
body.theme-entreprise .hdr-diag-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--ent-text-dim);
}
body.theme-entreprise .hdr-diag-val {
    font-family: var(--font-mono);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--ent-text);
}
body.theme-entreprise .hdr-diag-track {
    height: 5px;
    border: none;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
}
body.theme-entreprise .hdr-diag-fill { border-radius: 3px; box-shadow: none; }
body.theme-entreprise .hdr-diag-fill.cyan-glow  { background-color: var(--hud-cyan); }
body.theme-entreprise .hdr-diag-fill.gold-glow  { background-color: var(--hud-gold); }
body.theme-entreprise .hdr-diag-fill.green-glow { background-color: var(--hud-green); }

body.theme-entreprise .hud-clock {
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--ent-text-strong);
    text-shadow: none;
}
body.theme-entreprise .hud-date {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    color: var(--ent-text-dim);
}

/* Le selecteur de theme redevient un bouton secondaire ordinaire. */
body.theme-entreprise .theme-toggle {
    font-family: var(--font-panel);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 7px 12px;
    border-radius: var(--ent-r-sm);
    border: 1px solid var(--ent-border-strong);
    background: var(--ent-surface-2);
    color: var(--ent-text);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
body.theme-entreprise .theme-toggle:hover {
    background: var(--ent-surface-3);
    border-color: var(--ent-border-hover);
    color: var(--ent-text-strong);
    box-shadow: none;
}

/* =====================================================================
   BOUTONS D'ACTION DE LA SCENE (micro / scan / alerte)
   Hierarchie claire : le micro est le bouton plein, les autres sont
   secondaires. Plus de halo cyan ni de scale au survol.
   ===================================================================== */
body.theme-entreprise .hud-btn {
    font-family: var(--font-panel);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    min-height: 42px;
    padding: 11px 16px;
    border-radius: var(--ent-r-md);
    border: 1px solid var(--ent-border-strong);
    background: var(--ent-surface-2);
    color: var(--ent-text);
    box-shadow: var(--ent-shadow);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
body.theme-entreprise .hud-btn .btn-icon { font-size: 15px; line-height: 1; }
body.theme-entreprise .hud-btn:hover {
    background: var(--ent-surface-3);
    border-color: var(--ent-border-hover);
    color: var(--ent-text-strong);
    box-shadow: var(--ent-shadow);
    transform: none;
}
body.theme-entreprise .hud-btn:active { transform: none; background: var(--ent-surface-2); }

body.theme-entreprise .hud-btn.cyan-btn { border-color: var(--ent-border-strong); color: var(--ent-text); }

/* Le micro : bouton principal, donc aplat plein. */
body.theme-entreprise .stage-actions #btn-mic {
    font-size: 14px;
    background: var(--ent-accent-solid);
    border-color: var(--ent-accent-solid);
    color: #ffffff;
}
body.theme-entreprise .stage-actions #btn-mic:hover {
    background: var(--ent-accent-solid-hover);
    border-color: var(--ent-accent-solid-hover);
    color: #ffffff;
}
/* En ecoute : il passe au vert, avec un anneau qui respire. */
body.theme-entreprise #btn-mic.active-state {
    background: #1f9e60;
    border-color: #1f9e60;
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(53, 196, 122, 0.18);
    animation: ent-live 2.2s ease-in-out infinite;
}

/* Alerte rouge : contour rouge au repos, aplat rouge quand elle est armee. */
body.theme-entreprise .hud-btn.red-btn {
    background: rgba(239, 85, 85, 0.09);
    border-color: rgba(239, 85, 85, 0.42);
    color: #ff8a8a;
}
body.theme-entreprise .hud-btn.red-btn:hover {
    background: rgba(239, 85, 85, 0.16);
    border-color: rgba(239, 85, 85, 0.7);
    color: #ffb0b0;
    box-shadow: var(--ent-shadow);
}
body.theme-entreprise #btn-alert.active-state {
    background: #d8443f;
    border-color: #d8443f;
    color: #ffffff;
}

/* =====================================================================
   BANDEAU DE TRAVAIL — onglets
   ===================================================================== */
body.theme-entreprise .workbench {
    border: 1px solid var(--ent-border);
    border-radius: var(--ent-r-lg);
    background: var(--ent-surface);
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9);
    overflow: hidden;                /* les onglets epousent le coin arrondi */
}

body.theme-entreprise .wb-tabs {
    gap: 0;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.015);
    border-bottom: 1px solid var(--ent-border);
}

body.theme-entreprise .wb-tab {
    font-family: var(--font-panel);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 12px 15px;
    color: var(--ent-text-dim);
    border-bottom: 2px solid transparent;
}
body.theme-entreprise .wb-tab:hover { color: var(--ent-text); background: rgba(255, 255, 255, 0.03); }
body.theme-entreprise .wb-tab.is-active {
    color: var(--ent-text-strong);
    background: transparent;
    border-bottom-color: var(--hud-cyan);
}

body.theme-entreprise .wb-badge {
    min-width: 19px;
    padding: 1px 6px;
    border-radius: 9px;
    background: var(--ent-surface-3);
    color: var(--ent-text-dim);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
}
body.theme-entreprise .wb-tab.is-active .wb-badge {
    background: var(--ent-accent-solid);
    color: #ffffff;
}

body.theme-entreprise .wb-panels { padding: 18px; }

/* =====================================================================
   EN-TETES DE PANNEAU
   ===================================================================== */
body.theme-entreprise .ent-panel-head { margin-bottom: 14px; }

body.theme-entreprise .ent-panel-title {
    font-family: var(--font-panel);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: var(--ent-text-dim);
}

body.theme-entreprise .ent-count {
    font-family: var(--font-mono);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    color: var(--ent-text);
    background: var(--ent-surface-2);
    border: 1px solid var(--ent-border-strong);
    border-radius: 20px;
    padding: 2px 9px;
}

/* =====================================================================
   CHAMPS DE FORMULAIRE
   Hauteur unique (38px) pour que les lignes s'alignent, chevron maison sur
   les listes deroulantes, anneau de focus au lieu d'un simple changement
   de couleur de bordure.
   ===================================================================== */
body.theme-entreprise .ent-input,
body.theme-entreprise .ent-select,
body.theme-entreprise .ent-textarea {
    font-family: var(--font-panel);
    font-size: 13.5px;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: var(--ent-r-sm);
    border: 1px solid var(--ent-border-strong);
    background: var(--ent-surface-2);
    color: var(--ent-text-strong);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
body.theme-entreprise .ent-input:hover,
body.theme-entreprise .ent-select:hover,
body.theme-entreprise .ent-textarea:hover { border-color: var(--ent-border-hover); }

body.theme-entreprise .ent-input:focus,
body.theme-entreprise .ent-select:focus,
body.theme-entreprise .ent-textarea:focus {
    outline: none;
    border-color: var(--hud-cyan);
    box-shadow: 0 0 0 3px rgba(108, 155, 255, 0.18);
    background: var(--ent-surface-3);
}
body.theme-entreprise .ent-input::placeholder,
body.theme-entreprise .ent-textarea::placeholder { color: var(--ent-text-dim); }

body.theme-entreprise .ent-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.75 6 6.25 11 1.75' fill='none' stroke='%237d8798' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    cursor: pointer;
}

body.theme-entreprise .ent-textarea { min-height: 92px; line-height: 1.5; padding: 10px 12px; }

/* =====================================================================
   BOUTON PRINCIPAL DES FORMULAIRES
   ===================================================================== */
body.theme-entreprise .ent-btn {
    font-family: var(--font-panel);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    min-height: 38px;
    padding: 10px 16px;
    border-radius: var(--ent-r-sm);
    border: 1px solid var(--ent-accent-solid);
    background: var(--ent-accent-solid);
    color: #ffffff;
    box-shadow: var(--ent-shadow);
    transition: background 0.15s ease, border-color 0.15s ease;
}
body.theme-entreprise .ent-btn:hover {
    background: var(--ent-accent-solid-hover);
    border-color: var(--ent-accent-solid-hover);
    color: #ffffff;
}
body.theme-entreprise .ent-btn:active {
    background: var(--ent-accent-solid-press);
    border-color: var(--ent-accent-solid-press);
    opacity: 1;
    box-shadow: none;
}

/* =====================================================================
   PANNEAU TACHES
   ===================================================================== */
body.theme-entreprise .ent-task-form {
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ent-border);
}
body.theme-entreprise .ent-task-form-row { gap: 8px; }
body.theme-entreprise .ent-task-list { gap: 8px; }

/* La barre de priorite devient un liseré arrondi pose a l'interieur : le
   border-left de 3px coupait le coin arrondi de la ligne. */
body.theme-entreprise .ent-task-item {
    position: relative;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 12px 11px 18px;
    border: 1px solid var(--ent-border);
    border-left: 1px solid var(--ent-border);
    border-radius: var(--ent-r-md);
    background: var(--ent-surface-2);
    transition: background 0.15s ease, border-color 0.15s ease;
}
body.theme-entreprise .ent-task-item::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 11px;
    bottom: 11px;
    width: 3px;
    border-radius: 2px;
    background: var(--ent-normale);
}
body.theme-entreprise .ent-task-item.pr-urgente::before { background: var(--ent-urgente); }
body.theme-entreprise .ent-task-item.pr-haute::before   { background: var(--ent-haute); }
body.theme-entreprise .ent-task-item.pr-normale::before { background: var(--ent-normale); }
body.theme-entreprise .ent-task-item.pr-basse::before   { background: var(--ent-basse); }

body.theme-entreprise .ent-task-item:hover {
    background: var(--ent-surface-3);
    border-color: var(--ent-border-strong);
}
body.theme-entreprise .ent-task-item.is-done { opacity: 0.45; }
body.theme-entreprise .ent-task-item.is-done .ent-task-text { text-decoration-color: var(--ent-text-dim); }

body.theme-entreprise .ent-task-check {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    accent-color: var(--ent-accent-solid);
}

body.theme-entreprise .ent-task-text {
    font-size: 14px;
    line-height: 1.35;
    color: var(--ent-text-strong);
}

body.theme-entreprise .ent-task-meta {
    gap: 9px;
    margin-top: 5px;
    font-family: var(--font-panel);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    color: var(--ent-text-dim);
}

/* Etiquette de priorite : pastille + libelle, comme dans un vrai suivi. */
body.theme-entreprise .ent-priority-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 2px 8px 2px 7px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
}
body.theme-entreprise .ent-priority-tag::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}
body.theme-entreprise .ent-priority-tag.pr-urgente { background: rgba(239, 85, 85, 0.14);  color: #ff8a8a; }
body.theme-entreprise .ent-priority-tag.pr-haute   { background: rgba(224, 145, 60, 0.14); color: #f0ac63; }
body.theme-entreprise .ent-priority-tag.pr-normale { background: rgba(108, 155, 255, 0.14); color: #9dbcff; }
body.theme-entreprise .ent-priority-tag.pr-basse   { background: rgba(140, 152, 168, 0.14); color: #97a2b3; }

/* La croix de suppression ne s'affiche qu'au survol de la ligne (sur PC).
   Sur ecran tactile il n'y a pas de survol : elle reste visible. */
body.theme-entreprise .ent-task-del {
    font-size: 14px;
    line-height: 1;
    padding: 5px 6px;
    border-radius: var(--ent-r-sm);
    color: var(--ent-text-dim);
    transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
body.theme-entreprise .ent-task-del:hover { color: #ff8a8a; background: rgba(239, 85, 85, 0.12); }

@media (hover: hover) and (pointer: fine) {
    body.theme-entreprise .ent-task-del { opacity: 0; }
    body.theme-entreprise .ent-task-item:hover .ent-task-del,
    body.theme-entreprise .ent-task-del:focus-visible { opacity: 1; }
}

/* Etat vide : un vrai encadre, pas une ligne de texte perdue. */
body.theme-entreprise .ent-task-empty {
    font-size: 13px;
    color: var(--ent-text-dim);
    padding: 26px 16px;
    border: 1px dashed var(--ent-border-strong);
    border-radius: var(--ent-r-md);
    background: rgba(255, 255, 255, 0.012);
}

/* =====================================================================
   PANNEAU AGENDA
   ===================================================================== */
body.theme-entreprise .ent-agenda-head { gap: 8px; margin-bottom: 14px; }

body.theme-entreprise .ent-cal-nav {
    width: 30px;
    height: 30px;
    border-radius: var(--ent-r-sm);
    border: 1px solid var(--ent-border-strong);
    background: var(--ent-surface-2);
    color: var(--ent-text);
    font-size: 16px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
body.theme-entreprise .ent-cal-nav:hover {
    background: var(--ent-surface-3);
    border-color: var(--ent-border-hover);
    color: var(--ent-text-strong);
}

body.theme-entreprise .ent-cal-label {
    font-family: var(--font-header);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-transform: capitalize;
    color: var(--ent-text-strong);
}

body.theme-entreprise .ent-cal-today {
    font-family: var(--font-panel);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--ent-r-sm);
    border: 1px solid var(--ent-border-strong);
    background: var(--ent-surface-2);
    color: var(--ent-text);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
body.theme-entreprise .ent-cal-today:hover {
    background: var(--ent-surface-3);
    border-color: var(--ent-border-hover);
    color: var(--ent-text-strong);
}

body.theme-entreprise .ent-cal-weekdays {
    font-family: var(--font-panel);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--ent-text-dim);
    margin-bottom: 7px;
}

body.theme-entreprise .ent-cal-grid { gap: 5px; }

/* Cellules : pas de bordure au repos (une grille de 42 cadres, c'est du
   bruit), juste un aplat. La bordure apparait au survol et sur le jour du
   jour, ou elle est seule — plus le double anneau border + inset. */
body.theme-entreprise .ent-cal-day {
    padding: 5px 6px;
    border: 1px solid transparent;
    border-radius: var(--ent-r-sm);
    background: var(--ent-surface-2);
    transition: background 0.12s ease, border-color 0.12s ease;
}
body.theme-entreprise .ent-cal-day:hover { background: var(--ent-surface-3); border-color: var(--ent-border-hover); }
body.theme-entreprise .ent-cal-day.other-month { opacity: 1; background: transparent; }
body.theme-entreprise .ent-cal-day.other-month .ent-cal-daynum { color: #4b5568; }

body.theme-entreprise .ent-cal-day.is-today {
    border-color: var(--hud-cyan);
    box-shadow: none;
}
body.theme-entreprise .ent-cal-day.is-today .ent-cal-daynum { color: var(--hud-cyan); font-weight: 700; }

body.theme-entreprise .ent-cal-day.is-selected {
    background: rgba(108, 155, 255, 0.16);
    border-color: var(--hud-cyan-dim);
}

body.theme-entreprise .ent-cal-daynum {
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    color: var(--ent-text);
}

body.theme-entreprise .ent-cal-dot { width: 5px; height: 5px; }

body.theme-entreprise .ent-day-detail {
    margin-top: 14px;
    padding-top: 14px;
    gap: 8px;
}
body.theme-entreprise .ent-day-detail-head {
    font-family: var(--font-panel);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--ent-text-strong);
    margin-bottom: 2px;
}
body.theme-entreprise .ent-day-detail-close {
    font-size: 14px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: var(--ent-r-sm);
    transition: color 0.15s ease, background 0.15s ease;
}
body.theme-entreprise .ent-day-detail-close:hover { color: #ff8a8a; background: rgba(239, 85, 85, 0.12); }

/* =====================================================================
   PANNEAU COMMUNICATIONS
   Les deux onglets deviennent un vrai selecteur segmente : un rail, et le
   segment actif en relief. C'est le motif attendu dans une application.
   ===================================================================== */
body.theme-entreprise .ent-comms > .ent-panel-title { display: block; margin-bottom: 14px; }

body.theme-entreprise .ent-comms-tabs {
    gap: 3px;
    padding: 3px;
    max-width: 340px;
    border: 1px solid var(--ent-border);
    border-radius: var(--ent-r-md);
    background: var(--ent-surface-2);
    margin-bottom: 14px;
}

body.theme-entreprise .ent-tab {
    font-family: var(--font-panel);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: var(--ent-r-sm);
    background: transparent;
    color: var(--ent-text-dim);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
body.theme-entreprise .ent-tab:hover { color: var(--ent-text); }
body.theme-entreprise .ent-tab.is-active {
    background: var(--ent-surface-3);
    border-color: var(--ent-border-strong);
    color: var(--ent-text-strong);
    box-shadow: var(--ent-shadow);
}

body.theme-entreprise .ent-comms-form { gap: 8px; max-width: 620px; }

body.theme-entreprise .ent-comms-status {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    font-family: var(--font-panel);
    font-size: 12.5px;
    min-height: 18px;
}
body.theme-entreprise .ent-comms-status:not(:empty) {
    padding: 9px 12px;
    border-radius: var(--ent-r-sm);
    border: 1px solid var(--ent-border-strong);
    background: var(--ent-surface-2);
}
body.theme-entreprise .ent-comms-status.is-ok      { border-color: rgba(53, 196, 122, 0.35);  background: rgba(53, 196, 122, 0.10);  color: #6fdda4; }
body.theme-entreprise .ent-comms-status.is-err     { border-color: rgba(239, 85, 85, 0.35);   background: rgba(239, 85, 85, 0.10);   color: #ff8a8a; }
body.theme-entreprise .ent-comms-status.is-pending { color: var(--ent-text-dim); }

/* =====================================================================
   PANNEAUX PARTAGES (flotte, projets, systeme) : ils gardent leur cadre
   sci-fi cyan dans les autres themes, ici on les aligne sur le reste.
   ===================================================================== */
body.theme-entreprise .fleet-container,
body.theme-entreprise .projects-container,
body.theme-entreprise .sys-log-container,
body.theme-entreprise .nodes-status,
body.theme-entreprise .voice-config {
    border: 1px solid var(--ent-border);
    border-radius: var(--ent-r-md);
    background: var(--ent-surface-2);
}
body.theme-entreprise .sys-log-container,
body.theme-entreprise .sys-log-output {
    font-family: var(--font-mono);
    font-size: 11.5px;
    color: var(--ent-text-dim);
}
body.theme-entreprise .sys-log-title,
body.theme-entreprise .projects-title,
body.theme-entreprise .fleet-title {
    font-family: var(--font-panel);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: var(--ent-text-dim);
}

/* =====================================================================
   NOYAU IA — l'etat sous la sphere suit la meme typographie
   ===================================================================== */
body.theme-entreprise .orb-state {
    font-family: var(--font-panel);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
}
body.theme-entreprise .orb-sub {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.8px;
    font-variant-numeric: tabular-nums;
}

/* =====================================================================
   MOBILE — on reprend les tailles confortables du bloc d'origine, qui
   passait avant cette section dans la feuille (donc perdait l'arbitrage).
   16px sur les champs : c'est le seuil sous lequel iOS Safari zoome tout
   seul a la mise au point.
   ===================================================================== */
@media (max-width: 820px) {
    body.theme-entreprise .hud-title { font-size: 16px; letter-spacing: 2.5px; }
    body.theme-entreprise .hud-clock { font-size: 14px; }
    body.theme-entreprise .status-glow { font-size: 10.5px; }

    body.theme-entreprise .wb-tab { font-size: 12.5px; padding: 12px 13px; }
    body.theme-entreprise .wb-panels { padding: 13px; }

    body.theme-entreprise .ent-panel-title { font-size: 12px; }
    body.theme-entreprise .ent-count { font-size: 12px; padding: 2px 10px; }

    body.theme-entreprise .ent-input,
    body.theme-entreprise .ent-select,
    body.theme-entreprise .ent-textarea {
        font-size: 16px;
        min-height: 44px;
        padding: 11px 13px;
    }
    body.theme-entreprise .ent-select { padding-right: 34px; }
    body.theme-entreprise .ent-btn { font-size: 15px; min-height: 46px; padding: 13px 16px; }

    body.theme-entreprise .ent-task-item { padding: 12px 12px 12px 19px; }
    body.theme-entreprise .ent-task-text { font-size: 15px; }
    body.theme-entreprise .ent-task-meta { font-size: 12.5px; gap: 10px; }
    body.theme-entreprise .ent-priority-tag { font-size: 11px; padding: 3px 9px 3px 8px; }
    body.theme-entreprise .ent-task-check { width: 21px; height: 21px; }
    body.theme-entreprise .ent-task-del { font-size: 16px; padding: 7px 8px; opacity: 1; }

    body.theme-entreprise .ent-cal-label { font-size: 16px; }
    body.theme-entreprise .ent-cal-weekdays { font-size: 11px; }
    body.theme-entreprise .ent-cal-daynum { font-size: 13px; }
    body.theme-entreprise .ent-cal-day { min-height: 40px; padding: 5px 6px; }
    body.theme-entreprise .ent-cal-dot { width: 6px; height: 6px; }
    body.theme-entreprise .ent-cal-nav { width: 36px; height: 36px; font-size: 18px; }
    body.theme-entreprise .ent-cal-today { font-size: 13px; min-height: 36px; padding: 7px 12px; }

    body.theme-entreprise .ent-comms-tabs { max-width: none; }
    body.theme-entreprise .ent-tab { font-size: 14px; padding: 11px 12px; }
    body.theme-entreprise .ent-comms-status { font-size: 13px; }
}

/* Reglage systeme « moins d'animations » : plus rien ne clignote. */
@media (prefers-reduced-motion: reduce) {
    body.theme-entreprise .status-glow::before,
    body.theme-entreprise #btn-mic.active-state { animation: none; }
}
