* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* Palette unifiée (variables) */
:root {
    --grad-intermediate: linear-gradient(145deg, #7b5cff 0%, #a689ff 100%);
    --grad-advanced: linear-gradient(145deg, #7b5cff 0%, #a689ff 100%);
    --grad-beginner: linear-gradient(145deg, #26a69a 0%, #4db6ac 100%);
    --color-text: #212744;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--grad-intermediate);
    min-height: 100vh;
    padding-bottom: 50px;
}

/* Header et Navigation */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-btn {
    background: var(--grad-advanced);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.3s;
    font-weight: 600;
    white-space: nowrap;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 94, 122, 0.3);
}

h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5em;
}

nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(123, 92, 255, 0.3) transparent;
    -webkit-overflow-scrolling: touch;
    padding: 2px 0;
}

nav::-webkit-scrollbar {
    height: 4px;
}

nav::-webkit-scrollbar-track {
    background: transparent;
}

nav::-webkit-scrollbar-thumb {
    background: rgba(123, 92, 255, 0.3);
    border-radius: 2px;
}

.nav-btn {
    background: var(--grad-intermediate);
    color: white;
    border: none;
    padding: 5px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.3s;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-btn:hover {
    background: var(--grad-intermediate);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: var(--grad-advanced);
    transform: scale(1.03);
}

.nav-btn-booking {
    background: linear-gradient(145deg, #42d392 0%, #67e8a7 100%) !important;
    animation: pulse-glow 2s ease-in-out infinite;
}

.nav-btn-booking:hover {
    background: linear-gradient(145deg, #42d392 0%, #67e8a7 100%) !important;
    transform: translateY(-2px) scale(1.05);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(66, 211, 146, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(66, 211, 146, 0); }
}

/* Container principal */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Sections */
.section {
    display: none;
    background: transparent;
    border-radius: 0;
    padding: 40px;
    box-shadow: none;
    margin-bottom: 30px;
}

.section.active {
    display: block !important;
    animation: fadeIn 0.5s;
}

/* Solution propre : retirer le padding du parent .section pour le dashboard */
#home.section #home-dashboard {
    padding: 0 !important;
    margin: 0 !important;
}

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

/* Dashboard */
.dashboard-content {
    max-width: 1000px;
    margin: 0 auto;
}

/* Carrousels dans home-dashboard : prendre toute la largeur */
#home-dashboard .dashboard-content {
    max-width: 100%;
    padding: 0;
    margin: 0;
}

#home-dashboard .dashboard-section {
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

/* Exception pour les sections de carrousels qui doivent commencer après la sidebar */
#home-dashboard #home-suggested-carousel-section,
#home-dashboard #home-course-notes-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#home-dashboard .dashboard-cards {
    width: 100%;
}

/* Carrousels dans home : prendre toute la largeur disponible en débordant du conteneur */
/* Utiliser la même structure que .courses-carousel-section qui fonctionne bien */
#home-dashboard #home-suggested-carousel-section {
    width: calc(100vw - 260px) !important;
    position: relative;
    margin-left: -40px !important; /* Même valeur que .courses-carousel-section */
    margin-right: 0 !important;
    padding-left: 40px !important; /* Remettre le padding comme les autres carrousels */
    padding-right: 0 !important;
    box-sizing: border-box;
    left: 0 !important;
}

/* Le titre de la section uniquement (pas les h3 des cartes dans le carrousel) */
#home-dashboard #home-suggested-carousel-section > h3 {
    padding-left: 5px !important; /* Même padding que .carousel-title */
    padding-right: 20px !important;
    margin-left: 0;
    margin-right: 0;
}

/* Le conteneur intermédiaire - ne doit pas être un grid */
#home-dashboard #home-suggested-carousel-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    display: block !important; /* Pas de grid pour les carrousels */
}

/* S'assurer que .dashboard-cards dans le conteneur suggéré n'a pas de grid */
#home-dashboard #home-suggested-carousel-container.dashboard-cards {
    display: block !important; /* Pas de grid, c'est un carrousel */
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

#home-dashboard #home-personal-notes-carousel-container {
    width: calc(100vw - 260px) !important;
    position: relative;
    margin-left: -20px !important; /* Sortir du padding de la section (20px) */
    margin-right: 0 !important;
    padding-left: 0 !important; /* Pas de padding, commence juste après la sidebar */
    padding-right: 0 !important;
    box-sizing: border-box;
    left: 0 !important; /* Enlever le left qui cause le problème */
}

/* Les titres dans les sections de notes personnelles commencent juste après la sidebar */
#home-dashboard #home-personal-notes-carousel-container .dashboard-section h3 {
    padding-left: 0;
    padding-right: 20px;
    margin-left: 0;
    margin-right: 0;
}

/* Les conteneurs de carrousels dans les notes personnelles commencent au même endroit que le titre */
#home-dashboard #home-personal-notes-carousel-container .dashboard-section {
    padding-left: 0;
    padding-right: 0;
}

/* Supprimé - doublon */

#home-dashboard #home-personal-notes-carousel-container .dashboard-section {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Carrousels dans home : prendre toute la largeur disponible */
#home-dashboard .carousel-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 20px 20px 20px;
    margin: 0;
}

/* Les carrousels dans les sections qui commencent après la sidebar */
/* Utiliser le même style que .carousel-container qui fonctionne bien */
#home-dashboard #home-suggested-carousel-container .carousel-container {
    padding-left: 0 !important; /* Commence juste après la sidebar comme les autres */
    padding-right: 5px !important;
    padding-top: 10px !important;
    padding-bottom: 20px !important;
    /* Les autres propriétés sont déjà définies dans .carousel-container */
}

/* Les autres carrousels du dashboard */
#home-dashboard #home-personal-notes-carousel-container .carousel-container,
#home-dashboard #home-course-notes-container .carousel-container {
    width: 100% !important;
    max-width: none !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    padding-top: 10px !important;
    padding-bottom: 20px !important;
    margin: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    display: flex !important;
    gap: 20px !important;
    box-sizing: border-box !important;
}

/* Les cartes .dashboard-card dans les carrousels doivent avoir une largeur fixe */
#home-dashboard .carousel-container .dashboard-card {
    flex: 0 0 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    flex-shrink: 0 !important;
}

/* Section "Mes Notes de Cours" - même alignement que les autres carrousels */
#home-dashboard #home-course-notes-section {
    width: calc(100vw - 260px) !important;
    position: relative;
    margin-left: -20px !important; /* Sortir du padding de la section (20px) */
    margin-right: 0 !important;
    padding-left: 0 !important; /* Pas de padding, commence juste après la sidebar */
    padding-right: 0 !important;
    box-sizing: border-box;
    left: 0 !important; /* Enlever le left qui cause le problème */
}

/* Le titre de la section "Mes Notes de Cours" commence juste après la sidebar */
#home-dashboard #home-course-notes-section h3 {
    padding-left: 0 !important;
    padding-right: 20px !important;
    margin-left: 0;
    margin-right: 0;
}

/* Le conteneur du carrousel "Mes Notes de Cours" commence au même endroit que le titre */
#home-dashboard #home-course-notes-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

/* S'assurer que .dashboard-cards dans le conteneur n'a pas de padding */
#home-dashboard #home-course-notes-container.dashboard-cards {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
}

/* Section "Mes Exercices Faits (Archives)" - même alignement que les autres carrousels */
#home-dashboard #home-completed-exercises-section {
    width: calc(100vw - 260px) !important;
    position: relative;
    margin-left: -20px !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
    left: 0 !important;
}

/* Le titre de la section "Mes Exercices Faits" commence juste après la sidebar */
#home-dashboard #home-completed-exercises-section h3 {
    padding-left: 0 !important;
    padding-right: 20px !important;
    margin-left: 0;
    margin-right: 0;
}

/* Le conteneur du carrousel "Mes Exercices Faits" commence au même endroit que le titre */
#home-dashboard #home-completed-exercises-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

/* Style pour les exercices complétés - grisage et bandeau */
.dashboard-card.exercise-completed {
    opacity: 0.75 !important;
    transition: all 0.3s ease;
    overflow: visible !important;
}

.dashboard-card.exercise-completed:hover {
    opacity: 0.9 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 211, 146, 0.3);
}

/* Bandeau diagonal "FAIT" pour les exercices complétés */
.exercise-completed-ribbon {
    position: absolute;
    top: 20px;
    right: -100px;
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    pointer-events: none;
    background: #42d392;
    padding: 6px 0;
    transform: rotate(45deg);
    transform-origin: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
    margin-right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    display: block !important; /* Pas de grid pour les carrousels */
}

/* Supprimé - règle en doublon, déjà couverte ci-dessus */

.dashboard-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.dashboard-section:last-child {
    border-bottom: none;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: #3d3d3d;
    color: #ffffff;
    padding: 20px;
    padding-top: 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
    border: 1px solid #3a3a3a;
    margin-top: 4px;
    transform-origin: center;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    border-color: #4a4a4a;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dashboard-card h4 {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    color: white;
    font-weight: 700;
    line-height: 1.2;
}

.dashboard-card p {
    margin: 4px 0;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.dashboard-card .card-date {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 4px;
}

/* Menu de sections */
.section-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Sections de dialogues - forcer l'affichage en colonne */
#dialogues .section-menu .general-section,
#dialogues .section-menu .personalized-section {
    grid-column: 1 / -1;
    display: block;
    width: 100%;
}

.section-card {
    background: #3d3d3d;
    color: #ffffff;
    padding: 20px;
    padding-top: 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
    border: 1px solid #3a3a3a;
    margin-top: 4px;
    transform-origin: center;
}

/* EXCEPTION : Cartes avec images n'ont AUCUN padding */
.section-card.texte-card-with-image,
/* Règle pour TOUTES les cartes qui contiennent un conteneur d'image, même sans la classe .texte-card-with-image */
.section-card:has(.texte-card-image-container) {
    padding: 0 !important;
    padding-top: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
}

/* Cartes « jeu de consolidation » (Entraînement) — bordure rose + lueur animée discrète */
@keyframes consolidation-game-glow {
    0%, 100% {
        box-shadow:
            0 4px 16px rgba(236, 72, 153, 0.22),
            0 0 0 1px rgba(244, 114, 182, 0.35);
        border-color: #ec4899;
    }
    50% {
        box-shadow:
            0 6px 26px rgba(236, 72, 153, 0.38),
            0 0 0 2px rgba(251, 113, 133, 0.55);
        border-color: #f472b6;
    }
}

.section-card.section-card--consolidation-game {
    border: 3px solid #ec4899 !important;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.22);
    animation: consolidation-game-glow 2.8s ease-in-out infinite;
}

.section-card.section-card--consolidation-game:hover {
    animation: none;
    box-shadow: 0 8px 28px rgba(236, 72, 153, 0.38);
    border-color: #db2777 !important;
}

@media (prefers-reduced-motion: reduce) {
    .section-card.section-card--consolidation-game,
    .cartes-carousel .section-card.texte-card-with-image.section-card--consolidation-game,
    .texte-cards-container .section-card.texte-card-with-image.section-card--consolidation-game,
    .cartes-carousel .section-card:has(.texte-card-image-container).section-card--consolidation-game,
    .texte-cards-container .section-card:has(.texte-card-image-container).section-card--consolidation-game {
        animation: none;
    }
}

.consolidation-game-badge {
    display: inline-block;
    font-size: 0.78em;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.04em;
    color: #be185d;
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border: none;
    box-shadow: 0 1px 4px rgba(190, 24, 93, 0.12);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 8px;
}

/* Pastille discrète pour les cours avec mini-jeux */
.section-card.has-mini-games {
    overflow: visible;
}

.section-card.has-mini-games::before {
    content: '🎮';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(66, 211, 146, 0.15);
    border-radius: 50%;
    border: 1px solid rgba(66, 211, 146, 0.3);
    opacity: 0.6;
    transition: all 0.2s ease;
    z-index: 10;
}

.section-card.has-mini-games:hover::before {
    opacity: 1;
    background: rgba(66, 211, 146, 0.25);
    border-color: rgba(66, 211, 146, 0.5);
    transform: scale(1.1);
}

/* Pastille discrète pour les cours vérifiés */
.section-card.is-verified {
    overflow: visible;
    position: relative;
}

/* Masquer TOUTES les pastilles pour les cartes avec images, MÊME avec admin-badges-visible */
.cartes-carousel .section-card.texte-card-with-image.is-verified::after,
.texte-cards-container .section-card.texte-card-with-image.is-verified::after,
.cartes-carousel .section-card.texte-card-with-image.has-mini-games::before,
.texte-cards-container .section-card.texte-card-with-image.has-mini-games::before,
.cartes-carousel .section-card.texte-card-with-image.admin-badges-visible.is-verified::after,
.texte-cards-container .section-card.texte-card-with-image.admin-badges-visible.is-verified::after,
.cartes-carousel .section-card.texte-card-with-image.admin-badges-visible.has-mini-games::before,
.texte-cards-container .section-card.texte-card-with-image.admin-badges-visible.has-mini-games::before {
    display: none !important;
    content: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.section-card.is-verified::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 34px; /* À gauche de la pastille mini-jeux */
    width: 24px;
    height: 24px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(66, 211, 146, 0.2);
    color: #42d392;
    border-radius: 50%;
    border: 2px solid rgba(66, 211, 146, 0.5);
    opacity: 0.8;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(66, 211, 146, 0.2);
}

