/* ==========================================================================
   LA PÉPITE DU MOIS — Direction Artistique : Diner Américain 1960
   Palette : Bois acajou, Néons rouges, Chrome brillant, Crème vintage, Néon vert
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lobster&family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

:root {
    --bg-wood-dark: #190a05;
    --bg-wood-mid: #2e140a;
    --bg-wood-light: #441e10;
    --wood-border: #68301a;
    --cream-bg: #fbf5e8;
    --cream-card: #f4eaad;
    --text-dark: #221510;
    --text-gold: #f3c669;
    --text-cream: #fdf6ea;
    
    --neon-red: #ff2a55;
    --neon-red-glow: rgba(255, 42, 85, 0.7);
    --neon-green: #39ff14;
    --neon-green-glow: rgba(57, 255, 20, 0.7);
    --neon-blue: #00d2ff;
    --neon-blue-glow: rgba(0, 210, 255, 0.6);
    
    --chrome-light: #ffffff;
    --chrome-mid: #cfd8dc;
    --chrome-dark: #78909c;
    --chrome-border: linear-gradient(135deg, #ffffff 0%, #90a4ae 50%, #eceff1 100%);
    
    --font-heading: 'Lobster', cursive;
    --font-serif: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    
    --shadow-deep: 0 10px 30px rgba(0, 0, 0, 0.8);
    --shadow-neon-red: 0 0 15px var(--neon-red), 0 0 30px var(--neon-red-glow);
    --shadow-neon-green: 0 0 15px var(--neon-green), 0 0 30px var(--neon-green-glow);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-wood-dark);
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(68, 30, 16, 0.5) 0%, rgba(25, 10, 5, 0.95) 70%),
        repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0, 0, 0, 0.15) 3px, rgba(0, 0, 0, 0.15) 6px);
    color: var(--text-cream);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 90px;
}

/* Header & Typography */
.app-header {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
    position: relative;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    color: #fff;
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px var(--neon-red),
        0 0 40px var(--neon-red),
        0 0 60px var(--neon-red);
    letter-spacing: 2px;
    margin-bottom: 0.3rem;
    animation: neon-pulse 3s infinite ease-in-out alternate;
}

@keyframes neon-pulse {
    0%, 100% {
        text-shadow: 
            0 0 5px #fff,
            0 0 10px #fff,
            0 0 20px var(--neon-red),
            0 0 40px var(--neon-red);
    }
    50% {
        text-shadow: 
            0 0 8px #fff,
            0 0 15px #fff,
            0 0 25px var(--neon-red),
            0 0 50px var(--neon-red),
            0 0 80px var(--neon-red);
    }
}

.brand-subtitle {
    font-size: 1.1rem;
    color: var(--text-gold);
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.9;
}

.room-badge {
    display: inline-block;
    background: linear-gradient(180deg, #441e10 0%, #2e140a 100%);
    border: 2px solid var(--text-gold);
    color: var(--text-gold);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.8rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Layout Containers */
.main-container {
    max-width: 900px;
    width: 92%;
    margin: 0 auto 2rem;
    flex: 1;
}

/* Retro Diner Card */
.retro-card {
    background: linear-gradient(145deg, #32160b, #210d05);
    border: 6px solid var(--wood-border);
    border-radius: 20px;
    box-shadow: var(--shadow-deep);
    padding: 2.2rem;
    position: relative;
    overflow: hidden;
}

.retro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--chrome-light), var(--chrome-dark), var(--chrome-light));
}

/* Wooden Picture Frame for Nugget Winner */
.wooden-frame-wrapper {
    text-align: center;
    margin: 1.5rem 0 2.5rem;
}

.wooden-frame {
    display: inline-block;
    background: linear-gradient(145deg, #572714, #2d1308);
    padding: 20px;
    border-radius: 16px;
    border: 12px solid #6b341c;
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.9),
        0 15px 35px rgba(0,0,0,0.8),
        0 0 0 3px #a65832;
    position: relative;
    max-width: 420px;
    width: 100%;
}

.wooden-frame-inner {
    background: #0f0704;
    border: 3px solid var(--text-gold);
    border-radius: 8px;
    padding: 1.5rem;
    overflow: hidden;
}

.winner-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--chrome-light);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    margin: 0 auto 1rem;
    display: block;
}

