/* =================================================================== */
/* STYLES SPÉCIFIQUES AUX PAGES D'EXERCICES (FLIP & QUIZZ)         */
/* =================================================================== */

/* Conteneur principal pour centrer le contenu de l'exercice */
.container-exo {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
}

/* Barre de statut (sélection chapitre, boutons) et de score */
.container-exo .status, .container-exo .scoreboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.container-exo .scoreboard {
    font-size: 1.1rem;
    font-weight: 500;
}

/* --- STYLES POUR LES QUIZZ --- */

.container-exo .quizz-question {
    padding: 2rem;
    background-color: #003366; /* Votre couleur primaire */
    color: white;
    border-radius: 8px;
    min-height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

#quizzOptions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    width: 100%;
    margin-top: 1.5rem;
}

/* On utilise .btn-outline-light pour s'assurer que Bootstrap ne l'écrase pas */
#quizzOptions .btn.btn-outline-light {
    padding: 0.75rem;
    border-width: 2px;
    transition: background-color 0.2s, transform 0.2s;
    font-size: 1rem;
}

#quizzOptions .btn.btn-outline-light:hover:not(:disabled) {
    transform: translateY(-2px);
}

#quizzOptions .btn.correct {
    background-color: #198754; /* Vert succès Bootstrap */
    border-color: #198754;
    color: white;
}

#quizzOptions .btn.incorrect {
    background-color: #dc3545; /* Rouge erreur Bootstrap */
    border-color: #dc3545;
    color: white;
}


/* --- STYLES POUR LES FLASHCARDS --- */

.flashcard-container {
    perspective: 1000px; /* Active la perspective 3D pour l'enfant */
    margin-bottom: 1.5rem;
}

.flashcard {
    width: 100%;
    min-height: 200px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
    cursor: pointer;
}

.flashcard.flip {
    transform: rotateY(180deg);
}

.flashcard .front, .flashcard .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* Cache la face arrière */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    border-radius: 8px;
    font-size: 1.5rem;
}

.flashcard .front {
    background-color: #003366; /* Couleur primaire */
    color: white;
}

.flashcard .back {
    background-color: #eaf0f6; /* Bleu très clair */
    color: #333;
    transform: rotateY(180deg);
}

.card-label {
    font-weight: bold;
    color: #6c757d;
    margin-bottom: 0.5rem;
}


/* --- NOUVEAUX STYLES POUR LE JEU DES DEVINETTES (V2) --- */
#jauge-container {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
}
.jauge-niveau {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #6c757d;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    transition: all 0.3s ease-in-out;
}
.jauge-niveau:last-child {
    border-bottom: none;
}
.jauge-niveau.active {
    background-color: #ffc107; /* Jaune Bootstrap */
    color: #000;
    transform: scale(1.05);
    font-weight: bold;
}
.jauge-niveau.passed {
    background-color: #e9ecef;
    opacity: 0.6;
}
#music-toggle-btn i {
    margin-right: 0.5rem;
}

#chrono-display {
    padding: 0.5rem 1rem;
    background-color: #e9ecef; /* Fond gris clair */
    color: #495057; /* Texte gris foncé */
    border: 1px solid #dee2e6; /* Bordure subtile */
    border-radius: 6px;
    transition: all 0.3s ease;
}


#indices-container {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.25rem; 
    line-height: 1.6;
    font-weight: bold;     /* Pour mettre le texte en gras */
    color: #003366;        /* Une couleur bleue foncée pour une meilleure lisibilité */
}
/* =================================================================== */
/* STYLES POUR LA PAGE MATCH (LE GRAND DÉBAT) - VERSION 2.0         */
/* =================================================================== */

.scenario-btn { 
    cursor: pointer; 
}
.accordion-button:not(.collapsed) { 
    background-color: #e7f1ff; 
}

/* Nouvelle palette de couleurs pour les cartes */
.card-bob {
    background-color: #fdfaf6; /* Beige très clair */
    border: 1px solid #e9e1d8;
}
.card-bob .card-header {
    background-color: #d95f02; /* Orange soutenu (thème chaud) */
}

.card-pat {
    background-color: #f0f4f8; /* Gris-bleu très clair */
    border: 1px solid #d8dfe6;
}
.card-pat .card-header {
    background-color: #1f78b4; /* Bleu soutenu (thème froid) */
}

/* Amélioration du rendu des chemins de causalité (PLUS DE RETOUR À LA LIGNE) */
.path-container {
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 1rem;
    overflow-x: auto; /* Permet le défilement horizontal si le chemin est trop long */
    padding-bottom: 15px; /* Espace pour la barre de défilement */
}
.path-node {
    padding: 10px 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f8f9fa;
    text-align: center;
    font-size: 0.95rem; /* Taille légèrement réduite pour la compacité */
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0; /* Empêche les blocs de rétrécir */
}
.path-arrow {
    font-size: 1.5rem;
    color: #6c757d;
}
.divergence-point {
    border: 2px solid #ffc107;
    background-color: #fff3cd;
    box-shadow: 0 0 10px rgba(255,193,7,0.5);
}


/* Conteneur large spécifique pour le Grand Débat */
.container-exo-large {
    max-width: 1140px; /* Largeur standard pour les grands écrans */
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: justify;
}