.section-card.is-verified:hover::after {
    opacity: 1;
    background: rgba(66, 211, 146, 0.3);
    border-color: rgba(66, 211, 146, 0.7);
    transform: scale(1.1);
    box-shadow: 0 3px 6px rgba(66, 211, 146, 0.3);
}

/* Règle par défaut pour ::after - masquée sauf pour les cas spécifiques */
.section-card::after {
    display: none;
}

/* Exception : afficher ::after pour le badge vérifié */
.section-card.is-verified::after {
    display: flex;
}

/* ============================================
   BARRES DE PROGRESSION DES COURS
   ============================================ */

/* Container de la barre de progression sur une carte */
.course-progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    z-index: 1;
}

/* Barre de progression */
.course-progress-bar {
    height: 100%;
    min-height: 4px;
    background: linear-gradient(90deg, #42d392 0%, #67e8a7 100%);
    transition: width 0.5s ease;
    position: relative;
    border-radius: 0 0 12px 12px;
}

/* Checkmark dans la barre quand complété */
.course-progress-bar .course-progress-checkmark {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 9px;
    line-height: 1;
}

/* Pastille "Cours complété" */
.course-completed-badge {
    position: absolute;
    top: 8px;
    right: 60px; /* À gauche des pastilles admin */
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(66, 211, 146, 0.25);
    color: #42d392;
    border-radius: 50%;
    border: 2px solid rgba(66, 211, 146, 0.6);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(66, 211, 146, 0.3);
}

/* ============================================
   INDICATEURS VISUELS PARCOURS (FAUX AMIS)
   ============================================ */

/* Carte complétée dans un parcours (style renforcé pour les parcours séquentiels) */
.section-card.course-completed {
    border: 2px solid #42d392 !important;
    border-color: rgba(66, 211, 146, 0.8) !important;
    opacity: 0.95;
    transition: all 0.3s ease;
    overflow: visible !important; /* Permettre au checkmark de dépasser */
}

.section-card.course-completed:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 211, 146, 0.3);
}

/* Checkmark sur carte complétée */
.step-completed-checkmark {
    animation: checkmark-appear 0.3s ease-out;
    overflow: visible !important;
    clip-path: none !important;
}

/* S'assurer que les cartes complétées permettent au ruban de dépasser */
.section-card.course-completed .step-completed-checkmark {
    overflow: visible !important;
    clip-path: none !important;
}

@keyframes checkmark-appear {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Carte suivante (prochaine étape) */
.section-card.next-step {
    border: 3px solid #7b5cff;
    animation: pulse-border 2s ease-in-out infinite;
    transform: scale(1.02);
    transition: transform 0.3s ease;
    position: relative;
}

.section-card.next-step:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 16px rgba(123, 92, 255, 0.3);
}

@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(123, 92, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(123, 92, 255, 0);
    }
}

/* Badge "Étape suivante" */
.next-step-badge {
    animation: badge-appear 0.3s ease-out;
}

