/* ========================================
   COURT OF SHADOWS - CSS PREMIUM
   Thème : Intrigue Médiévale de Cour
   ======================================== */

/* Variables CSS */
:root {
    /* Couleurs principales */
    --deep-purple: #1a0a2e;
    --dark-burgundy: #3d0814;
    --royal-blue: #0f1b3d;
    --midnight-black: #0a0612;
    --shadow-grey: #1c1c28;
    
    /* Couleurs d'accent */
    --gold: #d4af37;
    --bright-gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    
    /* Couleurs de faction */
    --conspirator-red: #8b0000;
    --conspirator-dark: #4a0000;
    --loyalist-blue: #1e4d8b;
    --loyalist-light: #4a7bbf;
    
    /* Texte */
    --text-light: #f5f0e8;
    --text-gold: #e9c46a;
    --text-silver: #d4d4d4;
    
    /* Ombres */
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.4);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.6);
    --shadow-hard: 0 15px 50px rgba(0, 0, 0, 0.8);
    --glow-gold: 0 0 20px rgba(212, 175, 55, 0.5);
    --glow-blue: 0 0 20px rgba(30, 77, 139, 0.5);
    --glow-red: 0 0 20px rgba(139, 0, 0, 0.5);
}

/* ========================================
   RESET ET BASE
   ======================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cinzel', 'Georgia', serif;
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    
    /* Background principal - Texture de pierre */
    background: 
        radial-gradient(ellipse at top, rgba(61, 8, 20, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at bottom, rgba(15, 27, 61, 0.4) 0%, transparent 60%),
        linear-gradient(135deg, 
            var(--midnight-black) 0%, 
            var(--deep-purple) 25%,
            var(--dark-burgundy) 50%,
            var(--royal-blue) 75%,
            var(--midnight-black) 100%
        );
    background-size: 100% 100%, 100% 100%, 100% 100%;
    background-attachment: fixed;
}

/* Overlay de texture */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 4px
        );
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
}

/* Particules de poussière dorée animées */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(212, 175, 55, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(212, 175, 55, 0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(212, 175, 55, 0.3), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(212, 175, 55, 0.3), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(212, 175, 55, 0.3), transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: sparkle 20s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.4;
    z-index: 1;
}

@keyframes sparkle {
    0%, 100% { background-position: 0% 0%; opacity: 0.3; }
    50% { background-position: 100% 100%; opacity: 0.6; }
}

/* ========================================
   ÉCRANS ET CONTENEURS
   ======================================== */

.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 10;
}

.screen.active {
    display: block;
    animation: fadeInScreen 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInScreen {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

/* ========================================
   TYPOGRAPHIE
   ======================================== */

.title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    text-align: center;
    background: linear-gradient(135deg, 
        var(--bright-gold) 0%, 
        var(--gold) 50%, 
        var(--bronze) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    position: relative;
    text-shadow: none;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.7));
    animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
    0%, 100% { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.7)); }
    50% { filter: drop-shadow(0 4px 20px rgba(212, 175, 55, 0.6)); }
}

.subtitle {
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--text-gold);
    margin-bottom: 40px;
    font-style: italic;
    font-weight: 300;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* ========================================
   LOGO
   ======================================== */

.logo-container {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.logo-container img {
    max-width: 350px;
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.8));
    animation: logoFloat 6s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.05);
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

/* Halo doré autour du logo */
.logo-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, 
        rgba(212, 175, 55, 0.15) 0%, 
        transparent 70%
    );
    animation: haloGlow 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes haloGlow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* ========================================
   CARTES ET PANNEAUX
   ======================================== */

.form-card,
.game-over-card,
.room-info,
.players-list,
.player-order,
.game-players,
.game-action,
.game-chat {
    background: linear-gradient(135deg,
        rgba(26, 10, 46, 0.95) 0%,
        rgba(28, 28, 40, 0.95) 50%,
        rgba(15, 27, 61, 0.95) 100%
    );
    border-radius: 20px;
    padding: 35px;
    box-shadow: 
        var(--shadow-hard),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 40px rgba(212, 175, 55, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

/* Bordure animée */
.form-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg,
        transparent 40%,
        rgba(212, 175, 55, 0.3) 50%,
        transparent 60%
    );
    background-size: 300% 300%;
    animation: borderShine 6s ease infinite;
    border-radius: 20px;
    z-index: -1;
}

