/**
 * Styles pour le parcours d'apprentissage progressif
 * Version: 1.37.21
 * Dernière mise à jour: 2025-07-25
 */

/* Forcer la police Inter sur tout le quiz */
.quiz-fullscreen,
.quiz-fullscreen * {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Container principal du parcours */
#parcours-container {
    padding: 0;
    padding-bottom: 90px; /* Espace pour le menu fixe */
    background: #ffffff !important; /* Fond blanc uni - pas de grille ni dégradé */
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    position: relative;
}

/* Overlay supprimé pour fond blanc uni */
#parcours-container::before {
    display: none !important;
}

/* Effet de perspective supprimé pour fond blanc uni */
#parcours-container::after {
    display: none !important;
}

/* Objectifs quotidiens */
.daily-goals {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
}

.daily-goals h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.goal-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.goal-item.completed {
    background: #d4edda;
}

.goal-icon {
    font-size: 20px;
    margin-right: 10px;
}

.goal-info {
    flex: 1;
}

.goal-description {
    font-size: 14px;
    margin-bottom: 5px;
}

.goal-progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.goal-progress-fill {
    height: 100%;
    background: #4ecdc4;
    transition: width 0.3s ease;
}

.goal-reward {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
}

/* Route du parcours - Style moderne et épuré */
.parcours-route {
    position: relative;
    padding: 180px 0 40px 0 !important; /* Padding augmenté pour laisser de l'espace pour les menus fixes - IMPORTANT pour surcharger permis-duels.css */
    width: 100%;
    background: transparent;
    min-height: 100vh;
    max-width: none;
    z-index: 2; /* Au-dessus des overlays du container */
}

/* Mobile - Réduire l'espace en haut */
@media (max-width: 768px) {
    .parcours-route {
        padding-top: 160px; /* Un peu moins que desktop car menus plus petits sur mobile */
    }
}

/* Chapitre titre */
.chapter-section {
    margin-bottom: 40px;
    margin-top: 20px;
}

.chapter-title {
    display: none;
}

.chapter-title h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.chapter-title .chapter-emoji {
    font-size: 32px;
}