@keyframes badge-appear {
    from {
        transform: translateX(-10px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}


/* ============================================
   BARRES DE PROGRESSION PAR SECTION
   ============================================ */

.section-progress-container {
    margin: 4px 0 8px 0;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

/* Barre de progression inline (même ligne que le titre) */
.section-progress-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    font-size: 0.9em;
}

.section-progress-text {
    font-size: 0.85em;
    color: #666;
    font-weight: 500;
}

.section-progress-percentage {
    font-size: 0.85em;
    font-weight: 600;
    color: #42d392;
}

.section-progress-bar-inline {
    width: 120px;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.section-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.section-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

/* Barre de progression complétée (verte avec checkmark) */
.section-progress-bar-fill.completed {
    background: linear-gradient(90deg, #42d392 0%, #67e8a7 100%) !important;
    box-shadow: 0 0 8px rgba(66, 211, 146, 0.4);
}

.section-progress-checkmark {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 0.9em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Pourcentage et texte en vert quand complété */
.section-progress-percentage.completed,
.section-progress-text.completed {
    color: #42d392 !important;
    font-weight: 700;
}

/* Animation pour le badge de complétion */
@keyframes badge-appear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Animation pour la barre au passage 2/3 → 3/3 */
@keyframes progress-complete {
    0% {
        box-shadow: 0 0 0 rgba(66, 211, 146, 0);
    }
    50% {
        box-shadow: 0 0 12px rgba(66, 211, 146, 0.6);
        transform: scaleY(1.1);
    }
    100% {
        box-shadow: 0 0 8px rgba(66, 211, 146, 0.4);
        transform: scaleY(1);
    }
}

/* Animation discrète pour le titre au passage 2/3 → 3/3 */
@keyframes title-celebration {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* ============================================
   PASTILLES ADMIN (visibles uniquement pour l'admin)
   ============================================ */

/* Les pastilles admin sont cachées par défaut et affichées via JavaScript */
.section-card.has-mini-games::before,
.section-card.is-verified::after {
    display: none !important;
}

/* Classe pour afficher les pastilles admin (ajoutée via JS si admin) */
.section-card.admin-badges-visible.has-mini-games::before,
.section-card.admin-badges-visible.is-verified::after {
    display: flex !important;
}

/* Les classes de niveau appliquent une ombre colorée par défaut */
.section-card.level-beginner {
    box-shadow: 0 4px 12px rgba(255, 122, 158, 0.2);
}

.section-card.level-intermediate {
    box-shadow: 0 4px 12px rgba(123, 92, 255, 0.2);
}

.section-card.level-advanced {
    box-shadow: 0 4px 12px rgba(255, 94, 122, 0.2);
}

.section-card.level-green {
    box-shadow: 0 4px 12px rgba(66, 211, 146, 0.2);
}

.section-card.level-orange {
    box-shadow: 0 4px 12px rgba(255, 182, 163, 0.2);
}

.section-card:hover {
    background: #454545;
    transform: translateY(-2px) rotate(-1.5deg);
    /* La bordure et l'ombre sont gérées par les classes de niveau */
}

/* Hover avec couleurs de difficulté pour la bordure et l'ombre intensifiée */
.section-card.level-beginner:hover {
    border-color: #26a69a;
    box-shadow: 0 4px 12px rgba(38, 166, 154, 0.4);
    transform: translateY(-2px) rotate(-1.5deg);
}

.section-card.level-intermediate:hover {
    border-color: #7b5cff;
    box-shadow: 0 4px 12px rgba(123, 92, 255, 0.4);
    transform: translateY(-2px) rotate(-1.5deg);
}

.section-card.level-advanced:hover {
    border-color: #7b5cff;
    box-shadow: 0 4px 12px rgba(123, 92, 255, 0.4);
    transform: translateY(-2px) rotate(-1.5deg);
}

.section-card.level-green:hover {
    border-color: #42d392;
    box-shadow: 0 4px 12px rgba(66, 211, 146, 0.4);
    transform: translateY(-2px) rotate(-1.5deg);
}

.section-card.level-orange:hover {
    border-color: #FFB6A3;
    box-shadow: 0 4px 12px rgba(255, 182, 163, 0.4);
    transform: translateY(-2px) rotate(-1.5deg);
}

/* ============================================
   CTA DISCRET AU HOVER - CARTES DE COURS
   ============================================ */

/* CTA badge pour les cartes de cours classiques */
.section-card {
    position: relative;
}

/* CTA badge pour les cartes sans badge vérifié (::after disponible) */
/* Exclure les cartes de textes avec image qui ont leur propre overlay */
.section-card:not(.is-verified):not(.texte-card-with-image)::after {
    content: '';
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 0;
    height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
    font-size: 0.75em;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.section-card:not(.is-verified):not(.texte-card-with-image):hover::after {
    content: 'Commencer →';
    width: auto;
    min-width: 100px;
    padding: 0 14px;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Pour les cartes vérifiées, on utilise ::before pour le CTA (::after est utilisé pour le badge vérifié) */

/* Solution : utiliser ::before pour le CTA sur les cartes vérifiées (si pas de mini-games) */
.section-card.is-verified:not(.has-mini-games)::before {
    content: '';
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 0;
    height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
    font-size: 0.75em;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.section-card.is-verified:not(.has-mini-games):hover::before {
    content: 'Commencer →';
    width: auto;
    min-width: 100px;
    padding: 0 14px;
    opacity: 1;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Pour les cartes avec mini-games ET vérifiées : le ::before est pour mini-games, ::after pour vérifié */
/* On ne peut pas ajouter de CTA via pseudo-élément, mais on peut le faire via un wrapper HTML si nécessaire */
/* Pour l'instant, on laisse ces cartes sans CTA supplémentaire pour éviter les conflits */

/* Accessibilité: focus visibles */
.nav-btn:focus-visible,
.section-card:focus-visible,
.expression-audio-btn:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .9);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(123, 92, 255, .35);
}

/* Titres en blanc sur fonds à dégradé */
.section-card h3 {
    color: #fff;
}

/* Classe utilitaire pour texte caché (ARIA) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Carte bloquée (système de déblocage) */
.section-card.locked {
    position: relative;
    opacity: 0.6;
    filter: grayscale(0.5);
    pointer-events: none;
}

.section-card.locked .locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: not-allowed;
    pointer-events: auto;
}

.section-card.locked .locked-content {
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #4a5568;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: 1.1em;
    line-height: 1.5;
}

/* Pour les cartes avec image : limiter l'overlay à la zone image uniquement */
.section-card.locked:has(.texte-card-image-container) .locked-overlay {
    bottom: auto;
    aspect-ratio: 1 / 1;
    border-radius: 12px 12px 0 0;
}

/* Typographies mobiles XS */
@media (max-width: 375px) {
    h1 { font-size: 2.1em; }
    h2 { font-size: 1.6em; }
    .section-card h3 { font-size: 1.05em; }
    .expression-title { font-size: 1.25em; }
}

.section-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    color: white;
    font-weight: 700;
    line-height: 1.2;
}

.section-card h4 {
    margin: 0 0 6px 0;
    font-size: 1em;
    color: rgba(255,255,255,0.95);
    font-weight: 500;
    line-height: 1.3;
}

.section-card p {
    margin: 4px 0;
    font-size: 0.85em;
    color: rgba(255,255,255,0.8);
    line-height: 1.4;
}

.section-card .card-details {
    margin: 4px 0 0 0;
    font-size: 0.85em;
    color: rgba(255,255,255,0.75);
    line-height: 1.4;
}

/* Catégories de textes - Organisation visuelle */
/* Style pour le sommaire des exercices */
.table-of-contents a:hover {
    background: #e8dff5;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .table-of-contents ul {
        grid-template-columns: 1fr;
    }
}

.textes-category {
    margin-bottom: 25px;
}

.textes-category:last-child {
    margin-bottom: 0;
}

.textes-category-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #212744;
    margin-bottom: 2px;
    padding-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ============================================
   HEADER DE SECTION AVEC FILTRES INTÉGRÉS
   ============================================ */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid;
    border-image: linear-gradient(90deg, #667eea 0%, #764ba2 100%) 1;
}

.section-header-title {
    font-size: 1.8em;
    font-weight: 700;
    color: #212744;
    margin: 0;
    flex-shrink: 0;
}

.section-header-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.section-header-filters .level-filter-btn {
    width: auto;
    min-width: 50px;
    padding: 6px 14px;
    border: 1px solid #3a3a3a;
    background: #3d3d3d;
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9em;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.section-header-filters .level-filter-btn:hover {
    background: #454545;
    border-color: #4a4a4a;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.section-header-filters .level-filter-btn.active {
    background: linear-gradient(145deg, #7b5cff 0%, #a689ff 100%);
    color: #ffffff;
    border-color: #7b5cff;
    box-shadow: 0 3px 10px rgba(123, 92, 255, 0.4);
    font-weight: 700;
}

/* ============================================
   FILTRAGE ET CARROUSELS PAR NIVEAU
   ============================================ */

/* Filtres de niveau (ancienne version - pour compatibilité) */
.level-filters-container {
    margin-bottom: 15px;
    padding: 3px 0;
    width: 100%;
    background: transparent;
}

.level-filters-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
}

.level-filter-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.level-filter-btn {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #3a3a3a;
    background: #3d3d3d;
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.95em;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.level-filter-btn:hover {
    background: #454545;
    border-color: #4a4a4a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.level-filter-btn.active {
    background: linear-gradient(145deg, #7b5cff 0%, #a689ff 100%);
    color: #ffffff;
    border-color: #7b5cff;
    box-shadow: 0 4px 15px rgba(123, 92, 255, 0.4);
    font-weight: 700;
}

/* Barre de progression sous chaque bouton */
.level-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.level-progress-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%; /* Sera mis à jour dynamiquement plus tard */
    background: linear-gradient(90deg, #7b5cff 0%, #a689ff 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.level-filter-item.active .level-progress-bar::after {
    width: 100%;
}

/* Sections de niveau */
.level-section {
    margin-bottom: 20px;
    margin-top: 5px;
}

/* Carrousels */
.courses-carousel-section {
    margin-bottom: 25px;
    width: calc(100vw - 260px);
    margin-left: -40px; /* Sortir du padding gauche de la section */
    margin-right: 0;
    padding-left: 40px; /* Remettre le padding pour le titre et le contenu */
    padding-right: 0;
    position: relative;
}

.carousel-title {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    padding-left: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.carousel-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 5px 20px 5px;
    padding-left: 0; /* Commence juste après la sidebar pour les carrousels dans les sections */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(255, 255, 255, 0.1);
}

.carousel-container::-webkit-scrollbar {
    height: 8px;
}

.carousel-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.carousel-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.carousel-container::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Les cartes dans le carrousel gardent leur style existant mais avec une largeur fixe */
.carousel-container .section-card {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
}

/* Responsive pour les carrousels */
@media (max-width: 768px) {
    .carousel-container .section-card {
        flex: 0 0 250px;
        min-width: 250px;
        max-width: 250px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .section-header-title {
        font-size: 1.5em;
    }
    
    .section-header-filters {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .section-header-filters .level-filter-btn {
        flex: 1;
        min-width: 60px;
        padding: 6px 10px;
        font-size: 0.85em;
    }
    
    .level-filters-container {
        padding: 8px 0;
    }
    
    .level-filters-buttons {
        gap: 8px;
    }
    
    .level-filter-btn {
        padding: 6px 10px;
        font-size: 0.9em;
    }
    
    .level-progress-bar {
        height: 3px;
    }
}

.textes-category-subtitle {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
    padding-left: 2px;
    line-height: 1.3;
}

.level-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.75em;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Contenu des cours */
.course-content {
    display: none;
    background: transparent;
    border-radius: 0;
    padding: 15px 30px 30px 30px;
    box-shadow: none;
    margin-bottom: 20px;
}

.course-content.active {
    display: block !important;
    animation: fadeIn 0.5s;
}

.back-btn {
    background: #764ba2;
    color: white;
    padding: 8px 18px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(118, 75, 162, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 10px;
}

.back-btn:hover {
    transform: translateX(-3px);
    box-shadow: 0 12px 24px rgba(118, 75, 162, 0.4);
}

/* Bouton pour marquer le cours comme vérifié */
.course-verify-btn {
    background: rgba(66, 211, 146, 0.15);
    color: #42d392;
    padding: 8px 18px;
    border-radius: 30px;
    border: 2px solid rgba(66, 211, 146, 0.4);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    box-shadow: 0 4px 12px rgba(66, 211, 146, 0.2);
    transition: all 0.2s ease;
    margin-bottom: 15px;
    display: inline-block;
    margin-left: 10px;
}

.course-verify-btn:hover {
    background: rgba(66, 211, 146, 0.25);
    border-color: rgba(66, 211, 146, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 211, 146, 0.3);
}

.course-verify-btn:active {
    transform: translateY(0);
}

.course-verify-btn-clicked {
    animation: verifyButtonPulse 0.3s ease;
}

@keyframes verifyButtonPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(66, 211, 146, 0.4);
    }
    100% {
        transform: scale(1);
    }
}

h2 {
    color: #667eea;
    margin: 0 0 12px 0;
    font-size: 1.8em;
}

/* Assurer que les h2 dans les cours commencent en haut */
.course-content h2 {
    margin-top: 0 !important;
}

h3 {
    color: #764ba2;
    margin: 12px 0 10px 0;
    font-size: 1.3em;
}

h4 {
    color: #667eea;
    margin: 10px 0 8px 0;
    font-size: 1.1em;
}

p {
    line-height: 1.7;
    margin-bottom: 12px;
    color: #333;
}

/* Tableaux */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

th {
    background: linear-gradient(145deg, #7b5cff 0%, #a689ff 100%);
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 8px 10px;
    border-bottom: 1px solid #ddd;
}

tr:hover {
    background: #f5f5f5;
}

/* Sur mobile, wrapper scrollable pour les tables larges */
@media (max-width: 768px) {
    /* Les tables dans les cours peuvent être wrappées dans un div avec overflow */
    table {
        min-width: 100%;
    }
    
    /* Si une table est trop large, elle scrollera horizontalement */
    .course-content table,
    .section table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    
    .course-content table thead,
    .course-content table tbody,
    .course-content table tr {
        display: table;
        width: 100%;
        table-layout: auto;
    }
}

/* Boxes spéciaux */
.info-box {
    background: #e8eaf6;
    border-left: 4px solid #667eea;
    padding: 12px 14px;
    margin: 12px 0;
    border-radius: 8px;
}

.example-boxes-container {
    display: flex;
    gap: 15px;
    margin: 10px 0;
}

.example-boxes-container .example-box {
    flex: 1;
    margin: 0;
}

.example-box {
    background: #f3e5f5;
    border-left: 4px solid #764ba2;
    padding: 10px 12px;
    margin: 10px 0;
    border-radius: 8px;
}

.warning-box {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 10px 12px;
    margin: 10px 0;
    border-radius: 8px;
}

/* Exercices */
.exercise {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin: 25px 0;
    border: 2px solid #667eea;
}

.question {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
}

input[type="text"] {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    min-width: 150px;
    transition: border 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

input.correct {
    border-color: #42d392;
    background: #e8f5e9;
}

input.incorrect {
    border-color: #f44336;
    background: #ffebee;
}

/* Feedback individuel pour chaque question */
.feedback {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    display: none;
    line-height: 1.5;
}

.feedback.show {
    display: block;
}

.feedback.correct {
    background: #e8f5e9;
    border-left: 4px solid #42d392;
    color: #2e7d32;
}

.feedback.incorrect {
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

/* Couleurs pour le passé composé */
.auxiliaire {
    color: #667eea;
    font-weight: bold;
}

.participe-passe {
    color: #e91e63;
    font-weight: bold;
}

/* Boutons de vérification et explications */
.check-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 8px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.check-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.explanation {
    background: #f0f7ff;
    border-left: 4px solid #667eea;
    padding: 12px;
    margin-top: 8px;
    border-radius: 4px;
    font-size: 0.95em;
    color: #333;
    display: none;
}

.explanation.correct {
    background: #e8f5e9;
    border-left-color: #42d392;
    display: block;
}

.explanation.incorrect {
    background: #ffebee;
    border-left-color: #f44336;
    display: block;
}

button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    margin: 10px 5px;
    transition: all 0.3s;
}

button:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.result {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
    font-weight: bold;
}

.result.show {
    display: block;
}

.result.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result.partial {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

ul, ol {
    margin: 15px 0 15px 30px;
    line-height: 1.8;
}

li {
    margin: 8px 0;
}

strong {
    color: #667eea;
}

em {
    color: #764ba2;
    font-style: italic;
}

/* Home section - Mini-jeux */
.home-games {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px;
    max-width: 100%;
}

/* Assurer que les cartes de jeu prennent toute la largeur disponible */
.home-games .game-card {
    width: 100%;
    max-width: 100%;
}

/* Section "À découvrir" sur la page d'accueil */
.home-recommendations {
    max-width: 1200px;
    margin: 60px auto;
    padding: 40px 20px;
}

.recommendations-header {
    text-align: center;
    margin-bottom: 40px;
}

.recommendations-title {
    font-size: 2.5em;
    color: var(--accent-primary, #764ba2);
    margin-bottom: 10px;
    font-weight: 600;
}

.recommendations-subtitle {
    font-size: 1.1em;
    color: var(--text-secondary, #999);
}

.recommendations-content {
    margin-top: 30px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.recommendation-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recommendation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(118, 75, 162, 0.2);
    border-color: #764ba2;
}

.recommendation-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.recommendation-card h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
    font-weight: 600;
}

.recommendation-card p {
    color: #666;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .recommendations-grid {
        grid-template-columns: 1fr;
    }
    
    .recommendations-title {
        font-size: 2em;
    }
    
    .home-recommendations {
        padding: 20px 15px;
        margin: 40px auto;
    }
}

.game-card {
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Cartes entièrement colorées */
    background: transparent;
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.game-card-header {
    padding: 24px 28px;
    color: white;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.game-card-header h2 {
    margin: 0;
    font-size: 1.78em;
    color: #FFFFFF !important;
    font-weight: 600;
    letter-spacing: 0.55px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Animation pour l'icône de jeu (manette) */
.game-icon {
    display: inline-block;
    animation: gameIconPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

@keyframes gameIconPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
    }
}

/* Animation spécifique pour la grammaire (vert) */
.grammar-card .game-icon {
    animation: gameIconPulseGreen 2s ease-in-out infinite;
}

@keyframes gameIconPulseGreen {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 8px rgba(66, 211, 146, 0.8));
    }
}

/* Animation spécifique pour la conjugaison (rouge/bleu selon le temps) */
.conjugation-card .game-icon {
    animation: gameIconPulseRed 2s ease-in-out infinite;
}

.conjugation-card.tense-present .game-icon {
    animation: gameIconPulsePurple 2s ease-in-out infinite;
}

@keyframes gameIconPulseRed {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 8px rgba(255, 94, 122, 0.8));
    }
}

@keyframes gameIconPulsePurple {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 8px rgba(123, 92, 255, 0.8));
    }
}

/* Expression card - entièrement violet */
.expression-card {
    background: linear-gradient(145deg, #7b5cff 0%, #a689ff 100%);
}

.expression-card .game-card-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

/* Date card - entièrement vert émeraude */
.date-card {
    background: linear-gradient(145deg, #26a69a 0%, #4db6ac 100%);
}

.date-card .game-card-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.date-card .game-card-body {
    padding: 14px 28px;
}

/* Grammar card - couleur violet avec dégradé */
.grammar-card {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.grammar-card .game-card-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 12px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Bordure animée pulse */
.grammar-card .game-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: borderPulse 3s ease-in-out infinite;
}

/* Effet de brillance qui traverse */
.grammar-card .game-card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 4s ease-in-out infinite;
}

@keyframes borderPulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.8;
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

.grammar-card .game-card-header h2 {
    font-size: 1.5em;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #FFFFFF !important;
}

/* Icône animée */
.grammar-card .game-card-header .test-icon {
    display: inline-block;
    animation: iconPulse 2s ease-in-out infinite;
    font-size: 1.2em;
}

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

/* Style discret pour "5 min" */
.grammar-card .game-card-header .time-indicator {
    font-size: 0.6em;
    opacity: 0.6;
    font-weight: 400;
    margin-left: 4px;
}

/* Grammar prompt styles */
.grammar-prompt {
    margin-bottom: 10px;
}

.grammar-question-display {
    text-align: center;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.grammar-question-label {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
}

.grammar-question-text {
    font-size: 1.1em;
    font-weight: 700;
    color: white;
    font-family: 'Poppins', sans-serif;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: inline-block;
    white-space: nowrap;
}

.grammar-options-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.grammar-home-option-btn {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    width: 100%;
}

.grammar-home-option-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(4px);
}

.grammar-home-option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.grammar-home-option-btn.correct {
    background: rgba(66, 211, 146, 0.8);
    border-color: rgba(66, 211, 146, 1);
    color: white;
}

.grammar-home-option-btn.incorrect {
    background: rgba(244, 67, 54, 0.8);
    border-color: rgba(244, 67, 54, 1);
    color: white;
}

/* Conjugation card - couleur violet avec dégradé */
.conjugation-card {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    transition: background 0.5s ease;
}

/* Présent : violet avec dégradé */
.conjugation-card.tense-present {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

/* Passé composé : violet avec dégradé */
.conjugation-card.tense-passe-compose {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

/* S'assurer que le header hérite du fond de la carte */
.conjugation-card .game-card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 12px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Bordure animée pulse pour conjugation-card */
.conjugation-card .game-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: borderPulse 3s ease-in-out infinite;
}

/* Effet de brillance pour conjugation-card */
.conjugation-card .game-card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 4s ease-in-out infinite;
}

.conjugation-card .game-card-header h2 {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Présent : header avec le même fond bleu */
.conjugation-card.tense-present .game-card-header {
    background: transparent !important;
}

/* Passé composé : header avec le même fond rouge */
.conjugation-card.tense-passe-compose .game-card-header {
    background: transparent !important;
}

.conjugation-card .game-card-header h2 {
    font-size: 1.5em;
    color: #FFFFFF !important;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.game-card-body {
    padding: 28px;
    color: white;
    font-family: 'Poppins', sans-serif;
}

/* S'assurer que le body hérite du fond de la carte */
.conjugation-card .game-card-body {
    padding: 20px 28px;
    background: transparent !important;
}

/* Présent : body avec le même fond bleu */
.conjugation-card.tense-present .game-card-body {
    background: transparent !important;
}

/* Passé composé : body avec le même fond rouge */
.conjugation-card.tense-passe-compose .game-card-body {
    background: transparent !important;
}

/* S'assurer que la carte game-card avec conjugation-card hérite bien du fond violet */
.game-card.conjugation-card {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
}

/* S'assurer que QCMInputText (grammar-card) a toujours le fond violet */
.game-card.grammar-card {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
}

/* S'assurer que le body et header héritent du fond violet */
.game-card.grammar-card .game-card-body {
    background: transparent !important;
}

.game-card.grammar-card .game-card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Exception pour le quiz de rephrasing - background violet */
.game-card.conjugation-card.rephrasing-quiz {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
}

.game-card.conjugation-card.tense-present {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
}

/* Exception pour le quiz de rephrasing même avec tense-present */
.game-card.conjugation-card.rephrasing-quiz.tense-present {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
}

.game-card.conjugation-card.tense-passe-compose {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%) !important;
}

/* Translation card - violet avec dégradé */
.translation-card {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.translation-card .game-card-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 12px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Bordure animée pulse pour translation-card */
.translation-card .game-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: borderPulse 3s ease-in-out infinite;
}

/* Effet de brillance pour translation-card */
.translation-card .game-card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 4s ease-in-out infinite;
}

.translation-card .game-card-header h2 {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Animation pour l'icône de jeu dans les exercices */
h2 .game-icon {
    display: inline-block;
    animation: gameIconPulsePurple 2s ease-in-out infinite;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.translation-card .game-card-body {
    padding: 28px;
    color: white;
    font-family: 'Poppins', sans-serif;
}

.translation-question {
    margin-bottom: 16px;
    text-align: center;
}

.translation-question p {
    font-size: 1.5em;
    font-weight: 600;
    color: white;
    margin: 0;
    line-height: 1.5;
    font-family: 'Poppins', sans-serif;
}

.translation-input {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.translation-input input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-family: 'Poppins', sans-serif;
}

.translation-input input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.translation-input input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.25);
}

.translation-input button {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.translation-input button:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.translation-result {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    animation: fadeIn 0.5s;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.translation-result.correct {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.translation-result.incorrect {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.translation-result p {
    margin: 0;
    color: white;
    font-family: 'Poppins', sans-serif;
}

#translation-result-explanation {
    font-size: 0.9em;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    text-align: left;
}

#translation-result-explanation strong {
    color: white;
    font-weight: 700;
    font-size: 1em;
}

#translation-next {
    display: block;
    margin: 12px auto 0;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

#translation-next:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.translation-progress {
    text-align: center;
    margin-top: 16px;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-family: 'Poppins', sans-serif;
}

.translation-progress p {
    margin: 0;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.95);
}

.expression-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.expression-fr {
    font-size: 1.78em;
    font-weight: 600;
    color: white;
    margin: 0;
    line-height: 1.88;
    flex: 1;
}

.expression-audio-btn {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.expression-audio-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.expression-en {
    font-size: 1.12em;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 18px;
    font-weight: 500;
    line-height: 1.88;
}

.expression-explanation {
    font-size: 0.95em;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.88;
    font-style: italic;
    text-align: justify;
}

.date-text {
    font-size: 1.2em;
    color: white;
    text-align: center;
    font-weight: 600;
    line-height: 1.4;
    font-family: 'Poppins', sans-serif;
    margin: 0;
}

/* Conjugaison rapide - Format conversationnel */
.conjugation-prompt {
    margin-bottom: 10px;
}

.conjugation-instruction {
    text-align: center;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px;
    line-height: 1.4;
}

.instruction-text {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
}

.verb-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 700;
    color: white;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

.tense-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    color: white;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.conjugation-answer-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    justify-content: center;
}

.pronoun-display {
    font-size: 1.5em;
    font-weight: 700;
    color: white;
    font-family: 'Poppins', sans-serif;
    min-width: 45px;
    text-align: right;
    white-space: nowrap;
    flex-shrink: 0;
}

.conjugation-answer-line input {
    flex: 1;
    min-width: 200px;
    padding: 12px 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 1.1em;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-family: 'Poppins', sans-serif;
}

.conjugation-answer-line input::placeholder {
    color: rgba(102, 126, 234, 0.6);
}

.conjugation-answer-line input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.conjugation-answer-line button {
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    flex-shrink: 0;
}

/* Streak display */
.streak-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 0;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    font-size: 1em;
    font-weight: 700;
    color: white;
    font-family: 'Poppins', sans-serif;
    animation: fadeIn 0.3s ease-out;
}

.streak-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.streak-text {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.streak-pulse {
    animation: streakPulse 0.6s ease-out;
}

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

/* Animation de succès */
.success-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    pointer-events: none;
    display: none;
    align-items: center;
    justify-content: center;
}

.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(145deg, #42d392 0%, #67e8a7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 50px;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(66, 211, 146, 0.5);
}

.success-animation.animate .success-checkmark {
    animation: checkmarkScale 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

/* Confettis pour les grandes séries (optionnel, peut être activé plus tard) */
@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-200px) rotate(360deg);
        opacity: 0;
    }
}

/* Animation de confettis qui tombent */
@keyframes confettiFall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti-particle {
    will-change: transform, opacity;
}

/* Responsive : corrections pour les mini-jeux */
@media (max-width: 768px) {
    .conjugation-instruction {
        flex-wrap: wrap;
        gap: 4px;
        font-size: 0.95em;
    }
    
    .instruction-text {
        font-size: 0.9em;
        white-space: normal;
    }
    
    .verb-badge {
        font-size: 1em;
        padding: 4px 10px;
    }
    
    .tense-badge {
        font-size: 0.9em;
        padding: 4px 10px;
    }
    
    .conjugation-answer-line {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .grammar-question-text {
        font-size: 1.1em;
        padding: 10px 12px;
    }
    
    .grammar-home-option-btn {
        font-size: 0.95em;
        padding: 10px 14px;
    }
    
    .pronoun-display {
        font-size: 1.3em;
        min-width: 40px;
        text-align: center;
        width: 100%;
        margin-bottom: 4px;
    }
    
    .conjugation-answer-line input {
        min-width: 0;
        width: 100%;
        padding: 10px 14px;
        font-size: 1em;
    }
    
    .conjugation-answer-line button {
        width: 100%;
        padding: 10px 20px;
        font-size: 0.95em;
    }
    
    /* Timer et résultats sur tablette */
    .timer {
        font-size: 1.1em;
        padding: 6px 14px;
    }
    
    .conjugation-result {
        padding: 10px 14px;
    }
    
    #conjugation-result-explanation {
        font-size: 0.88em;
    }
    
    #conjugation-next {
        padding: 8px 18px;
        font-size: 0.92em;
    }
}

@media (max-width: 480px) {
    .conjugation-instruction {
        font-size: 0.85em;
        gap: 3px;
    }
    
    .instruction-text {
        font-size: 0.85em;
    }
    
    .verb-badge {
        font-size: 0.9em;
        padding: 3px 8px;
    }
    
    .tense-badge {
        font-size: 0.85em;
        padding: 3px 8px;
    }
    
    .pronoun-display {
        font-size: 1.2em;
    }
    
    .conjugation-answer-line input {
        padding: 8px 12px;
        font-size: 0.95em;
    }
    
    .conjugation-answer-line button {
        padding: 8px 16px;
        font-size: 0.9em;
    }
    
    /* Timer et résultats sur petits écrans */
    .timer {
        font-size: 1em;
        padding: 6px 12px;
    }
    
    .conjugation-result {
        padding: 10px 12px;
    }
    
    #conjugation-result-explanation {
        font-size: 0.85em;
    }
    
    #conjugation-next {
        padding: 6px 16px;
        font-size: 0.9em;
    }
}

.conjugation-answer-line button:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.conjugation-answer-line button:active {
    transform: translateY(0);
}

.timer {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    padding: 8px 16px;
    margin: 8px 0 12px 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.timer.warning {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    animation: pulse 1s infinite;
}

.timer.correct-answer-timer {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.timer.incorrect-answer-timer {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

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

.conjugation-result {
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    animation: fadeIn 0.5s;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-align: center;
}

.conjugation-result p {
    margin: 0 0 8px 0;
    font-size: 0.9em;
}

.conjugation-result.correct {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.conjugation-result.incorrect {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.conjugation-result p {
    margin: 0;
    color: white;
    font-family: 'Poppins', sans-serif;
}

#conjugation-result-explanation {
    font-size: 0.85em;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 8px 0;
    text-align: left;
}

#grammar-home-explanation {
    font-size: 0.85em;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 8px 0;
    text-align: left;
}

#conjugation-result-explanation strong {
    color: white;
    font-weight: 700;
    font-size: 1em;
}


#conjugation-next {
    display: block;
    margin: 12px auto 0;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

#conjugation-next:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Bouton Suivant pour le jeu rapide A2 (grammaire) */
#grammar-home-next {
    display: inline-block !important;
    margin: 12px auto 0 !important;
    padding: 12px 24px !important;
    min-width: 120px !important;
    width: auto !important;
    background: linear-gradient(145deg, #42d392 0%, #67e8a7 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 0.95em !important;
    font-weight: 600 !important;
    transition: all 0.3s !important;
    font-family: 'Poppins', sans-serif !important;
    text-align: center !important;
    box-sizing: border-box !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    line-height: 1.5 !important;
    box-shadow: 0 4px 12px rgba(66, 211, 146, 0.3) !important;
    position: relative !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

#grammar-home-next:hover {
    background: linear-gradient(145deg, #42d392 0%, #67e8a7 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(66, 211, 146, 0.4) !important;
}

#grammar-home-next:active {
    transform: translateY(0) !important;
}

/* S'assurer que le conteneur n'interfère pas */
.conjugation-result {
    pointer-events: auto !important;
}

.conjugation-result * {
    pointer-events: auto !important;
}

/* Bouton lien dans les cartes */
.game-card-link-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
    display: block;
    width: 100%;
    text-align: center;
}

.date-card .game-card-link-btn {
    margin-top: 10px;
    padding: 8px 16px;
    font-size: 0.85em;
}

.game-card-link-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Responsive Navigation */
@media (max-width: 1024px) {
    nav {
        gap: 4px;
    }
    
    .nav-btn {
        padding: 4px 12px;
        font-size: 0.8em;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 6px 8px;
    }
    
    nav {
        gap: 4px;
        padding: 1px 0;
    }
    
    .nav-btn {
        padding: 4px 10px;
        font-size: 0.75em;
        border-radius: 5px;
    }
}

/* Responsive */
/* Tous les écrans : 1 colonne pour que les jeux prennent toute la largeur disponible */
/* Les jeux sont empilés verticalement pour une meilleure lisibilité */
@media (min-width: 768px) {
    .home-games {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 100%;
    }
}

@media (min-width: 1024px) {
    .home-games {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 100%;
    }
}

.level-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.level-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.level-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.6);
}

.emoji {
    font-size: 3em;
    display: block;
    margin-bottom: 15px;
}

/* Boutons audio */
.audio-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.55em !important;
    box-shadow: 0 3px 7px rgba(102, 126, 234, 0.35) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.audio-btn:hover {
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 5px 10px rgba(102, 126, 234, 0.45) !important;
}

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

.audio-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3) !important;
}

