        /* === VARIABLES === */
        :root {
            --primary: #7209b7;
            --secondary: #3a0ca3;
            --accent: #4361ee;
            --dark: #14213d;
            --light: #f8f9fa;
            --success: #4cc9f0;
            --warning: #f72585;
            --radius: 8px;
            --shadow: 0 4px 6px rgba(0,0,0,0.1);
            --transition: all 0.3s ease;
        }

        /* === BASE === */
        body {
            font-family: 'Segoe UI', system-ui, sans-serif;
            line-height: 1.7;
            color: #333;
            background-color: var(--light);
            margin: 0;
            font-size: 1.1rem;
        }

        .container {
            margin: 0 auto;
            padding: 0 20px;
            /*max-width: 1200px;*/
        }

        /* === HEADER AMÉLIORÉ === */
        header {
            background: linear-gradient(135deg, var(--primary), var(--secondary));
            color: white;
            padding: 1rem 0;
            box-shadow: var(--shadow);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .logo i {
            color: var(--accent);
            animation: pulse 2s infinite;
        }

        /* Menu du cours amélioré */
        .course-menu-toggle {
            background: none;
            border: none;
            color: white;
            cursor: pointer;
            font-size: 1.5rem;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            border-radius: 4px;
            transition: var(--transition);
        }
        
        .course-menu-toggle:hover {
            background: rgba(255,255,255,0.1);
        }
        
        .course-menu-toggle i {
            font-size: 1.8rem; /* Icône plus grande */
        }
        
        .course-menu-toggle .menu-text {
            font-size: 1.1rem;
        }
        
        .course-menu {
            position: absolute;
            top: 100%;
            right: 20px;
            background: white;
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            width: 300px;
            max-height: 70vh;
            overflow-y: auto;
            transform: scale(0.95);
            opacity: 0;
            visibility: hidden;
            transform-origin: top right;
            transition: var(--transition);
            z-index: 90;
        }
        
        .course-menu.active {
            transform: scale(1);
            opacity: 1;
            visibility: visible;
        }
        
        .course-menu h3 {
            color: var(--primary);
            margin: 0;
            padding: 1rem;
            border-bottom: 1px solid #eee;
        }
        
        .course-menu ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        
        .course-menu li {
            border-bottom: 1px solid #f5f5f5;
        }
        
        .course-menu a {
            display: block;
            padding: 0.8rem 1rem;
            color: var(--dark);
            text-decoration: none;
            transition: var(--transition);
        }
        
        .course-menu a:hover {
            background: rgba(114, 9, 183, 0.05);
            color: var(--primary);
        }
        
        .course-menu .current {
            background: rgba(114, 9, 183, 0.1);
            color: var(--primary);
            font-weight: 600;
        }

        @keyframes pulse {
            0% { transform: scale(1); }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

        /* === MAIN LAYOUT === */
        .lesson-container {
            display: grid;
            grid-template-columns: 250px 1fr;
            gap: 20px;
            margin: 1.5rem 0 3rem;
        }

        @media (max-width: 768px) {
            .lesson-container {
                grid-template-columns: 1fr;
            }
        }

        /* === SIDEBAR === */
        .lesson-sidebar {
            position: sticky;
            top: 80px;
            align-self: start;
            background: white;
            border-radius: var(--radius);
            padding: 1.2rem;
            box-shadow: var(--shadow);
        }

        .sidebar-title {
            font-size: 1.2rem;
            margin-bottom: 1.2rem;
            color: var(--dark);
            padding-bottom: 0.5rem;
            border-bottom: 2px solid var(--accent);
        }

        .sidebar-nav {
            list-style: none;
            padding: 0;
        }

        .sidebar-nav li {
            margin-bottom: 0.7rem;
            position: relative;
        }

        .sidebar-nav a {
            color: var(--dark);
            text-decoration: none;
            display: block;
            padding: 0.5rem;
            border-radius: 4px;
            transition: var(--transition);
        }

        .sidebar-nav a:hover,
        .sidebar-nav .active {
            background: rgba(114, 9, 183, 0.1);
            color: var(--primary);
        }

        .sidebar-nav .active {
            font-weight: 600;
        }

        .sidebar-nav .active::before {
            content: '';
            position: absolute;
            left: -5px;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 60%;
            background: var(--primary);
            border-radius: 2px;
        }

        /* === CONTENT === */
        .lesson-content {
            background: white;
            border-radius: var(--radius);
            padding: 1.8rem;
            box-shadow: var(--shadow);
        }

        .lesson-title {
            color: var(--dark);
            font-size: 2rem;
            margin-bottom: 1.5rem;
            position: relative;
            padding-bottom: 0.5rem;
        }

        .lesson-title::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 80px;
            height: 4px;
            background: var(--accent);
        }

        h2 {
            color: var(--primary);
            margin: 2rem 0 1.2rem;
            font-size: 1.7rem;
        }

        h3 {
            color: var(--secondary);
            margin: 1.8rem 0 1rem;
            font-size: 1.4rem;
        }

        p {
            margin-bottom: 1.2rem;
            line-height: 1.7;
        }

        ul, ol {
            margin: 1.2rem 0 1.2rem 1.5rem;
        }

        li {
            margin-bottom: 0.6rem;
        }

        /* === COMPONENTS === */
        .note {
            background: #e7f5ff;
            border-left: 4px solid var(--accent);
            padding: 1.2rem;
            margin: 1.5rem 0;
            border-radius: 0 var(--radius) var(--radius) 0;
        }

        .warning {
            background: #fff3bf;
            border-left: 4px solid #ffd43b;
            padding: 1.2rem;
            margin: 1.5rem 0;
            border-radius: 0 var(--radius) var(--radius) 0;
        }

        .tip {
            background: #ebfbee;
            border-left: 4px solid #2b8a3e;
            padding: 1.2rem;
            margin: 1.5rem 0;
            border-radius: 0 var(--radius) var(--radius) 0;
        }

        .code-tabs {
            margin: 1.8rem 0;
        }

        .code-tab-buttons {
            display: flex;
            border-bottom: 1px solid #ddd;
        }

        .code-tab-btn {
            padding: 0.7rem 1.2rem;
            background: none;
            border: none;
            cursor: pointer;
            font-weight: 600;
            color: #666;
            transition: var(--transition);
        }

        .code-tab-btn.active {
            color: var(--primary);
            border-bottom: 3px solid var(--primary);
        }

        .code-tab-content {
            display: none;
        }

        .code-tab-content.active {
            display: block;
        }

        /* === CODE BLOCKS === */
        .code-block {
            background: #1e1e1e;
            color: #d4d4d4;
            padding: 1.2rem;
            border-radius: var(--radius);
            font-family: 'Consolas', monospace;
            margin: 1.5rem 0;
            overflow-x: auto;
            line-height: 1.5;
            font-size: 0.95rem;
        }

        .code-comment { color: #6a9955; }
        .code-selector { color: #d7ba7d; }
        .code-property { color: #9cdcfe; }
        .code-value { color: #ce9178; }
        .code-function { color: #dcdcaa; }

        /* === DEMO BLOCKS === */
        .demo-container {
            margin: 1.8rem 0;
            padding: 1.2rem;
            background: #f8f9fa;
            border-radius: var(--radius);
            border: 1px solid #ddd;
        }

        .demo-title {
            font-weight: 600;
            margin-bottom: 1rem;
            color: var(--dark);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .demo-toggle {
            background: none;
            border: none;
            color: var(--primary);
            cursor: pointer;
            font-size: 0.9rem;
        }

        .demo-box {
            padding: 1rem;
            background: white;
            border: 1px dashed #ccc;
            margin-bottom: 1rem;
            overflow: hidden;
        }

        /* FUNCTION CARDS */
        .function-card {
            background: white;
            border-radius: var(--radius);
            padding: 1.8rem;
            margin: 1.8rem 0;
            box-shadow: var(--shadow);
            border-top: 4px solid var(--secondary);
        }

        .function-card h3 {
            display: flex;
            align-items: center;
            margin-top: 0;
        }

        .function-card h3 code {
            margin-left: 0.5rem;
            background: rgba(0, 0, 0, 0.1);
            padding: 0.3rem 0.6rem;
            border-radius: 20px;
            font-size: 0.9em;
        }

        /* === NAVIGATION === */
        .lesson-navigation {
            display: flex;
            justify-content: space-between;
            margin: 2.5rem 0 1rem;
            padding-top: 2rem;
            border-top: 1px solid #eee;
        }

        .nav-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 0.8rem 1.5rem;
            background: var(--primary);
            color: white;
            text-decoration: none;
            border-radius: var(--radius);
            transition: var(--transition);
            font-weight: 600;
        }

        .nav-btn:hover {
            background: var(--secondary);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }

        /* === FOOTER === */
        footer {
            background: var(--dark);
            color: white;
            padding: 2.5rem 0;
        }

        .footer-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1.5rem;
        }

        .footer-column h3 {
            font-size: 1.2rem;
            margin-bottom: 1.2rem;
            position: relative;
        }

        .footer-column h3::after {
            content: '';
            position: absolute;
            bottom: -8px;
            left: 0;
            width: 40px;
            height: 3px;
            background: var(--accent);
        }

        .footer-column ul {
            list-style: none;
            padding: 0;
        }

        .footer-column li {
            margin-bottom: 0.7rem;
        }

        .footer-column a {
            color: #ccc;
            text-decoration: none;
            transition: color 0.3s;
        }

        .footer-column a:hover {
            color: white;
        }

        .social-links {
            display: flex;
            gap: 15px;
            margin-top: 1.2rem;
        }

        .social-links a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background: rgba(255,255,255,0.1);
            border-radius: 50%;
            transition: var(--transition);
        }

        .social-links a:hover {
            background: var(--accent);
            transform: translateY(-3px);
        }

        .copyright {
            text-align: center;
            margin-top: 2.5rem;
            padding-top: 1.5rem;
            border-top: 1px solid rgba(255,255,255,0.1);
            color: #aaa;
            font-size: 0.9rem;
        }

        /* === BOUTON RETOUR EN HAUT === */
        .back-to-top {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 50px;
            height: 50px;
            background: var(--primary);
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            cursor: pointer;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition);
            box-shadow: 0 2px 10px rgba(0,0,0,0.2);
            z-index: 99;
        }

        .back-to-top.visible {
            opacity: 1;
            visibility: visible;
        }

        .back-to-top:hover {
            background: var(--secondary);
            transform: translateY(-3px);
        }

        /* Mobile menu */
        @media (max-width: 768px) {
            .course-menu-toggle .menu-text {
                display: none; /* Cache le texte en mobile */
            }
            
            .course-menu {
                right: 10px;
                width: calc(100% - 20px);
                max-height: 60vh;
            }
            
            .lesson-sidebar {
                position: fixed;
                top: 70px;
                left: 0;
                width: 280px;
                height: calc(100vh - 70px);
                transform: translateX(-100%);
                transition: transform 0.3s ease;
                z-index: 90;
            }
            
            .lesson-sidebar.active {
                transform: translateX(0);
            }
            
            .lesson-container {
                grid-template-columns: 1fr;
            }
            
            .back-to-top {
                bottom: 20px;
                right: 20px;
                width: 45px;
                height: 45px;
                font-size: 1.3rem;
            }
        }

        /* Overlay pour les menus */
        .overlay {
            position: fixed;
            top: 70px;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 80;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        
        .overlay.active {
            opacity: 1;
            visibility: visible;
        }