/* ============================================================
   1. STRUCTURE GÉNÉRALE ET TYPOGRAPHIE
   ============================================================ */
body {
    background-color: #f4f4f4; /* Gris clair pour faire ressortir la carte blanche */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #1a1a1a;
}

.content-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}

/* ============================================================
   2. EN-TÊTE ET BOUTON RETOUR
   ============================================================ */
.header-chapitre-titre {
    margin-bottom: 30px;
}

.btn-retour {
    display: inline-flex;
    align-items: center;
    gap: 10px; /* Espace entre l'icône et le texte */
    background-color: #ff6233; /* Orange Kult */
    color: black;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, background 0.2s;
}

.btn-retour:hover {
    background-color: #e5532a;
    transform: translateX(-5px); /* Petit effet de mouvement à gauche */
}

/* ============================================================
   3. SECTION COURS (THÉORIE)
   ============================================================ */
.cours-section {
    background: white;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 30px;
    border-left: 5px solid #ff6233; /* Barre orange sur le côté */
}

.titre-ia {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.icon-orange {
    color: #ff6233;
    font-size: 1.8rem;
}

/* ============================================================
   4. SECTION QUIZ ET BARRE DE PROGRESSION
   ============================================================ */
.quiz-header {
    margin-bottom: 20px;
}

/* Fond de la barre de progression (Gris) */
.progress-bar-bg {
    background-color: #e0e0e0;
    height: 12px;
    border-radius: 10px;
    margin-top: 10px;
    overflow: hidden;
}

/* Remplissage de la barre (Noir/Anthracite) */
#progress-bar-fill {
    height: 100%;
    background-color: #2d2d2d;
    width: 0%; /* Sera modifié par le JS */
    transition: width 0.5s ease-in-out; /* Animation fluide du remplissage */
}

/* ============================================================
   5. LA CARTE DE QUIZ (QUIZ CARD)
   ============================================================ */
.quiz-card {
    background-color: #ffffff;
    border-radius: 35px; /* Bords très arrondis style moderne */
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.question-principale {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 20px 0;
}

/* Boutons de réponse */
.option-btn {
    display: block;
    width: 100%;
    padding: 18px 25px;
    margin-bottom: 12px;
    background: white;
    border: 2px solid #2d2d2d; /* Bordure noire fine */
    border-radius: 20px;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}


.option-btn:hover:not(:disabled) {
    background-color: #f8f8f8;
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* Classe ajoutée par JS si la réponse est correcte */
.option-btn.correct {
    background-color: #e8f5e9 !important;
    border-color: #2e7d32 !important;
    color: #2e7d32 !important;
    font-weight: bold;
}

/* Classe ajoutée par JS si la réponse est fausse */
.option-btn.wrong {
    background-color: #ffebee !important; /* Rouge très clair */
    border-color: #c62828 !important;     /* Rouge foncé */
    color: #c62828 !important;
}

/* ============================================================
   6. ZONE DE FEEDBACK ET BOUTON SUIVANT
   ============================================================ */

/* Alerte de correction (Success/Error) */
.alert-success {
    padding: 20px;
    border-radius: 20px;
    border: 2px solid;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: bold;
}

/* Bouton Suivant Orange */
.btn-suivant {
    background-color: #ff6233;
    color:black;
    border: none;
    padding: 18px;
    border-radius: 20px;
    width: 100%;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-suivant:hover {
    background-color: #e5532a;
}

/* ==========================================
   STYLE POUR L'ÉCRAN DE FIN
   ========================================== */

.grand-trophee {
    font-size: 7rem;        /* Taille très grande (environ 112px) */
    color: #ff6233;         /* Ta couleur Orange Kult */
    margin-bottom: 30px;    /* Espace généreux sous le trophée */
    display: block;         /* Pour bien centrer avec la marge */
    
    /* PETIT BONUS : Une petite animation d'apparition */
    animation: popIn 0.5s ease-out; 
}

/* Définition de l'animation popIn */
@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    80% { transform: scale(1.1); } /* Petit effet de rebond */
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 600px) {
    .content-container {
        padding: 10px;
        margin-top: 10px;
    }
    .quiz-card {
        padding: 20px; /* On réduit un peu le padding sur petit écran */
    }
}