.global-warning {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(145deg, #7b5cff 0%, #a689ff 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    font-weight: 600;
    letter-spacing: 0.2px;
    z-index: 2000;
    text-align: center;
}

.global-warning .warning-icon {
    font-size: 1.1em;
    flex-shrink: 0;
}

.global-warning .warning-text {
    font-size: 0.8em;
    line-height: 1.3;
}

/* Impression globale */
@media print {
    .print-hide { display: none !important; }
    body { background: #ffffff !important; }
    .section, .container { box-shadow: none !important; }
}

/* Section de réservation */
.reservation-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.calendly-inline-widget {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Bouton CTA flottant */
.floating-cta {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: linear-gradient(145deg, #42d392 0%, #67e8a7 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1em;
    box-shadow: 0 8px 24px rgba(66, 211, 146, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1500;
    transition: all 0.3s ease;
    animation: pulse-cta 2s ease-in-out infinite;
}

.floating-cta:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(66, 211, 146, 0.5);
    text-decoration: none;
    color: white;
}

.floating-cta:active {
    transform: translateY(-2px) scale(1.02);
}

.cta-icon {
    font-size: 1.3em;
}

.cta-text {
    white-space: nowrap;
}

@keyframes pulse-cta {
    0%, 100% { 
        box-shadow: 0 8px 24px rgba(66, 211, 146, 0.4);
    }
    50% { 
        box-shadow: 0 8px 32px rgba(66, 211, 146, 0.6);
    }
}

/* Responsive pour le bouton CTA */
@media (max-width: 768px) {
    .floating-cta {
        bottom: 50px;
        right: 15px;
        padding: 16px;
        border-radius: 50%;
        width: 56px;
        height: 56px;
        justify-content: center;
        font-size: 0.9em;
    }
    
    .cta-text {
        display: none;
    }
    
    .cta-icon {
        font-size: 1.5em;
    }
    
    body {
        padding-bottom: 45px;
    }
}

/* ============================================
   CORRECTIONS MOBILE - PROBLÈMES D'IMBRICATION
   ============================================ */

/* Réduction des paddings sur tablette et mobile */
@media (max-width: 768px) {
    /* Container principal - réduction padding */
    .container {
        padding: 0 12px;
        margin: 20px auto;
    }
    
    /* Sections - réduction padding */
    .section {
        padding: 20px 16px;
        margin-bottom: 20px;
        border-radius: 0;
    }
    
    /* Contenu des cours - réduction padding */
    .course-content {
        padding: 20px 16px;
        margin-bottom: 20px;
    }
    
    /* Boxes d'exemple côte à côte - empilées sur mobile */
    .example-boxes-container {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Boxes d'information - réduction padding */
    .info-box,
    .example-box,
    .warning-box {
        padding: 12px 14px;
        margin: 15px 0;
    }
    
    /* Game cards - réduction padding */
    .game-card-body {
        padding: 20px 16px;
    }
    
    .game-card-header {
        padding: 20px 16px;
    }
    
    /* Expression cards */
    .expression-card .game-card-body,
    .conjugation-card .game-card-body,
    .translation-card .game-card-body {
        padding: 20px 16px;
    }
    
    /* Date card */
    .date-card .game-card-body {
        padding: 12px 16px;
    }
    
    /* Tables - padding réduit */
    table {
        font-size: 0.9em;
    }
    
    th, td {
        padding: 8px 10px;
    }
    
    /* Exercices - padding réduit */
    .exercise {
        padding: 16px;
        margin: 20px 0;
    }
    
    .question {
        padding: 12px;
        margin: 15px 0;
    }
}

/* Réduction encore plus importante sur petits mobiles */
@media (max-width: 480px) {
    /* Container - padding minimal */
    .container {
        padding: 0 8px;
        margin: 15px auto;
    }
    
    /* Sections - padding minimal mais lisible */
    .section {
        padding: 16px 12px;
        border-radius: 0;
    }
    
    /* Contenu des cours - padding minimal */
    .course-content {
        padding: 16px 12px;
        border-radius: 0;
    }
    
    /* Boxes - padding minimal */
    .info-box,
    .example-box,
    .warning-box {
        padding: 10px 12px;
        margin: 12px 0;
    }
    
    /* Game cards - padding minimal */
    .game-card-body {
        padding: 16px 12px;
    }
    
    .game-card-header {
        padding: 16px 12px;
    }
    
    .expression-card .game-card-body,
    .conjugation-card .game-card-body,
    .translation-card .game-card-body {
        padding: 16px 12px;
    }
    
    .date-card .game-card-body {
        padding: 10px 12px;
    }
    
    /* Tables - padding très réduit */
    th, td {
        padding: 6px 8px;
        font-size: 0.85em;
    }
    
    /* Exercices - padding minimal */
    .exercise {
        padding: 12px;
        margin: 15px 0;
    }
    
    .question {
        padding: 10px;
        margin: 12px 0;
    }
    
    /* Titres - taille réduite */
    h2 {
        font-size: 1.6em;
        margin: 20px 0 15px 0;
    }
    
    h3 {
        font-size: 1.3em;
        margin: 15px 0 12px 0;
    }
    
    h4 {
        font-size: 1.1em;
        margin: 12px 0 8px 0;
    }
    
    /* Paragraphes - espacement réduit */
    p {
        margin-bottom: 12px;
        line-height: 1.7;
    }
}

/* Correction pour les text-container dans les cours HTML individuels */
@media (max-width: 768px) {
    .text-container {
        padding: 20px 16px !important;
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .text-container {
        padding: 16px 12px !important;
    }
}

/* Section "Vous aimerez aussi" - Navigation entre cours */
.related-courses-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 3px solid rgba(255, 193, 7, 0.3);
}

.related-courses-title {
    font-size: 1.8em;
    font-weight: 700;
    color: #212744;
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.related-courses-title::before,
.related-courses-title::after {
    content: '✨';
    font-size: 0.9em;
}

.related-courses-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Style des cartes "Vous aimerez aussi" - même design que les cartes principales */
.related-course-card {
    color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Le background sera défini par les classes level-* comme les autres cartes */
}

.related-course-card::after {
    display: none;
}

.related-course-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.6);
}

.related-course-card:hover::after {
    display: none;
}

.related-course-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: white;
    font-weight: 600;
}

.related-course-card p {
    margin: 5px 0;
    font-size: 0.9em;
    color: rgba(255,255,255,0.9);
}

.related-course-card:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .9);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, .35);
}

