/* --- VARIABLES GLOBALES --- */
:root {
    --primary: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --dark: #2c3e50;
    --bg-fallback: #1a1a2e;
    --warning: #f1c40f;
    --glass: rgba(0, 0, 0, 0.75);
    --glass-light: rgba(255, 255, 255, 0.1);
    --shadow-strong: 0 15px 45px rgba(0,0,0,0.6);
}

/* --- STYLE GÉNÉRAL --- */
body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background-color: var(--bg-fallback);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    color: white;
    min-height: 100vh;
    transition: background 1s ease-in-out;
}

/* Container pour pages Admin et Guichet */
.container {
    max-width: 1000px;
    margin: auto;
    padding: 30px 20px;
    padding-bottom: 120px;
}

/* --- STRUCTURE ÉCRAN AFFICHAGE --- */
.screen-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.left-panel {
    width: 40%;
    background: var(--glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    padding: 35px;
    box-sizing: border-box;
    box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    z-index: 5;
}

.right-panel {
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
    position: relative;
}

/* --- COMPOSANTS --- */
.card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    text-align: center;
    color: var(--dark);
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.2);
}

/* --- LISTES D'ATTENTE (Fichiers Admin/Guichet) --- */
ul#queueList {
    list-style: none;
    padding: 0;
}

ul#queueList li {
    background: #fdfdfd;
    margin-bottom: 15px;
    padding: 18px 25px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 8px solid var(--primary);
    transition: all 0.3s ease;
    color: var(--dark);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

ul#queueList li:hover {
    transform: translateX(12px);
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* --- AFFICHAGE TICKET (Grand Écran) --- */
#ticketDisplay {
    font-size: 20rem;
    font-weight: 900;
    color: var(--warning);
    line-height: 0.7;
    margin: 0;
    text-shadow: 0 15px 70px rgba(0, 0, 0, 0.9), 0 0 40px rgba(241, 196, 15, 0.5);
}

#guichetDisplay {
    font-size: 6.5rem;
    color: var(--success);
    border: 7px solid var(--success);
    padding: 20px 100px;
    border-radius: 180px;
    margin-top: 45px;
    font-weight: 900;
    background: rgba(39, 174, 96, 0.18);
    box-shadow: 0 0 50px rgba(39, 174, 96, 0.4);
    text-transform: uppercase;
    letter-spacing: 5px;
}

#gabonClock {
    font-size: 5.5rem;
    color: #fff;
    font-weight: 900;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 5px 15px rgba(0,0,0,0.6);
    letter-spacing: -2px;
}

/* --- BOUTONS --- */
button {
    padding: 20px 30px;
    border: none;
    border-radius: 15px;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

button:active { transform: scale(0.95); }
button:hover { filter: brightness(1.15); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }

.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; margin-top: 15px; }

/* --- BANNIÈRE DÉFILANTE --- */
.footer-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--warning);
    color: #000;
    height: 85px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-top: 6px solid #d4ac0d;
    z-index: 2000;
    box-shadow: 0 -8px 30px rgba(0,0,0,0.4);
}

.pub-text {
    font-weight: 900;
    font-size: 2.8rem;
    white-space: nowrap;
    position: absolute;
    animation: scroll-left 35s linear infinite;
    letter-spacing: 1px;
}

@keyframes scroll-left {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* --- ANIMATION IMPACT APPEL --- */
.flash {
    animation: flash-impact 0.8s ease-in-out 3;
}

@keyframes flash-impact {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.6); color: #fff; }
}

/* --- MÉTÉO SECOURS --- */
.weather-box {
    margin-top: 30px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* --- ADAPTATION MOBILE --- */
@media (max-width: 768px) {
    .screen-container { flex-direction: column; }
    .left-panel, .right-panel { width: 100%; height: 50vh; }
    #ticketDisplay { font-size: 11rem; }
    #guichetDisplay { font-size: 4rem; padding: 15px 45px; }
    #gabonClock { font-size: 3.5rem; }
}

/* --- IMPRESSION TICKET --- */
@media print {
    body * { visibility: hidden !important; }
    #printArea, #printArea * { 
        visibility: visible !important; 
        color: black !important;
    }
    #printArea { 
        position: absolute; 
        left: 0; top: 0; 
        width: 100%;
        text-align: center;
        font-family: 'Courier New', monospace;
    }
}