@keyframes borderShine {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ========================================
   PARAMÈTRES DE PARTIE
   ======================================== */

.game-settings {
    background: linear-gradient(135deg,
        rgba(26, 10, 46, 0.95) 0%,
        rgba(28, 28, 40, 0.95) 50%,
        rgba(15, 27, 61, 0.95) 100%
    );
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.game-settings h3 {
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.setting-item {
    margin-bottom: 15px;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 15px;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-switch {
    width: 50px;
    height: 26px;
    background: rgba(100, 100, 100, 0.5);
    border-radius: 13px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
}

.toggle-label input[type="checkbox"]:checked + .toggle-switch {
    background: linear-gradient(135deg, var(--gold) 0%, var(--bronze) 100%);
}

.toggle-label input[type="checkbox"]:checked + .toggle-switch::after {
    left: 26px;
}

.setting-text {
    color: var(--text-light);
    font-size: 1rem;
}

.setting-hint {
    color: #888;
    font-size: 0.85rem;
    margin-top: 8px;
    margin-left: 65px;
    font-style: italic;
}

/* ========================================
   AUTHENTIFICATION
   ======================================== */

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    background: rgba(10, 6, 18, 0.8);
    color: var(--text-gold);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-tab:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.auth-tab.active {
    background: linear-gradient(135deg, var(--gold) 0%, var(--bronze) 100%);
    color: var(--midnight-black);
    border-color: var(--bright-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-error {
    margin-top: 15px;
    padding: 15px;
    border-radius: 10px;
    background: rgba(139, 0, 0, 0.3);
    border: 2px solid rgba(255, 0, 0, 0.5);
    color: #ff6b6b;
    font-weight: 600;
    text-align: center;
    display: none;
}

.auth-error.visible {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Info utilisateur connecté */
.user-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(10, 6, 18, 0.8);
    border-radius: 15px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.user-info span {
    color: var(--text-gold);
    font-size: 1.1rem;
}

.user-info strong {
    color: var(--bright-gold);
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========================================
   INPUTS
   ======================================== */

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 18px 24px;
    margin-bottom: 20px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 15px;
    background: rgba(10, 6, 18, 0.9);
    color: var(--text-light);
    font-size: 1.1rem;
    font-family: 'Cinzel', serif;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--bright-gold);
    background: rgba(10, 6, 18, 1);
    box-shadow:
        inset 0 2px 10px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: rgba(245, 240, 232, 0.4);
    font-style: italic;
}

/* ========================================
   BOUTONS
   ======================================== */

.btn {
    padding: 18px 40px;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-bottom: 15px;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-medium);
}

/* Effet de brillance au survol */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

.btn:active {
    transform: scale(0.98);
}

/* Bouton primaire (Or) */
.btn-primary {
    background: linear-gradient(135deg, 
        var(--bright-gold) 0%, 
        var(--gold) 50%,
        var(--bronze) 100%
    );
    color: var(--midnight-black);
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 15px 40px rgba(212, 175, 55, 0.6),
        0 0 50px rgba(255, 215, 0, 0.4);
}

/* Bouton secondaire */
.btn-secondary {
    background: rgba(28, 28, 40, 0.9);
    color: var(--gold);
    border: 2px solid var(--gold);
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--bright-gold);
    transform: translateY(-3px);
    box-shadow: 
        var(--shadow-hard),
        var(--glow-gold);
}

/* Bouton danger */
.btn-danger {
    background: linear-gradient(135deg,
        #c41e3a 0%,
        var(--conspirator-red) 50%,
        var(--conspirator-dark) 100%
    );
    color: var(--text-light);
}

.btn-danger:hover {
    transform: translateY(-4px);
    box-shadow:
        0 15px 40px rgba(139, 0, 0, 0.6),
        var(--glow-red);
}

/* Bouton warning (reconnexion) */
.btn-warning {
    background: linear-gradient(135deg,
        #f39c12 0%,
        #e67e22 50%,
        #d35400 100%
    );
    color: var(--midnight-black);
    font-weight: 700;
}

.btn-warning:hover {
    transform: translateY(-4px);
    box-shadow:
        0 15px 40px rgba(243, 156, 18, 0.6),
        0 0 20px rgba(243, 156, 18, 0.5);
}

/* ========================================
   FORMULAIRE DE REJOINDRE UNE PARTIE
   ======================================== */

.join-game-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 0.9rem;
    color: var(--text-gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-left: 5px;
}

.input-with-icon {
    position: relative;
}

/* Style pour le code de partie (plus visible) */
#room-code {
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 3px;
    text-align: center;
    text-transform: uppercase;
    background: linear-gradient(135deg,
    rgba(212, 175, 55, 0.1) 0%,
    rgba(10, 6, 18, 0.9) 100%
    );
    border: 3px solid rgba(212, 175, 55, 0.4);
}

#room-code:focus {
    border-color: var(--bright-gold);
    box-shadow:
            inset 0 2px 10px rgba(0, 0, 0, 0.5),
            0 0 40px rgba(212, 175, 55, 0.6);
    letter-spacing: 5px;
}

#room-code::placeholder {
    font-size: 1rem;
    letter-spacing: 2px;
}

/* Mot de passe plus discret */
#join-password {
    font-size: 1.1rem;
}

