body, html { margin: 0; padding: 0; height: 100%; font-family: sans-serif; overflow: hidden; }

#game-header {
    height: 80px;
    background: #b38b45;
    color: white;
    display: flex;
    align-items: center;
    padding: 0 20px;

    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    z-index: 9999;
}

.header-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    width: 100%;
    align-items: center;
}

#current-question-text {
    color: #000000;        /* rouge plus vif */
    font-size: 2.4em;      /* plus gros */
    font-weight: 500;
    margin: 0;
    text-align: center;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.15);
    white-space: nowrap;
}


.header-right { text-align: right; }

#map-container {
    position: absolute;
    top: 80px;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    /* On active le mode côte à côte */
    display: flex;
    flex-direction: row;
}

#map { 
    /* La carte prend tout l'espace qu'on lui laisse */
    flex: 1; 
    height: 100%; 
    cursor: crosshair; 
    background: #b5d0d0; 
}

#info-panel {
    /* Le panneau a sa largeur fixe */
    width: 38vw;
    max-width: 480px;
    height: 100%;
    background: white;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    /* Transition pour que le changement de taille soit fluide */
    transition: all 0.3s ease;
}

#info-panel.hidden { 
    /* Quand il est caché, on lui donne une largeur de 0 */
    /* La carte (flex: 1) s'étendra alors automatiquement à 100% */
    width: 0;
    max-width: 0;
    margin: 0;
    overflow: hidden;
    opacity: 0;
}

.panel-content {
    padding: 20px;
    max-width: 350px;
    margin: 0 auto;
}

.stats-box {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin: 15px 0;
}

#btn-play {
    background: #e67e22;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
}

#next-question {
    background: #27ae60;
    color: white;
    border: none;
    width: 100%;
    padding: 16px 18px;
    cursor: pointer;
    margin-top: 30px;          /* espace avec Informations */
    font-size: 1.4em;          /* texte plus gros */
    font-weight: 900;
    border-radius: 8px;
    box-shadow: 0 3px 0 rgba(0,0,0,0.25);
}


.rules-box {
    background: #2c3e50;
    color: #f1c40f;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.rules-box h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    text-transform: uppercase;
    border-bottom: 1px solid #f1c40f;
}

.rules-box ul { list-style: none; padding: 0; margin: 0; }
.rules-box li { margin-bottom: 5px; font-size: 0.9rem; }

.instruction-hint {
    font-style: italic;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 20px;
}

/* =========================
   ÉCRAN D’INTRODUCTION
   ========================= */

#intro-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    /* Image de fond */
    background:
        linear-gradient(
            rgba(0, 0, 0, 0.65),
            rgba(0, 0, 0, 0.65)
        ),
        url("images/cover.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    color: white;
    z-index: 5000;

    display: flex;
    justify-content: center;
    align-items: center;
}


.intro-content {
    max-width: 600px;
    text-align: center;
    padding: 30px;
}

.intro-content h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

.intro-tagline {
    font-size: 1.2em;
    color: #f1c40f;
    margin-bottom: 25px;
}

.intro-rules p {
    margin: 8px 0;
    font-size: 1em;
}

#start-game-btn {
    margin-top: 30px;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    background: #e67e22;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#final-content {
    display: none;
}

.info-toggle {
    width: 100%;
    background: #eee;
    border: none;
    padding: 10px;
    font-weight: bold;
    cursor: pointer;
    margin: 15px 0;
    border-radius: 5px;
    text-align: left;
}

#info-details.hidden {
    display: none;
}

/* Avant réponse : pas d'informations visibles */
#result-content.hidden details {
    display: none;
}

/* Titre "Informations" */
#info-details > summary {
    font-size: 1.8em;
    font-weight: 900;
    color: #2c3e50;
    cursor: pointer;
    margin: 20px 0;
    padding: 10px 14px;
    background: #f1c40f;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 0 rgba(0,0,0,0.25);
}


/* Quand Informations est ouvert (optionnel, effet visuel) */
#info-details[open] > summary {
    color: #e74c3c;            /* rouge plus vif */
}

#next-question {
    display: none;
}

/* Légendes et crédits discrets */
#image-credit,
#audio-source-text {
    font-size: 0.7em;
    color: #777;
    line-height: 1.3;
    margin-top: 5px;
}

#audio-cover {
    margin-bottom: 5px;
}
#final-content:not(.hidden) {
    display: block !important;
}
.final-score-box {
    background: #f1c40f;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    color: #2c3e50;
}
/* On s'occupe du bloc qui contient le titre et le numéro */
.header-left {
    display: flex;
    flex-direction: column; 
    justify-content: center;
}

/* On enlève l'espace vide autour du gros titre Geo Musica */
.header-left h1 {
    margin: 0; 
    padding: 0;
    line-height: 1; /* Pour qu'il ne prenne pas trop de place en hauteur */
}

/* On remonte le numéro de question */
#question-number {
    margin-top: 0; /* On enlève l'espace au-dessus */
    font-size: 0.9em; /* On le met un tout petit peu plus petit */
}
/* Zoom image question */
#question-image.zoomed {
    transform: scale(1.6);
    transition: transform 0.25s ease;
    cursor: zoom-out;
}
#question-image {
    cursor: zoom-in;
}
#question-image-container {
    transition: opacity 0.5s ease;
}
/* Le conteneur principal (le panneau repliable) */
#regles-details {
    background-color: #fff9db; /* Fond jaune pâle */
    border-left: 5px solid #fcc419; /* Barre jaune vive à gauche */
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 0px;
    transition: all 0.3s ease;
}

/* Le titre cliquable */
#regles-details summary {
    cursor: pointer;
    font-weight: bold;
    color: #e67e22;
    outline: none; /* Enlève le cadre bleu au clic */
    list-style: none; /* Cache la petite flèche par défaut du navigateur */
}

/* On ajoute notre propre petite flèche ou indicateur si on veut, 
   mais restons simple pour l'instant avec le texte seul */

/* Le contenu à l'intérieur une fois déplié */
#regles-texte-interieur {
    margin-top: 10px;
    font-size: 0.9em;
    line-height: 1.4;
    color: #333;
}
/* ===================================
   RÉDUCTION ESPACEMENT PANNEAU DROITE
   =================================== */

/* Suppression espace sous les règles */
.rules-box {
    margin-bottom: 0 !important;
}

/* Remontée du bloc résultat */
#result-content {
    margin-top: -15px !important;
    padding-top: 0 !important;
}

/* Réduction titre "Résultat" */
#result-content h2 {
    margin-bottom: 8px !important;
}

/* Compacter la stats-box */
.stats-box {
    padding: 8px !important;
}

.stats-box p {
    margin: 3px 0 !important;
    line-height: 1.3 !important;
}