/* DESIGN "PRIME RADIANT" V24 - COMPLETE DARK NEON */

/* 1. RESET & VARIABLES */
* { box-sizing: border-box; }

:root { 
    --bg-deep: #020205; 
    --neon-blue: #00f3ff; 
    --neon-green: #00ff9d; 
    --neon-red: #ff0055; 
    --neon-yellow: #ffee00; 
    --gold: #ffd700;
    --glass: rgba(10, 20, 30, 0.85);
    --glass-border: rgba(0, 243, 255, 0.3);
}

/* 2. BODY */
body { 
    color: #e0e0e0; 
    font-family: 'Rajdhani', sans-serif; 
    margin: 0; padding: 20px; 
    min-height: 100vh; 
    overflow-x: hidden;
    
    background-color: var(--bg-deep);
    background-image: url('bg.gif'); 
    background-size: contain; 
    background-position: center top; 
    background-repeat: no-repeat;
    
    position: relative;
}

/* FILTRE SOMBRE */
body::after {
    content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 2, 5, 0.5); z-index: -1; pointer-events: none; 
}

.container { max-width: 1400px; margin: 0 auto; width: 100%; position: relative; z-index: 2; }

/* 4. HEADER */
header { 
    display: flex; justify-content: space-between; align-items: center; 
    border-bottom: 2px solid var(--glass-border); 
    padding-bottom: 20px; margin-bottom: 40px; position: relative; 
}
header::after { 
    content: ''; position: absolute; bottom: -5px; right: 0; 
    width: 100px; height: 5px; background: var(--neon-blue); 
}

h1 { 
    font-family: 'Orbitron', sans-serif; font-weight: 900; 
    font-size: clamp(1.5rem, 4vw, 3rem); margin: 0; 
    text-transform: uppercase; letter-spacing: 4px; 
    background: linear-gradient(90deg, #fff, var(--neon-blue)); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; 
    text-shadow: 0 0 20px rgba(0, 243, 255, 0.4); 
}

.status-pill { 
    font-family: 'Share Tech Mono', monospace; 
    background: rgba(0, 243, 255, 0.05); 
    padding: 8px 16px; border: 1px solid var(--neon-blue); 
    font-size: 0.8em; color: var(--neon-blue); 
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2); 
}

/* 5. SCORE HUD */
.score-hud { 
    display: flex; flex-direction: column; align-items: center; justify-content: center; 
    background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0, 243, 255, 0.1) 50%, rgba(0,0,0,0) 100%); 
    border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border); 
    padding: 30px 0; margin-bottom: 40px; position: relative; 
}
.score-hud::before { 
    content: "[  SYSTEM STATUS  ]"; position: absolute; top: -12px; 
    font-family: 'Share Tech Mono'; font-size: 0.8em; 
    color: var(--neon-blue); background: #000; padding: 0 10px; 
}

.big-number { 
    font-family: 'Orbitron', sans-serif; font-size: clamp(3rem, 8vw, 6rem); font-weight: 700; 
    color: #fff; text-shadow: 0 0 20px rgba(255,255,255,0.5); line-height: 1; margin: 10px 0; 
}
.hud-label { 
    font-family: 'Share Tech Mono', monospace; letter-spacing: 4px; 
    color: #888; font-size: 0.9em; text-transform: uppercase; 
}

/* 6. CHART WRAPPER */
.chart-wrapper { 
    background: var(--glass); backdrop-filter: blur(10px); 
    border: 1px solid var(--glass-border); 
    padding: 20px; margin-bottom: 40px; border-radius: 4px; position: relative; z-index: 10; 
}
.chart-wrapper::after { 
    content: "TIME SERIES PROJECTION // SELDON_ALGO_V5"; 
    position: absolute; bottom: 5px; right: 10px; 
    font-family: 'Share Tech Mono'; font-size: 0.7em; color: rgba(0, 243, 255, 0.3); 
}

/* 7. TERMINAL */
.terminal-box { 
    background: linear-gradient(180deg, rgba(10,15,20,0.9) 0%, rgba(5,5,10,0.95) 100%); 
    border: 1px solid var(--glass-border); border-left: 4px solid var(--neon-blue); 
    padding: 30px; margin-bottom: 40px; position: relative; 
    box-shadow: 0 0 50px rgba(0,0,0,0.5); z-index: 10; 
}
.terminal-header { 
    color: var(--neon-blue); font-family: 'Orbitron'; font-size: 1.1em; 
    margin-bottom: 20px; display: flex; align-items: center; gap: 10px; 
}
.blink { animation: blinker 1s linear infinite; } 
@keyframes blinker { 50% { opacity: 0; } }

