/* --- CONFIG GÉNÉRALE --- */
body { 
    background-color: #0f172a; 
    color: #f1f5f9; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    text-align: center; 
    padding: 20px; 
    margin: 0;
}

h1 { letter-spacing: 5px; color: #38bdf8; text-shadow: 0 0 10px rgba(56, 189, 248, 0.3); }

/* --- BOITES & CONTENEURS --- */
.box { 
    background: #1e293b; 
    max-width: 500px; 
    margin: 20px auto; 
    padding: 25px; 
    border-radius: 12px; 
    border: 1px solid #334155; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

.hidden { display: none !important; }

/* --- FORMULAIRES --- */
input { 
    display: block; 
    width: 90%; 
    margin: 15px auto; 
    padding: 12px; 
    background: #0f172a; 
    border: 1px solid #475569; 
    color: white; 
    border-radius: 6px; 
    font-size: 16px;
}
input:focus { outline: 2px solid #38bdf8; border-color: transparent; }

/* --- BOUTONS --- */
button { 
    background: #3b82f6; 
    color: white; 
    border: none; 
    padding: 12px 24px; 
    cursor: pointer; 
    border-radius: 6px; 
    margin: 5px; 
    font-weight: bold;
    transition: transform 0.1s, background 0.2s;
}
button:hover { background: #2563eb; transform: translateY(-2px); }
button:active { transform: translateY(0); }

.secondary-btn { background: #475569; }
.secondary-btn:hover { background: #334155; }

.logout-btn { background: #ef4444; font-size: 12px; padding: 8px 16px; }

.action-btn { 
    background: linear-gradient(135deg, #8b5cf6, #d946ef); 
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

/* --- ADMIN --- */
.admin-panel { border: 2px solid #ef4444; background: #2a1b1b; }
.admin-title { color: #ef4444; margin-top: 0; }
.red-btn { background: #dc2626; }
.user-list { text-align: left; margin-top: 15px; max-height: 200px; overflow-y: auto; }
.user-row { 
    border-bottom: 1px solid #451a1a; 
    padding: 8px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

/* --- CARTES & TEXTES --- */
.highlight { color: #38bdf8; }
.error-msg { color: #f87171; min-height: 20px; }

.card-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.card-item {
    background: #0f172a; border: 1px solid #475569;
    padding: 10px; border-radius: 8px; width: 100px;
    text-align: center; font-size: 12px;
}

/* --- NOUVEAUX STYLES --- */
.success-btn { background: #22c55e; }
.success-btn:hover { background: #16a34a; }

.booster-btn { 
    background: linear-gradient(45deg, #ff00cc, #333399); 
    width: 100%; font-size: 1.2em;
}

/* ADMIN SPECIFIQUE */
.admin-header { border-bottom: 2px solid #ef4444; margin-bottom: 20px; padding-bottom: 10px; }
.admin-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.admin-box { margin: 0; min-width: 300px; }
.wide { flex-grow: 1; max-width: 800px; }
.refresh-btn { font-size: 0.8em; padding: 5px 10px; background: #64748b; }

/* Inscription */
#register-view { border-color: #3b82f6; }
/* --- WARNING SYSTEM --- */
#warn-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(220, 38, 38, 0.85); /* Rouge fort semi-transparent */
    backdrop-filter: blur(5px); /* Effet de flou derrière */
    z-index: 9999; /* Toujours au dessus de tout */
    display: flex;
    justify-content: center;
    align-items: center;
    animation: pulseRed 2s infinite;
}

.warn-box {
    background: #450a0a; /* Rouge très sombre */
    border: 4px solid #fca5a5;
    padding: 30px;
    width: 400px;
    border-radius: 15px;
    text-align: center;
    color: white;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    position: relative;
}

.warn-box h2 { color: #fecaca; font-size: 2em; margin-bottom: 10px; }

.close-btn {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #fca5a5;
    transition: 0.3s;
}
.close-btn:hover { color: white; transform: scale(1.2); }

@keyframes pulseRed {
    0% { background: rgba(220, 38, 38, 0.85); }
    50% { background: rgba(185, 28, 28, 0.95); }
    100% { background: rgba(220, 38, 38, 0.85); }
}