.winner-silhouette {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: #2a140b;
    border: 5px solid var(--chrome-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.winner-silhouette svg {
    width: 90px;
    height: 90px;
    fill: var(--text-gold);
}

.winner-name {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--text-gold);
    margin-bottom: 0.5rem;
}

.winner-topic-box {
    background: rgba(253, 246, 234, 0.95);
    color: var(--text-dark);
    padding: 1rem 1.2rem;
    border-radius: 10px;
    margin-top: 1rem;
    font-size: 1rem;
    border-left: 5px solid var(--neon-red);
    text-align: left;
}

.winner-topic-title {
    font-weight: 700;
    color: #9c152d;
    margin-bottom: 0.3rem;
}

/* Jukebox Voting Panel */
.jukebox-panel {
    background: linear-gradient(180deg, #261108 0%, #150904 100%);
    border: 4px solid var(--chrome-mid);
    border-radius: 16px;
    padding: 1.8rem;
    margin-top: 1.5rem;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.8);
}

.jukebox-header {
    text-align: center;
    margin-bottom: 1.8rem;
}

.topic-banner {
    background: linear-gradient(90deg, #441e10, #73341b, #441e10);
    border: 2px solid var(--text-gold);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.topic-banner-title {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--text-gold);
    margin-bottom: 0.4rem;
}

.topic-banner-desc {
    font-size: 1rem;
    color: var(--text-cream);
    line-height: 1.5;
    opacity: 0.95;
}

.jukebox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
}

/* Jukebox Push Button Item */
.jukebox-btn {
    background: linear-gradient(145deg, #4a2314, #2d140b);
    border: 3px solid #6e351d;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.25s ease;
    user-select: none;
    position: relative;
    box-shadow: 0 5px 12px rgba(0,0,0,0.4);
}

.jukebox-btn:hover {
    transform: translateY(-3px);
    border-color: var(--text-gold);
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}

.jukebox-btn.selected {
    background: linear-gradient(145deg, #611824, #360c13);
    border-color: var(--neon-red);
    box-shadow: 0 0 15px var(--neon-red-glow);
}

.candidate-info {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.candidate-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--chrome-light);
}

.candidate-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1a0a05;
    border: 2px solid var(--text-gold);
    display: flex;
    align-items: center;
    justify-content: center;
}

.candidate-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-cream);
}

/* Jukebox LED Light Indicator */
.jukebox-led {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #401015;
    border: 2px solid #802028;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
    transition: all 0.3s ease;
}

.jukebox-btn.selected .jukebox-led {
    background: var(--neon-green);
    border-color: #ffffff;
    box-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green-glow);
}

/* Forms & UI Inputs */
.form-group {
    margin-bottom: 1.4rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-gold);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.1rem;
    background: #150904;
    border: 2px solid #572714;
    border-radius: 10px;
    color: var(--text-cream);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--neon-red);
    box-shadow: 0 0 10px var(--neon-red-glow);
}

.form-help {
    font-size: 0.85rem;
    color: #bfa180;
    margin-top: 0.4rem;
}

/* Action Buttons */
.btn-retro {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #d32f2f 0%, #9a0007 100%);
    border: 2px solid var(--chrome-light);
    border-radius: 30px;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.85rem 2rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-retro:hover {
    background: linear-gradient(180deg, #f44336 0%, #c62828 100%);
    transform: translateY(-2px);
    box-shadow: 0 0 15px var(--neon-red-glow);
}

.btn-retro-secondary {
    background: linear-gradient(180deg, #455a64 0%, #263238 100%);
    border-color: var(--chrome-mid);
}

.btn-retro-secondary:hover {
    background: linear-gradient(180deg, #607d8b 0%, #37474f 100%);
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

/* Countdown Timer */
.countdown-box {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.countdown-unit {
    background: #120703;
    border: 2px solid var(--text-gold);
    border-radius: 12px;
    padding: 0.8rem 1.2rem;
    min-width: 80px;
    text-align: center;
}

.countdown-num {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--neon-red);
    font-weight: 700;
}

.countdown-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-gold);
    letter-spacing: 1px;
}

/* Tabs System */
.nav-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 3px solid var(--wood-border);
    margin-bottom: 1.8rem;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    background: #251007;
    border: 2px solid var(--wood-border);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    color: var(--text-cream);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: #4a2314;
    border-color: var(--text-gold);
    color: var(--text-gold);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Data Tables in Admin */
.retro-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: #180a04;
    border-radius: 10px;
    overflow: hidden;
}

.retro-table th, .retro-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #36170b;
}

.retro-table th {
    background: #2b1308;
    color: var(--text-gold);
    font-weight: 600;
}

/* Alerts & Badges */
.alert-box {
    padding: 1rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(57, 255, 20, 0.15);
    border: 2px solid var(--neon-green);
    color: #a3ff8f;
}

.alert-danger {
    background: rgba(255, 42, 85, 0.15);
    border: 2px solid var(--neon-red);
    color: #ff99aa;
}

.alert-info {
    background: rgba(0, 210, 255, 0.15);
    border: 2px solid var(--neon-blue);
    color: #a3efff;
}

.badge-medal {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
    color: #211202;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Persistent Footer */
.persistent-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(180deg, #2b1308 0%, #150803 100%);
    border-top: 4px solid var(--chrome-mid);
    box-shadow: 0 -5px 25px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 1000;
}

.footer-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.voter-id-display {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--neon-blue);
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid var(--neon-blue);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

.lang-selector {
    display: flex;
    gap: 0.3rem;
}

.lang-btn {
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    border: 1px solid var(--wood-border);
    background: #180a04;
    color: var(--text-cream);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

.lang-btn.active {
    background: var(--text-gold);
    color: #1a0a05;
    border-color: var(--text-gold);
}

.footer-link {
    color: var(--text-gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #fff;
    text-shadow: 0 0 8px var(--text-gold);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-backdrop.active {
    display: flex;
}

.modal-box {
    background: #291208;
    border: 4px solid var(--wood-border);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    padding: 2rem;
    box-shadow: var(--shadow-deep);
}

/* Responsive */
@media (max-width: 650px) {
    .brand-title {
        font-size: 2.6rem;
    }
    
    .persistent-footer {
        padding: 0 0.8rem;
    }
    
    .voter-id-display {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
}