/* Canvas SVG pour la route */
.route-canvas {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

/* Container des leçons */
.lessons-route {
    position: relative;
    min-height: 400px;
    margin: 0 auto;
    width: 100%;
    max-width: 600px;
}

/* Container pour les boutons de leçon */
.lessons-buttons-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.lesson-button-wrapper {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    z-index: 10;
    width: 80px;
    height: 80px;
}

/* Routes et chemins */
.road-segment {
    transition: stroke 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Road segment completed supprimé - pas de couleur de progression */

/* Décorations thématiques du permis */
.road-sign {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: opacity 0.3s ease;
}

.traffic-cone {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.milestone {
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.1));
}

.streetlight {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.guardrail {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.road-marking {
    /* Pas d'ombre pour les marquages au sol */
}

/* Animation d'apparition des boutons - DÉSACTIVÉE */
.lesson-button-wrapper {
    opacity: 1;
    /* animation: lessonAppear 0.5s ease-out forwards; */
}

/* Décoration du chapitre */
.chapter-decoration {
    opacity: 0;
    animation: decorationFadeIn 0.8s ease-out 0.3s forwards;
}

/* Centre d'examen entre les chapitres */
.center-exam-transition {
    opacity: 0;
    animation: fadeInScale 0.8s ease-out 0.5s forwards;
    z-index: 15;
}

.center-exam-transition img {
    transition: transform 0.3s ease;
}

.center-exam-transition:hover img {
    transform: scale(1.05);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

/* Container pour les chapitres */
.chapters-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Route de chapitre individuelle */
.chapter-route {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

@keyframes decorationFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Délai d'animation progressif - DÉSACTIVÉ
.lesson-button-wrapper:nth-child(1) { animation-delay: 0.1s; }
.lesson-button-wrapper:nth-child(2) { animation-delay: 0.2s; }
.lesson-button-wrapper:nth-child(3) { animation-delay: 0.3s; }
.lesson-button-wrapper:nth-child(4) { animation-delay: 0.4s; }
.lesson-button-wrapper:nth-child(5) { animation-delay: 0.5s; }
.lesson-button-wrapper:nth-child(6) { animation-delay: 0.6s; }
.lesson-button-wrapper:nth-child(7) { animation-delay: 0.7s; }
.lesson-button-wrapper:nth-child(8) { animation-delay: 0.8s; }
.lesson-button-wrapper:nth-child(9) { animation-delay: 0.9s; }
.lesson-button-wrapper:nth-child(10) { animation-delay: 1s; }

@keyframes lessonAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
} */

.lesson-path.curved-right {
    width: 100px;
    height: 60px;
    background: transparent;
    border-right: 6px solid #e0e0e0;
    border-bottom: 6px solid #e0e0e0;
    border-radius: 0 0 30px 0;
    right: 50%;
    transform: translateX(50%);
}

/* ===== BOUTONS DE LEÇON D'APPRENTISSAGE ===== */
.lesson-button {
    position: relative;
    width: 60px;  /* Largeur standard */
    height: 54px; /* Hauteur réduite pour compenser l'ombre de 6px */
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    /* Centrer le bouton dans le wrapper */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    border: none;
    padding: 0;
}

/* Bouton 3D épuré */
.button-3d-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #58cc02;
    box-shadow: 0 6px 0 #46a302;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    transition: box-shadow 0.1s ease;
}

/* Icône centrée dans le bouton */
.lesson-icon {
    display: inline-block;
    line-height: 1;
    font-size: 24px; /* Légèrement réduit */
    text-align: center;
}

/* Icônes des étapes verrouillées - pas de cadenas, juste grisé */
.lesson-button.locked .lesson-icon {
    font-size: 22px;
    opacity: 0.8;
}

/* Cercle de progression moderne */
.lesson-progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -47%); /* Centrage parfait pour le cercle de progression */
    width: 80px;  /* 60px (bouton+ombre) + 10px de marge de chaque côté */
    height: 80px; /* Carré parfait pour entourer le bouton+ombre */
    pointer-events: none;
}

.lesson-progress-ring svg {
    transform: rotate(-180deg); /* Rotation ajustée pour que le remplissage commence vraiment à 12h */
    width: 100%;
    height: 100%;
}

.lesson-progress-ring circle {
    fill: none;
    stroke-width: 5; /* Épaisseur augmentée pour un style plus moderne */
}

.lesson-progress-ring .progress-bg {
    stroke: rgba(224, 224, 224, 0.2); /* Plus subtil */
    stroke-width: 4; /* Légèrement plus fin que le progress */
}

.lesson-progress-ring .progress-fill {
    stroke: #58cc02;
    stroke-dasharray: 251;
    stroke-dashoffset: 251;
    transition: stroke-dashoffset 0.5s cubic-bezier(0.4, 0, 0.2, 1); /* Animation plus fluide */
    stroke-linecap: round;
    filter: drop-shadow(0 0 4px rgba(88, 204, 2, 0.3)); /* Légère lueur verte */
}

/* État déverrouillé */
.lesson-button.unlocked .lesson-progress-ring .progress-fill {
    stroke-dashoffset: 0;
}

/* État en cours - animation pulse sur le cercle */
.lesson-button.in-progress .lesson-progress-ring .progress-fill {
    stroke-dashoffset: 125;
    animation: pulseStroke 2s ease-in-out infinite;
}

@keyframes pulseStroke {
    0%, 100% { 
        stroke-width: 5;
        opacity: 1;
    }
    50% { 
        stroke-width: 7;
        opacity: 0.8;
    }
}

/* Couleurs du cercle selon le type de leçon */
.lesson-button.quiz .lesson-progress-ring .progress-fill {
    stroke: #ff4b4b;
    filter: drop-shadow(0 0 4px rgba(255, 75, 75, 0.3));
}

.lesson-button.revision .lesson-progress-ring .progress-fill {
    stroke: #1cb0f6;
    filter: drop-shadow(0 0 4px rgba(28, 176, 246, 0.3));
}

.lesson-button.boss .lesson-progress-ring .progress-fill {
    stroke: #ce82ff;
    filter: drop-shadow(0 0 4px rgba(206, 130, 255, 0.3));
}

/* État complété - cercle jaune */
.lesson-button.completed .lesson-progress-ring .progress-fill {
    stroke: #ffc800;
    stroke-dashoffset: 0;
}

/* Segments pour les 4 niveaux */
.lesson-progress-ring .progress-segment {
    stroke-linecap: round;
    transition: stroke 0.3s ease;
}

.lesson-progress-ring .segment-empty {
    stroke: rgba(224, 224, 224, 0.3);
    stroke-width: 4;
}

.lesson-progress-ring .segment-completed {
    stroke: #4caf50;
    stroke-width: 5;
    filter: drop-shadow(0 0 4px rgba(76, 175, 80, 0.4));
}

/* États verrouillés - grisés mais gardant le style */
.lesson-button.locked .button-3d-top {
    background: #e5e5e5;
    box-shadow: 0 6px 0 #b8b8b8;
    opacity: 1;
}

.lesson-button.locked.quiz .button-3d-top {
    background: #ffd0d0;
    box-shadow: 0 6px 0 #e5a0a0;
}

.lesson-button.locked.revision .button-3d-top {
    background: #c0dff5;
    box-shadow: 0 6px 0 #9cb8d5;
}

.lesson-button.locked.boss .button-3d-top {
    background: #e8d0ff;
    box-shadow: 0 6px 0 #c0a0e5;
}

/* Pas d'effet hover - le bouton reste statique */
.lesson-button.unlocked:hover .button-3d-top {
    /* Aucun changement au survol */
}

/* Effet poussoir au clic - pour TOUS les boutons non verrouillés */
.lesson-button:not(.locked):active .button-3d-top {
    transform: translateY(3px);
}

/* Adaptation de l'ombre selon le type pour l'effet poussoir */
.lesson-button:not(.locked):active .button-3d-top {
    box-shadow: 0 3px 0 #46a302; /* Vert par défaut */
}

.lesson-button.quiz:not(.locked):active .button-3d-top {
    box-shadow: 0 3px 0 #cc3939; /* Rouge pour quiz */
}

.lesson-button.revision:not(.locked):active .button-3d-top {
    box-shadow: 0 3px 0 #148acc; /* Bleu pour révision */
}

.lesson-button.boss:not(.locked):active .button-3d-top {
    box-shadow: 0 3px 0 #a666cc; /* Violet pour boss */
}

/* Types spéciaux avec couleurs distinctes */
.lesson-button.quiz.unlocked .button-3d-top {
    background: #ff4b4b;
    box-shadow: 0 6px 0 #cc3939;
}

.lesson-button.quiz.unlocked:hover .button-3d-top {
    /* Aucun changement au survol */
}

.lesson-button.revision.unlocked .button-3d-top {
    background: #1cb0f6;
    box-shadow: 0 6px 0 #148acc;
}

.lesson-button.revision.unlocked:hover .button-3d-top {
    /* Aucun changement au survol */
}

.lesson-button.boss.unlocked .button-3d-top {
    background: #ce82ff;
    box-shadow: 0 6px 0 #a666cc;
}

.lesson-button.boss.unlocked:hover .button-3d-top {
    /* Aucun changement au survol */
}

/* Label moderne au-dessus du bouton actif */
.lesson-label {
    position: absolute;
    top: -45px; /* Au-dessus du bouton au lieu de dessous */
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    z-index: 20;
    opacity: 0;
    animation: labelFadeIn 0.5s ease-out forwards;
    display: none;
}

/* Flèche pointant vers le bas */
.lesson-label::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #764ba2;
}

/* Afficher uniquement le label de la leçon active */
.lesson-button.active ~ .lesson-label {
    display: block;
}

@keyframes labelFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Suppression de l'animation pulse - pas de pulsation */
.lesson-button.unlocked:not(.completed) .button-3d-top {
    animation: none;
}

/* Loading */
.route-loading {
    text-align: center;
    padding: 50px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ================================= */
/* QUIZ FULLSCREEN MODERNE - GAME UI */
/* ================================= */
/* 
 * IMPORTANT : Tous les styles de cette section sont préfixés avec .quiz-fullscreen
 * pour éviter tout conflit avec d'autres parties de l'application.
 * La classe body.quiz-active n'est ajoutée que pendant le quiz du parcours.
 */

/* Body en mode quiz - empêcher tout scroll */
body.quiz-active {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    touch-action: none !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
}

/* Masquer tout quand le quiz est actif - UNIQUEMENT EN MODE QUIZ PARCOURS */
body.quiz-active.quiz-parcours .sg-wrapper,
body.quiz-active.quiz-parcours .modern-bottom-nav,
body.quiz-active.quiz-parcours .auth-bar,
body.quiz-active.quiz-parcours .tab-menu-container,
body.quiz-active.quiz-parcours #globalTabMenu,
body.quiz-active.quiz-parcours #bottomNavigation {
    display: none !important;
    visibility: hidden !important;
}

