:root {
    --bg-dark: #0d0e15; --bg-mid: #1a1c29; --bg-light: #2a2d42;
    --panel: rgba(30, 32, 45, 0.85); --accent: #e67e22; 
    --safe: #95a5a6; --defuse: #27ae60; --bomb: #c0392b; --text: #ecf0f1;
}

body {
    margin: 0; 
    font-family: 'Poppins', sans-serif; /* Nouvelle police moderne */
    /* Nouveau background image */
    background: url('assets/background.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text); overflow-x: hidden;
}

/* Application de la nouvelle police aux titres */
h1, h2, h3 { font-family: 'Poppins', sans-serif; font-weight: 800; margin: 0 0 15px 0; }
h1 { font-size: 2.5rem; text-shadow: 2px 2px 10px rgba(0,0,0,0.8); }

.screen { display: none; padding: 30px 20px; min-height: 100vh; box-sizing: border-box; }
.screen.active { display: flex; flex-direction: column; align-items: center; }

/* OVERLAYS */
.overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(10, 10, 15, 0.95); backdrop-filter: blur(5px); z-index: 100;
    flex-direction: column; justify-content: center; align-items: center; text-align: center;
}
.overlay.active { display: flex; }
.overlay h1 { font-size: 4rem; letter-spacing: 2px; color: var(--text); }
.overlay h2 { font-size: 2.5rem; color: var(--accent); }
#reveal-text { color: white; margin-bottom: 25px; font-size: 2.5rem; text-shadow: 0 0 15px var(--accent); }

.danger-text { color: var(--bomb) !important; text-shadow: 0 0 20px var(--bomb); animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

/* UI DE BASE */
/* J'ai augmenté un peu la taille du logo au cas où ton nouveau logo soit plus détaillé */
.logo { width: 180px; margin-bottom: 20px; filter: drop-shadow(0px 0px 15px rgba(230, 126, 34, 0.4)); }
.card-panel { 
    background: var(--panel); backdrop-filter: blur(10px); padding: 40px; 
    border-radius: 15px; border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 40px rgba(0,0,0,0.8); width: 320px; display: flex; flex-direction: column; gap: 15px; 
}

input { padding: 14px; border-radius: 8px; border: 1px solid #444; background: rgba(0,0,0,0.5); color: white; text-align: center; font-size: 1rem; font-family: 'Poppins', sans-serif; font-weight: 600; transition: 0.3s; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 10px rgba(230, 126, 34, 0.3); }

button { padding: 14px; border-radius: 8px; border: none; background: var(--accent); color: white; font-weight: 800; cursor: pointer; transition: all 0.2s ease; font-size: 1.1rem; font-family: 'Poppins', sans-serif; box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3); letter-spacing: 1px; }
button:hover:not(:disabled) { background: #d35400; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(230, 126, 34, 0.5); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { background: #555; color: #888; cursor: not-allowed; box-shadow: none; }

.btn-secondary { background: #34495e; box-shadow: 0 4px 15px rgba(52, 73, 94, 0.3); }
.btn-secondary:hover:not(:disabled) { background: #2c3e50; box-shadow: 0 6px 20px rgba(52, 73, 94, 0.5); }

.divider { margin: 10px 0; color: #7f8c8d; font-size: 0.9rem; }
#error-msg { color: #e74c3c; margin-top: 15px; font-weight: bold; }

/* BOUTONS SALONS */
.room-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.room-buttons button { background: #2c3e50; box-shadow: 0 4px 15px rgba(44, 62, 80, 0.4); }
.room-buttons button:hover { background: var(--accent); box-shadow: 0 6px 20px rgba(230, 126, 34, 0.5); }

/* LOBBY */
.room-id-box { background: rgba(0,0,0,0.6); padding: 15px; border-radius: 8px; margin: 15px 0; color: var(--accent); font-size: 1.5rem; letter-spacing: 3px; border: 1px solid rgba(230,126,34,0.3); font-weight: 800; }
.player-list-container { background: rgba(0,0,0,0.3); padding: 15px; border-radius: 8px; margin-bottom: 25px; min-height: 100px; width: 100%; box-sizing: border-box; }
.player-list { display: flex; flex-direction: column; gap: 8px; font-size: 1.1rem; }
.player-tag { background: rgba(255,255,255,0.1); padding: 8px 12px; border-radius: 5px; display: inline-block; font-weight: 600; }

/* JEU */
.header-game { display: flex; justify-content: space-around; width: 100%; max-width: 950px; background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.1); padding: 20px; border-radius: 15px; margin-bottom: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.6); backdrop-filter: blur(10px); }
#my-info { display: flex; align-items: center; gap: 25px; }
#my-role-img { width: 75px; border-radius: 8px; border: 2px solid #f1c40f; box-shadow: 0 0 15px rgba(241, 196, 15, 0.3); }
#my-role-name { font-weight: 800; font-size: 1.1rem; margin-top: 5px; color: #f1c40f; }
#summary-icons { display: flex; gap: 12px; font-weight: 600; background: rgba(0,0,0,0.4); padding: 8px 15px; border-radius: 8px; margin-top: 8px; border: 1px solid rgba(255,255,255,0.05); }
#summary-icons span { display: flex; align-items: center; gap: 6px; font-size: 1.1rem; }
.summary-img { width: 22px; }

.stat-box { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; background: rgba(0,0,0,0.4); padding: 8px 15px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.05); }
#turn-banner { font-size: 1.6rem; font-weight: 800; margin: 15px 0; color: var(--accent); min-height: 1.6em; text-shadow: 0 0 10px rgba(230,126,34,0.5); }

.board { display: flex; flex-wrap: wrap; gap: 25px; justify-content: center; width: 100%; padding-bottom: 50px; }
.player-area { background: rgba(30, 32, 45, 0.7); backdrop-filter: blur(5px); padding: 20px; border-radius: 12px; width: 250px; border: 2px solid transparent; transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.5); }
.player-area.active-turn { border-color: var(--accent); background: rgba(44, 62, 80, 0.9); box-shadow: 0 0 20px rgba(230, 126, 34, 0.3); }
.player-area strong { display: block; font-size: 1.2rem; margin-bottom: 10px; font-weight: 800; }

.cards-container { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 15px; perspective: 1000px; }
.card { width: 60px; height: 90px; border-radius: 6px; cursor: pointer; background-size: cover; background-position: center; border: 1px solid #111; box-shadow: 2px 2px 5px rgba(0,0,0,0.5); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-5px); box-shadow: 2px 7px 10px rgba(0,0,0,0.6); }

.card.hidden { background-image: url('assets/carte_cachee.png'); }
.card.revealed { cursor: default; }
.card.revealed:hover { transform: none; box-shadow: 2px 2px 5px rgba(0,0,0,0.5); }

.anim-flip { animation: flipIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes flipIn { 0% { transform: rotateY(90deg) scale(1.1); opacity: 0; } 100% { transform: rotateY(0deg) scale(1); opacity: 1; } }

.big-card { width: 200px; height: 300px; box-shadow: 0 0 40px rgba(255, 255, 255, 0.4); border-radius: 15px; animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes popIn { 0% { transform: scale(0.3); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }