/* ============================================================
   1. VARIABLES & CONFIGURATION DE BASE (Crystal Theme Ready)
   ============================================================ */
:root {
    /* Ces variables sont pilotées par le menu.js */
    --gold: #f9d976;
    --gold-gradient: linear-gradient(145deg, #f9d976 0%, #b28e28 50%, #8c6d1d 100%);
    --neon: #00f2ff;
    --bg-dark: #05070a;
    
    /* Variables statiques */
    --panel: rgba(255, 255, 255, 0.05);
    --success: #00ff88;
    --error: #ff4d4d;
    --font-main: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-main);
    background: radial-gradient(circle at center, #1a2036 0%, var(--bg-dark) 100%);
    color: white;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre tout le contenu horizontalement */
    overflow-x: hidden;
    transition: background 0.5s ease;
}

/* Overlay pour les effets de flash (Quizz) */
#flash-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 9999; opacity: 0; transition: 0.2s;
}

/* ============================================================
   2. NAVIGATION AFFINÉE (Centrage Royal)
   ============================================================ */
.main-nav-bar {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center; /* Centre les liens au milieu */
    align-items: center;
    background: rgba(5, 7, 10, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(249, 217, 118, 0.3);
    position: sticky;
    top: 0;
    z-index: 9999;
}

.nav-logo {
    position: absolute;
    left: 40px; /* Logo reste à gauche */
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.logo-box {
    width: 35px; height: 35px;
    background: var(--gold-gradient);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #221a00;
    font-weight: 900;
}

.logo-text { 
    letter-spacing: 4px; 
    font-size: 0.85rem; 
    font-weight: 300; 
}

.nav-links-container {
    display: flex;
    height: 100%;
    align-items: center;
    gap: 10px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--gold);
    background: rgba(249, 217, 118, 0.05);
}

/* --- Menu Déroulant --- */
.nav-dropdown {
    position: relative;
    height: 100%;
}

.dropdown-content {
    display: none; /* Caché par défaut */
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #0a0c12;
    min-width: 200px;
    border: 1px solid rgba(249, 217, 118, 0.2);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    padding: 10px 0;
    z-index: 10000;
}

.nav-dropdown:hover .dropdown-content {
    display: block; /* S'affiche au survol */
}

.dropdown-content a {
    color: rgba(255, 255, 255, 0.6);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: 600;
    transition: 0.2s;
}

.dropdown-content a:hover {
    background: rgba(249, 217, 118, 0.1);
    color: var(--gold);
    padding-left: 25px;
}

/* ============================================================
   3. LAYOUT & PANELS (Structure Centrée)
   ============================================================ */
.main-layout {
    display: grid;
    grid-template-columns: 320px 1fr 320px; /* Structure 3 colonnes Quizz */
    gap: 40px;
    width: 95%;
    max-width: 1450px;
    margin: 0 auto; /* Centre le bloc complet */
    padding: 60px 20px;
    align-items: start;
    flex: 1;
}

/* Pour les pages avec un seul panneau (ex: QR Code), on peut forcer le centrage flex */
.main-layout.centered {
    display: flex;
    justify-content: center;
}

.glass-panel {
    background: var(--panel);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
}

.btn-main {
    padding: 20px 50px;
    background: var(--gold-gradient);
    border: none;
    border-radius: 15px;
    color: #221a00;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: 0.3s;
    box-shadow: 0 10px 25px rgba(184, 134, 11, 0.3);
}

.btn-main:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(184, 134, 11, 0.5);
}

/* ============================================================
   4. ELEMENTS SPÉCIFIQUES DU QUIZZ
   ============================================================ */
.joker-bar { display: flex; gap: 15px; margin-bottom: 25px; }

.btn-joker {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(249, 217, 118, 0.3);
    color: var(--gold);
    padding: 12px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-joker:hover:not(:disabled) { background: rgba(249, 217, 118, 0.1); }
.btn-joker:disabled { opacity: 0.2; cursor: not-allowed; filter: grayscale(1); }

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
    margin-top: 25px;
}

