:root {
    --cyber-neon: #D4FF00;
    --cyber-red: #ff003c;
    --cyber-blue: #00f2ff;
    --panel-bg: rgba(10, 10, 10, 0.85);
}

.war-room-root {
    background: #000;
    min-height: 100vh;
    width: 100%;
    position: relative;
    color: #eee;
    font-family: 'Share Tech Mono', monospace;
    overflow-x: hidden;
}

/* GRILLE DE FOND (Désactivation des événements pour laisser cliquer) */
.war-room-grid-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(30, 30, 30, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 30, 30, 0.4) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none; /* TRÈS IMPORTANT : permet de cliquer "à travers" la grille */
}

.war-room-content {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* HUD LAYOUT */
.war-room-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-bottom: 50px;
    width: 100%;
    /* Empêche les éléments de sortir de la ligne */
    flex-wrap: nowrap; 
}

.hud-panel { 
    width: 280px; 
    flex: 0 0 280px; /* Force la largeur fixe, ne peut pas rétrécir ni grandir */
    z-index: 20;
}

.hud-box {
    background: var(--panel-bg);
    border: 1px solid #222;
    border-left: 4px solid #444;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border-radius: 4px;
}

.hud-label { color: #666; font-size: 10px; letter-spacing: 1px; margin-bottom: 8px; display: block; }
.hud-value { font-size: 36px; font-weight: bold; line-height: 1; font-family: 'Share Tech Mono'; }
.hud-value.small-val { font-size: 16px; color: #ff8800; margin: 5px 0; }
.hud-sub { color: #444; font-size: 9px; margin-top: 5px; display: block; }

.color-blue { color: var(--cyber-blue); text-shadow: 0 0 15px rgba(0, 242, 255, 0.3); }
.color-red { color: var(--cyber-red); text-shadow: 0 0 15px rgba(255, 0, 60, 0.3); }
.color-neon { color: var(--cyber-neon); text-shadow: 0 0 15px rgba(212, 255, 0, 0.3); }

.hud-link {
    display: block; border: 1px solid #333; color: #888; text-align: center;
    padding: 12px; font-size: 11px; text-decoration: none; transition: 0.3s;
}
.hud-link:hover { border-color: var(--cyber-neon); color: #fff; background: rgba(212, 255, 0, 0.05); }

/* GLOBE CENTER */
.war-room-center { 
    flex: 1; 
    height: 500px; 
    position: relative;
    min-width: 0; /* TRÈS IMPORTANT pour Flexbox : autorise l'élément à être plus petit que son contenu */
    overflow: hidden; /* Empêche le canevas 3D de déborder */
}
#home-3d-globe { 
    width: 100%; 
    height: 100%; 
    display: block;
}
.globe-caption { position: absolute; bottom: 0; width: 100%; text-align: center; color: #444; font-size: 10px; letter-spacing: 4px; }

/* SEARCH SECTION */
.war-room-search-section { margin-bottom: 60px; }
.search-container-card {
    background: rgba(5,5,5,0.9);
    border: 1px solid #222;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,0,0,1);
}
.search-title { color: #fff; font-size: 18px; margin-bottom: 20px; text-align: center; letter-spacing: 2px; }

/* NEWS GRID */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card { background: #0a0a0a; border: 1px solid #222; padding: 25px; border-radius: 4px; transition: 0.3s; }
.news-card:hover { border-color: var(--cyber-neon); transform: translateY(-5px); }
.news-card.critical { border-top: 3px solid var(--cyber-red); }

.news-id { color: var(--cyber-neon); font-size: 11px; font-weight: bold; }
.news-sev-label { float: right; font-size: 9px; color: #444; text-transform: uppercase; }
.news-body { color: #eee; font-size: 14px; margin: 15px 0; min-height: 45px; line-height: 1.5; }
.news-btn { color: #666; font-size: 10px; text-decoration: none; }
.news-btn:hover { color: #fff; }

.pulse-red { width: 8px; height: 8px; background: var(--cyber-red); border-radius: 50%; display: inline-block; animation: blink 1.5s infinite; margin-right: 10px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* --- COMPLÉMENT : NIVEAUX DE SÉVÉRITÉ DES CARTES NEWS --- */

.news-card.critical { border-top: 3px solid var(--cyber-red); }

/* High Severity (Orange) */
.news-card.high {
    border-top: 3px solid var(--cyber-high, #ff8800);
}
.news-card.high .news-sev-label {
    color: var(--cyber-high, #ff8800);
}
.news-card.high:hover {
    box-shadow: 0 5px 15px rgba(255, 136, 0, 0.2);
}

/* Medium Severity (Jaune Néon) */
.news-card.medium {
    border-top: 3px solid var(--cyber-neon);
}
.news-card.medium .news-sev-label {
    color: var(--cyber-neon);
}
.news-card.medium:hover {
    box-shadow: 0 5px 15px rgba(212, 255, 0, 0.2);
}

/* Low Severity (Bleu) */
.news-card.low {
    border-top: 3px solid var(--cyber-blue);
}
.news-card.low .news-sev-label {
    color: var(--cyber-blue);
}
.news-card.low:hover {
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.2);
}

/* Ajustement spécifique pour les badges Critical (Rouge) */
.news-card.critical .news-sev-label {
    color: var(--cyber-red);
    font-weight: bold;
}

/* --- OPTIMISATIONS UX SUPPLÉMENTAIRES --- */

/* Effet de lueur sur les titres de News au survol de la carte */
.news-card:hover .news-body {
    color: #fff;
}

/* Style des liens "Analyse IA" */
.news-btn {
    display: inline-block;
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px solid #1a1a1a;
    width: 100%;
    transition: all 0.3s;
}

.news-card:hover .news-btn {
    color: var(--cyber-neon);
    border-top-color: #333;
}

/* --- RESPONSIVE WAR ROOM --- */

/* 1. Ajustement Tablettes et Petits Laptops */
@media (max-width: 1200px) {
    .war-room-layout {
        flex-direction: column; /* On empile les éléments */
        gap: 40px;
    }

    .hud-panel {
        width: 100%;
        flex: 1 1 auto;
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Les stats passent sur 2 colonnes */
        gap: 20px;
    }

    /* Le bouton lien prend toute la largeur sous les 2 colonnes */
    .hud-link {
        grid-column: span 2;
    }

    .war-room-center {
        width: 100%;
        order: -1; /* On place le globe en premier sur mobile pour le visuel */
        height: 400px;
    }
}

/* 2. Ajustement Mobiles Large (Tablettes Portrait) */
@media (max-width: 992px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr); /* News sur 2 colonnes */
    }
    
    .search-container-card {
        padding: 30px 20px;
    }
}

/* 3. Ajustement Mobiles Standard */
@media (max-width: 768px) {
    .war-room-content {
        padding: 15px;
    }

    .hud-panel {
        grid-template-columns: 1fr; /* Stats sur 1 seule colonne */
    }

    .hud-link {
        grid-column: span 1;
    }

    .news-grid {
        grid-template-columns: 1fr; /* News sur 1 seule colonne */
    }

    .hud-value {
        font-size: 28px;
    }

    .war-room-center {
        height: 300px; /* Globe plus petit pour ne pas masquer tout l'écran */
    }
}

/* 4. Optimisation Petits Mobiles */
@media (max-width: 480px) {
    .search-title {
        font-size: 14px;
    }

    .hud-box {
        padding: 15px;
    }

    .logo-text {
        font-size: 24px; /* On réduit le logo si présent dans la war room */
    }

    .globe-caption {
        font-size: 8px;
        letter-spacing: 2px;
    }
}