/* --- VARIABLES ET BASES --- */
:root {
    --primary: #1e3c72;
    --secondary: #3498db;
    --admin-green: #27ae60;
    --admin-red: #e74c3c;
    --bg-color: #f4f7f6;
    --dark-text: #2c3e50;
    --light-text: #666;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

body { 
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 0.9rem;
    background: var(--bg-color); 
    color: var(--dark-text); 
    padding: 20px;
    line-height: 1.5;
}

h1, h2, h3 { text-align: center; color: var(--dark-text); }
h1 { color: var(--primary); border-bottom: 3px solid var(--primary); padding-bottom: 10px; }
h2 { margin-top: 30px; display: flex; align-items: center; justify-content: center; }

/* --- MENU DE NAVIGATION --- */
.nav-menu {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.nav-menu a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: bold;
    margin: 0 10px;
}
.nav-menu a:hover { color: #217dbb; }

/* --- DASHBOARD OVERLAY (Noir & Vert) --- */
.admin-dashboard {
    position: fixed; top: 20px; right: 20px;
    background: rgba(0, 0, 0, 0.9); color: #00ff00;
    padding: 15px; border-radius: 10px; border: 2px solid #444;
    z-index: 1000; font-family: monospace; box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
    min-width: 220px;
}
.admin-dashboard b { color: #fff; }

/* --- TABLEAUX --- */
table { 
    width: 100%; 
    max-width: 1000px;
    margin: 20px auto;
    background: var(--white); 
    border-collapse: collapse; 
    border-radius: 10px; 
    overflow: hidden; 
    box-shadow: var(--shadow); 
}

th { background: var(--primary); color: white; padding: 15px; text-align: left; text-transform: uppercase; font-size: 0.9em; }
td { padding: 12px 15px; border-bottom: 1px solid #eee; }
tr:hover { background-color: #f9f9f9; }

/* --- ÉTATS ET ALERTES --- */
.ok { color: var(--admin-green); font-weight: bold; }
.alerte { color: var(--admin-red); font-weight: bold; }
.prive { color: #7f8c8d; font-style: italic; }
.freq-tag { font-size: 0.8em; color: var(--light-text); display: block; }
code { background: #eee; padding: 2px 4px; border-radius: 4px; font-family: monospace; }

@keyframes pulse-red {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.01); }
    100% { opacity: 1; transform: scale(1); }
}
.flash-alert {
    background: #ffcccc; border: 2px solid var(--admin-red); padding: 15px; 
    margin: 0 auto 20px; max-width: 900px; border-radius: 8px; 
    color: #b30000; font-weight: bold; text-align: center; 
    animation: pulse-red 2s infinite;
}

/* --- CARTES ET FILTRES --- */
.stat-container { display: flex; gap: 20px; margin: 20px auto; max-width: 1000px; }
.stat-card { background: var(--white); padding: 20px; border-radius: 10px; flex: 1; text-align: center; box-shadow: var(--shadow); }
.stat-card h3 { margin: 0; font-size: 14px; color: var(--light-text); text-transform: uppercase; }
.stat-card p { margin: 5px 0 0; font-size: 28px; font-weight: bold; }

.filter-bar { background: var(--white); padding: 15px; border-radius: 10px; margin-bottom: 20px; box-shadow: var(--shadow); text-align: center; }
.filter-btn { text-decoration: none; padding: 8px 18px; background: #eee; color: #333; border-radius: 5px; margin: 0 5px; font-size: 14px; transition: 0.3s; }
.filter-btn.active { background: var(--secondary); color: white; }

 .container { max-width: 1000px; margin: 0 auto; }
        h1 { color: #ff9800; border-bottom: 2px solid #333; padding-bottom: 10px; }
        .log-entry { padding: 8px; border-bottom: 1px solid #333; margin-bottom: 2px; font-size: 13px; }
        .CRITICAL { color: #ff5252; font-weight: bold; border-left: 4px solid #ff5252; }
        .WARNING { color: #000; border-left: 4px solid #ffca28; }
        .SUCCESS { color: #66bb6a; border-left: 4px solid #66bb6a; }
        .btn { display: inline-block; padding: 10px 20px; color: white; text-decoration: none; border-radius: 4px; margin-right: 10px; font-weight: bold; }
        .btn-refresh { background: #ff9800; }
        .btn-clear { background: #f44336; }
        .no-log { color: #888; font-style: italic; margin-top: 20px; }

/* --- MOBILE --- */
@media (max-width: 768px) {
    .stat-container { flex-direction: column; }
    .admin-dashboard { position: static; width: 100%; margin-bottom: 20px; box-sizing: border-box; }
}