/* Portail isolé pour le quiz */
#quiz-portal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 2147483647 !important;
    overflow: hidden !important;
    background: #ffffff !important; /* Fond blanc comme demandé */
    pointer-events: auto !important;
    display: none; /* Caché par défaut */
}

/* Forcer l'affichage quand visible */
#quiz-portal[style*="display: block"] {
    display: block !important;
}

/* S'assurer que rien ne peut cacher le quiz */
body.quiz-active #quiz-portal {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Modal fullscreen dans le portail */
.quiz-fullscreen {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
    display: flex !important;
    background: #ffffff !important; /* Fond blanc */
}

/* Forcer l'affichage quand affiché */
body.quiz-active .quiz-fullscreen {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Animation supprimée pour affichage instantané */

.quiz-fullscreen-content {
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height pour mobile */
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    background: transparent !important;
    position: relative;
    overflow: hidden !important; /* Forcer l'absence de scroll */
    max-height: 100vh !important; /* Forcer la hauteur maximale */
    max-height: 100dvh !important;
    width: 100% !important;
}

/* S'assurer que le contenu est visible */
body.quiz-active .quiz-fullscreen-content {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Header moderne style jeu */
.quiz-header {
    background: #f8f9fa;
    padding: 12px 20px;
    display: grid; /* Changé de flex à grid */
    grid-template-columns: auto 1fr; /* Bouton fermer, puis tout le reste pour la barre */
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

/* Bouton de fermeture discret */
.quiz-close-btn {
    width: 40px;
    height: 40px;
    background: #e5e7eb;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quiz-close-btn:hover {
    background: #d1d5db;
    transform: rotate(90deg);
}

.quiz-close-btn svg {
    width: 20px;
    height: 20px;
    stroke: #374151;
}

/* Progress bar moderne */
.quiz-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0;
    margin-right: 15px; /* Espace avec le bouton fermer */
}

.progress-bar {
    flex: 1;
    width: 100%; /* Forcer la largeur complète */
    height: 14px;
    background: #e5e7eb;
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: #58CC02; /* Même vert que le bouton continuer */
    border-radius: 100px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

#question-counter {
    display: none !important;
}

/* Cacher le titre de la leçon */
#lesson-title {
    display: none !important;
}

/* Body du quiz modernisé - REFONTE COMPLETE */
.quiz-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    padding: clamp(10px, 3vw, 20px); /* Padding adaptatif */
    padding-bottom: 0; /* Pas de padding en bas pour éviter l'espace blanc */
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    overflow: hidden !important; /* Empêcher tout scroll */
    position: relative;
    min-height: 0; /* Permettre au flexbox de rétrécir */
}

/* Container de question moderne - PLUS IMMERSIF */
.quiz-fullscreen .question-container {
    background: transparent; /* Pas de fond */
    padding: clamp(20px, 4vw, 40px);
    border-radius: 0;
    margin-bottom: clamp(10px, 1.5vh, 15px);
    border: none; /* Pas de bordure */
    box-shadow: none; /* Pas d'ombre */
    position: relative;
    overflow: visible;
    flex-shrink: 0;
}

/* Supprimer l'effet de fond */
.quiz-fullscreen .question-container::before {
    display: none;
}

/* Texte de question moderne - Police moderne et grande */
.quiz-fullscreen .question-text {
    font-size: clamp(22px, 5vw, 32px); /* Plus grand */
    font-weight: 500; /* Medium weight */
    color: #1f2937;
    margin-bottom: clamp(20px, 3vh, 30px);
    line-height: 1.6; /* Encore plus d'espace */
    text-align: center;
    position: relative;
    z-index: 1;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* Police moderne */
    letter-spacing: 0px; /* Normal */
    word-spacing: normal; /* Normal */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Classe pour l'effet d'apparition moderne des mots */
.typewriter-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    animation: wordFadeInSmooth 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    margin-right: 0.25em; /* Espace entre les mots */
}

/* Supprimer l'espace après le dernier mot */
.typewriter-word:last-child {
    margin-right: 0;
}

