﻿/* ========================================================
   VARIABLES ET RESET
   ======================================================== */
:root {
    --bg-color: #050510;
    --panel-bg: #151520;
    --gold: #d4af37;
    --text-main: #e0e0e0;
    --accent-red: #ff3333;
    --accent-green: #00ff88;
    --font-title: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* ========================================================
   CONTENEUR PRINCIPAL
   ======================================================== */
#main-container {
    display: flex; 
    width: 95vw; 
    height: 90vh; 
    max-width: 1200px;
    background: var(--panel-bg); 
    border: 3px solid var(--gold);
    box-shadow: 0 0 40px rgba(0,0,0,0.8); 
    border-radius: 8px;
    overflow: hidden;
}

/* PANNEAU DU SORCIER (GAUCHE) */
.wizard-panel {
    width: 30%; 
    position: relative; 
    border-right: 3px solid var(--gold); 
    background: #000;
}

.wizard-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    opacity: 0.7; 
}

.lives-overlay {
    position: absolute; 
    bottom: 60px; 
    left: 0; 
    right: 0;
    background: rgba(0, 0, 0, 0.85); 
    padding: 10px; 
    text-align: center;
    border-top: 1px solid var(--gold); 
    border-bottom: 1px solid var(--gold);
}

.lives-label { 
    display: block; 
    font-family: var(--font-title); 
    color: var(--gold); 
    font-size: 0.8rem; 
    margin-bottom: 5px; 
    text-transform: uppercase; 
}

#lives-display { 
    font-size: 1.5rem; 
    letter-spacing: 5px; 
}

#music-btn {
    position: absolute; 
    bottom: 15px; 
    right: 15px;
    background: rgba(0,0,0,0.6); 
    color: var(--gold); 
    border: 1px solid var(--gold); 
    padding: 5px 10px; 
    cursor: pointer;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* PANNEAU DE JEU (DROITE) */
.game-panel {
    width: 70%; 
    display: flex; 
    flex-direction: column; 
    padding: 30px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    position: relative;
}

header { 
    text-align: center; 
    border-bottom: 2px solid rgba(212, 175, 55, 0.3); 
    padding-bottom: 15px; 
    margin-bottom: 25px; 
}

.game-title { 
    font-family: var(--font-title); 
    color: var(--gold); 
    font-size: 2rem; 
    text-transform: uppercase; 
    letter-spacing: 3px;
}

#content-area { 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center; 
}

/* ========================================================
   ÉCRANS ET ÉLÉMENTS DE JEU
   ======================================================== */

/* Accueil */
.intro-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    margin: 20px 0;
    max-width: 85%;
    text-align: left;
}

.intro-list { list-style: none; margin-top: 15px; }
.intro-list li { margin-bottom: 12px; font-size: 1.1rem; }

/* Enigme */
.room-header { color: #aaa; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; font-size: 0.9rem; margin-bottom: 10px; }
h2 { font-family: var(--font-title); font-size: 2.2rem; margin-bottom: 15px; color: #fff; }
.icon-medium { font-size: 3.5rem; margin: 15px 0; }
.icon-large { font-size: 5rem; margin-bottom: 25px; color: var(--gold); }

#room-desc {
    font-size: 1.4rem; 
    line-height: 1.6; 
    margin-bottom: 30px;
    background: rgba(0,0,0,0.4); 
    padding: 25px; 
    border-radius: 8px; 
    border: 1px solid #444;
    width: 90%;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
}

/* Input area */
.input-area { 
    display: flex; 
    gap: 15px; 
    justify-content: center; 
    width: 100%; 
    max-width: 500px; 
}

input {
    flex-grow: 1; 
    padding: 15px; 
    background: rgba(0,0,0,0.3);
    border: none; 
    border-bottom: 3px solid var(--gold);
    color: white; 
    font-size: 1.6rem; 
    text-align: center; 
    outline: none;
}

/* BOUTONS */
.action-btn {
    padding: 15px 35px; 
    background: var(--gold); 
    border: none;
    color: #1a1a2e; 
    font-weight: bold; 
    cursor: pointer; 
    font-family: var(--font-title); 
    font-size: 1.2rem;
    transition: 0.3s; 
    border-radius: 4px;
    text-transform: uppercase;
}

.action-btn:hover { 
    background: #fff; 
    transform: scale(1.05); 
    box-shadow: 0 0 20px var(--gold); 
}

.btn-pulse { animation: pulse 2s infinite; }

/* ========================================================
   FEEDBACKS (BOXES COULEURS)
   ======================================================== */
.feedback-msg { 
    margin-top: 30px; 
    width: 90%; 
    min-height: 70px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    border-radius: 8px; 
    font-weight: bold; 
    font-size: 1.3rem;
    transition: 0.3s;
}

/* LA BELLE BOX ROUGE */
.feedback-msg.error {
    background: rgba(150, 0, 0, 0.9); 
    border: 2px solid var(--accent-red);
    color: white; 
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.5); 
    animation: shake 0.4s;
    padding: 15px;
}

/* LA BELLE BOX VERTE */
.feedback-msg.success {
    background: rgba(0, 100, 50, 0.9); 
    border: 2px solid var(--accent-green);
    color: white;
    padding: 15px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

/* BOX GAME OVER ROUGE */
.error-box-large {
    background: rgba(100, 0, 0, 0.8); 
    border: 2px solid var(--accent-red);
    padding: 30px; 
    border-radius: 10px; 
    margin: 25px 0; 
    font-size: 1.3rem;
    line-height: 1.5;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.4);
}

/* ========================================================
   PROGRESSION (STRIP)
   ======================================================== */
.bottom-strip-container { 
    height: 80px; 
    margin-top: auto; 
    border-top: 1px solid #333; 
    padding-top: 15px; 
}

.bottom-strip { 
    display: flex; 
    gap: 10px; 
    justify-content: center; 
}

.strip-item {
    width: 40px; 
    height: 40px; 
    border: 1px solid #444; 
    background: #222;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    color: #555; 
    font-family: var(--font-title);
    transition: 0.3s;
}

.strip-item.done { 
    color: var(--accent-green); 
    border-color: var(--accent-green); 
    background: rgba(0, 255, 136, 0.1); 
}

.strip-item.active { 
    border-color: var(--gold); 
    color: var(--gold); 
    transform: scale(1.25); 
    box-shadow: 0 0 15px var(--gold); 
    background: #333;
}

/* ========================================================
   ANIMATIONS
   ======================================================== */
.hidden { display: none !important; }

@keyframes shake { 
    0%, 100% {transform: translateX(0);} 
    25% {transform: translateX(-12px);} 
    75% {transform: translateX(12px);} 
}

@keyframes pulse { 
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.5); } 
    70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); } 
}

/* Pour mobile si besoin */
@media (max-width: 768px) {
    #main-container { flex-direction: column; height: 95vh; }
    .wizard-panel { width: 100%; height: 20%; border-right: none; border-bottom: 2px solid var(--gold); }
    .game-panel { width: 100%; padding: 15px; }
    h2 { font-size: 1.5rem; }
    #room-desc { font-size: 1.1rem; }
}