/* Alternative: Layout horizontal pour desktop */
@media (min-width: 768px) {
    .join-game-form-horizontal {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        align-items: end;
    }

    .join-game-form-horizontal .input-group {
        margin-bottom: 0;
    }

    .join-game-form-horizontal button {
        grid-column: 1 / -1;
    }
}

/* ========================================
   SÉLECTEUR DE TYPE DE PARTIE
   ======================================== */

.create-game-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-type-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.game-type-btn {
    flex: 1;
    padding: 15px 25px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    background: rgba(10, 6, 18, 0.8);
    color: var(--text-gold);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.game-type-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.game-type-btn:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.game-type-btn:hover::before {
    width: 400px;
    height: 400px;
}

.game-type-btn.active {
    background: linear-gradient(135deg, var(--gold) 0%, var(--bronze) 100%);
    color: var(--midnight-black);
    border-color: var(--bright-gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
    font-weight: 900;
}

.game-type-btn.active::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.2rem;
    color: var(--midnight-black);
}

/* Champ mot de passe pour partie privée */
#private-password-field {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#private-password-field input {
    width: 100%;
    margin-bottom: 0;
}

/* ========================================
   PLATEAUX DE PROGRESSION - CSS PUR
   ======================================== */

.progression-boards-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 40px 0;
}

.progression-board {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 320px;
    box-shadow: 
        var(--shadow-hard),
        0 0 60px rgba(0, 0, 0, 0.8);
    border: 3px solid rgba(212, 175, 55, 0.4);
    transition: transform 0.3s ease;
}

.progression-board:hover {
    transform: translateY(-5px);
}

/* Plateau des Complots - CSS PUR */
.progression-board.conspirators {
    background: 
        linear-gradient(135deg,
            rgba(139, 0, 0, 0.2) 0%,
            rgba(74, 0, 0, 0.4) 50%,
            rgba(26, 10, 46, 0.6) 100%
        ),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(0, 0, 0, 0.1) 10px,
            rgba(0, 0, 0, 0.1) 20px
        );
    border-color: rgba(139, 0, 0, 0.6);
    box-shadow: 
        var(--shadow-hard),
        0 0 60px rgba(139, 0, 0, 0.4),
        inset 0 0 100px rgba(139, 0, 0, 0.1);
}

/* Motif de chaînes pour Complots */
.progression-board.conspirators::before {
    content: '🗡️ COMPLOTS 🗡️';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: 900;
    color: rgba(255, 0, 0, 0.8);
    text-shadow: 
        0 0 10px rgba(255, 0, 0, 0.8),
        0 4px 10px rgba(0, 0, 0, 0.9);
    letter-spacing: 3px;
    z-index: 1;
}

/* Plateau des Édits - CSS PUR */
.progression-board.loyalists {
    background: 
        linear-gradient(135deg,
            rgba(30, 77, 139, 0.2) 0%,
            rgba(15, 39, 79, 0.4) 50%,
            rgba(26, 10, 46, 0.6) 100%
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 10px,
            rgba(74, 155, 255, 0.05) 10px,
            rgba(74, 155, 255, 0.05) 20px
        );
    border-color: rgba(30, 77, 139, 0.6);
    box-shadow: 
        var(--shadow-hard),
        0 0 60px rgba(30, 77, 139, 0.4),
        inset 0 0 100px rgba(30, 77, 139, 0.1);
}

/* Titre pour Édits */
.progression-board.loyalists::before {
    content: '⚜️ ÉDITS ROYAUX ⚜️';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    font-weight: 900;
    color: rgba(74, 155, 255, 0.9);
    text-shadow: 
        0 0 10px rgba(74, 155, 255, 0.8),
        0 4px 10px rgba(0, 0, 0, 0.9);
    letter-spacing: 3px;
    z-index: 1;
}

/* Overlay subtil */
.board-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    pointer-events: none;
}

/* Marqueurs de progression */
.progress-markers {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 80px 25px 40px;
    position: relative;
    z-index: 2;
}

.progress-markers.edits {
    padding: 90px 40px 40px;
}

.progress-marker {
    width: 90px;
    height: 120px;
    border-radius: 12px;
    background: rgba(10, 6, 18, 0.95);
    border: 3px solid rgba(212, 175, 55, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow:
        var(--shadow-medium),
        inset 0 2px 10px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.progress-marker .marker-card {
    width: 60px;
    height: 85px;
    object-fit: cover;
    border-radius: 6px;
    opacity: 0.3;
    filter: grayscale(100%);
    transition: all 0.5s ease;
}

.progress-marker .power-icon {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    white-space: nowrap;
}

/* Marqueur actif - Conspirateurs */
.progress-marker.active.conspirators-marker {
    background: linear-gradient(135deg,
        var(--conspirator-red) 0%,
        #a80000 50%,
        var(--conspirator-dark) 100%
    );
    border-color: #ff0000;
    border-width: 4px;
    box-shadow:
        0 0 40px rgba(139, 0, 0, 1),
        0 0 80px rgba(255, 0, 0, 0.6),
        inset 0 2px 20px rgba(255, 0, 0, 0.3);
    transform: scale(1.15);
    animation: pulseRed 2s ease-in-out infinite;
}

.progress-marker.active.conspirators-marker .marker-card {
    opacity: 1;
    filter: grayscale(0%) drop-shadow(0 0 10px rgba(255, 0, 0, 0.8));
}

@keyframes pulseRed {
    0%, 100% { 
        box-shadow: 
            0 0 40px rgba(139, 0, 0, 1),
            0 0 80px rgba(255, 0, 0, 0.6);
    }
    50% { 
        box-shadow: 
            0 0 60px rgba(139, 0, 0, 1),
            0 0 120px rgba(255, 0, 0, 0.8);
    }
}

/* Marqueur actif - Loyalistes */
.progress-marker.active.loyalists-marker {
    background: linear-gradient(135deg,
        var(--loyalist-blue) 0%,
        #3d6db5 50%,
        #1a3d6e 100%
    );
    border-color: #4a9eff;
    border-width: 4px;
    box-shadow:
        0 0 40px rgba(30, 77, 139, 1),
        0 0 80px rgba(74, 155, 255, 0.6),
        inset 0 2px 20px rgba(74, 155, 255, 0.3);
    transform: scale(1.15);
    animation: pulseBlue 2s ease-in-out infinite;
}

.progress-marker.active.loyalists-marker .marker-card {
    opacity: 1;
    filter: grayscale(0%) drop-shadow(0 0 10px rgba(74, 155, 255, 0.8));
}

@keyframes pulseBlue {
    0%, 100% { 
        box-shadow: 
            0 0 40px rgba(30, 77, 139, 1),
            0 0 80px rgba(74, 155, 255, 0.6);
    }
    50% { 
        box-shadow: 
            0 0 60px rgba(30, 77, 139, 1),
            0 0 120px rgba(74, 155, 255, 0.8);
    }
}

/* Effet de ripple */
.progress-marker.active::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid currentColor;
    animation: ripple 2s ease-out infinite;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* ========================================
   ORDRE DES JOUEURS
   ======================================== */

.player-order {
    margin: 30px 0;
}

.player-order h3 {
    color: var(--gold);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.players-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.player-token {
    position: relative;
    padding: 15px 30px;
    background: rgba(28, 28, 40, 0.9);
    border-radius: 15px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    text-align: center;
    font-weight: 600;
    box-shadow: var(--shadow-medium);
}

/* Roi actuel */
.player-token.current-king {
    background: linear-gradient(135deg,
        var(--bright-gold) 0%,
        var(--gold) 100%
    );
    border-color: #fff;
    color: var(--midnight-black);
    font-weight: 900;
    transform: scale(1.2);
    box-shadow: 
        0 0 40px rgba(255, 215, 0, 0.8),
        var(--shadow-hard);
    animation: crownGlow 2s ease-in-out infinite;
}

@keyframes crownGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.8), var(--shadow-hard); }
    50% { box-shadow: 0 0 60px rgba(255, 215, 0, 1), var(--shadow-hard); }
}

/* Couronne du roi */
.player-token.current-king::before {
    content: '👑';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.8));
    animation: crownFloat 3s ease-in-out infinite;
}

@keyframes crownFloat {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* Chancelier */
.player-token.current-chancellor {
    border-color: #2a9d8f;
    background: rgba(42, 157, 143, 0.25);
    box-shadow: 
        var(--shadow-medium),
        0 0 30px rgba(42, 157, 143, 0.4);
}

/* Joueur éliminé */
.player-token.eliminated {
    opacity: 0.3;
    filter: grayscale(100%);
    transform: scale(0.9);
}

/* ========================================
   EN-TÊTE DU JEU
   ======================================== */

.game-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 30px;
}

.score-board {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

/* Pioche et Défausse */
.deck-info {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.deck-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(10, 6, 18, 0.9);
    border-radius: 12px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    min-width: 80px;
}

.deck-item .deck-card-img {
    width: 40px;
    height: 55px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.deck-item .discard-placeholder {
    width: 40px;
    height: 55px;
    border-radius: 4px;
    background: rgba(50, 50, 50, 0.5);
    border: 2px dashed rgba(212, 175, 55, 0.3);
}

.deck-item .deck-count {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--bright-gold);
}

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

.scores-container {
    display: flex;
    gap: 15px;
}

.score-item {
    padding: 20px 25px;
    border-radius: 15px;
    text-align: center;
    min-width: 150px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.score-item:hover {
    transform: translateY(-5px);
}

/* Loyalistes */
.score-item.loyalists {
    background: linear-gradient(135deg,
        var(--loyalist-blue) 0%,
        #2d5a9a 100%
    );
    border: 2px solid rgba(74, 155, 255, 0.5);
    box-shadow: 
        var(--shadow-medium),
        0 0 30px rgba(30, 77, 139, 0.4);
}

/* Conspirateurs */
.score-item.conspirators {
    background: linear-gradient(135deg,
        var(--conspirator-red) 0%,
        #a00000 100%
    );
    border: 2px solid rgba(255, 0, 0, 0.5);
    box-shadow: 
        var(--shadow-medium),
        0 0 30px rgba(139, 0, 0, 0.4);
}

.score-item .label {
    display: block;
    font-size: 1rem;
    opacity: 0.95;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.score-item .count {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, var(--bright-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

/* Indicateur de phase */
.phase-indicator {
    background: rgba(10, 6, 18, 0.95);
    padding: 20px 50px;
    border-radius: 15px;
    text-align: center;
    font-weight: 900;
    background: linear-gradient(135deg, 
        var(--bright-gold) 0%, 
        var(--gold) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.3rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    border: 2px solid rgba(212, 175, 55, 0.4);
    box-shadow: 
        var(--shadow-medium),
        inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Zone droite du header */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* Affichage du pseudo du joueur */
.player-info-display {
    background: linear-gradient(135deg, var(--gold) 0%, var(--bronze) 100%);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.player-info-display .player-name-label {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--midnight-black);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Affichage du rôle */
.player-role-display {
    background: rgba(10, 6, 18, 0.95);
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-medium);
}

.player-role-display .role-label {
    font-size: 0.9rem;
    color: var(--text-gold);
    font-weight: 600;
}

.player-role-display .role-value {
    font-size: 1.1rem;
    font-weight: 900;
    padding: 5px 15px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.player-role-display.loyalist .role-value {
    background: linear-gradient(135deg, var(--loyalist-blue) 0%, #2d5a9a 100%);
    color: white;
    border: 2px solid rgba(74, 155, 255, 0.5);
    box-shadow: 0 0 15px rgba(30, 77, 139, 0.5);
}

.player-role-display.conspirator .role-value,
.player-role-display.usurper .role-value {
    background: linear-gradient(135deg, var(--conspirator-red) 0%, #a00000 100%);
    color: white;
    border: 2px solid rgba(255, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(139, 0, 0, 0.5);
}

/* Compteur d'impasse */
.deadlock-counter {
    text-align: right;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 700;
    background: rgba(10, 6, 18, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

/* ========================================
   ZONE DE JEU PRINCIPALE
   ======================================== */

.game-main {
    display: grid;
    grid-template-columns: 336px 1fr 350px;
    gap: 25px;
    min-height: 600px;
}

.game-players {
    background: linear-gradient(135deg,
        rgba(26, 10, 46, 0.95) 0%,
        rgba(28, 28, 40, 0.95) 100%
    );
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--shadow-hard);
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.game-players h3,
.game-chat h3 {
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

#game-players-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.game-player-item {
    background: rgba(10, 6, 18, 0.8);
    padding: 15px;
    border-radius: 12px;
    border: 2px solid rgba(212, 175, 55, 0.2);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
}

.game-player-item:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateX(5px);
}

.game-player-item .player-order-number {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--bronze) 100%);
    color: var(--midnight-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.game-player-item.eliminated .player-order-number {
    background: linear-gradient(135deg, #666 0%, #444 100%);
    color: #999;
}

.game-player-item .player-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-light);
    flex: 1;
}

.game-player-item .player-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 5px;
    margin-top: 5px;
}

.game-player-item.current-king {
    border-color: var(--bright-gold);
    background: linear-gradient(135deg,
        rgba(212, 175, 55, 0.2) 0%,
        rgba(10, 6, 18, 0.8) 100%
    );
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.game-player-item.current-king .player-name {
    color: var(--bright-gold);
}

.game-player-item.current-chancellor {
    border-color: #2a9d8f;
    background: linear-gradient(135deg,
        rgba(42, 157, 143, 0.2) 0%,
        rgba(10, 6, 18, 0.8) 100%
    );
}

.game-player-item.eliminated {
    position: relative;
    opacity: 0.7;
    background: linear-gradient(135deg,
        rgba(80, 20, 20, 0.4) 0%,
        rgba(60, 10, 10, 0.3) 50%,
        rgba(10, 6, 18, 0.8) 100%
    ) !important;
    border-color: #8b0000 !important;
}

.game-player-item.eliminated .player-name {
    text-decoration: line-through;
    color: #c44 !important;
}

.game-player-item.eliminated::after {
    content: '💀';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 1.2rem;
}

/* Couleurs d'arrière-plan selon le rôle connu */
.game-player-item.role-loyalist {
    background: linear-gradient(135deg,
        rgba(30, 77, 139, 0.4) 0%,
        rgba(74, 123, 191, 0.2) 50%,
        rgba(10, 6, 18, 0.8) 100%
    );
    border-color: var(--loyalist-blue);
}

.game-player-item.role-conspirator {
    background: linear-gradient(135deg,
        rgba(180, 60, 60, 0.4) 0%,
        rgba(200, 80, 80, 0.2) 50%,
        rgba(10, 6, 18, 0.8) 100%
    );
    border-color: #c44;
}

.game-player-item.role-usurper {
    background: linear-gradient(135deg,
        rgba(139, 0, 0, 0.5) 0%,
        rgba(100, 0, 0, 0.3) 50%,
        rgba(10, 6, 18, 0.8) 100%
    );
    border-color: var(--conspirator-red);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.4);
}

/* Indicateur de rôle connu */
.known-role {
    display: block;
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 3px;
    font-style: italic;
}

.game-player-item.role-loyalist .known-role {
    color: var(--loyalist-light);
}

.game-player-item.role-conspirator .known-role {
    color: #e88;
}

.game-player-item.role-usurper .known-role {
    color: #ff6666;
    font-weight: 600;
}

/* Affichage du vote sous le pseudo */
.player-vote {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-left: 10px;
    animation: voteAppear 0.5s ease-out;
}

.player-vote.vote-yes {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.5);
}

.player-vote.vote-no {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
}

@keyframes voteAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Statut de vote en cours */
.vote-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.vote-status.voted {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.4);
}

.vote-status.thinking {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.4);
}

/* Spinner de chargement */
.loading-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(241, 196, 15, 0.3);
    border-top-color: #f1c40f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Sélection de joueur */
.player-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.selectable-player {
    background: rgba(28, 28, 40, 0.9);
    padding: 25px 15px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid rgba(212, 175, 55, 0.2);
    box-shadow: var(--shadow-medium);
}

.selectable-player:hover {
    background: rgba(15, 52, 96, 0.9);
    border-color: var(--gold);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        var(--shadow-hard),
        0 0 30px rgba(212, 175, 55, 0.4);
}

.selectable-player.selected {
    border-color: var(--bright-gold);
    background: linear-gradient(135deg,
        var(--gold) 0%,
        var(--bronze) 100%
    );
    color: var(--midnight-black);
    transform: translateY(-8px) scale(1.1);
    box-shadow: 
        0 15px 50px rgba(255, 215, 0, 0.6),
        0 0 60px rgba(255, 215, 0, 0.8);
}

.selectable-player .player-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.selectable-player .player-name-selector {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Action content */
.action-content {
    background: rgba(10, 6, 18, 0.6);
    padding: 35px;
    border-radius: 15px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.action-title {
    text-align: center;
    background: linear-gradient(135deg, 
        var(--bright-gold) 0%, 
        var(--gold) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2rem;
    margin-bottom: 25px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ========================================
   VOTE
   ======================================== */

.vote-buttons {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin: 50px 0;
}

.vote-btn {
    padding: 40px 60px;
    font-size: 1.8rem;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 900;
    min-width: 250px;
    box-shadow: var(--shadow-hard);
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    overflow: hidden;
}

.vote-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.vote-btn:hover::before {
    width: 500px;
    height: 500px;
}

.vote-btn.yes {
    background: linear-gradient(135deg,
        #2a9d8f 0%,
        #1e7a6f 100%
    );
    color: white;
    border: 4px solid #3dbaa9;
}

.vote-btn.yes:hover {
    background: linear-gradient(135deg,
        #3dbaa9 0%,
        #2a9d8f 100%
    );
    transform: translateY(-8px) scale(1.08);
    box-shadow: 
        0 20px 60px rgba(42, 157, 143, 0.8),
        0 0 80px rgba(42, 157, 143, 0.6);
}

.vote-btn.yes:active {
    transform: translateY(-4px) scale(1.05);
}

.vote-btn.no {
    background: linear-gradient(135deg,
        #e63946 0%,
        #c41e3a 100%
    );
    color: white;
    border: 4px solid #ff4d5a;
}

.vote-btn.no:hover {
    background: linear-gradient(135deg,
        #ff4d5a 0%,
        #e63946 100%
    );
    transform: translateY(-8px) scale(1.08);
    box-shadow: 
        0 20px 60px rgba(230, 57, 70, 0.8),
        0 0 80px rgba(230, 57, 70, 0.6);
}

.vote-btn.no:active {
    transform: translateY(-4px) scale(1.05);
}

/* ========================================
   CARTES DE DÉCRETS
   ======================================== */

.decree-cards {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin: 40px 0;
    flex-wrap: wrap;
}

.decree-card {
    width: 200px;
    height: 300px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: var(--shadow-hard);
    border: 4px solid rgba(212, 175, 55, 0.3);
}

.decree-card-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    padding: 20px;
}

/* Carte Complot */
.decree-card.plot .decree-card-inner {
    background: linear-gradient(135deg,
        rgba(139, 0, 0, 0.9) 0%,
        rgba(74, 0, 0, 0.95) 100%
    );
    border: 2px solid rgba(255, 0, 0, 0.5);
}

.decree-card.plot {
    border-color: rgba(139, 0, 0, 0.6);
}

/* Carte Édit */
.decree-card.edit .decree-card-inner {
    background: linear-gradient(135deg,
        rgba(30, 77, 139, 0.9) 0%,
        rgba(15, 39, 79, 0.95) 100%
    );
    border: 2px solid rgba(74, 155, 255, 0.5);
}

.decree-card.edit {
    border-color: rgba(30, 77, 139, 0.6);
}

.decree-card .card-icon {
    font-size: 6rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.8));
    animation: cardIconFloat 3s ease-in-out infinite;
}

@keyframes cardIconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.decree-card .card-label {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-light);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
}

/* Hover */
.decree-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 
        var(--shadow-hard),
        0 20px 60px rgba(0, 0, 0, 0.8);
}

.decree-card.plot:hover {
    border-color: #ff0000;
    box-shadow: 
        var(--shadow-hard),
        0 0 50px rgba(255, 0, 0, 0.6);
}

.decree-card.edit:hover {
    border-color: #4a9eff;
    box-shadow: 
        var(--shadow-hard),
        0 0 50px rgba(74, 155, 255, 0.6);
}

/* Selected */
.decree-card.selected {
    transform: translateY(-20px) scale(1.15);
    border-width: 6px;
}

.decree-card.plot.selected {
    border-color: #ff0000;
    box-shadow: 
        0 25px 80px rgba(255, 0, 0, 0.8),
        0 0 80px rgba(255, 0, 0, 0.8),
        inset 0 0 30px rgba(255, 0, 0, 0.3);
    animation: selectedGlowRed 1.5s ease-in-out infinite;
}

.decree-card.edit.selected {
    border-color: #4a9eff;
    box-shadow: 
        0 25px 80px rgba(74, 155, 255, 0.8),
        0 0 80px rgba(74, 155, 255, 0.8),
        inset 0 0 30px rgba(74, 155, 255, 0.3);
    animation: selectedGlowBlue 1.5s ease-in-out infinite;
}

@keyframes selectedGlowRed {
    0%, 100% {
        box-shadow: 
            0 25px 80px rgba(255, 0, 0, 0.8),
            0 0 80px rgba(255, 0, 0, 0.8);
    }
    50% {
        box-shadow: 
            0 25px 80px rgba(255, 0, 0, 1),
            0 0 100px rgba(255, 0, 0, 1);
    }
}

@keyframes selectedGlowBlue {
    0%, 100% {
        box-shadow: 
            0 25px 80px rgba(74, 155, 255, 0.8),
            0 0 80px rgba(74, 155, 255, 0.8);
    }
    50% {
        box-shadow: 
            0 25px 80px rgba(74, 155, 255, 1),
            0 0 100px rgba(74, 155, 255, 1);
    }
}

/* ========================================
   CHAT
   ======================================== */

#chat-messages {
    flex: 1;
    background: rgba(10, 6, 18, 0.8);
    border-radius: 15px;
    padding: 20px;
    height: 500px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: inset 0 2px 15px rgba(0, 0, 0, 0.6);
}

.chat-message {
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(28, 28, 40, 0.7);
    border-radius: 12px;
    border-left: 4px solid var(--gold);
    animation: slideInMessage 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-soft);
}

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chat-message .chat-author {
    color: var(--gold);
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chat-message .chat-text {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Partage des cartes */
#share-cards-container {
    margin-bottom: 12px;
}

.share-cards-section {
    background: rgba(10, 6, 18, 0.8);
    border-radius: 10px;
    padding: 12px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.share-cards-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-gold);
    margin-bottom: 10px;
    font-weight: 600;
}

.share-cards-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-card-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(28, 28, 40, 0.9) 0%, rgba(15, 27, 61, 0.9) 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}

.share-card-btn:hover {
    background: linear-gradient(135deg, var(--gold) 0%, var(--bronze) 100%);
    color: var(--midnight-black);
    border-color: var(--bright-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.chat-input {
    display: flex;
    gap: 12px;
}

.chat-input input {
    flex: 1;
    margin-bottom: 0;
}

.chat-input button {
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--bronze) 100%);
    color: var(--midnight-black);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 900;
    font-family: 'Cinzel', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
}

.chat-input button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 10px 25px rgba(212, 175, 55, 0.5),
        var(--glow-gold);
}

/* ========================================
   SCROLLBAR PERSONNALISÉE
   ======================================== */

::-webkit-scrollbar {
    width: 14px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 6, 18, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg,
        var(--bright-gold) 0%,
        var(--gold) 50%,
        var(--bronze) 100%
    );
    border-radius: 10px;
    border: 2px solid rgba(10, 6, 18, 0.6);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg,
        #ffd700 0%,
        var(--bright-gold) 100%
    );
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
    .game-main {
        grid-template-columns: 1fr;
    }
    
    .progression-boards-container {
        grid-template-columns: 1fr;
    }
    
    .game-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .title {
        font-size: 2rem;
    }
    
    .players-row {
        flex-direction: column;
        align-items: center;
    }
    
    .progress-marker {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* ========================================
   ANIMATIONS GLOBALES
   ======================================== */

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.shimmer {
    animation: shimmer 3s linear infinite;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(212, 175, 55, 0.3) 50%,
        transparent 100%
    );
    background-size: 1000px 100%;
}

/* ========================================
   UTILITAIRES
   ======================================== */

.divider {
    text-align: center;
    margin: 25px 0;
    color: var(--text-gold);
    font-style: italic;
    opacity: 0.7;
    font-size: 1.1rem;
}

.btn-icon {
    background: rgba(28, 28, 40, 0.9);
    color: var(--gold);
    border: 2px solid var(--gold);
    padding: 12px 18px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
}

.btn-icon:hover {
    background: rgba(212, 175, 55, 0.2);
    transform: scale(1.1);
    box-shadow: var(--glow-gold);
}

/* ========================================
   EFFETS SPÉCIAUX
   ======================================== */

.glowing {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    }
    50% {
        box-shadow: 0 0 50px rgba(212, 175, 55, 0.8);
    }
}