/* Responsive pour les cartes de navigation */
@media (max-width: 768px) {
    .related-courses-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .related-courses-title {
        font-size: 1.5em;
    }
}

/* ============================================
   MODAL D'AUTHENTIFICATION
   ============================================ */

.auth-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
    pointer-events: none;
}

.auth-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

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

.auth-modal-content {
    background: white;
    border-radius: 0;
    padding: 0;
    max-width: 1000px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUp 0.3s ease-out;
    display: flex;
    height: 600px;
}

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

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 100;
}

.auth-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.auth-modal-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Section gauche : Branding */
.auth-modal-branding {
    flex: 0 0 35%;
    background: linear-gradient(135deg, #e8e4ff 0%, #d4c5ff 100%);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
}

.auth-branding-icon {
    margin-bottom: 40px;
}

.auth-branding-icon svg {
    width: 60px;
    height: 60px;
}

.auth-branding-text {
    color: #888;
    font-size: 1.05em;
    line-height: 1.7;
    margin: 0 0 40px 0;
    font-weight: 400;
}

.auth-branding-illustration {
    margin-top: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.85;
    padding-bottom: 20px;
}

.auth-branding-illustration svg {
    width: 180px;
    height: 180px;
}

/* Section droite : Formulaire */
.auth-modal-form-section {
    flex: 1;
    background: white;
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

.auth-language-selector {
    position: absolute;
    top: 20px;
    right: 60px;
    z-index: 10;
}

.auth-language-select {
    padding: 6px 12px 6px 8px;
    border: none;
    border-radius: 4px;
    background: transparent;
    font-size: 0.9em;
    color: #666;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    padding-right: 24px;
}

.auth-language-select:hover {
    color: #333;
}

.auth-form {
    display: none;
    flex-direction: column;
    flex: 1;
}

.auth-form.active {
    display: flex;
}

.auth-form h2 {
    margin: 0 0 32px 0;
    color: #000;
    font-size: 1.8em;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.auth-form-group {
    margin-bottom: 20px;
    position: relative;
}

.auth-form-group input {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    font-size: 1em;
    transition: border-color 0.2s;
    background: transparent;
    box-sizing: border-box;
}

.auth-form-group input::placeholder {
    color: #999;
    opacity: 1;
}

.auth-form-group input:focus {
    outline: none;
    border-bottom-color: #667eea;
    border-bottom-width: 2px;
}

.auth-form-group-password {
    display: flex;
    align-items: center;
}

.auth-form-group-password input {
    flex: 1;
    padding-right: 40px;
}

.auth-password-toggle {
    position: absolute;
    right: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-password-toggle:hover {
    color: #667eea;
}

.auth-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.auth-btn-primary {
    width: 100%;
    padding: 14px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.auth-btn-primary:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #999;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.auth-divider span {
    padding: 0 15px;
    font-size: 0.9em;
    font-weight: 500;
}

.auth-btn-social {
    width: 100%;
    padding: 12px 16px;
    background: white;
    color: #000;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s;
    margin-bottom: 12px;
    box-shadow: none;
}

.auth-btn-social:hover {
    background: #f5f5f5;
    border-color: #ccc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.auth-btn-social svg {
    flex-shrink: 0;
}

.auth-btn-google {
    background: white;
}

.auth-btn-facebook {
    background: white;
}

.auth-switch-form {
    margin-top: 20px;
    text-align: center;
    color: #999;
    font-size: 0.9em;
}

.auth-switch-form a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-switch-form a:hover {
    text-decoration: underline;
}

/* Responsive pour la modal */
@media (max-width: 768px) {
    .auth-modal-content {
        width: 95%;
        max-height: 95vh;
        flex-direction: column;
        height: auto;
    }
    
    .auth-modal-branding {
        flex: 0 0 auto;
        padding: 40px 30px;
        min-height: 200px;
    }
    
    .auth-branding-illustration {
        display: none;
    }
    
    .auth-modal-form-section {
        padding: 30px 20px;
    }
    
    .auth-form {
        padding: 0;
    }
    
    .auth-language-selector {
        top: 15px;
        right: 20px;
    }
}

/* ============================================
   OVERLAY DE CHARGEMENT AUTHENTIFICATION
   ============================================ */

.auth-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10001; /* Au-dessus de la modal d'auth (z-index: 10000) */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.auth-loading-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.auth-loading-content {
    background: white;
    border-radius: 16px;
    padding: 40px 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: slideUpFadeIn 0.3s ease-out;
}

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

.auth-loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.auth-loading-message {
    font-size: 1.2em;
    font-weight: 600;
    color: #212744;
    margin-bottom: 10px;
    font-family: 'Poppins', sans-serif;
}

.auth-loading-submessage {
    font-size: 0.95em;
    color: #666;
    line-height: 1.5;
    margin-top: 8px;
    display: none;
}

/* Animation de succès */
.auth-loading-overlay.success .auth-loading-spinner {
    border: none;
    width: 60px;
    height: 60px;
    background: #42d392;
    border-radius: 50%;
    position: relative;
    animation: scaleIn 0.3s ease-out;
}

.auth-loading-overlay.success .auth-loading-spinner::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 30px;
    font-weight: bold;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .auth-loading-content {
        padding: 30px 30px;
        max-width: 90%;
    }

    .auth-loading-spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }

    .auth-loading-message {
        font-size: 1.1em;
    }

    .auth-loading-submessage {
        font-size: 0.9em;
    }
}

/* ============================================
   ADMIN - CREATOR (Gestion des brouillons de cours)
   ============================================ */

.creator-courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.creator-course-card {
    background: #ffffff;
    color: #212744;
    padding: 8px 12px;
    padding-top: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: visible;
    border: 1px solid #e0e0e0;
    margin-top: 2px;
    min-height: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.creator-course-card.draft-course {
    border: 2px solid #667eea;
    background: #f8f9ff;
}

.creator-course-card.published-course {
    background: #f5f5f5;
    opacity: 0.85;
    border-color: #d0d0d0;
}

.creator-course-card.draft-course:hover {
    background: #f0f2ff;
    transform: translateY(-1px);
    border-color: #7b5cff;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2);
}

.creator-course-card.published-course:hover {
    background: #eeeeee;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.creator-course-card .card-header {
    margin-bottom: 6px;
}

.creator-course-card h3 {
    margin: 0 0 4px 0;
    font-size: 0.75em;
    color: #212744;
    line-height: 1.2;
}

.creator-course-card h4 {
    margin: 0 0 6px 0;
    font-size: 0.65em;
    color: #666666;
    font-weight: 400;
    line-height: 1.2;
}

.creator-course-card .card-badges {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    gap: 2px;
}

.card-badge {
    width: 14px;
    height: 14px;
    font-size: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.card-badge.mini-games {
    background: rgba(66, 211, 146, 0.2);
    border: 1px solid rgba(66, 211, 146, 0.5);
}

.card-badge.verified {
    background: rgba(66, 211, 146, 0.2);
    border: 1px solid rgba(66, 211, 146, 0.5);
}

.status-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.55em;
    font-weight: 600;
    margin-top: 4px;
    line-height: 1.2;
}

.status-badge.published {
    background: rgba(123, 92, 255, 0.15);
    color: #764ba2;
    border: 1px solid rgba(123, 92, 255, 0.4);
}

.status-badge.draft {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.5);
}

.creator-category-section {
    margin-bottom: 40px;
}

.creator-category-title {
    font-size: 1.4em;
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.card-category {
    font-size: 0.6em;
    color: #999;
    margin-top: 4px;
}

/* Modal d'édition de brouillon */
.draft-editor-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.draft-editor-modal-content {
    background: #2d2d2d;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

.draft-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
}

.draft-editor-header h2 {
    margin: 0;
    color: white;
    font-size: 1.5em;
}

.draft-editor-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.draft-editor-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.draft-editor-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    background: #2d2d2d;
}

.draft-editor-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #3a3a3a;
}

.draft-editor-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.draft-editor-section h3 {
    margin: 0 0 20px 0;
    color: #a689ff;
    font-size: 1.2em;
    font-weight: 600;
}

.draft-editor-field {
    margin-bottom: 20px;
}

.draft-editor-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ffffff;
}

.draft-editor-field input[type="text"],
.draft-editor-field select,
.draft-editor-field textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #3a3a3a;
    color: #ffffff;
}

.draft-editor-field input[type="text"]:focus,
.draft-editor-field select:focus,
.draft-editor-field textarea:focus {
    outline: none;
    border-color: #7b5cff;
    background: #454545;
}

.draft-editor-field textarea {
    resize: vertical;
    min-height: 120px;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    color: #ffffff;
}

.draft-editor-field input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.draft-editor-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.draft-editor-footer {
    padding: 24px 30px;
    border-top: 2px solid #3a3a3a;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #2d2d2d;
    border-radius: 0 0 16px 16px;
}

.draft-editor-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.draft-editor-btn-cancel {
    background: #3a3a3a;
    color: #ffffff;
}

.draft-editor-btn-cancel:hover {
    background: #454545;
}

.draft-editor-btn-save {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.draft-editor-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Modal d'export des brouillons */
.export-drafts-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.export-drafts-modal-content {
    background: #2d2d2d;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

.export-drafts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 2px solid #3a3a3a;
    background: linear-gradient(135deg, #42d392 0%, #67e8a7 100%);
    border-radius: 16px 16px 0 0;
}

.export-drafts-header h2 {
    margin: 0;
    color: white;
    font-size: 1.5em;
}

.export-drafts-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.export-drafts-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.export-drafts-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    background: #2d2d2d;
}

.export-drafts-footer {
    padding: 24px 30px;
    border-top: 2px solid #3a3a3a;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #2d2d2d;
    border-radius: 0 0 16px 16px;
}

.export-drafts-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.export-drafts-btn-cancel {
    background: #3a3a3a;
    color: #ffffff;
}

.export-drafts-btn-cancel:hover {
    background: #454545;
}

.export-drafts-btn-copy {
    background: linear-gradient(135deg, #42d392 0%, #67e8a7 100%);
    color: white;
}

.export-drafts-btn-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 211, 146, 0.3);
}

/* Responsive pour admin-creator */
@media (max-width: 768px) {
    .creator-courses-grid {
        grid-template-columns: 1fr;
    }
    
    .draft-editor-field-row {
        grid-template-columns: 1fr;
    }
    
    .draft-editor-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .draft-editor-body {
        padding: 20px;
    }
    
    .export-drafts-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* ============================================
   LANDING PAGE - HOME SECTION
   ============================================ */

/* Accueil invité — bloc court (EN) */
.home-marketing-compact {
    margin-bottom: 24px;
}

.guest-landing {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    padding: 38px 32px 34px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.07) 0%, rgba(17, 153, 142, 0.08) 100%);
    border-radius: 24px;
}

.guest-landing-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 14px;
    line-height: 1.1;
    font-family: 'Poppins', sans-serif;
}

