/* --- VARIABLES ET THÈME --- */
:root {
    --primary-color: #e67e22;    /* Orange Secours */
    --secondary-color: #d35400;  /* Orange Foncé */
    --success-color: #27ae60;    /* Vert Réussite */
    --error-color: #e74c3c;      /* Rouge Erreur */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --text-dark: #2d3436;
}

/* --- FOND ANIMÉ LIQUIDE --- */
body {
    margin: 0;
    padding: 15px;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(-45deg, #ff9a9e, #fad0c4, #fbc2eb, #a18cd1);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-dark);
}

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

/* --- CARTE PRINCIPALE --- */
#quiz-card {
    background: var(--glass-bg);
    padding: 2rem;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    width: 100%;
    max-width: 500px;
    position: relative;
    box-sizing: border-box;
    transition: all 0.4s ease;
}

/* --- BOUTON RETOUR --- */
#back-home {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.5);
    padding: 8px 15px;
    border-radius: 50px;
    transition: 0.3s;
}

#back-home:hover {
    background: #fff;
    transform: translateX(-5px);
}

/* --- CASE PRÉNOM (ESTHÉTIQUE) --- */
#pseudo-container {
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

#pseudo-input {
    width: 100%;
    padding: 18px 25px;
    margin: 25px 0;
    border-radius: 50px; /* Forme pilule */
    border: 2px solid rgba(230, 126, 34, 0.1);
    background: rgba(255, 255, 255, 0.5);
    color: var(--text-dark);
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    outline: none;
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#pseudo-input:focus {
    background: #ffffff;
    border-color: var(--primary-color);
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(230, 126, 34, 0.15);
}

#pseudo-input::placeholder {
    color: rgba(0, 0, 0, 0.3);
    font-weight: 400;
}

/* --- GRILLE DES MODULES --- */
.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 25px;
}

.menu-card {
    background: rgba(255, 255, 255, 0.4);
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.menu-card:hover {
    background: #fff;
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.icon-wrapper {
    height: 60px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu-icon {
    max-height: 100%;
    width: auto;
}

/* --- BOUTONS D'ACTION ET RÉPONSES --- */
button {
    width: 100%;
    padding: 16px;
    border-radius: 18px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    margin-bottom: 12px;
}

#start-game-btn, .action-btn {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 8px 15px rgba(230, 126, 34, 0.2);
}

#start-game-btn:hover, .action-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(230, 126, 34, 0.3);
}

#options-container button {
    background: white;
    color: var(--text-dark);
    border: 1px solid rgba(0,0,0,0.05);
    text-align: left;
    padding-left: 20px;
}

#options-container button:hover:not(.disabled) {
    background: #fffbf5;
    border-color: var(--primary-color);
    transform: translateX(5px);
}

/* --- ÉTATS --- */
.correct { background: var(--success-color) !important; color: white !important; }
.wrong { background: var(--error-color) !important; color: white !important; }
.disabled { pointer-events: none; opacity: 0.7; }
.hidden { display: none !important; }

/* --- TYPOGRAPHIE --- */
h1 { font-size: 1.8rem; color: var(--secondary-color); margin-bottom: 5px; text-align: center; }
p { text-align: center; color: #636e72; margin-top: 0; }
h2 { font-size: 1.3rem; line-height: 1.4; text-align: center; }
#progress { text-align: center; font-weight: 800; color: var(--primary-color); text-transform: uppercase; font-size: 0.8rem; margin-bottom: 10px; }

/* --- SCORE FINAL --- */
.final-score {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-color);
    text-align: center;
    margin: 20px 0;
}

/* --- RESPONSIVE --- */
@media (max-width: 480px) {
    #quiz-card { padding: 1.5rem; border-radius: 20px; }
    .menu-grid { grid-template-columns: 1fr; }
    h1 { font-size: 1.5rem; }
    .final-score { font-size: 3rem; }
}

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