@keyframes wordFadeInSmooth {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Image de question avec effet - TAILLE MAXIMALE CONTRÔLÉE */
.quiz-fullscreen .question-image {
    text-align: center;
    margin: clamp(10px, 2vh, 20px) 0;
    position: relative;
    z-index: 1;
    flex-shrink: 1; /* Peut rétrécir si nécessaire */
}

.quiz-fullscreen .question-image img {
    max-width: 100%;
    max-height: clamp(120px, 20vh, 200px); /* Hauteur max adaptative */
    height: auto;
    width: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.quiz-fullscreen .question-image img:hover {
    transform: scale(1.05);
}

/* Audio button moderne */
.quiz-fullscreen .audio-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.quiz-fullscreen .audio-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.quiz-fullscreen .audio-btn:active {
    transform: translateY(0);
}

/* Container des réponses moderne - OPTIMISÉ POUR L'ESPACE */
.quiz-fullscreen .answers-container {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.5vh, 12px); /* Gap adaptatif */
    margin-top: auto; /* Pousser vers le bas */
    margin-bottom: 0; /* Pas de marge en bas */
    padding-bottom: clamp(15px, 3vh, 30px); /* Padding augmenté pour plus d'espace */
    flex-shrink: 1; /* Peut rétrécir si nécessaire */
    max-height: 50vh; /* Un peu plus d'espace */
    overflow-y: auto; /* Permettre le scroll si nécessaire */
    overflow-x: hidden;
    position: relative; /* Pour s'assurer du positionnement */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* Style de la scrollbar pour webkit */
.quiz-fullscreen .answers-container::-webkit-scrollbar {
    width: 6px;
}

.quiz-fullscreen .answers-container::-webkit-scrollbar-track {
    background: transparent;
}

.quiz-fullscreen .answers-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.quiz-fullscreen .answers-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* S'assurer que le quiz-body n'a pas d'espace en trop */
.quiz-fullscreen .quiz-body::after {
    content: none !important; /* Supprimer tout pseudo-élément */
}

/* Masquer complètement la navigation (bouton Vérifier) */
.quiz-fullscreen .quiz-navigation {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: hidden !important;
}

.quiz-fullscreen .btn-check {
    display: none !important;
}



/* Boutons de réponse - DESIGN MINIMAL ET ÉPURÉ */
.quiz-fullscreen .answer-option {
    width: 100%;
    padding: clamp(14px, 2vh, 20px) clamp(16px, 3vw, 24px);
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    font-size: clamp(15px, 2.5vw, 18px);
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Survol très subtil */
.quiz-fullscreen .answer-option:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.5);
}

/* État sélectionné - minimaliste */
.quiz-fullscreen .answer-option.selected {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(102, 126, 234, 0.5);
}

/* PAS d'effet visuel pour correct/incorrect sur les boutons */
.quiz-fullscreen .answer-option.correct,
.quiz-fullscreen .answer-option.incorrect {
    /* Garder le même style que désactivé */
    cursor: not-allowed;
    opacity: 0.7;
}

/* État désactivé */
.quiz-fullscreen .answer-option:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Supprimer l'effet ripple */
.quiz-fullscreen .answer-option .ripple {
    display: none;
}

/* Ajustements pour petits écrans */
@media (max-width: 400px) {
    .quiz-fullscreen .answer-option {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
        border-radius: 10px;
    }
}

/* ================================= */
/* FEEDBACK MODERNE */
/* ================================= */

/* Container de feedback en bas de l'écran */
.quiz-feedback-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    display: none !important;
}

.quiz-feedback-bar.show {
    display: block !important;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Quand le feedback est affiché, réduire le body */
.quiz-fullscreen.showing-feedback .quiz-body {
    padding-bottom: 200px;
}

/* Barre de résultat colorée - Style minimal */
.feedback-result-bar {
    height: 8px;
    background: #f3f4f6;
    position: relative;
    overflow: hidden;
}

.feedback-result-bar.correct {
    background: #58CC02; /* Même vert que le bouton continuer */
}

.feedback-result-bar.incorrect {
    background: #ef4444;
}

/* Animation subtile de la barre */
.feedback-result-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: feedbackShine 0.6s ease-out; /* Plus rapide */
}

@keyframes feedbackShine {
    to { left: 100%; }
}

/* Contenu du feedback - Bien organisé */
.feedback-main-content {
    padding: 24px 20px 20px;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Section gauche avec résultat */
.feedback-result {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

/* Icône de résultat - Style simple et moderne */
.feedback-result-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    animation: feedbackIconBounce 0.3s ease-out; /* Plus rapide */
    flex-shrink: 0;
}

.feedback-result-icon.correct {
    background: #58CC02; /* Même vert que le bouton continuer */
    color: white;
}

.feedback-result-icon.incorrect {
    background: #ef4444;
    color: white;
}

/* Utiliser des symboles Unicode propres */
.feedback-result-icon.correct::before {
    content: '✓';
}

.feedback-result-icon.incorrect::before {
    content: '✕';
}

@keyframes feedbackIconBounce {
    0% { 
        transform: scale(0);
        opacity: 0;
    }
    60% { 
        transform: scale(1.1); /* Moins de bounce */
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

.feedback-result-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0; /* Permettre le text-overflow */
}

.feedback-result-message {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #1f2937;
    line-height: 1.2;
}

.feedback-correct-answer {
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.correct-answer-label {
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

#correct-answer-text {
    color: #58CC02; /* Même vert que le reste */
    font-weight: 600;
}

/* Section droite avec actions */
.feedback-actions {
    display: flex;
    align-items: center;
    gap: 8px; /* Réduire l'espacement */
    flex-shrink: 0;
}

/* Bouton explication - Style minimaliste sans point orange */
.btn-explanation {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    width: 40px;
    height: 40px;
    border-radius: 12px; /* Carré arrondi au lieu de rond */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    color: #6b7280;
    position: relative;
    font-weight: 700;
    margin-right: 8px; /* Espacement avec le bouton continuer */
}

.btn-explanation:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: scale(1.05);
}

.btn-explanation:active {
    transform: scale(0.95);
}

/* Supprimer l'indicateur orange */
.btn-explanation.has-explanation::after {
    display: none;
}

/* Bouton continuer principal - Plus large */
.btn-continue-main {
    background: #58CC02;
    color: white;
    border: none;
    padding: 14px 48px; /* Plus large */
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 0 #46A302;
    position: relative;
    top: 0;
    white-space: nowrap;
    min-width: 180px; /* Largeur minimale */
}

.btn-continue-main:hover {
    /* Pas d'effet au hover */
}

.btn-continue-main:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #46A302;
}

/* Indicateur de raccourci clavier */
.keyboard-hint {
    position: absolute;
    bottom: 8px;
    right: 20px;
    font-size: 11px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.7;
}

.keyboard-key {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: 600;
    color: #6b7280;
    box-shadow: 0 1px 0 #e5e7eb;
    font-size: 10px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .feedback-main-content {
        padding: 18px 16px 16px;
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .feedback-result {
        justify-content: center;
        width: 100%;
    }
    
    .feedback-result-text {
        text-align: left;
        flex: 1;
    }
    
    .feedback-actions {
        width: 100%;
        justify-content: center;
        gap: 12px; /* Plus d'espace sur mobile */
    }
    
    .btn-continue-main {
        flex: 1;
        max-width: 250px; /* Plus large sur mobile aussi */
        font-size: 15px;
        padding: 12px 36px;
        min-width: 160px;
    }
    
    .keyboard-hint {
        display: none;
    }
}

/* Amélioration du feedback de fin de quiz */
#quiz-feedback-bar.last-question {
    background: white;
}

#quiz-feedback-bar.last-question .feedback-result-bar {
    height: 8px;
}

#quiz-feedback-bar.last-question .feedback-main-content {
    padding-top: 28px;
    padding-bottom: 24px;
}

#quiz-feedback-bar.last-question #btn-continue-main {
    background: #58CC02;
    font-size: 17px;
    padding: 16px 56px; /* Plus large pour la dernière question */
    box-shadow: 0 6px 0 #46A302;
    min-width: 200px;
}