.guest-landing-tagline {
    font-size: clamp(1.1rem, 2.3vw, 1.26rem);
    color: #1e293b;
    margin: 0 0 12px;
    line-height: 1.45;
    font-weight: 600;
}

.guest-landing-lead {
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    color: #0f766e;
    margin: 0 0 12px;
    line-height: 1.5;
    font-weight: 600;
}

.guest-landing-proof {
    font-size: clamp(0.92rem, 1.6vw, 1rem);
    color: #64748b;
    margin: 0 0 22px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.guest-landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    align-items: center;
}

.guest-landing-actions .landing-cta-primary,
.guest-landing-actions .landing-cta-secondary {
    min-width: 250px;
    justify-content: center;
    padding: 18px 32px !important;
    font-size: 1.08em !important;
}

/* Accueil invité : CTA vert eau (cohérent rappel admin / accent site) */
.guest-landing-actions .landing-cta-primary {
    background: linear-gradient(145deg, #11998e 0%, #0d9488 100%) !important;
    box-shadow: 0 10px 28px rgba(17, 153, 142, 0.38) !important;
    color: #fff !important;
}

.guest-landing-actions .landing-cta-primary:hover {
    box-shadow: 0 14px 36px rgba(17, 153, 142, 0.48) !important;
}

.guest-landing-actions .landing-cta-primary:active {
    box-shadow: 0 8px 22px rgba(17, 153, 142, 0.4) !important;
}

.guest-landing-actions .landing-cta-secondary {
    background: transparent !important;
    color: #0f172a !important;
    border: 2px solid rgba(17, 153, 142, 0.45) !important;
    box-shadow: none !important;
}

.guest-landing-actions .landing-cta-secondary:hover {
    background: rgba(17, 153, 142, 0.1) !important;
    border-color: rgba(17, 153, 142, 0.75) !important;
    color: #0f766e !important;
}

.guest-landing-actions .landing-cta-secondary:active {
    background: rgba(17, 153, 142, 0.14) !important;
}

.guest-landing-cta-note {
    font-weight: 500;
    opacity: 0.95;
}

.landing-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: #fff;
    color: #5a67d8;
    border: 2px solid rgba(102, 126, 234, 0.55);
    border-radius: 50px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Poppins', sans-serif;
}

.landing-cta-secondary:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: #667eea;
    transform: translateY(-2px);
}

.landing-cta-secondary:active {
    transform: translateY(0);
}

/* Hero Section */
.landing-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 60px 40px;
    margin-bottom: 80px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 20px;
}

.landing-hero-content {
    max-width: 600px;
}

.landing-hero-title {
    font-size: 3.5em;
    font-weight: 700;
    color: #212744;
    margin-bottom: 24px;
    line-height: 1.2;
    font-family: 'Poppins', sans-serif;
}

.landing-hero-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-hero-subtitle {
    font-size: 1.3em;
    color: #666;
    margin-bottom: 32px;
    line-height: 1.6;
}

.landing-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    font-family: 'Poppins', sans-serif;
}

.landing-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.landing-cta-primary:active {
    transform: translateY(-1px);
}

.cta-icon {
    font-size: 1.3em;
}

/* Preview Card dans Hero */
.landing-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.landing-preview-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 500px;
    width: 100%;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.landing-preview-card:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.preview-card-header {
    background: #f5f5f5;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.preview-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
}

.preview-dot:nth-child(1) {
    background: #ff5f56;
}

.preview-dot:nth-child(2) {
    background: #ffbd2e;
}

.preview-dot:nth-child(3) {
    background: #27c93f;
}

.preview-card-content {
    padding: 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #f3f4ff 100%);
    position: relative;
}

.preview-screenshot {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
}

.preview-snippet {
    padding: 32px;
}

.preview-snippet h3 {
    color: #667eea;
    margin-bottom: 16px;
    font-size: 1.3em;
}

.preview-snippet p {
    color: #333;
    margin: 8px 0;
    font-size: 1.1em;
}

.preview-snippet strong {
    color: #764ba2;
    font-weight: 600;
}

/* Section Features */
.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
    padding: 0 20px;
}

.landing-feature-card {
    text-align: center;
    padding: 40px 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.landing-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.feature-icon {
    font-size: 3.5em;
    margin-bottom: 20px;
    display: block;
}

.landing-feature-card h3 {
    color: #212744;
    margin-bottom: 12px;
    font-size: 1.3em;
    font-weight: 600;
}

.landing-feature-card p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Section Preview */
.landing-preview-section {
    margin-bottom: 80px;
    padding: 0 20px;
}

.landing-section-title {
    text-align: center;
    font-size: 2.5em;
    color: #212744;
    margin-bottom: 50px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.landing-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.landing-preview-item {
    text-align: center;
}

.preview-item-image {
    margin-bottom: 16px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.preview-item-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.3);
}

.preview-screenshot-grid {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

.preview-mockup {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.preview-mockup:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.preview-mockup h4 {
    font-size: 1.5em;
    margin-bottom: 12px;
    font-weight: 600;
}

.preview-mockup p {
    font-size: 1.1em;
    opacity: 0.9;
    margin: 0;
}

.preview-item-label {
    color: #666;
    font-weight: 500;
    font-size: 1.1em;
    margin-top: 12px;
}

/* CTA Final Section */
.landing-cta-section {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    margin-bottom: 40px;
}

.landing-cta-title {
    font-size: 2.5em;
    color: #212744;
    margin-bottom: 16px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.landing-cta-subtitle {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 32px;
}

.landing-cta-large {
    padding: 20px 48px;
    font-size: 1.2em;
}

/* Responsive Landing Page */
@media (max-width: 1024px) {
    .landing-hero {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .landing-hero-content {
        max-width: 100%;
    }
    
    .landing-hero-title {
        font-size: 2.8em;
    }
    
    .landing-preview-card {
        transform: none;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .landing-hero {
        padding: 40px 20px;
        margin-bottom: 50px;
    }
    
    .landing-hero-title {
        font-size: 2.2em;
    }
    
    .landing-hero-subtitle {
        font-size: 1.1em;
    }
    
    .landing-features {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 50px;
    }
    
    .landing-preview-grid {
        grid-template-columns: 1fr;
    }
    
    .landing-cta-section {
        padding: 50px 20px;
    }
    
    .landing-cta-title {
        font-size: 2em;
    }
    
    .landing-section-title {
        font-size: 2em;
    }
    
    .landing-cta-primary {
        padding: 16px 28px;
        font-size: 1em;
    }
    
    .landing-cta-large {
        padding: 18px 36px;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .landing-hero-title {
        font-size: 1.8em;
    }
    
    .landing-hero-subtitle {
        font-size: 1em;
    }
    
    .landing-section-title {
        font-size: 1.6em;
    }
    
    .landing-cta-title {
        font-size: 1.6em;
    }
}

/* Carrousel de cartes pour Grands Hommes Français */
.cartes-carousel-container {
    margin: 30px 0;
    display: block;
    width: calc(100vw - 260px);
    margin-left: -40px; /* Sortir du padding gauche de la section */
    margin-right: 0;
    padding-left: 40px; /* Remettre le padding pour le titre et le contenu */
    padding-right: 0;
    overflow: visible; /* Permet aux icônes des cartes de ne pas être coupées */
    position: relative;
}

/* Réduire l'espace en haut pour la section textes */
#textes {
    padding-top: 0;
}

/* Réduire l'espace en haut pour le premier carrousel dans la section textes */
#textes .cartes-carousel-container:first-of-type {
    margin-top: 0;
}

/* Réduire l'espace en haut pour la section cours */
#cours {
    padding-top: 0;
}

/* Réduire l'espace en haut pour le premier élément dans la section cours */
#cours > *:first-child:not(.sr-only) {
    margin-top: 0;
}

#cours #courses-carousels-container {
    margin-top: 0;
}

/* Réduire l'espace en haut pour le premier carrousel dans la section cours */
#cours .courses-carousel-section:first-of-type {
    margin-top: 0;
}

.cartes-carousel {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px;
    overflow-x: auto;
    overflow-y: visible; /* Permet aux icônes de dépasser légèrement */
    padding: 10px 5px 20px 5px;
    padding-left: 0; /* Commence juste après la sidebar, sans padding gauche */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(255, 255, 255, 0.1);
    width: 100%;
}

.cartes-carousel::-webkit-scrollbar {
    height: 8px;
}

.cartes-carousel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.cartes-carousel::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.cartes-carousel::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

.cartes-carousel .section-card {
    flex: 0 0 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    width: 280px !important;
    display: flex;
    flex-direction: column;
    margin: 0 !important; /* Retirer toute marge pour éviter les espaces */
}

@media (max-width: 768px) {
    .cartes-carousel .section-card {
        flex: 0 0 250px !important;
        min-width: 250px !important;
        max-width: 250px !important;
        width: 250px !important;
    }
}

/* ============================================
   CARTES DE TEXTES AVEC IMAGE + BANDEAU
   ============================================
   
   ⚠️ RÈGLE IMPORTANTE :
   TOUTES les cartes avec un conteneur .texte-card-image-container
   DOIVENT avoir la classe .texte-card-with-image dans le HTML.
   
   Sinon, elles gardent le padding par défaut de .section-card (20px)
   au lieu d'avoir padding: 0, ce qui crée une marge visible de 42px
   (21px de chaque côté) autour de l'image et du bandeau.
   
   Solutions automatiques en place :
   1. Script normalize-image-cards.js : normalise automatiquement au chargement
   2. Sélecteur CSS :has(.texte-card-image-container) : filet de sécurité
   3. cloneCardForCarousel() : ajoute la classe lors du clonage
   
   ⚠️ Lors de la création de nouvelles cartes avec images :
   - Toujours ajouter la classe .texte-card-with-image
   - Ou utiliser le script de normalisation automatique
   ============================================ */

/* Structure de base pour les cartes de textes avec image */
.texte-card-with-image {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%; /* Forcer l'expansion jusqu'aux bords */
    overflow: visible; /* Permet à l'icône de dépasser légèrement si nécessaire */
    position: relative;
    box-sizing: border-box; /* Assure que width inclut padding/border */
}

/* Zone image carrée 1:1 - même largeur que hauteur */
.texte-card-image-container {
    width: 100% !important;
    max-width: 100% !important; /* Forcer l'expansion jusqu'aux bords */
    min-width: 100% !important; /* Forcer l'expansion minimale */
    aspect-ratio: 1 / 1; /* Force le conteneur à être carré */
    overflow: hidden; /* Cache le débordement de l'image */
    position: relative;
    background: transparent;
    flex-shrink: 0 !important;
    flex-grow: 0; /* Ne pas grandir, garder la taille fixe */
    border-radius: 12px 12px 0 0; /* Coins arrondis en haut pour correspondre à la carte */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    box-sizing: border-box !important; /* Assure que width inclut padding/border */
}

/* Masquer le conteneur d'image s'il est vide (pas d'image à l'intérieur) */
.texte-card-image-container:empty {
    display: none !important;
}

/* Masquer aussi le conteneur s'il ne contient que des commentaires HTML */
.texte-card-image-container:not(:has(img)) {
    display: none !important;
}

/* Forcer la largeur exacte pour les cartes dans les carrousels */
.cartes-carousel .section-card.texte-card-with-image .texte-card-image-container,
.texte-cards-container .section-card.texte-card-with-image .texte-card-image-container,
.cartes-carousel .section-card:has(.texte-card-image-container) .texte-card-image-container,
.texte-cards-container .section-card:has(.texte-card-image-container) .texte-card-image-container {
    width: 280px !important;
    max-width: 280px !important;
    min-width: 280px !important;
    /* S'assurer qu'il n'y a AUCUN padding/margin qui réduit la taille */
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Limiter aussi les conteneurs d'images dans .section-menu (vocabulaire) */
.section-menu .section-card.texte-card-with-image .texte-card-image-container,
.section-menu .section-card:has(.texte-card-image-container) .texte-card-image-container {
    max-width: 100% !important; /* 100% de la carte, mais la carte est limitée à 280px */
    width: 100% !important;
}

.texte-card-image-container img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    object-fit: cover; /* Remplit tout l'espace carré */
    object-position: center center;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    border-radius: 12px 12px 0 0; /* Coins arrondis en haut pour correspondre au conteneur */
    /* S'assurer que l'image remplit complètement jusqu'aux bords */
    will-change: transform;
    box-sizing: border-box !important;
}

/* Bandeau texte (30% de la hauteur pour format carré 1:1) */
.texte-card-banner {
    flex: 0 0 30%; /* Format carré 1:1 - proportion ajustée */
    width: 100% !important;
    max-width: 100% !important; /* Forcer l'expansion jusqu'aux bords */
    min-width: 100% !important; /* Forcer l'expansion minimale */
    background: #E8EAF6; /* Bleu lavande clair */
    padding: 0 !important; /* Plus de padding, les éléments enfants gèrent leur propre espace */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    min-height: 0; /* Permet au contenu de s'adapter */
    overflow: visible; /* Pour que l'icône ne soit pas coupée */
    box-sizing: border-box !important; /* Assure que tout est inclus dans la hauteur */
    border-radius: 0 0 12px 12px; /* Coins arrondis en bas pour correspondre à la carte */
    margin: 0 !important; /* Pas de marge */
    border: none !important;
    outline: none !important;
    flex-shrink: 0 !important; /* Ne pas rétrécir */
}

/* Forcer la largeur exacte pour les bandeaux dans les cartes des carrousels */
.cartes-carousel .section-card.texte-card-with-image .texte-card-banner,
.texte-cards-container .section-card.texte-card-with-image .texte-card-banner,
.cartes-carousel .section-card:has(.texte-card-image-container) .texte-card-banner,
.texte-cards-container .section-card:has(.texte-card-image-container) .texte-card-banner {
    width: 280px !important;
    max-width: 280px !important;
    min-width: 280px !important;
}

/* Limiter aussi les bandeaux dans .section-menu (vocabulaire) */
.section-menu .section-card.texte-card-with-image .texte-card-banner,
.section-menu .section-card:has(.texte-card-image-container) .texte-card-banner {
    max-width: 100% !important; /* 100% de la carte, mais la carte est limitée à 280px */
    width: 100% !important;
}

.texte-card-banner h3 {
    margin: 0;
    padding: 12px 16px 5px 16px; /* Padding vertical en haut + horizontal */
    font-size: 1.05em; /* Légèrement réduit */
    font-weight: 700;
    color: #1A237E; /* Bleu marine foncé */
    line-height: 1.25; /* Légèrement réduit */
}

.texte-card-banner p {
    margin: 0;
    padding: 0 16px 3px 16px; /* Padding horizontal */
    font-size: 0.85em; /* Légèrement réduit */
    font-weight: 400;
    color: #424242; /* Gris anthracite */
    line-height: 1.35; /* Légèrement réduit */
}

.texte-card-banner .card-details {
    margin: 2px 0 0 0; /* Réduit de 4px à 2px */
    padding: 0 16px 18px 16px; /* Padding horizontal + vertical en bas */
    font-size: 0.75em; /* Légèrement réduit */
    color: #616161; /* Gris moyen */
    line-height: 1.2; /* Réduit */
    display: block;
}

/* Icône dans le coin du bandeau - repositionnée pour ne pas être coupée */
.texte-card-icon {
    position: absolute;
    bottom: 14px; /* Augmenté pour éviter le débordement */
    right: 12px;
    width: 30px; /* Légèrement réduit */
    height: 30px; /* Légèrement réduit */
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px; /* Légèrement réduit */
    background: rgba(102, 126, 234, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

/* Ajustement des cartes dans les carrousels */
.cartes-carousel .section-card.texte-card-with-image,
.texte-cards-container .section-card.texte-card-with-image,
/* Cibler aussi les cartes avec images même sans la classe .texte-card-with-image */
.cartes-carousel .section-card:has(.texte-card-image-container),
.texte-cards-container .section-card:has(.texte-card-image-container) {
    flex: 0 0 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    width: 280px !important;
    height: auto !important; /* Hauteur automatique basée sur l'image carrée + bandeau */
    /* FORCER le padding à 0 avec toutes les propriétés individuelles - RÈGLE TRÈS SPÉCIFIQUE */
    padding: 0 !important;
    padding-top: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    margin: 0 !important; /* Retirer toute marge */
    display: flex;
    flex-direction: column;
    overflow: hidden !important; /* Changé de visible à hidden pour éviter les débordements */
    box-sizing: border-box !important; /* Assure que tout est inclus dans la hauteur */
    /* Retirer TOUT ce qui pourrait créer une marge visible */
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    outline: none !important;
    background: transparent !important; /* IMPORTANT : Retirer le background gris qui se voit */
    border-radius: 12px !important;
    box-shadow: none !important; /* Retirer le box-shadow qui pourrait créer un espace visuel */
    /* Forcer l'expansion complète */
    min-height: 0 !important;
    max-height: none !important;
}

/* IMPORTANT : Limiter la largeur des cartes avec images dans .section-menu (vocabulaire, etc.) */
/* Pour éviter que l'image carrée 1:1 ne prenne toute la largeur de la page */
.section-menu .section-card.texte-card-with-image,
.section-menu .section-card:has(.texte-card-image-container) {
    max-width: 280px !important;
    width: 100% !important; /* Prendre 100% de la colonne grid mais limité à 280px max */
    min-width: 250px !important; /* Respecter le minmax du grid */
}

/* FORCER la largeur complète sur TOUS les enfants directs */
.cartes-carousel .section-card.texte-card-with-image > *,
.texte-cards-container .section-card.texte-card-with-image > *,
.cartes-carousel .section-card:has(.texte-card-image-container) > *,
.texte-cards-container .section-card:has(.texte-card-image-container) > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Désactiver les box-shadows des classes de niveau pour les cartes avec images */
.cartes-carousel .section-card.texte-card-with-image.level-beginner,
.cartes-carousel .section-card.texte-card-with-image.level-intermediate,
.cartes-carousel .section-card.texte-card-with-image.level-advanced,
.cartes-carousel .section-card.texte-card-with-image.level-green,
.cartes-carousel .section-card.texte-card-with-image.level-orange,
.texte-cards-container .section-card.texte-card-with-image.level-beginner,
.texte-cards-container .section-card.texte-card-with-image.level-intermediate,
.texte-cards-container .section-card.texte-card-with-image.level-advanced,
.texte-cards-container .section-card.texte-card-with-image.level-green,
.texte-cards-container .section-card.texte-card-with-image.level-orange {
    box-shadow: none !important;
}

/* Jeux (cardType: game) : bordure rose sur TOUTE la carte — surcharge border:none des cartes image carrousel */
.cartes-carousel .section-card.texte-card-with-image.section-card--consolidation-game,
.texte-cards-container .section-card.texte-card-with-image.section-card--consolidation-game,
.cartes-carousel .section-card:has(.texte-card-image-container).section-card--consolidation-game,
.texte-cards-container .section-card:has(.texte-card-image-container).section-card--consolidation-game {
    border: 3px solid #ec4899 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.22) !important;
    animation: consolidation-game-glow 2.8s ease-in-out infinite;
}

.cartes-carousel .section-card.texte-card-with-image.section-card--consolidation-game:hover,
.texte-cards-container .section-card.texte-card-with-image.section-card--consolidation-game:hover,
.cartes-carousel .section-card:has(.texte-card-image-container).section-card--consolidation-game:hover,
.texte-cards-container .section-card:has(.texte-card-image-container).section-card--consolidation-game:hover {
    animation: none;
    box-shadow: 0 8px 28px rgba(236, 72, 153, 0.38) !important;
    border-color: #db2777 !important;
}

/* Préserver les effets hover pour les cartes avec image */
.cartes-carousel .section-card.texte-card-with-image:hover {
    transform: translateY(-2px) rotate(-1.5deg);
}

.cartes-carousel .section-card.texte-card-with-image:hover .texte-card-image-container img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.cartes-carousel .section-card.texte-card-with-image .texte-card-image-container img {
    transition: transform 0.3s ease;
}

/* ============================================
   CTA DISCRET AU HOVER - CARTES DE TEXTES AVEC IMAGE
   ============================================ */

/* Overlay clair sur l'image avec message centré au hover */
.texte-card-image-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5); /* Opacité réduite pour un voile plus léger */
    backdrop-filter: blur(1px);
    border-radius: 12px 12px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.texte-card-with-image:hover .texte-card-image-container::after {
    opacity: 1;
    content: 'Commencer';
    font-size: 1.1em;
    font-weight: 600;
    color: #1A237E;
    text-align: center;
    white-space: nowrap;
}

/* Overlay permanent (voile) sur les cartes complétées */
.section-card.course-completed.texte-card-with-image .texte-card-image-container::after {
    opacity: 1 !important;
    content: '';
    /* Le voile est toujours visible, mais sans texte par défaut */
}

/* Au hover, afficher le texte "Revoir" */
.section-card.course-completed.texte-card-with-image:hover .texte-card-image-container::after {
    content: 'Revoir';
    font-size: 1.1em;
    font-weight: 600;
    color: #1A237E;
    text-align: center;
    white-space: nowrap;
}

/* Home dashboard: titre section « Start Now » en vert eau */
#home-dashboard #home-suggested-carousel-section > h3 {
    color: #11998e !important;
    background: transparent !important;
}

@keyframes homeSuggestedTealPulse {
    0% {
        box-shadow: 0 4px 14px rgba(17, 153, 142, 0.22);
        border-color: rgba(17, 153, 142, 0.5);
    }
    50% {
        box-shadow: 0 8px 24px rgba(17, 153, 142, 0.45);
        border-color: rgba(17, 153, 142, 0.95);
    }
    100% {
        box-shadow: 0 4px 14px rgba(17, 153, 142, 0.22);
        border-color: rgba(17, 153, 142, 0.5);
    }
}

#home-suggested-carousel-container .section-card.home-suggested-cta-card {
    border: 3px solid rgba(17, 153, 142, 0.72) !important;
    box-shadow: 0 4px 14px rgba(17, 153, 142, 0.24) !important;
    animation: homeSuggestedTealPulse 2.4s ease-in-out infinite;
}