.analysis-text { font-size: 1.2em; line-height: 1.6; margin-bottom: 30px; border-left: 2px solid #333; padding-left: 15px; }

.alert-group-title { margin-top: 20px; margin-bottom: 10px; font-weight: bold; font-family: 'Orbitron'; letter-spacing: 1px; }
.alerts-list { list-style: none; padding: 0; margin: 0; }

.alert-item { 
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); 
    padding: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 15px; 
    font-family: 'Share Tech Mono', monospace; transition: 0.3s; 
}
.alert-crit { border-left: 3px solid var(--neon-red); }
.alert-warn { border-left: 3px solid var(--neon-yellow); }
.alert-info { border-left: 3px solid var(--neon-green); }
.alert-crisis { border: 1px solid var(--gold); background: rgba(255, 215, 0, 0.05); }

.badge { padding: 4px 8px; font-weight: bold; font-size: 0.8em; font-family: 'Orbitron'; min-width: 90px; text-align: center; }
.b-red { background: var(--neon-red); color: #000; }
.b-orange { background: var(--neon-yellow); color: #000; }
.b-green { background: var(--neon-green); color: #000; }
.b-gold { 
    background: linear-gradient(135deg, #b8860b, #ffd700, #b8860b); color: #000; 
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); position: relative; overflow: hidden; 
}
.b-gold::before { 
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent); 
    animation: shine 3s infinite; 
}
@keyframes shine { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }

/* 8. CARDS */
.grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 25px; position: relative; z-index: 20; 
}

.card { 
    background: var(--glass); backdrop-filter: blur(5px); 
    border: 1px solid var(--glass-border); padding: 20px; 
    position: relative; z-index: 1; transition: transform 0.2s;
    overflow: hidden; 
}

.card:hover {
    transform: translateY(-2px); background: rgba(15, 25, 35, 0.95); border-color: var(--neon-blue);
}

.card::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--neon-blue); opacity: 0.5; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.card-title-box { display: flex; align-items: center; }
.card-title { font-family: 'Orbitron'; font-size: 0.8em; letter-spacing: 1px; color: #888; }
.card-score { font-family: 'Orbitron'; font-size: 1.8em; font-weight: bold; text-shadow: 0 0 10px currentColor; }

.progress-container { height: 4px; background: rgba(255,255,255,0.1); width: 100%; position: relative; }
.progress-bar { height: 100%; transition: width 1.5s ease; box-shadow: 0 0 10px currentColor; position: relative; }
.progress-bar::after { content: ''; position: absolute; right: 0; top: -3px; width: 2px; height: 10px; background: #fff; box-shadow: 0 0 5px #fff; }

.c-good { color: var(--neon-green); } .bg-good { background-color: var(--neon-green); }
.c-mid { color: var(--neon-yellow); } .bg-mid { background-color: var(--neon-yellow); }
.c-bad { color: var(--neon-red); } .bg-bad { background-color: var(--neon-red); }

/* 9. TOOLTIPS FIXES (V24 - ADAPTATIF) */
.info-icon { 
    display: inline-flex; justify-content: center; align-items: center; 
    width: 18px; height: 18px; border: 1px solid var(--neon-blue); 
    color: var(--neon-blue); font-size: 10px; margin-left: 10px; cursor: help; 
}
.info-icon:hover { background: var(--neon-blue); color: #000; }

/* Masquage forcé des données internes */
.tooltip-data { display: none !important; opacity: 0 !important; visibility: hidden !important; }

/* La boîte flottante JS - ADAPTATIVE */
#floating-tooltip {
    display: none; position: fixed; z-index: 999999;
    background-color: rgba(5, 10, 15, 0.98); border: 1px solid var(--neon-blue);
    color: #fff; padding: 15px; 
    
    /* Auto width + Contraintes */
    width: auto; 
    max-width: 320px; 
    min-width: 150px;
    
    font-family: 'Share Tech Mono', monospace; font-size: 0.85rem; line-height: 1.4;
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.3); pointer-events: none;
    border-radius: 4px; backdrop-filter: blur(8px);
}
@media (max-width: 600px) { #floating-tooltip { max-width: 250px; } }

/* 10. TERMINOLOGIE SELDONIENNE (NOUVEAU) */
.seldon-term {
    color: var(--neon-blue);
    font-family: 'Orbitron';
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.tooltip-inline {
    font-size: 0.7em;
    color: #666;
    font-family: 'Share Tech Mono';
    margin-left: 10px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.hud-label:hover .tooltip-inline {
    opacity: 1;
    color: var(--neon-blue);
}

/* 11. FOOTER */
footer { 
    margin-top: 60px; 
    text-align: center; 
    color: #444; 
    font-family: 'Share Tech Mono'; 
    font-size: 0.7em; 
    letter-spacing: 2px; 
}
/* ========================================
   ÉQUATIONS PSYCHOHISTORIQUES - SEMAINE 2
   ======================================== */

.seldon-equations-box {
    background: linear-gradient(180deg, rgba(5,10,15,0.95) 0%, rgba(10,15,20,0.98) 100%);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--gold);
    padding: 30px;
    margin-bottom: 40px;
    position: relative;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.1);
    z-index: 10;
}

.equation-header {
    color: var(--gold);
    font-family: 'Orbitron';
    font-size: 1.1em;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.equation-container {
    background: rgba(255, 215, 0, 0.02);
    border: 1px solid rgba(255, 215, 0, 0.2);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    transition: 0.3s;
}

.equation-container:hover {
    background: rgba(255, 215, 0, 0.05);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.1);
}

.equation-title {
    font-family: 'Share Tech Mono';
    font-size: 0.85em;
    color: #888;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.equation-formula {
    font-family: 'Cambria Math', 'STIX Two Math', 'Latin Modern Math', serif;
    font-size: 1.6em;
    color: var(--gold);
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    margin-bottom: 15px;
    letter-spacing: 2px;
    line-height: 1.5;
}

.equation-legend {
    font-family: 'Share Tech Mono';
    font-size: 0.85em;
    color: #aaa;
    line-height: 1.8;
    padding-left: 20px;
    border-left: 2px solid rgba(255, 215, 0, 0.3);
}

.equation-legend .var {
    font-family: 'Cambria Math', serif;
    color: var(--neon-blue);
    font-style: italic;
    font-weight: bold;
    font-size: 1.1em;
}

/* Animation subtile au survol */
@keyframes equation-glow {
    0%, 100% { text-shadow: 0 0 15px rgba(255, 215, 0, 0.3); }
    50% { text-shadow: 0 0 25px rgba(255, 215, 0, 0.5); }
}

.equation-formula:hover {
    animation: equation-glow 2s ease-in-out infinite;
}

/* Support mobile */
@media (max-width: 768px) {
    .equation-formula {
        font-size: 1.2em;
        padding: 15px;
    }
    
    .seldon-equations-box {
        padding: 20px;
    }
}
/* ========================================
   PRIME RADIANT 3D - SEMAINE 3
   ======================================== */

.radiant-3d-wrapper {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 20px;
    margin-bottom: 40px;
    border-radius: 4px;
    position: relative;
    z-index: 10;
}

.radiant-3d-header {
    color: var(--neon-blue);
    font-family: 'Orbitron';
    font-size: 1.1em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.radiant-3d-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 243, 255, 0.05) 0%, rgba(0, 0, 0, 0.8) 100%);
    border: 1px solid rgba(0, 243, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

#prime-radiant-sphere {
    width: 100%;
    height: 100%;
    cursor: grab;
}

#prime-radiant-sphere:active {
    cursor: grabbing;
}

.radiant-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.radiant-btn {
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    padding: 8px 16px;
    font-family: 'Share Tech Mono';
    font-size: 0.85em;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 2px;
}

.radiant-btn:hover {
    background: var(--neon-blue);
    color: #000;
}

.radiant-info {
    color: #888;
    font-family: 'Share Tech Mono';
    font-size: 0.85em;
}

.event-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--neon-blue);
    padding: 15px;
    pointer-events: none;
    z-index: 1000;
    font-family: 'Share Tech Mono';
    max-width: 300px;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    border-radius: 4px;
}

.event-year {
    font-family: 'Orbitron';
    color: var(--neon-blue);
    font-size: 1.2em;
    margin-bottom: 5px;
}

.event-score {
    color: #888;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.event-desc {
    color: #fff;
    font-size: 0.85em;
    line-height: 1.4;
}

.radiant-legend {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    font-family: 'Share Tech Mono';
    font-size: 0.85em;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

/* Support mobile */
@media (max-width: 768px) {
    .radiant-3d-container {
        height: 400px;
    }
    
    .radiant-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .radiant-legend {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}