#quiz-feedback-bar.last-question #btn-continue-main:hover {
    /* Pas d'effet au hover */
}

#quiz-feedback-bar.last-question #btn-continue-main:active {
    transform: translateY(3px);
    box-shadow: 0 3px 0 #46A302;
}

/* Message de fin de quiz */
.quiz-complete-message {
    font-size: 15px;
    color: #6b7280;
    margin-top: 6px;
    font-weight: 600;
    line-height: 1.3;
}

/* ========================================
   ALERTES CARBURANT DANS LE QUIZ
   ======================================== */
.fuel-alert {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    padding: 12px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 100;
    min-width: 280px;
    text-align: center;
}

.fuel-alert.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.fuel-alert-content {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

/* Variations selon la criticité */
.fuel-alert.fuel-notice {
    border: 2px solid #FFA500;
    color: #E67E00;
}

.fuel-alert.fuel-warning {
    border: 2px solid #FF6B35;
    color: #D64000;
    animation: pulse-fuel 2s infinite;
}

.fuel-alert.fuel-danger {
    border: 2px solid #E74C3C;
    color: #C0392B;
    animation: shake-fuel 0.5s, pulse-fuel 2s infinite 0.5s;
}

.fuel-alert.fuel-critical {
    border: 2px solid #C0392B;
    background: #E74C3C;
    color: white;
    animation: shake-fuel 0.8s;
    font-size: 16px;
}

/* Animations pour les alertes carburant */
@keyframes pulse-fuel {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

@keyframes shake-fuel {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(calc(-50% - 5px)) translateY(0); }
    20%, 40%, 60%, 80% { transform: translateX(calc(-50% + 5px)) translateY(0); }
}

/* Position relative pour le feedback bar */
#quiz-feedback-bar {
    position: relative;
}

/* S'assurer que le contenu ne déborde pas sur mobile */
.feedback-correct-answer {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Animation d'entrée du feedback */
.quiz-feedback-bar.show .feedback-result-icon {
    animation-delay: 0s; /* Instantané */
}

.quiz-feedback-bar.show .feedback-result-text {
    animation: fadeInUp 0.2s ease-out 0.05s both; /* Beaucoup plus rapide */
}

.quiz-feedback-bar.show .feedback-actions {
    animation: fadeInUp 0.2s ease-out 0.1s both; /* Beaucoup plus rapide */
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(5px); /* Moins de déplacement */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================= */
/* FIN FEEDBACK MODERNE */
/* ================================= */

/* Navigation moderne */
.quiz-fullscreen .quiz-navigation {
    padding: 20px 0;
    text-align: center;
}

.quiz-fullscreen .btn-check {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a3aa 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    border-radius: 100px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    box-shadow: 0 8px 20px rgba(78, 205, 196, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.quiz-fullscreen .btn-check::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.quiz-fullscreen .btn-check:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(78, 205, 196, 0.5);
}

.quiz-fullscreen .btn-check:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.quiz-fullscreen .btn-check:active:not(:disabled) {
    transform: translateY(-1px);
}

.quiz-fullscreen .btn-check:disabled {
    background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Effet de particules pour les bonnes réponses */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2147483646;
}

/* Modal des résultats */
.results-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2147483648; /* Plus haut que le quiz fullscreen */
}

.results-modal.show {
    display: flex !important; /* S'assurer que flex est appliqué */
}

.results-modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-modal h2 {
    margin: 0 0 30px 0;
    font-size: 28px;
    color: #333;
}

.results-stars {
    font-size: 48px;
    margin-bottom: 30px;
}

.results-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.result-item {
    text-align: center;
}

.result-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.result-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.results-actions button {
    padding: 12px 30px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-retry {
    background: #e0e7ff;
    color: #667eea;
}

.btn-retry:hover {
    background: #c7d2fe;
    transform: translateY(-2px);
}

.btn-close {
    background: #4ecdc4;
    color: white;
    box-shadow: 0 4px 0 #44a3aa;
}

.btn-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #44a3aa;
}

.btn-close:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #44a3aa;
}

/* Progression de la leçon (4 niveaux) */
.lesson-progress-info {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.lesson-progress-info h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #4a5568;
}

.lesson-progress-bar {
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.lesson-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.lesson-progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 70%
    );
    animation: shimmer 2s infinite;
}

.lesson-progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Mini barre de progression dans le quiz */
.lesson-progress-mini {
    margin: 10px 0;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.lesson-progress-mini .progress-fill {
    width: 120px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.lesson-progress-mini .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #4ecdc4;
    transition: width 0.3s ease;
}

.lesson-progress-mini .progress-text {
    font-size: 12px;
    font-weight: 600;
    color: white;
}

/* Boutons de résultats améliorés */
#btn-continue-lesson {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

#btn-continue-lesson:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

#btn-retry-lesson {
    background: #e0e7ff;
    color: #667eea;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#btn-retry-lesson:hover {
    background: #c7d2fe;
    transform: translateY(-2px);
}

/* Responsive design */
@media (max-width: 768px) {
    .quiz-body {
        padding: 20px;
    }
}

/* ================================= */
/* AMÉLIORATIONS SUPPLÉMENTAIRES */
/* ================================= */

/* Timer visuel pour les questions */
.question-timer {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 10;
}

.timer-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.timer-circle svg {
    position: absolute;
    top: -3px;
    left: -3px;
    width: 66px;
    height: 66px;
    transform: rotate(-90deg);
}

.timer-circle svg circle {
    fill: none;
    stroke: #4ecdc4;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 188.5;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-circle.warning {
    animation: timerWarning 1s ease-in-out infinite;
}

@keyframes timerWarning {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.timer-circle.warning svg circle {
    stroke: #ef4444;
}

/* Streak counter */
.streak-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 100px;
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.streak-fire {
    font-size: 24px;
    animation: fireFlicker 1.5s ease-in-out infinite;
}

@keyframes fireFlicker {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(0.95) rotate(5deg); }
}

/* Score animation */
.score-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 72px;
    font-weight: 900;
    color: #4ecdc4;
    text-shadow: 0 0 30px rgba(78, 205, 196, 0.5);
    pointer-events: none;
    z-index: 10000;
    animation: scorePopup 1s ease-out forwards;
}

