/* Design épuré et moderne pour NumoQuest */
:root {
    --bg-primary: #f4f6f9;
    --window-bg: #ffffff;
    --accent-color: #4a90e2;
    --text-main: #333333;
    --border-color: #e1e6eb;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* Grille principale tri-fenêtres */
#main-layout {
    display: grid;
    grid-template-columns: 3fr 1fr; /* Fenêtre jeu large, barre stats plus étroite */
    grid-template-rows: 1fr 90px;  /* Le contenu prend tout le haut, la pub prend 90px en bas */
    height: 100vh;
    gap: 10px;
    padding: 10px;
}

/* Zone 1 : Fenêtre de jeu */
#game-window {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    background: var(--window-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    overflow-y: auto;
}

/* Zone 2 : Barre de statistiques */
#stats-window {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    background: var(--window-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Zone 3 : Fenêtre de Publicité (Bas) */
#banner-ad-window {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
    background: #e9ecef;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #adb5bd;
}

.ad-placeholder {
    font-size: 12px;
    font-weight: bold;
    color: #6c757d;
    letter-spacing: 2px;
}

/* Écrans et Éléments de jeu */
.screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.hidden {
    display: none !important;
}

/* Saisie nombre */
#guess-input {
    padding: 12px;
    font-size: 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    width: 200px;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}

#guess-input:focus {
    border-color: var(--accent-color);
}

button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background-color: var(--accent-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #357abd;
}

/* Zone QCM */
#qcm-zone {
    width: 100%;
    max-width: 500px;
    margin-top: 20px;
    border-top: 2px solid var(--bg-primary);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#qcm-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}

/* Boutons spécifiques pour le QCM */
.qcm-btn {
    background-color: #f8f9fa;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.qcm-btn:hover {
    background-color: #e9ecef;
}

/* Sidebar Stats */
#stats-window h3 {
    border-bottom: 2px solid var(--bg-primary);
    padding-bottom: 10px;
    font-size: 18px;
}

.stat-item label {
    font-size: 12px;
    text-transform: uppercase;
    color: #7f8c8d;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

#timer-display, #attempts-display, #questions-progress-display {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
}

/* Écran de fin et overlay Image IA */
#end-screen {
    position: relative;
}

#animal-bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.15; /* Très léger en fond pour pas gêner la lecture */
    z-index: 1;
}

#end-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
}