/* ========================================
   JOUEURS ÉLIMINÉS
   ======================================== */

.game-player-item.eliminated {
    opacity: 0.6;
    filter: none;
    background: linear-gradient(135deg,
        rgba(80, 20, 20, 0.4) 0%,
        rgba(60, 10, 10, 0.3) 50%,
        rgba(10, 6, 18, 0.8) 100%
    );
    border-color: #8b0000;
}

.game-player-item.eliminated .player-name {
    text-decoration: line-through;
    color: #c44;
}

.game-player-item.eliminated::after {
    content: '💀';
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 1.2rem;
}

/* ========================================
   ÉCRAN DE FIN DE PARTIE
   ======================================== */

.final-roles-container {
    margin: 30px 0;
}

.final-roles-container h3 {
    color: var(--gold);
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.final-roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.final-role-card {
    padding: 20px 15px;
    border-radius: 15px;
    text-align: center;
    border: 3px solid;
    transition: transform 0.3s ease;
}

.final-role-card:hover {
    transform: scale(1.05);
}

.final-role-card.loyalists {
    background: linear-gradient(135deg,
        rgba(30, 77, 139, 0.6) 0%,
        rgba(74, 123, 191, 0.3) 100%
    );
    border-color: var(--loyalist-blue);
}

.final-role-card.conspirators {
    background: linear-gradient(135deg,
        rgba(139, 0, 0, 0.6) 0%,
        rgba(180, 60, 60, 0.3) 100%
    );
    border-color: var(--conspirator-red);
}

.final-role-card.dead {
    opacity: 0.6;
}

.final-role-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-light);
}

.final-role-card.dead .final-role-name {
    text-decoration: line-through;
    color: #999;
}

.final-role-type {
    font-size: 0.95rem;
    color: var(--gold);
}

.final-role-dead {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #c44;
}

/* Ajouts pour le lobby amélioré */

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-warning {
    background: linear-gradient(135deg, #ff9500 0%, #ff6b00 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff6b00 0%, #ff4500 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 149, 0, 0.4);
}

/* Animation de chargement */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Badges de statut */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 8px;
}

.status-badge.public {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.status-badge.private {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.status-badge.in-progress {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

.status-badge.paused {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

/* Amélioration des cartes de formulaire */
.form-card h2 {
    color: var(--gold);
    font-family: 'Cinzel', serif;
}

/* Responsive */
@media (max-width: 768px) {
    .game-item {
        flex-direction: column;
        gap: 15px;
    }

    .game-actions {
        width: 100%;
    }

    .game-actions .btn {
        width: 100%;
    }

    .game-type-selector {
        flex-direction: column;
    }

    .game-details {
        flex-direction: column;
        gap: 8px;
    }
}

/* Message vide stylisé */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.empty-state-hint {
    font-size: 0.9rem;
    color: #666;
}

/* Effets de hover améliorés */
.game-item {
    position: relative;
    overflow: hidden;
}

.game-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

.game-item:hover::before {
    left: 100%;
}

/* Indicateur d'activité récente */
.activity-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.activity-indicator.active {
    background: #4caf50;
    box-shadow: 0 0 10px #4caf50;
    animation: pulse-green 2s ease-in-out infinite;
}

.activity-indicator.inactive {
    background: #666;
}

@keyframes pulse-green {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}