@keyframes scorePopup {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8) translateY(-50px);
    }
}

/* Effet de particules amélioré */
.particle {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    z-index: 1000;
}

.particle.star {
    width: 20px;
    height: 20px;
    background: #ffd93d;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: starFloat 2s ease-out forwards;
}

@keyframes starFloat {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) rotate(360deg) scale(1.5);
    }
}

/* Badges de réussite */
.achievement-badge {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10001;
    animation: achievementSlide 3s ease-out forwards;
}

@keyframes achievementSlide {
    0% {
        top: -100px;
    }
    20% {
        top: 50px;
    }
    80% {
        top: 50px;
    }
    100% {
        top: -100px;
    }
}

.achievement-icon {
    font-size: 36px;
}

.achievement-text {
    display: flex;
    flex-direction: column;
}

.achievement-title {
    font-weight: 700;
    color: #2d3748;
    font-size: 18px;
}

.achievement-desc {
    color: #718096;
    font-size: 14px;
}

/* Transition de niveau */
.level-up-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.level-up-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.level-up-content {
    text-align: center;
    color: white;
    animation: levelUpBounce 0.6s ease-out;
}

@keyframes levelUpBounce {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.level-up-icon {
    font-size: 120px;
    margin-bottom: 20px;
}

.level-up-title {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 10px;
}

.level-up-subtitle {
    font-size: 24px;
    opacity: 0.9;
}

/* Amélioration de la question image pour mobile */
@media (max-width: 768px) {
    .question-image img {
        max-height: 150px;
    }
    
    .question-timer {
        top: 10px;
        right: 10px;
    }
    
    .timer-circle {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .timer-circle svg {
        width: 56px;
        height: 56px;
    }
    
    .streak-counter {
        top: 10px;
        left: 10px;
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .streak-fire {
        font-size: 20px;
    }
    
    .score-popup {
        font-size: 48px;
    }
    
    .achievement-badge {
        padding: 15px 20px;
        width: 90%;
    }
    
    .achievement-icon {
        font-size: 28px;
    }
    
    .achievement-title {
        font-size: 16px;
    }
    
    .achievement-desc {
        font-size: 12px;
    }
}

/* Effet de glissement pour les questions sur mobile */
@supports (-webkit-touch-callout: none) {
    .quiz-body {
        -webkit-overflow-scrolling: touch;
    }
    
    .answer-option {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Animation d'entrée des éléments du parcours */
.parcours-route .lesson-node {
    animation: lessonNodeAppear 0.5s ease-out forwards;
    animation-delay: calc(var(--index) * 0.1s);
    opacity: 0;
}

@keyframes lessonNodeAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ================================= */
/* FIN AMÉLIORATIONS SUPPLÉMENTAIRES */
/* ================================= */ 

/* ================================= */
/* SYSTÈME DE STREAK ET COMBO */
/* ================================= */

/* Container de streak */
.streak-container {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 100px;
    display: none;
    align-items: center;
    gap: 10px;
    animation: streakBounce 0.5s ease-out;
}

.streak-container.show {
    display: flex;
}

@keyframes streakBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.streak-icon {
    font-size: 24px;
    animation: flameFlicker 1s ease-in-out infinite;
}

.streak-text {
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.streak-count {
    color: #ffd93d;
    font-size: 20px;
    font-weight: 900;
}

/* Message de combo */
.combo-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 2147483646;
    text-align: center;
    animation: comboPopup 1s ease-out forwards;
}

@keyframes comboPopup {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-10deg);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
    }
    80% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
}

.combo-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.combo-text {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================= */
/* OPTIMISATIONS MOBILE AGRESSIVES */
/* ================================= */

@media (max-width: 768px) and (max-height: 700px) {
    /* Petits écrans - réductions maximales */
    .quiz-fullscreen .quiz-header {
        padding: 10px 15px;
    }
    
    .quiz-fullscreen #lesson-title {
        display: none; /* Cacher le titre sur très petit écran */
    }
    
    .quiz-fullscreen .quiz-body {
        padding: 10px;
    }
    
    .quiz-fullscreen .question-container {
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .quiz-fullscreen .question-text {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .quiz-fullscreen .question-image img {
        max-height: 100px;
    }
    
    .quiz-fullscreen .answers-container {
        gap: 6px;
    }
    
    .quiz-fullscreen .answer-option {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .quiz-feedback-bar .feedback-main-content {
        padding: 15px 10px;
    }
    
    .feedback-result-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .feedback-result-message {
        font-size: 16px;
    }
    
    .btn-continue-main {
        padding: 12px 30px;
        font-size: 14px;
    }
}

@media (max-height: 600px) {
    /* Écrans très courts (paysage) */
    .quiz-fullscreen .quiz-header {
        position: absolute;
        background: transparent;
        border: none;
    }
    
    .quiz-fullscreen .question-container {
        background: transparent;
        padding: 10px;
        box-shadow: none;
        border: none;
    }
    
    .quiz-fullscreen .answers-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    
    .quiz-fullscreen .answer-option {
        flex: 0 1 calc(50% - 8px);
        padding: 10px;
        font-size: 14px;
    }
}

/* ================================= */
/* FIN OPTIMISATIONS MOBILE */
/* ================================= */

/* Mode compact automatique - PRÉFIXÉ POUR LE QUIZ */
body.quiz-active.quiz-compact-mode .quiz-fullscreen .question-text {
    font-size: 20px !important; /* Plus grand même en compact */
    margin-bottom: 12px !important;
    line-height: 1.5 !important;
}

body.quiz-active.quiz-compact-mode .quiz-fullscreen .question-container {
    padding: 12px !important;
    margin-bottom: 8px !important;
}

body.quiz-active.quiz-compact-mode .quiz-fullscreen .answer-option {
    padding: 10px 15px !important;
    font-size: 14px !important;
    min-height: 40px !important;
}

body.quiz-active.quiz-compact-mode .quiz-fullscreen .answers-container {
    gap: 6px !important;
}

body.quiz-active.quiz-compact-mode .quiz-fullscreen .question-image img {
    max-height: 80px !important;
}

body.quiz-active.quiz-compact-mode .quiz-fullscreen .quiz-header {
    padding: 8px 15px !important;
}

body.quiz-active.quiz-compact-mode .quiz-fullscreen #lesson-title {
    font-size: 14px !important;
}

body.quiz-active.quiz-compact-mode .quiz-fullscreen .progress-bar {
    height: 8px !important;
} 

/* S'assurer qu'aucun élément ne dépasse en bas */
.quiz-fullscreen .quiz-body,
.quiz-fullscreen .answers-container,
.quiz-fullscreen .question-container {
    max-height: 100vh !important;
    max-height: 100dvh !important;
}

/* Forcer le masquage de tout élément qui pourrait créer un rectangle blanc */
.quiz-fullscreen .quiz-body > *:last-child {
    margin-bottom: 0 !important;
}

/* S'assurer que les réponses ne dépassent jamais */
.quiz-fullscreen .answers-container {
    position: relative;
    bottom: 0;
}

/* Masquer tout débordement potentiel */
.quiz-fullscreen::before,
.quiz-fullscreen::after {
    display: none !important;
}

/* Forcer le fond du quiz à couvrir tout l'écran */
.quiz-fullscreen {
    background-size: cover !important;
    background-attachment: fixed !important;
} 

/* Empêcher tout débordement en bas quand le feedback n'est pas affiché */
.quiz-fullscreen:not(.showing-feedback) .quiz-body {
    padding-bottom: 0 !important;
}

/* S'assurer que le conteneur des réponses n'a pas de marge en bas */
.quiz-fullscreen .answers-container {
    margin-bottom: 0 !important;
}

/* Forcer les réponses à rester dans les limites */
.quiz-fullscreen .answers-container {
    max-height: calc(100vh - 250px) !important; /* Ajuster selon l'espace nécessaire */
    max-height: calc(100dvh - 250px) !important;
} 

/* Système de popup d'explication propre */
.explanation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2147483646;
    display: none;
    justify-content: center;
    align-items: center;
}

.explanation-overlay.show {
    display: flex;
}

/* Popup d'explication */
.explanation-popup {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    max-width: min(500px, 85vw);
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

/* Bouton fermer */
.explanation-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #6b7280;
    transition: all 0.2s ease;
}

.explanation-close:hover {
    background: #e5e7eb;
    transform: scale(1.1);
} 

/* ================================= */ 
/* ===== Centre d'examen cliquable ===== */
/* ================================= */

/* Centre d'examen comme bouton de leçon */
.center-exam-transition.lesson-button {
    transition: transform 0.2s ease, opacity 0.3s ease;
}

/* Centre d'examen verrouillé */
.center-exam-transition.locked .center-exam-img {
    filter: grayscale(100%) brightness(0.5) drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

/* Centre d'examen déverrouillé */
.center-exam-transition.unlocked .center-exam-img {
    filter: grayscale(0%) brightness(1) drop-shadow(0 6px 12px rgba(0,0,0,0.3));
}

/* Centre d'examen complété */
.center-exam-transition.completed .center-exam-img {
    filter: grayscale(0%) brightness(1) drop-shadow(0 6px 12px rgba(88, 204, 2, 0.4));
}

/* Centre d'examen actif avec animation */
.center-exam-transition.active-lesson .center-exam-img {
    animation: examPulse 2s ease-in-out infinite;
}

@keyframes examPulse {
    0%, 100% {
        transform: scale(1);
        filter: grayscale(0%) brightness(1) drop-shadow(0 6px 12px rgba(88, 204, 2, 0.4));
    }
    50% {
        transform: scale(1.05);
        filter: grayscale(0%) brightness(1.1) drop-shadow(0 8px 16px rgba(88, 204, 2, 0.6));
    }
}

/* Hover sur centre d'examen déverrouillé */
.center-exam-transition.unlocked:hover .center-exam-img,
.center-exam-transition.completed:hover .center-exam-img {
    transform: scale(1.05);
    filter: grayscale(0%) brightness(1.05) drop-shadow(0 8px 16px rgba(0,0,0,0.4));
}

/* ================================= */ 
/* ===== Titre de chapitre fixe ===== */
/* ================================= */

/* Les styles du titre sont maintenant dans app-template.php pour éviter les doublons */

/* Styles supprimés - maintenant dans app-template.php */

/* ================================= */
/* ÉCRAN DE CHARGEMENT DES RÉSULTATS */
/* ================================= */

.results-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    z-index: 100;
}

.results-loading .loading-content {
    text-align: center;
    padding: 2rem;
}

.results-loading .loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e0e0e0;
    border-top-color: #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.results-loading h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.results-loading p {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animation pour la mise à jour de la progression */
.lesson-button-wrapper.updating .lesson-progress-fill {
    transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation de déverrouillage */
.lesson-button-wrapper.unlocking {
    animation: unlockPulse 0.6s ease-out;
}

@keyframes unlockPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Amélioration du feedback de fin de quiz */
#quiz-feedback-bar.last-question {
    background: #f8f9fa; /* Fond uniforme au lieu du dégradé violet */
}

#quiz-feedback-bar.last-question .feedback-main-content {
    background: white;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#quiz-feedback-bar.last-question .feedback-result-bar {
    height: 16px;
    border-bottom-width: 4px;
}

#quiz-feedback-bar.last-question #btn-continue-main {
    background: #58CC02;
    font-size: 18px;
    padding: 16px 40px;
    box-shadow: 0 6px 0 #46A302;
}

#quiz-feedback-bar.last-question #btn-continue-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #46A302;
}

#quiz-feedback-bar.last-question #btn-continue-main:active {
    transform: translateY(2px);
    box-shadow: 0 3px 0 #46A302;
}