.opt-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 25px 20px;
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    min-height: 80px;
}

.opt-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--gold);
    color: var(--gold);
    transform: scale(1.02);
}

.opt-btn.hidden { visibility: hidden; }

.wheel-style-timer {
    width: 120px; height: 120px;
    padding: 8px; background: var(--gold-gradient);
    border-radius: 50%; box-shadow: 0 0 30px rgba(184, 134, 11, 0.2);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 30px;
}

.inner-timer {
    width: 100%; height: 100%; background: #05070a;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; font-weight: 900; color: white;
}

/* Shake Animation pour erreur */
.shake { animation: shakeAnim 0.4s ease-in-out; }
@keyframes shakeAnim {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

/* ============================================================
   5. LISTES, INPUTS & ARCHIVES
   ============================================================ */
.list-items { list-style: none; padding: 0; margin-top: 20px; }
.list-items li {
    background: rgba(255,255,255,0.05); margin-bottom: 10px;
    padding: 15px; border-radius: 12px; display: flex;
    justify-content: space-between; border-left: 4px solid var(--gold);
    transition: 0.3s; cursor: pointer;
}
.list-items li.active { border-left-color: var(--neon); background: rgba(0,242,255,0.1); }
.list-items li.done { opacity: 0.5; border-left-color: #444; }

input, select {
    width: 100%; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1); padding: 15px;
    border-radius: 12px; color: white; outline: none; transition: 0.3s;
}
input:focus, select:focus { border-color: var(--gold); background: rgba(255,255,255,0.1); }

/* Désactivation du style par défaut des inputs color dans le panneau theme */
input[type="color"] {
    width: 35px; height: 35px; border: none; border-radius: 50%;
    cursor: pointer; background: none; padding: 0;
}

/* ============================================================
   6. FOOTER (MASSIF & PROFOND)
   ============================================================ */
.main-footer {
    width: 100%;
    padding: 80px 0;
    margin-top: 100px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(30px);
    border-top: 3px solid rgba(249, 217, 118, 0.2);
    display: flex;
    justify-content: center;
}

.footer-container {
    text-align: center;
    width: 90%;
}

.footer-brand {
    font-size: 1.8rem;
    letter-spacing: 12px;
    font-weight: 200;
    text-transform: uppercase;
}

.footer-gold-bar {
    width: 180px; height: 4px;
    background: var(--gold-gradient);
    margin: 25px auto;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(184, 134, 11, 0.6);
}

.footer-credits {
    font-size: 0.75rem;
    opacity: 0.3;
    letter-spacing: 4px;
    margin-top: 20px;
    text-transform: uppercase;
}

/* --- HEADER GLOSSY STYLE --- */
.top-header-glass {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 10000;
    /* Couleur du site visible par transparence */
    background: rgba(10, 12, 20, 0.15); 
    backdrop-filter: blur(25px) saturate(150%);
    -webkit-backdrop-filter: blur(25px) saturate(150%);
    display: flex;
    flex-direction: column;
}

.header-vibe {
    max-width: 100%;
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.glitch-diamond {
    font-size: 1.4rem;
    filter: drop-shadow(0 0 10px var(--gold));
    animation: diamond-float 3s ease-in-out infinite;
}

.brand-name {
    color: white;
    font-size: 1rem;
    font-weight: 200;
    letter-spacing: 10px;
    text-transform: uppercase;
}

.gold-txt {
    color: var(--gold);
    font-weight: 900;
}

/* Statut à droite */
.server-status {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 5px 15px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
    font-weight: 800;
}

.pulse-ring {
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold);
}

/* Ligne de finition Glossy Or */
.header-glow-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(249, 217, 118, 0.5) 50%, 
        transparent 100%);
    box-shadow: 0 1px 15px rgba(249, 217, 118, 0.2);
}

/* Animation discrète */
@keyframes diamond-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Adaptation Mobile */
@media (max-width: 768px) {
    .header-vibe { padding: 10px 20px; }
    .brand-name { font-size: 0.8rem; letter-spacing: 5px; }
    .server-status { display: none; }
}