/* Reset et variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    position: relative;
    flex-wrap: nowrap;
    overflow: visible;
}

/* En mode desktop, le nav-menu est normal */
@media (min-width: 769px) {
    .nav-menu {
        position: relative !important;
        display: flex !important;
    }
    
    .nav-overlay {
        display: none !important;
    }
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
    position: relative;
    width: auto;
}

.nav-menu > li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
    display: block;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

/* Menu déroulant */
.nav-menu .dropdown {
    position: relative;
}

.nav-menu .dropdown > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu .dropdown > a::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.nav-menu .dropdown:hover > a::after {
    transform: rotate(180deg);
}

.nav-menu .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    min-width: 220px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
    z-index: 1000;
}

.nav-menu .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .dropdown-menu li {
    margin: 0;
}

.nav-menu .dropdown-menu a {
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    display: block;
    transition: background-color 0.2s;
}

.nav-menu .dropdown-menu a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.nav-menu .dropdown-menu a.active {
    background-color: #eff6ff;
    color: var(--primary-color);
    font-weight: 600;
}

/* Menu hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
    position: relative;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(59, 130, 246, 0.1);
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
    background-color: #ef4444;
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(9px, -9px);
    background-color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        position: relative;
    }
    
    .logo {
        order: 1;
        flex-shrink: 0;
    }
    
    .menu-toggle {
        display: flex !important;
        position: relative;
        z-index: 1002;
        order: 2;
        margin-left: auto;
        cursor: pointer;
        pointer-events: auto;
        flex-shrink: 0;
        width: auto;
        min-width: 40px;
    }
    
    /* Overlay - SORTI du flux flex */
    .nav-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.5) !important;
        backdrop-filter: blur(4px) !important;
        z-index: 1000 !important;
        opacity: 0 !important;
        transition: opacity 0.4s ease !important;
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }
    
    .nav-overlay.active {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
    
    /* Menu mobile - SORTI du flux flex */
    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        left: auto !important;
        width: 90% !important;
        max-width: 400px !important;
        height: 100vh !important;
        background: #ffffff !important;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15) !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        list-style: none !important;
        transition: right 0.3s ease !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        z-index: 1001 !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(59, 130, 246, 0.5) transparent !important;
        will-change: scroll-position !important;
        overscroll-behavior: contain !important;
    }
    
    /* Assurer que le menu peut toujours scroller */
    .nav-menu.active {
        overflow-y: auto !important;
    }
    
    /* Style de la scrollbar pour le menu mobile */
    .nav-menu::-webkit-scrollbar {
        width: 6px !important;
    }
    
    .nav-menu::-webkit-scrollbar-track {
        background: transparent !important;
    }
    
    .nav-menu::-webkit-scrollbar-thumb {
        background: rgba(59, 130, 246, 0.3) !important;
        border-radius: 3px !important;
    }
    
    .nav-menu::-webkit-scrollbar-thumb:hover {
        background: rgba(59, 130, 246, 0.5) !important;
    }
    
    .nav-menu.active {
        right: 0 !important;
    }
    
    /* SOLUTION ULTIME : Le menu et overlay ont width:0 dans le container flex */
    .navbar .container .nav-menu {
        position: fixed !important;
        width: 0 !important;
        height: 0 !important;
        min-width: 0 !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
    
    .navbar .container .nav-menu.active {
        width: 90% !important;
        max-width: 400px !important;
        height: 100vh !important;
    }
    
    .navbar .container .nav-overlay {
        position: fixed !important;
        width: 0 !important;
        height: 0 !important;
    }
    
    .navbar .container .nav-overlay.active {
        width: 100vw !important;
        height: 100vh !important;
    }
    
    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid #e5e7eb;
        margin: 0;
        flex-shrink: 0;
        position: relative;
    }
    
    .nav-menu > li:first-of-type {
        margin-top: 0;
        border-top: none;
    }
    
    .nav-menu > li > a {
        padding: 1.5rem 2rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-weight: 600;
        font-size: 1.1rem;
        color: #1f2937;
        transition: all 0.2s ease;
        position: relative;
        background: #ffffff;
        min-height: 65px;
    }
    
    .nav-menu > li > a:hover {
        background: #f3f4f6;
        color: #3b82f6;
    }
    
    .nav-menu > li > a.active {
        background: #3b82f6;
        color: #ffffff;
    }
    
    .nav-menu .dropdown > a::after {
        margin-left: auto;
        font-size: 0.6rem;
        transition: transform 0.3s ease;
    }
    
    .nav-menu .dropdown.active > a::after {
        transform: rotate(180deg);
    }
    
    .nav-menu .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 0;
        padding: 0;
        background: #f9fafb;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-top: 1px solid #e5e7eb;
    }
    
    .nav-menu .dropdown.active .dropdown-menu {
        max-height: 50vh;
        padding: 0.5rem 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(59, 130, 246, 0.3) transparent;
    }
    
    /* Scrollbar pour le sous-menu */
    .nav-menu .dropdown.active .dropdown-menu::-webkit-scrollbar {
        width: 5px;
    }
    
    .nav-menu .dropdown.active .dropdown-menu::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .nav-menu .dropdown.active .dropdown-menu::-webkit-scrollbar-thumb {
        background: rgba(59, 130, 246, 0.4);
        border-radius: 3px;
    }
    
    .nav-menu .dropdown.active .dropdown-menu::-webkit-scrollbar-thumb:hover {
        background: rgba(59, 130, 246, 0.6);
    }
    
    .nav-menu .dropdown-menu li {
        border-bottom: 1px solid #e5e7eb;
        margin: 0;
    }
    
    .nav-menu .dropdown-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-menu .dropdown-menu a {
        padding: 1.2rem 2rem 1.2rem 3.5rem;
        font-size: 1rem;
        color: #4b5563;
        font-weight: 500;
        transition: all 0.2s ease;
        display: block;
        background: #f9fafb;
        min-height: 55px;
        box-sizing: border-box;
        position: relative;
    }
    
    .nav-menu .dropdown-menu a::before {
        content: '•';
        position: absolute;
        left: 2.5rem;
        color: #9ca3af;
        font-size: 1.2rem;
    }
    
    .nav-menu .dropdown-menu a:hover {
        background: #e5e7eb;
        color: #1f2937;
        padding-left: 4rem;
    }
    
    .nav-menu .dropdown-menu a:hover::before {
        color: #3b82f6;
    }
    
    .nav-menu .dropdown-menu a.active {
        background: #dbeafe;
        color: #3b82f6;
        font-weight: 600;
    }
    
    .nav-menu .dropdown-menu a.active::before {
        color: #3b82f6;
    }
    
    /* Overlay pour fermer le menu - déjà défini plus haut dans @media */
    
    /* Header du menu mobile */
    .nav-menu::before {
        content: '📚 Menu';
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        padding: 1.75rem 2rem;
        background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        color: white;
        font-weight: 700;
        font-size: 1.4rem;
        text-align: center;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
        z-index: 10;
        border-bottom: 2px solid rgba(255, 255, 255, 0.2);
        display: block;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.hero .description {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Course Grid */
.courses-overview {
    padding: 4rem 0;
}

.courses-overview h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.course-card {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.course-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.course-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.course-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: var(--secondary-color);
}

/* Features */
.features {
    background-color: var(--bg-color);
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.feature p {
    color: var(--text-light);
}

/* Sections de cours Front/Back */
.course-section {
    margin: 3rem 0;
}

.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #2563eb;
}

.section-header h3 {
    font-size: 1.8rem;
    color: #2563eb;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.section-icon {
    font-size: 2rem;
}

.section-description {
    color: #6b7280;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Barre de recherche */
#searchInput {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    margin-top: 4rem;
    padding: 3rem 0 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section h4 {
    color: #cbd5e1;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: #94a3b8;
    margin: 0;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    footer {
        padding: 2rem 0 1rem;
    }
}

/* Course Page Styles */
.course-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0;
}

.course-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.course-content {
    padding: 3rem 0;
}

.course-section {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.course-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.course-section h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.course-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.course-section ul,
.course-section ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.course-section li {
    margin-bottom: 0.5rem;
}

.code-block {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Courier New', 'Monaco', 'Consolas', 'Menlo', 'Fira Code', monospace;
    font-size: 0.95rem;
    line-height: 1.9;
    white-space: pre;
    word-wrap: normal;
    tab-size: 4;
    -moz-tab-size: 4;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: block;
    letter-spacing: 0.02em;
}

/* Coloration syntaxique pour les blocs de code */
.code-block .tag {
    color: #7dd3fc; /* Cyan pour les balises */
}

.code-block .tag-name {
    color: #f472b6; /* Rose pour les noms de balises */
}

.code-block .attribute {
    color: #a78bfa; /* Violet pour les attributs */
}

.code-block .string {
    color: #86efac; /* Vert pour les chaînes */
}

.code-block .comment {
    color: #64748b; /* Gris pour les commentaires */
    font-style: italic;
}

.code-block .doctype {
    color: #fbbf24; /* Jaune pour DOCTYPE */
}

.code-block .operator {
    color: #f472b6; /* Rose pour les opérateurs (=, >, <) */
}

.code-block .keyword {
    color: #60a5fa; /* Bleu pour les mots-clés */
}

.code-block .number {
    color: #fbbf24; /* Jaune pour les nombres */
}

.code-block .text {
    color: #e2e8f0; /* Blanc pour le texte normal */
}

/* Coloration PHP (cours PHP) - Style VS Code avec couleurs très vives */
.php-keyword {
    color: #569cd6; /* Bleu ciel vif (comme VS Code) */
    font-weight: 600;
}

.php-variable {
    color: #9cdcfe; /* Bleu clair très vif pour les variables */
    font-weight: 500;
}

.php-string {
    color: #ce9178; /* Orange/beige vif pour les chaînes */
    font-weight: 500;
}

.php-comment {
    color: #6a9955; /* Vert moyen pour les commentaires */
    font-style: italic;
}

.php-number {
    color: #b5cea8; /* Vert clair pour les nombres */
    font-weight: 500;
}

.php-function {
    color: #dcdcaa; /* Jaune/beige clair pour les fonctions */
    font-weight: 500;
}

/* Coloration CSS (cours CSS) - Style VS Code avec couleurs vives */
.css-selector {
    color: #d7ba7d; /* Jaune/beige pour les sélecteurs */
    font-weight: 600;
}

.css-property {
    color: #9cdcfe; /* Bleu clair vif pour les propriétés */
    font-weight: 500;
}

.css-value {
    color: #ce9178; /* Orange/beige vif pour les valeurs */
    font-weight: 500;
}

.css-comment {
    color: #6a9955; /* Vert moyen pour les commentaires */
    font-style: italic;
}

/* Coloration JavaScript (cours JavaScript) - Style VS Code avec couleurs vives */
.js-keyword {
    color: #569cd6; /* Bleu ciel vif pour les mots-clés (let, const, if, etc.) */
    font-weight: 600;
}

.js-string {
    color: #ce9178; /* Orange/beige vif pour les chaînes de caractères */
    font-weight: 500;
}

.js-comment {
    color: #6a9955; /* Vert moyen pour les commentaires */
    font-style: italic;
}

.js-number {
    color: #b5cea8; /* Vert clair pour les nombres */
    font-weight: 500;
}

.js-function {
    color: #dcdcaa; /* Jaune/beige clair pour les fonctions natives */
    font-weight: 500;
}

.js-operator {
    color: #d4d4d4; /* Gris clair pour les opérateurs */
    font-weight: 500;
}

.js-template {
    color: #4ec9b0; /* Cyan pour les template literals ${} */
    font-weight: 500;
}

.css-number {
    color: #b5cea8; /* Vert clair pour les nombres */
    font-weight: 500;
}

.css-string {
    color: #ce9178; /* Orange/beige pour les chaînes (url, etc.) */
    font-weight: 500;
}

.css-keyword {
    color: #569cd6; /* Bleu ciel vif pour les mots-clés (important, etc.) */
    font-weight: 600;
}

.css-function {
    color: #dcdcaa; /* Jaune/beige clair pour les fonctions (calc, rgb, etc.) */
    font-weight: 500;
}

.css-pseudo {
    color: #c586c0; /* Violet pour les pseudo-classes et pseudo-éléments */
    font-weight: 500;
}

.css-at-rule {
    color: #c586c0; /* Violet pour @media, @keyframes, etc. */
    font-weight: 600;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    border-radius: 8px 8px 0 0;
}

/* Amélioration du scroll horizontal */
.code-block {
    scrollbar-width: thin;
    scrollbar-color: #475569 #1e293b;
}

.code-block::-webkit-scrollbar {
    height: 10px;
}

.code-block::-webkit-scrollbar-track {
    background: #0f172a;
    border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.code-block::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Style pour les balises <pre> et <code> si utilisées */
pre.code-block,
code.code-block {
    display: block;
    white-space: pre;
    font-family: inherit;
}

pre.code-block code {
    display: block;
    white-space: pre;
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Exercise Section */
.exercise-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 5px solid var(--primary-color);
    padding: 2.5rem;
    margin: 3rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.exercise-section::before {
    content: '💡';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    opacity: 0.2;
}

.exercise-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exercise-section .exercise-description {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.exercise-section .exercise-description p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.exercise-section .exercise-description p strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.exercise-section .exercise-description ol,
.exercise-section .exercise-description ul {
    margin-left: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.exercise-section .exercise-description li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.exercise-section .exercise-description ul li {
    list-style-type: disc;
}

.exercise-section .exercise-solution {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--border-color);
}

.exercise-section .solution-toggle {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.exercise-section .solution-toggle:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
}

.exercise-section .solution-toggle:active {
    transform: translateY(0);
}

.exercise-section .solution-content {
    display: none !important;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--success-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.exercise-section .solution-content.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
}

/* Bouton copier le code */
.copy-code-btn {
    background-color: #6b7280;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-code-btn:hover {
    background-color: #4b5563;
    transform: translateY(-1px);
}

.copy-code-btn:active {
    transform: translateY(0);
}

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

.exercise-section .solution-content .code-block {
    margin-top: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
    background-color: #1e293b;
    white-space: pre;
    font-family: 'Courier New', 'Monaco', 'Consolas', 'Menlo', 'Fira Code', monospace;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    .course-header h1 {
        font-size: 2rem;
    }

    .course-section {
        padding: 1.5rem;
    }

    .exercise-section {
        padding: 1.5rem;
        margin: 2rem 0;
    }

    .exercise-section .exercise-description {
        padding: 1.5rem;
    }

    .exercise-section h3 {
        font-size: 1.3rem;
    }

    .code-block {
        font-size: 0.85rem;
        padding: 1rem;
    }
}

/* Navigation breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Table of Contents (Sommaire) */
.table-of-contents {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 280px;
    max-height: calc(100vh - 100px);
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
    z-index: 100;
    display: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.table-of-contents.show {
    display: block;
}

.table-of-contents h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-of-contents .toc-close {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
    line-height: 1;
}

.table-of-contents .toc-close:hover {
    background: var(--bg-light);
}

.table-of-contents ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.4rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.table-of-contents a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding-left: 0.75rem;
}

.table-of-contents a.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
}

.table-of-contents .toc-level-2 {
    padding-left: 0.5rem;
    font-size: 0.85rem;
}

.table-of-contents .toc-level-3 {
    padding-left: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Toggle button pour le sommaire */
.toc-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.toc-toggle:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

.toc-toggle:active {
    transform: scale(0.95);
}

/* Ajustement du contenu principal quand le sommaire est visible */
.course-content-wrapper {
    display: flex;
    gap: 2rem;
    position: relative;
}

.course-content-main {
    flex: 1;
    max-width: 100%;
}

/* Responsive pour le sommaire */
@media (min-width: 1200px) {
    .table-of-contents {
        display: none; /* Par défaut caché, peut être ouvert avec le bouton */
    }
    
    .table-of-contents.show {
        display: block;
    }
    
    .toc-toggle {
        display: flex; /* Toujours visible pour ouvrir/fermer */
    }
    
    .course-content-main {
        max-width: 100%; /* Prend toute la largeur quand le sommaire est fermé */
        transition: max-width 0.3s ease;
    }
    
    /* Quand le sommaire est ouvert, ajuster la largeur du contenu */
    .table-of-contents.show ~ .course-content-main,
    body:has(.table-of-contents.show) .course-content-main {
        max-width: calc(100% - 300px);
    }
}

@media (max-width: 1199px) {
    .table-of-contents {
        right: 10px;
        width: 260px;
    }
}

@media (max-width: 768px) {
    .table-of-contents {
        width: 100%;
        right: 0;
        left: 0;
        top: 0;
        max-height: 100vh;
        border-radius: 0;
        z-index: 1001;
        position: fixed;
    }
    
    .table-of-contents .toc-close {
        display: block;
    }
    
    .toc-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .toc-overlay.active {
        display: block;
        opacity: 1;
    }
    }
    
    .course-content-wrapper {
        flex-direction: column;
    }
    
    .course-content-main {
        max-width: 100%;
    }
}

/* Styles pour les résultats attendus (mockups) */
.expected-result {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.expected-result h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.result-mockup {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.mockup-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
}

/* Mockup Exercice 1 - Page de présentation */
.mockup-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mockup-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.mockup-nav span {
    margin: 0 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.mockup-nav span:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mockup-content {
    padding: 1.5rem;
}

.mockup-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.mockup-h2 {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.mockup-img-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 1rem auto;
    border: 4px solid white;
    box-shadow: var(--shadow);
}

.mockup-text {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.mockup-list {
    background: white;
    padding: 1rem;
    border-radius: 4px;
}

.mockup-list-item {
    padding: 0.5rem 0;
    color: var(--text-color);
}

.mockup-form {
    background: white;
    padding: 1rem;
    border-radius: 4px;
}

.mockup-input {
    height: 40px;
    background: #f5f5f5;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.mockup-textarea {
    height: 100px;
    background: #f5f5f5;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.mockup-button {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    display: inline-block;
    cursor: pointer;
    transition: background 0.3s;
}

.mockup-button:hover {
    background: var(--secondary-color);
}

.mockup-footer {
    background: var(--text-color);
    color: white;
    padding: 1rem;
    text-align: center;
    border-radius: 0 0 8px 8px;
}

/* Mockup Exercice 2 - Carte de produit */
.mockup-product-card {
    max-width: 350px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.mockup-product-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.mockup-product-info {
    padding: 1.5rem;
}

.mockup-product-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.mockup-product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.mockup-product-desc {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.mockup-product-button {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s;
}

.mockup-product-button:hover {
    background: var(--secondary-color);
}

/* Mockup Exercice 3 - Layout Grid/Flexbox */
.mockup-layout {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.mockup-header-layout {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    text-align: center;
    font-weight: bold;
}

.mockup-main-layout {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 1.5rem;
}

.mockup-sidebar {
    width: 250px;
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
}

.mockup-content-layout {
    flex: 1;
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    color: var(--text-color);
}

.mockup-footer-layout {
    background: var(--text-color);
    color: white;
    padding: 1.5rem;
    text-align: center;
    font-weight: bold;
}

/* Mockup Exercice 4 - Menu responsive */
.mockup-responsive-nav {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.mockup-nav-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mockup-logo {
    font-weight: bold;
    font-size: 1.2rem;
}

.mockup-hamburger {
    font-size: 1.5rem;
    cursor: pointer;
}

.mockup-nav-menu {
    display: flex;
    flex-direction: column;
    background: var(--bg-light);
}

.mockup-nav-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.3s;
}

.mockup-nav-item:hover {
    background: white;
    color: var(--primary-color);
}

.mockup-nav-item:last-child {
    border-bottom: none;
}

/* Mockup Exercice 5 - Page complète */
.mockup-full-page {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.mockup-page-header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    text-align: center;
    font-weight: bold;
}

.mockup-page-hero {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.mockup-page-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-light);
}

.mockup-page-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    font-weight: bold;
    color: var(--text-color);
}

.mockup-page-footer {
    background: var(--text-color);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

@media (max-width: 768px) {
    .mockup-page-grid {
        grid-template-columns: 1fr;
    }
    
    .mockup-main-layout {
        flex-direction: column;
    }
    
    .mockup-sidebar {
        width: 100%;
    }
}

/* Styles pour rendre le cours plus ludique */
/* Mini-exercices pratiques */
.mini-exercise {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.mini-exercise-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.exercise-icon {
    font-size: 1.5rem;
}

.mini-exercise-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.mini-exercise-content {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.mini-exercise-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.mini-solution-toggle {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mini-solution-toggle:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.mini-solution-content {
    display: none !important;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mini-solution-content.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    animation: fadeIn 0.3s ease;
}

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

/* Encadrés visuels (Astuces, Avertissements, Exemples) */
.tip-box, .warning-box, .example-box {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
    animation: slideIn 0.4s ease;
}

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

.tip-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left: 4px solid var(--success-color);
}

.tip-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tip-content {
    flex: 1;
    color: var(--text-color);
    line-height: 1.6;
}

.warning-box {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-left: 4px solid #f59e0b;
}

.warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.warning-content {
    flex: 1;
    color: var(--text-color);
    line-height: 1.6;
}

.example-box {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-left: 4px solid #8b5cf6;
}

.example-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.example-content {
    flex: 1;
    color: var(--text-color);
    line-height: 1.6;
}

/* Quiz interactif */
.quiz-box {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
}

.quiz-question {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option {
    padding: 1rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quiz-option:hover {
    background: #e0f2fe;
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.quiz-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.quiz-option.correct {
    background: #d1fae5;
    border-color: var(--success-color);
}

.quiz-option.incorrect {
    background: #fee2e2;
    border-color: #ef4444;
}

.quiz-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.quiz-submit:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.quiz-result {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.quiz-result.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.quiz-result.correct {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid var(--success-color);
}

.quiz-result.incorrect {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

/* Badge de progression */
.progress-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

.progress-badge::before {
    content: "✓";
    background: rgba(255, 255, 255, 0.3);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Responsive pour les éléments ludiques */
@media (max-width: 768px) {
    .mini-exercise {
        padding: 1rem;
    }
    
    .tip-box, .warning-box, .example-box {
        flex-direction: column;
        padding: 1rem;
    }
    
    .quiz-box {
        padding: 1.5rem;
    }
}


/* Bouton de téléchargement PDF */
#pdf-download-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
    white-space: nowrap !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

#pdf-download-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Responsive pour le bouton PDF */
@media (max-width: 768px) {
    .course-header .container {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    #pdf-download-btn {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Styles pour l'impression PDF */
@media print {
    /* Masquer les éléments non nécessaires */
    header,
    footer,
    .table-of-contents,
    .toc-toggle,
    .breadcrumb,
    #pdf-download-btn,
    .nav-overlay,
    .menu-toggle,
    .nav-menu,
    button,
    .solution-toggle,
    .mini-solution-toggle {
        display: none !important;
    }

    /* Styles pour le body et main */
    body {
        background: white !important;
        color: #1f2937 !important;
    }

    main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Forcer la visibilité de toutes les sections */
    .course-section,
    .exercise-section {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 2rem !important;
        background: white !important;
        box-shadow: none !important;
        border: none !important;
        padding: 1rem 0 !important;
    }

    /* Styles pour les titres */
    h1 {
        font-size: 2rem !important;
        color: #1f2937 !important;
        page-break-after: avoid;
        margin-top: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
        color: #1f2937 !important;
        page-break-after: avoid;
        margin-top: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    h3 {
        font-size: 1.5rem !important;
        color: #1f2937 !important;
        page-break-after: avoid;
        margin-top: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }

    h4, h5, h6 {
        font-size: 1.25rem !important;
        color: #1f2937 !important;
        page-break-after: avoid;
        margin-top: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Styles pour les paragraphes */
    p {
        color: #1f2937 !important;
        margin-bottom: 1rem !important;
        line-height: 1.6 !important;
    }

    /* Styles pour les listes */
    ul, ol {
        margin-bottom: 1rem !important;
        padding-left: 2rem !important;
    }

    li {
        margin-bottom: 0.5rem !important;
        color: #1f2937 !important;
    }

    /* Styles pour les code blocks */
    .code-block {
        background-color: #f3f4f6 !important;
        color: #1f2937 !important;
        padding: 1rem !important;
        border-radius: 4px !important;
        margin-bottom: 1rem !important;
        overflow: visible !important;
        font-family: monospace !important;
        font-size: 0.9rem !important;
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        page-break-inside: avoid;
        border: 1px solid #e5e7eb !important;
    }

    /* Styles pour les tableaux */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-bottom: 1rem !important;
        page-break-inside: avoid;
    }

    th, td {
        padding: 0.5rem !important;
        border: 1px solid #e5e7eb !important;
        color: #1f2937 !important;
    }

    /* Styles pour les images */
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
        margin-bottom: 1rem !important;
    }

    /* Styles pour les liens */
    a {
        color: #2563eb !important;
        text-decoration: underline !important;
    }

    /* Styles pour les encadrés */
    .info-box,
    .tip-box,
    .warning-box {
        page-break-inside: avoid;
        margin-bottom: 1rem !important;
        border: 1px solid #e5e7eb !important;
    }

    /* Masquer les solutions par défaut (ou les afficher si besoin) */
    .solution-content,
    .mini-solution-content {
        display: block !important;
    }

    /* Éviter les sauts de page dans les éléments importants */
    .quiz,
    .mini-exercise {
        page-break-inside: avoid;
    }
}