#home-suggested-carousel-container .section-card.home-suggested-cta-card:hover {
    animation: none;
    border-color: #11998e !important;
    box-shadow: 0 10px 28px rgba(17, 153, 142, 0.42) !important;
}

#home-suggested-carousel-container .section-card.home-suggested-cta-card .texte-card-image-container::after {
    top: auto;
    bottom: 0;
    height: 52%;
    border-radius: 0 0 12px 12px;
    background: linear-gradient(to top, rgba(17, 153, 142, 0.94) 0%, rgba(17, 153, 142, 0.62) 65%, rgba(17, 153, 142, 0) 100%);
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

#home-suggested-carousel-container .section-card.home-suggested-cta-card:hover .texte-card-image-container::after {
    content: 'Start now';
    color: #ffffff;
    font-size: 1.15em;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 1;
    transform: translateY(0);
}

/* Responsive mobile */
@media (max-width: 768px) {
    .cartes-carousel .section-card.texte-card-with-image,
    .texte-cards-container .section-card.texte-card-with-image {
        flex: 0 0 250px !important;
        min-width: 250px !important;
        max-width: 250px !important;
        width: 250px !important;
        height: auto !important; /* Hauteur automatique basée sur l'image carrée + bandeau */
    }
    
    /* Forcer la largeur exacte pour les conteneurs sur mobile */
    .cartes-carousel .section-card.texte-card-with-image .texte-card-image-container,
    .texte-cards-container .section-card.texte-card-with-image .texte-card-image-container {
        width: 250px !important;
        max-width: 250px !important;
        min-width: 250px !important;
    }
    
    .cartes-carousel .section-card.texte-card-with-image .texte-card-banner,
    .texte-cards-container .section-card.texte-card-with-image .texte-card-banner {
        width: 250px !important;
        max-width: 250px !important;
        min-width: 250px !important;
    }
    
    .texte-card-banner {
        padding: 0; /* Plus de padding, les éléments enfants gèrent leur propre espace */
    }
    
    .texte-card-banner h3 {
        padding: 10px 14px 4px 14px; /* Padding vertical en haut + horizontal */
        font-size: 0.95em;
        margin: 0;
    }
    
    .texte-card-banner p {
        padding: 0 14px 2px 14px; /* Padding horizontal */
        font-size: 0.8em;
        margin: 0;
    }
    
    .texte-card-banner .card-details {
        padding: 2px 14px 16px 14px; /* Padding horizontal + vertical en bas */
        font-size: 0.7em;
        margin: 0;
    }
    
    .texte-card-icon {
        width: 28px;
        height: 28px;
        font-size: 13px;
        bottom: 12px;
        right: 10px;
    }
    
    /* Ajuster le CTA sur mobile */
    .texte-card-with-image:hover .texte-card-image-container::after {
        font-size: 0.95em;
    }
    
    /* CTA pour les cartes de cours sur mobile */
    .section-card:not(.has-mini-games):not(.is-verified):hover::after,
    .section-card.has-mini-games:not(.is-verified):hover::after,
    .section-card.is-verified:not(.has-mini-games):hover::after,
    .section-card.has-mini-games.is-verified:hover::after {
        min-width: 90px;
        padding: 0 12px;
        font-size: 0.7em;
        height: 26px;
        bottom: 10px;
        right: 10px;
    }
}

/* Pour les très petits écrans */
@media (max-width: 375px) {
    .cartes-carousel .section-card.texte-card-with-image,
    .texte-cards-container .section-card.texte-card-with-image {
        flex: 0 0 220px !important;
        min-width: 220px !important;
        max-width: 220px !important;
        width: 220px !important;
        height: auto !important; /* Hauteur automatique basée sur l'image carrée + bandeau */
    }
    
    /* Forcer la largeur exacte pour les conteneurs sur très petits écrans */
    .cartes-carousel .section-card.texte-card-with-image .texte-card-image-container,
    .texte-cards-container .section-card.texte-card-with-image .texte-card-image-container {
        width: 220px !important;
        max-width: 220px !important;
        min-width: 220px !important;
    }
    
    .cartes-carousel .section-card.texte-card-with-image .texte-card-banner,
    .texte-cards-container .section-card.texte-card-with-image .texte-card-banner {
        width: 220px !important;
        max-width: 220px !important;
        min-width: 220px !important;
    }
    
    .texte-card-banner {
        padding: 0; /* Plus de padding, les éléments enfants gèrent leur propre espace */
    }
    
    .texte-card-banner h3 {
        padding: 8px 12px 3px 12px; /* Padding vertical en haut + horizontal */
        font-size: 0.9em;
        margin: 0;
    }
    
    .texte-card-banner p {
        padding: 0 12px 2px 12px; /* Padding horizontal */
        font-size: 0.75em;
        margin: 0;
    }
    
    .texte-card-banner .card-details {
        padding: 2px 12px 14px 12px; /* Padding horizontal + vertical en bas */
        font-size: 0.65em;
        margin: 0;
    }
    
    .texte-card-icon {
        width: 26px;
        height: 26px;
        font-size: 12px;
        bottom: 10px;
        right: 8px;
    }
    
    /* Ajuster le CTA sur très petits écrans */
    .texte-card-with-image:hover .texte-card-image-container::after {
        font-size: 0.85em;
    }
    
    /* CTA pour les cartes de cours sur très petits écrans */
    .section-card:not(.has-mini-games):not(.is-verified):hover::after,
    .section-card.has-mini-games:not(.is-verified):hover::after,
    .section-card.is-verified:not(.has-mini-games):hover::after,
    .section-card.has-mini-games.is-verified:hover::after {
        min-width: 80px;
        padding: 0 10px;
        font-size: 0.65em;
        height: 24px;
        bottom: 8px;
        right: 8px;
    }
}

/* Bouton "Voir plus" pour le chargement progressif - dans le carrousel horizontal */
.cartes-carousel .load-more-cards-btn {
    flex: 0 0 auto;
    min-width: 200px;
    height: fit-content;
    margin: 0;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    align-self: center;
    white-space: nowrap;
}

.cartes-carousel .load-more-cards-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.cartes-carousel .load-more-cards-btn:active {
    transform: translateY(0) scale(1);
}

.cartes-carousel .load-more-cards-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Masquer les cartes en lazy loading */
.lazy-card {
    display: none !important;
}

/* Mode plein écran pour les exercices interactifs */
#course-container.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: white !important;
    z-index: 9999 !important;
    overflow-y: auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

.fullscreen-back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10000;
    padding: 12px 24px;
    background: linear-gradient(145deg, #7b5cff 0%, #a689ff 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(123, 92, 255, 0.3);
    transition: all 0.3s;
}

.fullscreen-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(123, 92, 255, 0.4);
}

/* Splash screen de chargement pour les cours */
.course-loading-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.course-loading-splash.hidden {
    opacity: 0;
    visibility: hidden;
}

.course-loading-splash-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
}

.course-loading-splash-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.course-loading-splash-title {
    font-size: 2em;
    font-weight: 600;
    color: #5B3EAE;
    margin-bottom: 15px;
    font-family: 'Poppins', sans-serif;
}

.course-loading-splash-subtitle {
    font-size: 1.1em;
    color: #6b7280;
    margin-bottom: 30px;
}

.course-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(91, 62, 174, 0.2);
    border-top-color: #5B3EAE;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

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

/* ===== SALLE DES TROPHÉES (style rétro jeu vidéo) ===== */
#trophees {
    padding: 10px 16px 18px;
}

.trophees-view-toggle {
    max-width: 980px;
    margin: 0 auto 6px auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trophees-toggle-btn {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.28);
    color: rgba(255, 255, 255, 0.88);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.trophees-toggle-btn:hover {
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(0, 0, 0, 0.4);
}

.trophees-toggle-btn.active {
    border-color: rgba(255, 255, 255, 0.42);
    background: var(--sidebar-active, #7c5ece);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(91, 62, 174, 0.35);
}

.trophees-toggle-btn.active:hover {
    background: var(--sidebar-hover, #6b4ebe);
    border-color: rgba(255, 255, 255, 0.55);
    color: #ffffff;
}

.trophees-meta {
    max-width: 980px;
    margin: 0 auto 10px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.trophees-summary {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    font-size: 0.95rem;
}

.trophees-legend {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.82rem;
}

.trophees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    max-width: 980px;
    margin: 0 auto;
}

.trophy-empty-state {
    grid-column: 1 / -1;
    padding: 18px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
}

/* Favoris vides : message court, pas de panneau gris */
.trophy-favorites-empty-message {
    grid-column: 1 / -1;
    margin: 4px auto 0;
    max-width: 28rem;
    padding: 8px 12px;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.45;
    color: #4c1d95;
    background: none;
    border: none;
    box-shadow: none;
}

.trophy-card {
    position: relative;
    background: rgba(0, 0, 0, 0.36);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
    cursor: pointer;
}

.trophy-card:hover {
    transform: translateY(-2px);
}

/* Série pas terminée : couleur pleine (objectif à viser) */
.trophy-card.not-started {
    filter: none;
    opacity: 1;
    border-color: rgba(167, 139, 250, 0.65);
    box-shadow: 0 4px 14px rgba(123, 92, 255, 0.28);
}

.trophy-card.not-started:hover {
    border-color: rgba(199, 181, 255, 0.85);
    box-shadow: 0 6px 18px rgba(123, 92, 255, 0.35);
}

.trophy-card.in-progress {
    border-color: rgba(66, 211, 146, 0.55);
    box-shadow: 0 4px 12px rgba(66, 211, 146, 0.22);
    filter: none;
    opacity: 1;
}

/* Série terminée : voilée (déjà « gagnée », moins prioritaire visuellement) */
.trophy-card.completed {
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: none;
    filter: grayscale(0.55) saturate(0.65);
    opacity: 0.82;
}

.trophy-card.completed:hover {
    opacity: 0.9;
    filter: grayscale(0.4) saturate(0.8);
}

/* Mini-jeux : jamais de voilage / désaturation (les séries terminées restent grisées) */
#trophees .trophy-game-card.trophy-card.completed,
#trophees .trophy-game-card.trophy-card.completed:hover {
    filter: none;
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

#trophees .trophy-game-card.completed .trophy-card-image::after {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent 55%);
}

.trophy-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #2a2a2a;
}

.trophy-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent 55%);
    pointer-events: none;
}

.trophy-card.completed .trophy-card-image::after {
    background: linear-gradient(
        165deg,
        rgba(255, 255, 255, 0.38) 0%,
        rgba(255, 255, 255, 0.12) 45%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

.trophy-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.trophy-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.trophy-badge--progress {
    background: linear-gradient(145deg, #42d392 0%, #67e8a7 100%);
}

.trophy-badge--done {
    background: linear-gradient(145deg, #fbbf24 0%, #fde047 100%);
    color: #1f2937;
}

.trophy-badge--lock {
    background: linear-gradient(145deg, #64748b 0%, #94a3b8 100%);
    font-size: 11px;
}

.trophy-game-card.trophy-card--locked {
    filter: none;
    opacity: 0.94;
    cursor: default;
    border-color: rgba(148, 163, 184, 0.55);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.trophy-game-card.trophy-card--locked:hover {
    transform: none;
    opacity: 0.98;
}

.trophy-game-card.trophy-card--locked .trophy-card-image::after {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.2) 50%);
}

.trophy-game-series {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 2px;
}

.trophy-card-label {
    padding: 10px 12px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Fond zone texte = violet sidebar (séries / jeux à faire) ; version atténuée si terminé */
#trophees .trophy-card-label {
    background: linear-gradient(
        180deg,
        rgba(124, 94, 206, 0.45) 0%,
        var(--sidebar-active, #7c5ece) 24%,
        var(--sidebar-bg, #5b3eae) 68%,
        var(--sidebar-border, #4a2e9e) 100%
    );
    border-top: 1px solid rgba(255, 255, 255, 0.16);
}

#trophees .trophy-card.completed .trophy-card-label {
    background: linear-gradient(
        180deg,
        rgba(88, 78, 128, 0.55) 0%,
        rgba(62, 54, 98, 0.88) 45%,
        rgba(48, 42, 78, 0.96) 100%
    );
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#trophees .trophy-card.trophy-card--locked .trophy-card-label {
    background: linear-gradient(
        180deg,
        rgba(75, 70, 100, 0.6) 0%,
        rgba(52, 48, 72, 0.92) 100%
    );
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.trophy-card-title {
    font-size: 0.87rem;
    font-weight: 700;
    color: white;
    line-height: 1.25;
}

.trophy-card-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.3;
}

/* Même esprit que #global-progress-sidebar (barre 6px, fond semi-transparent, dégradé vert) */
.trophy-card-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.trophy-card-progress-track {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.trophy-card-progress-fill {
    height: 100%;
    background: linear-gradient(145deg, #42d392 0%, #67e8a7 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Libellé fraction (ex. 1/3 terminés) à la place du % à droite de la barre */
.trophy-card-progress-pct {
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 3.5rem;
    max-width: 48%;
    text-align: right;
    line-height: 1.25;
    color: rgba(255, 255, 255, 0.88);
    flex-shrink: 0;
}

.trophy-card-cta {
    margin-top: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0.95;
}

.trophy-card.not-started .trophy-card-cta {
    color: #e9deff;
}

.trophy-card.in-progress .trophy-card-cta {
    color: #b6f5d2;
}

.trophy-card.completed .trophy-card-cta {
    color: rgba(255, 255, 255, 0.65);
}

/* Série terminée : zone texte allégée (détails au survol seulement) */
#trophees .trophy-card-label--completed-quiet {
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 0;
    min-height: 0;
}

#trophees .trophy-card.completed .trophy-card-label--completed-quiet .trophy-card-title {
    font-size: 0.82rem;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.88);
}

/* Mini-jeux : une seule ligne « GAME : practice … », détails au survol */
#trophees .trophy-card-label--game-quiet {
    padding-top: 11px;
    padding-bottom: 11px;
    gap: 0;
    min-height: 0;
}

#trophees .trophy-card-label--game-quiet .trophy-card-title {
    font-size: clamp(0.68rem, 2.1vw, 0.8rem);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.92);
    text-transform: none;
}

#trophees .trophy-game-card.completed .trophy-card-label--game-quiet .trophy-card-title {
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Bandeau titre mini-jeux : rouge corail (prioritaire sur violet / gris série ou verrou) */
#trophees .trophy-game-card .trophy-card-label--game-quiet,
#trophees .trophy-game-card.trophy-card--locked .trophy-card-label--game-quiet,
#trophees .trophy-game-card.completed .trophy-card-label--game-quiet {
    background: linear-gradient(
        180deg,
        #ff9a8c 0%,
        #f06b58 38%,
        #d9483c 72%,
        #c23a32 100%
    );
    border-top: 1px solid rgba(255, 255, 255, 0.28);
}

/* Bandeau CTA au survol (depuis le bas, style proche accueil « Start now ») */
#trophees .trophy-hover-cta-band {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 46%;
    max-height: 62%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px 14px;
    box-sizing: border-box;
    background: linear-gradient(
        to top,
        rgba(66, 211, 146, 0.95) 0%,
        rgba(66, 211, 146, 0.72) 40%,
        rgba(66, 211, 146, 0) 100%
    );
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.26s ease;
    pointer-events: none;
    z-index: 5;
    border-radius: 0 0 10px 10px;
}

#trophees .trophy-card:hover .trophy-hover-cta-band {
    transform: translateY(0);
    opacity: 1;
}

#trophees .trophy-hover-cta-label {
    font-size: clamp(0.72rem, 2.6vw, 0.92rem);
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.42);
    text-transform: uppercase;
}

#trophees .trophy-card.not-started .trophy-hover-cta-band {
    background: linear-gradient(
        to top,
        rgba(139, 92, 246, 0.96) 0%,
        rgba(167, 139, 250, 0.72) 40%,
        rgba(167, 139, 250, 0) 100%
    );
}

#trophees .trophy-card.completed .trophy-hover-cta-band {
    background: linear-gradient(
        to top,
        rgba(251, 191, 36, 0.96) 0%,
        rgba(253, 224, 71, 0.68) 38%,
        rgba(253, 224, 71, 0) 100%
    );
}

#trophees .trophy-card.completed .trophy-hover-cta-label {
    color: #1f2937;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    letter-spacing: 0.08em;
    font-size: clamp(0.68rem, 2.2vw, 0.82rem);
}

#trophees .trophy-card.trophy-card--locked .trophy-hover-cta-band {
    background: linear-gradient(
        to top,
        rgba(51, 65, 85, 0.96) 0%,
        rgba(100, 116, 139, 0.68) 38%,
        rgba(100, 116, 139, 0) 100%
    );
}

@media (prefers-reduced-motion: reduce) {
    #trophees .trophy-hover-cta-band {
        transform: translateY(0);
        opacity: 0;
        transition: opacity 0.18s ease;
    }

    #trophees .trophy-card:hover .trophy-hover-cta-band {
        opacity: 1;
    }
}

.trophy-detail-panel {
    max-width: 980px;
    margin: 18px auto 0 auto;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 14px;
    color: rgba(255, 255, 255, 0.92);
}

.trophy-detail-panel strong {
    color: #ffffff;
}

.trophy-detail-panel .muted {
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.9rem;
}

@media (max-width: 700px) {
    .trophees-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

/* ============================================
   Mobile: enlever la soustraction de sidebar
   (évite le "rectangle blanc" à droite)
   ============================================ */
@media (max-width: 768px) {
    /* Accueil */
    #home-dashboard #home-suggested-carousel-section,
    #home-dashboard #home-course-notes-section,
    #home-dashboard #home-personal-notes-carousel-container,
    #home-dashboard #home-completed-exercises-section {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Cours */
    #cours .courses-carousel-section {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Nouveau format + Textes */
    .cartes-carousel-container {
        width: 100% !important;
        margin-left: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Alignement vertical : titre + progression (évite "1 mot par ligne") */
    .textes-category-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .carousel-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .section-progress-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-left: 0 !important;
    }

    .section-progress-bar-inline {
        width: 100%;
        max-width: 220px;
    }
}