/* Message de fin de quiz */
.quiz-complete-message {
    font-size: 16px;
    color: #6b7280;
    margin-top: 8px;
    font-weight: 600;
}

/* ================================= */
/* FIN ÉCRAN DE CHARGEMENT */
/* ================================= */ 

/* Ajustements pour très petits écrans */
@media (max-width: 400px) {
    .quiz-fullscreen .question-text {
        font-size: 20px;
        line-height: 1.5;
    }
}

/* ================================= */
/* DESIGN ÉPURÉ MINIMALISTE - PARCOURS */
/* ================================= */

/* Variables pour design épuré */
:root {
    --road-color: #e5e7eb;
    --road-border: #d1d5db;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --text-muted: #6b7280;
}

/* Route simple et élégante */
.road-base {
    stroke: var(--road-color);
    stroke-width: 48;
}

.road-border {
    stroke: var(--road-border);
    stroke-width: 52;
}

/* Ligne centrale discrète */
.road-center-line {
    stroke: white;
    stroke-width: 2;
    stroke-dasharray: 20 40;
    opacity: 0.4;
}

/* Intersections vers les boutons */
.road-intersection {
    stroke: var(--road-color);
    stroke-width: 24;
    opacity: 0.8;
}

/* ================================= */
/* BOUTONS ÉPURÉS MODERNES */
/* ================================= */

/* Suppression des styles complexes */
.lesson-button-wrapper::before,
.lesson-button-wrapper::after,
.lesson-button::before,
.lesson-button::after {
    display: none !important;
}

/* Badge numéro épuré */
.lesson-button .lesson-number {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-blue);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* États visuels simplifiés */
.lesson-button-wrapper.locked .lesson-number {
    background: var(--text-muted);
}

.lesson-button-wrapper.completed .lesson-number {
    background: var(--accent-green);
}

.lesson-button-wrapper.active .lesson-number {
    background: var(--accent-yellow);
}

/* Hover complètement statique */
.lesson-button-wrapper:not(.locked):hover .lesson-button {
    /* On garde le transform pour le centrage */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: none !important;
}

/* Suppression du mouvement au clic - DÉSACTIVÉ car interfère avec le centrage
.lesson-button:active {
    transform: none !important;
    transition: none !important;
} */

/* Suppression de toute transition sur les boutons */
.lesson-button,
.lesson-button * {
    transition: none !important;
}

/* Suppression des animations inutiles */
@keyframes neonGlow { /* Supprimé */ }
@keyframes activePulse { /* Supprimé */ }
@keyframes flagWave { /* Supprimé */ }
@keyframes treeSwayGentle { /* Supprimé */ }
@keyframes lampFlicker { /* Supprimé */ }
@keyframes roadLineFlow { /* Supprimé */ }

/* Retrait des décorations inutiles */
.road-tree,
.road-sign,
.road-lamp,
.road-barrier,
.environment-layer {
    display: none !important;
}

/* ================================= */
/* ADAPTATION MOBILE ÉPURÉE */
/* ================================= */

@media (max-width: 768px) {
    .lesson-button .lesson-number {
        width: 20px;
        height: 20px;
        font-size: 11px;
        top: -6px;
        right: -6px;
    }
}

/* ================================= */
/* FIN DESIGN ÉPURÉ */
/* ================================= */

/* ===============================
   POPUP DE SÉLECTION DE NIVEAU
   =============================== */

.level-selection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.level-selection-modal {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

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

.level-selection-modal .modal-header {
    background: var(--accent-blue);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.level-selection-modal .modal-header h2 {
    margin: 0;
    font-size: 24px;
}

.level-selection-modal .close-popup {
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.level-selection-modal .close-popup:hover {
    background: rgba(255, 255, 255, 0.2);
}

.level-selection-modal .modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.lesson-info {
    margin-bottom: 20px;
    text-align: center;
}

.lesson-info p {
    color: #666;
    margin-bottom: 15px;
}

.overall-progress {
    margin: 0 auto;
    max-width: 400px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.overall-progress span {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    color: #1a1a1a;
    font-size: 16px;
}

.overall-progress .progress-bar {
    background: #e5e7eb;
    height: 12px;
    border-radius: 20px;
    overflow: hidden;
}

.overall-progress .progress-fill {
    background: linear-gradient(90deg, #58CC02 0%, #46A302 100%);
    height: 100%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(70, 163, 2, 0.2);
}

.levels-grid {
    display: grid;
    gap: 15px;
}

.level-selection-item {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px 15px;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.level-selection-item:hover:not(.locked) {
    border-color: var(--accent-blue);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.level-selection-item.completed {
    background: #e8f5e9;
    border-color: #4caf50;
}

.level-selection-item.failed {
    background: #ffebee;
    border-color: #f44336;
}

.level-selection-item.locked {
    background: #f5f5f5;
    border-color: #ddd;
    opacity: 0.7;
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.level-number {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.status-icon {
    font-size: 20px;
}

.level-body {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.status-text {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.stars-display {
    font-size: 14px;
    letter-spacing: 2px;
}

.level-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
}

.reward-text {
    font-size: 12px;
    color: #666;
}

.btn-start-level {
    background: #58CC02;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 0 #46A302;
    position: relative;
    top: 0;
    white-space: nowrap;
    min-width: 140px;
    display: inline-block;
    text-align: center;
}

.btn-start-level:hover:not(:disabled) {
    /* Pas d'effet au hover */
}

.btn-start-level:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #46A302;
}

.btn-start-level:disabled {
    background: #999;
    box-shadow: 0 4px 0 #777;
    cursor: not-allowed;
    opacity: 0.8;
}

.btn-start-level:disabled:active {
    transform: none;
    box-shadow: 0 4px 0 #777;
}

.level-selection-item.completed .btn-start-level {
    background: #FF7E00;
    box-shadow: 0 4px 0 #CC6400;
}

.level-selection-item.completed .btn-start-level:active {
    box-shadow: 0 2px 0 #CC6400;
}

/* Responsive pour mobile */
@media (max-width: 600px) {
    .level-selection-modal {
        width: 95%;
        max-height: 90vh;
        margin: 20px auto;
    }
    
    .level-selection-modal .modal-header {
        padding: 15px;
    }
    
    .level-selection-modal .modal-header h2 {
        font-size: 18px;
    }
    
    .level-selection-modal .modal-body {
        padding: 15px;
        max-height: calc(90vh - 70px);
    }
    
    .level-selection-item {
        padding: 10px 12px;
        margin-bottom: 8px;
    }
    
    .level-number {
        font-size: 15px;
    }
    
    .status-icon {
        font-size: 18px;
    }
    
    .level-body {
        margin-bottom: 8px;
    }
    
    .status-text {
        font-size: 13px;
    }
    
    .reward-text {
        font-size: 11px;
    }
    
    .btn-start-level {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 70px;
    }
    
    .lesson-info p {
        font-size: 14px;
    }
    
    .overall-progress {
        margin-bottom: 15px;
    }
    
    .overall-progress span {
        font-size: 14px;
    }
}