/* GoGoKodo - Styles pour l'interface principale */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --success-bg: #f0f9f0;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --hover-bg: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 60px;
    --transition-speed: 0.3s;
    --transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea0a 0%, #764ba20a 50%, #6365f10a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* Widget des points utilisateur */
.user-points-widget {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.user-points-widget.collapsed .points-display,
.user-points-widget.collapsed .points-progress,
.user-points-widget.collapsed .achievements-preview,
.user-points-widget.collapsed .ranking-info {
    display: none;
}

.points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.points-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.points-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.points-icon {
    font-size: 1.2rem;
}

.points-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.points-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.points-display {
    text-align: center;
    margin-bottom: 1rem;
}

.total-points {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.points-label {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.points-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    height: 0.5rem;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    background: linear-gradient(90deg, #10b981, #34d399);
    height: 100%;
    width: 0%;
    border-radius: 1rem;
    transition: width 0.8s ease;
}

.next-milestone {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    opacity: 0.9;
}

.achievements-preview {
    margin-bottom: 1rem;
}

.achievements-title {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.achievements-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    min-height: 2rem;
}

.achievement-badge {
    width: 2rem;
    height: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.achievement-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.achievement-badge.new {
    animation: newAchievement 1s ease;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

@keyframes newAchievement {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.ranking-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rank-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.leaderboard-link {
    color: #fbbf24;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.leaderboard-link:hover {
    color: #f59e0b;
}

/* États des cours - Enhanced completion tracking */
.course-item.completed,
.nav-item.completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    color: var(--text-secondary);
    border: 2px solid rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
    opacity: 0.7;
}

/* Completed course buttons - disabled state */
.course-button.completed-course {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.02));
    border: 1px solid rgba(16, 185, 129, 0.2);
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.course-button.completed-course::after {
    content: '🔒';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.7;
}

.course-item.completed::before,
.nav-item.completed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: completionShimmer 3s ease-in-out infinite;
}

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

.course-item.completed .course-button,
.nav-item.completed .nav-link {
    color: var(--text-secondary);
    cursor: not-allowed; /* Prevent access to completed courses */
    position: relative;
    z-index: 1;
}

.course-button.completed-course:hover {
    transform: none;
    box-shadow: none;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.02));
    border-color: rgba(16, 185, 129, 0.2);
}

.course-item.completed .course-meta,
.nav-item.completed .course-meta {
    color: rgba(255, 255, 255, 0.9);
}

/* Completion badges */
.completion-badge {
    padding: 0.15rem 0.4rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.completed-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid #10b981;
}

.available-badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.completion-status {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Bouton de validation pour cours complétés */
.btn-primary.completed {
    background: linear-gradient(135deg, #10b981, #059669);
    cursor: not-allowed;
    opacity: 0.8;
    position: relative;
    overflow: hidden;
}

.btn-primary.completed::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.1) 10px,
        rgba(255,255,255,0.1) 20px
    );
}

.btn-primary.completed:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    transform: none;
}

/* Overlay de completion */
.completion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
    animation: overlayFadeIn 0.5s ease-out;
}

@keyframes overlayFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.completion-message {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #10b981;
    max-width: 400px;
    animation: messageSlideIn 0.6s ease-out 0.2s both;
}

@keyframes messageSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.completion-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: iconBounce 1s ease-out 0.5s both;
}

@keyframes iconBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.completion-message h3 {
    color: #10b981;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.completion-message p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.completion-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Container principal */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar - Menu latéral */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 50%, #f8fafc 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    resize: horizontal;
    overflow: hidden;
    min-width: var(--sidebar-collapsed-width);
    max-width: 800px;
    backdrop-filter: blur(10px);
    border-right: 2px solid transparent;
    background-clip: padding-box;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar:hover::before {
    opacity: 1;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    min-width: var(--sidebar-collapsed-width);
    transform: translateX(0);
}

/* Header du sidebar */
.sidebar-header {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--secondary-color) 100%);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 20%, rgba(255,255,255,0.15) 50%, transparent 80%);
    transform: translateX(-100%) skewX(-15deg);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sidebar-header:hover::before {
    transform: translateX(100%) skewX(-15deg);
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4));
    transition: width 0.3s ease;
}

.logo:hover::after {
    width: 100%;
}

.sidebar.collapsed .logo {
    opacity: 0;
    transform: translateX(-30px) scale(0.8);
}

/* Bouton toggle */
.toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.hamburger {
    width: 18px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: #fbbf24;
}

.sidebar.collapsed .hamburger:nth-child(2) {
    opacity: 0;
    transform: scale(0) rotate(180deg);
}

.sidebar.collapsed .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: #fbbf24;
}

/* Contenu du sidebar */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(99, 102, 241, 0.1);
    position: relative;
    background: transparent;
}

.sidebar-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 4px;
    margin: 8px 0;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--secondary-color) 100%);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary-color) 0%, var(--primary-color) 50%, var(--primary-dark) 100%);
    transform: scaleX(1.3);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* Sections de navigation */
.nav-section {
    margin-bottom: 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    position: relative;
    overflow: hidden;
}

.nav-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-section:hover::before {
    transform: scaleY(1);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0.5rem;
}

.section-header:hover {
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(5px);
}

.section-title {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    flex: 1;
    transition: color 0.3s ease;
}

.section-header:hover .section-title {
    color: var(--primary-color);
}

.section-counter {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    min-width: 2rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
    animation: pulse 2s ease-in-out infinite;
}

.section-counter:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
}

.section-counter.completed {
    background: linear-gradient(135deg, var(--success-color), #059669);
    animation: none;
}

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

.section-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.section-toggle:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.toggle-icon {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.nav-section.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.sidebar.collapsed .section-title {
    opacity: 0;
    transform: translateX(-20px);
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-item.completed {
    opacity: 0.8;
}

.nav-item.completed .nav-link {
    background: var(--success-bg, #f0f9f0);
    border-left: 4px solid var(--success-color);
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    margin: 0.25rem 0.75rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 0 2px 2px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
}

.nav-link:hover::before {
    transform: scaleY(1);
}

.nav-link:hover::after {
    opacity: 1;
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    color: var(--primary-color);
    font-weight: 600;
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
    animation: activeGlow 2s ease-in-out infinite;
}

.nav-link.active::before {
    transform: scaleY(1);
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color), var(--primary-color));
    width: 6px;
}

@keyframes activeGlow {
    0%, 100% { box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2); }
    50% { box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3); }
}

.course-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.course-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

.course-points {
    background: var(--accent-color);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-weight: 600;
}

.course-difficulty {
    color: var(--text-muted);
    font-style: italic;
}

.completion-badge {
    background: var(--success-color);
    color: white;
    padding: 0.1rem 0.3rem;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: auto;
}

.loading-navigation {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-style: italic;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Styles pour les nouveaux éléments de navigation */
.folder-section {
    margin-bottom: 0.5rem;
    animation: slideInFromLeft 0.4s ease-out;
    animation-fill-mode: both;
}

.folder-section:nth-child(1) { animation-delay: 0.1s; }
.folder-section:nth-child(2) { animation-delay: 0.2s; }
.folder-section:nth-child(3) { animation-delay: 0.3s; }
.folder-section:nth-child(4) { animation-delay: 0.4s; }
.folder-section:nth-child(5) { animation-delay: 0.5s; }

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

.folder-button {
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(248, 250, 252, 0.9));
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.folder-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.03));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.folder-button:hover {
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15);
    border-color: var(--primary-color);
}

.folder-button:hover::before {
    opacity: 1;
}

.folder-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.folder-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    transition: color 0.3s ease;
}

.folder-button:hover .folder-title {
    color: var(--primary-color);
}

.folder-counter {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.folder-button:hover .folder-counter {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.folder-arrow {
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.folder-button:hover .folder-arrow {
    color: var(--primary-color);
    transform: translateX(4px);
}



.course-button {
    width: 100%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.08);
    border-radius: 10px;
    padding: 0.875rem;
    margin: 0.25rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.course-button::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.course-button:hover {
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
}

.course-button:hover::before {
    transform: scaleY(1);
}

.course-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    flex: 1;
}

.course-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.course-button:hover .course-title {
    color: var(--primary-color);
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.difficulty {
    color: var(--text-secondary);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.course-button:hover .difficulty {
    background: var(--primary-color);
    color: white;
}

.points {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.course-button:hover .points {
    transform: scale(1.1);
}

.course-arrow {
    font-size: 1rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.course-button:hover .course-arrow {
    color: var(--primary-color);
    transform: translateX(3px);
}

.back-button {
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}

.btn-back {
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.btn-back:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.back-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-back:hover .back-icon {
    transform: translateX(-2px);
}

.section-title-header {
    padding: 1rem 0.75rem 0.5rem;
}

.section-title-header h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
    position: relative;
}

.section-title-header h3::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 1px;
}

.courses-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-content-sidebar {
    padding: 1rem 0.75rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.course-content-sidebar h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.course-content-sidebar p {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.course-content-sidebar ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.course-content-sidebar li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.sidebar.collapsed .nav-list a {
    padding: 0.75rem;
    margin: 0.25rem 0.5rem;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.sidebar.collapsed .nav-list a:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: white;
}

.sidebar.collapsed .nav-list a span {
    opacity: 0;
    transform: translateX(-30px) scale(0.8);
}

.sidebar.collapsed .folder-button,
.sidebar.collapsed .course-button {
    padding: 0.75rem;
    margin: 0.25rem 0.5rem;
    justify-content: center;
    border-radius: 8px;
}

.sidebar.collapsed .folder-info,
.sidebar.collapsed .course-info,
.sidebar.collapsed .folder-arrow,
.sidebar.collapsed .course-arrow {
    opacity: 0;
    transform: translateX(-20px);
}

.sidebar.collapsed .folder-button:hover,
.sidebar.collapsed .course-button:hover {
    transform: scale(1.1);
}

/* Handle de redimensionnement */
.resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    cursor: ew-resize;
    transition: background var(--transition-speed) var(--transition-easing);
    z-index: 10;
}

.resize-handle:hover {
    background: var(--primary-color);
}

.resize-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 30px;
    background: var(--border-color);
    border-radius: 1px;
    transition: all var(--transition-speed) var(--transition-easing);
}

.resize-handle:hover::before {
    background: white;
    height: 40px;
}

/* Zone de contenu principale */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-secondary);
    transition: all var(--transition-speed) var(--transition-easing);
}

/* Header du contenu */
.content-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.content-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb span {
    position: relative;
}

.breadcrumb span:not(:last-child):not(.course-points)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--border-color);
}

.breadcrumb span:last-child:not(.course-points) {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb .course-points {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: auto;
    box-shadow: var(--shadow-sm);
}

/* Zone de contenu */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
}

.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Conteneurs de contenu */
.editor-container,
.text-container,
.input-container,
.iframe-container {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all var(--transition-speed) var(--transition-easing);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
}

.editor-container:hover,
.text-container:hover,
.input-container:hover,
.iframe-container:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

/* Headers des conteneurs */
.editor-header,
.text-header,
.input-header,
.iframe-header {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.editor-title,
.text-title,
.input-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.editor-title::before {
    content: "💻";
    font-size: 1rem;
}

.editor-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Bouton d'exécution amélioré */
#runCode {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

#runCode:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

#runCode:active {
    transform: translateY(0);
}

.run-icon {
    font-size: 0.875rem;
}

.run-text {
    font-size: 0.875rem;
}

/* Éditeur Monaco amélioré */
.monaco-editor {
    flex: 1;
    min-height: 350px;
    max-height: 600px;
    border: none;
    font-family: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    overflow: hidden;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Zone de sortie du code */
.code-output {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    max-height: 200px;
    overflow-y: auto;
}

.output-header {
    background: var(--bg-tertiary);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.output-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.output-title::before {
    content: "📤";
    font-size: 0.875rem;
}

.btn-clear {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.output-content {
    padding: 1rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
    color: var(--text-primary);
}

.output-success {
    color: #10b981;
}

.output-error {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.5rem;
    border-radius: 0.25rem;
    border-left: 3px solid #ef4444;
}

.output-info {
    color: #3b82f6;
}

/* États de chargement */
#runCode.loading {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    cursor: not-allowed;
}

#runCode.loading .run-icon {
    animation: spin 1s linear infinite;
}

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

/* Zone d'éditeur avec scroll personnalisé */
.editor-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(99, 102, 241, 0.1);
}

.editor-wrapper::-webkit-scrollbar {
    width: 8px;
}

.editor-wrapper::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 4px;
}

.editor-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.editor-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
}

/* Zone de texte */
.text-area {
    width: 100%;
    flex: 1;
    min-height: 200px;
    max-height: 400px;
    padding: 1.5rem;
    border: none;
    outline: none;
    resize: none;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.6;
    background: transparent;
    color: var(--text-primary);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(99, 102, 241, 0.1);
}

.text-area::-webkit-scrollbar {
    width: 6px;
}

.text-area::-webkit-scrollbar-track {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 3px;
}

.text-area::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.text-area::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
}

.text-area::placeholder {
    color: var(--text-muted);
}

/* Input simple */
.simple-input {
    width: 100%;
    padding: 1.5rem;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    background: transparent;
    color: var(--text-primary);
}

.simple-input::placeholder {
    color: var(--text-muted);
}

/* Contenu par défaut */
.default-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.welcome-card {
    text-align: center;
    max-width: 600px;
    background: var(--bg-primary);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.welcome-card h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.welcome-card p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

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

.feature {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all var(--transition-speed) var(--transition-easing);
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Zone de validation */
.validation-area {
    padding: 1.5rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: var(--shadow-lg);
    display: flex;
    justify-content: center;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

/* Header styles */
.header {
    background: var(--bg-secondary);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header h1 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.course-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.course-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.course-points {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.course-difficulty {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

/* Validation button */
.validate-btn {
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.validate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.validate-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #4f46e5, #4338ca);
}

.validate-btn:hover::before {
    left: 100%;
}

.validate-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.validate-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.validate-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.validate-btn.completed {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.validate-btn.completed:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
    background: var(--text-muted);
}

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

/* Boutons */
.btn-primary,
.btn-secondary {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-easing);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
    min-height: 2.75rem;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #3730a3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Animations et effets */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.slide-in {
    animation: slideIn 0.3s var(--transition-easing);
}

.fade-in {
    animation: fadeIn 0.3s var(--transition-easing);
}

/* Styles pour la navigation hiérarchique */
.folder-section {
    margin-bottom: 0.5rem;
}

.folder-button {
    width: 100%;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    font-family: inherit;
}

.folder-button:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.folder-info {
    flex: 1;
}

.folder-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.folder-counter {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.folder-arrow {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
}

.back-button {
    margin-bottom: 1rem;
}

.btn-back {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-primary);
    width: 100%;
}

.btn-back:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
}

.back-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.section-title-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.section-title-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.courses-list {
    list-style: none;
    padding: 0;
    margin: 0;
}



.course-button {
    width: 100%;
    padding: 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    font-family: inherit;
}

.course-button:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.course-button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.course-button.active .course-arrow {
    color: white;
}

.course-info {
    flex: 1;
}

.course-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.difficulty {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.points {
    color: var(--primary-color);
    font-weight: 500;
}

.completion-badge {
    color: var(--success-color);
    font-weight: 600;
}

.course-arrow {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
}

.course-item.completed .course-button {
    background: var(--success-bg);
    border-color: var(--success-color);
}

.course-content-sidebar {
    padding: 1rem 0;
}

.course-content-sidebar h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.course-details .description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.course-details .objectives {
    margin-bottom: 1rem;
}

.course-details .objectives h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.course-details .objectives ul {
    list-style: none;
    padding-left: 0;
}

.course-details .objectives li {
    padding: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    position: relative;
    padding-left: 1rem;
}

.course-details .objectives li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.course-details .time {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.course-details .preview {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-height: 200px;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-area {
        padding: 1rem;
    }
    
    .content-header {
        padding: 1rem;
    }
    
    .welcome-card {
        padding: 2rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .folder-button,
    .course-button {
        padding: 0.75rem;
    }
    
    .folder-title {
        font-size: 0.9rem;
    }
    
    .course-title {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .content-header h1 {
        font-size: 1.5rem;
    }
    
    .welcome-card h2 {
        font-size: 1.875rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.8125rem;
    }
}

/* États de focus pour l'accessibilité */
.toggle-btn:focus,
.nav-list a:focus,
.btn-primary:focus,
.btn-secondary:focus,
.text-area:focus,
.simple-input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Mode sombre (optionnel) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --text-muted: #9ca3af;
        --bg-primary: #1f2937;
        --bg-secondary: #111827;
        --bg-tertiary: #374151;
        --border-color: #374151;
        --border-light: #4b5563;
    }
}

/* Performance optimizations */
.sidebar,
.main-content,
.nav-list a,
.btn-primary,
.btn-secondary {
    will-change: transform;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Préchargement des polices */
@font-face {
    font-family: 'Inter';
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    font-display: swap;
}

/* Animations pour les avertissements anti-triche */
@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Styles pour les notifications anti-triche */
.anti-cheat-warning {
    z-index: 10001;
    pointer-events: none;
}

.anti-cheat-warning > div {
    animation: slideInRight 0.3s ease-out, shake 0.5s ease-in-out 0.3s;
    border-left: 4px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

/* Protection contre l'inspection */
.anti-cheat-protected {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Overlay de protection */
.anti-cheat-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(239, 68, 68, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

/* Indicateur de surveillance active */
.anti-cheat-indicator {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
    animation: pulse 2s infinite;
}

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

/* Widget des points utilisateur dans la sidebar */
.user-points-widget {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 1.25rem;
    margin: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.user-points-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pointsShimmer 4s ease-in-out infinite;
}

@keyframes pointsShimmer {
    0%, 100% { opacity: 0.3; transform: rotate(0deg); }
    50% { opacity: 0.8; transform: rotate(180deg); }
}

.points-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.points-title {
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0.9;
    margin: 0;
}

.points-icon {
    font-size: 1.25rem;
    animation: pointsBounce 2s ease-in-out infinite;
}

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

.points-display {
    position: relative;
    z-index: 2;
}

.total-points {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.points-label {
    font-size: 0.8rem;
    opacity: 0.8;
    margin: 0;
}

.points-progress {
    margin-top: 1rem;
    position: relative;
    z-index: 2;
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    height: 6px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    height: 100%;
    border-radius: 1rem;
    transition: width 0.8s ease;
    position: relative;
}

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

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

.next-milestone {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

.achievements-preview {
    margin-top: 1rem;
    position: relative;
    z-index: 2;
}

.achievements-title {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.9;
    margin: 0 0 0.5rem 0;
}

.achievements-list {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.achievement-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    position: relative;
}

.achievement-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.achievement-badge.new {
    animation: achievementGlow 1s ease-in-out;
}

@keyframes achievementGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(255, 255, 255, 0.5); }
    50% { box-shadow: 0 0 12px rgba(255, 255, 255, 0.8); }
}

.ranking-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    z-index: 2;
}

.ranking-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.rank-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-weight: 600;
}

.leaderboard-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.leaderboard-link:hover {
    color: white;
    text-decoration: underline;
}

/* Collapse/expand du widget points */
.user-points-widget.collapsed {
    padding: 0.75rem 1rem;
}

.user-points-widget.collapsed .points-progress,
.user-points-widget.collapsed .achievements-preview,
.user-points-widget.collapsed .ranking-info {
    display: none;
}

.user-points-widget.collapsed .points-header {
    margin-bottom: 0;
}

.user-points-widget.collapsed .total-points {
    font-size: 1.25rem;
    display: inline;
    margin-left: 0.5rem;
}

.points-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    font-size: 0.75rem;
}

.points-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Styles pour la navigation par dossiers */
.folder-section {
    transition: all 0.3s ease;
}

.folder-button {
    width: 100%;
    background: none;
    border: none;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.06);
}

.folder-button:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    transform: translateX(4px);
}

.folder-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.folder-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
    color: var(--text-primary);
}

.folder-counter {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.folder-arrow {
    color: var(--primary-color);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.folder-button:hover .folder-arrow {
    transform: translateX(2px);
    color: var(--primary-dark);
}

/* Styles pour la liste des cours */
.courses-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-item {
    border-bottom: 1px solid rgba(99, 102, 241, 0.04);
    transition: all 0.3s ease;
}

.course-item.completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03) 0%, rgba(16, 185, 129, 0.01) 100%);
}

.course-button {
    width: 100%;
    background: none;
    border: none;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    text-align: left;
}

.course-button:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(139, 92, 246, 0.03) 100%);
    transform: translateX(2px);
}

.course-button.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.course-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.course-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.3;
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.difficulty,
.points {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-weight: 500;
    text-transform: capitalize;
}

.difficulty {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-dark);
}

.points {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.completion-badge {
    background: var(--success-color);
    color: white;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
}

.course-arrow {
    color: var(--text-muted);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.course-button:hover .course-arrow {
    color: var(--primary-color);
    transform: translateX(2px);
}

.course-button.active .course-arrow {
    color: white;
}

/* Styles pour le contenu HTML des cours dans la sidebar */
.course-content-sidebar {
    padding: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    border-top: 1px solid rgba(99, 102, 241, 0.08);
}

.course-content-sidebar h1,
.course-content-sidebar h2,
.course-content-sidebar h3,
.course-content-sidebar h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.course-content-sidebar h1 {
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.course-content-sidebar h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
}

.course-content-sidebar h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1rem;
}

.course-content-sidebar h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.75rem;
}

.course-content-sidebar p {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.course-content-sidebar ul,
.course-content-sidebar ol {
    margin-bottom: 0.75rem;
    padding-left: 1.25rem;
}

.course-content-sidebar li {
    margin-bottom: 0.25rem;
    color: var(--text-secondary);
}

.course-content-sidebar .course-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.course-content-sidebar .course-header h1 {
    color: white;
    border: none;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.course-content-sidebar .course-header p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

.course-content-sidebar .points-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.course-content-sidebar .exercise {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--primary-color);
    margin: 1rem 0;
}

.course-content-sidebar .code-block {
    background: #1f2937;
    color: #f9fafb;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0.5rem 0;
}

.course-content-sidebar .hint {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin: 0.75rem 0;
    font-size: 0.85rem;
}

.course-content-sidebar code {
    background: var(--bg-tertiary);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.course-content-sidebar strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Bouton retour dans la sidebar */
.back-button {
    padding: 1rem;
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.02) 0%, rgba(139, 92, 246, 0.01) 100%);
}

.btn-back {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    font-size: 0.875rem;
    font-weight: 500;
    width: 100%;
    backdrop-filter: blur(10px);
}

.btn-back:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.back-icon {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.btn-back:hover .back-icon {
    transform: translateX(-2px);
}

/* Responsive pour la sidebar content */
@media (max-width: 768px) {
    .course-content-sidebar {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
    
    .course-content-sidebar h1 {
        font-size: 1.1rem;
    }
    
    .course-content-sidebar h2 {
        font-size: 1rem;
    }
    
    .course-content-sidebar .code-block {
        font-size: 0.75rem;
        padding: 0.5rem;
    }
}

.section-breakdown {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    text-align: center;
}

.section-breakdown small {
    color: var(--text-secondary);
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Styles pour le conteneur iframe */
.iframe-container {
    max-height: calc(100vh - 150px);
}

.iframe-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.course-iframe {
    width: 100%;
    height: calc(100vh - 250px);
    min-height: 500px;
    border: none;
    background: white;
    flex: 1;
}

/* Styles pour la sidebar vide lors des cours iframe */
.iframe-course-sidebar-empty {
    margin-top: 1rem;
    padding: 1rem;
    text-align: center;
}

.empty-sidebar-message {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 2rem 1rem;
    border: 1px solid var(--border-light);
}

.empty-sidebar-message p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
    font-style: italic;
}

/* Styles pour le contenu HTML des cours iframe dans la sidebar */
.iframe-course-sidebar-content {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.4;
}

.iframe-course-sidebar-content h1,
.iframe-course-sidebar-content h2,
.iframe-course-sidebar-content h3 {
    font-size: 1rem;
    margin: 1rem 0 0.5rem 0;
}

.iframe-course-sidebar-content p {
    margin: 0.5rem 0;
}

.iframe-course-sidebar-content .code-block {
    font-size: 0.75rem;
    margin: 0.5rem 0;
}

.iframe-course-sidebar-content .copy-btn {
    display: none; /* Masquer les boutons copier dans la sidebar */
}

/* Masquer le contenu sidebar pour le cours Docker */
.sidebar.hide-content .course-content-sidebar {
    display: none !important;
}

/* Styles pour les cours interactifs */
.lesson-navigation {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.lesson-nav-header {
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.lesson-nav-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.lesson-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.lesson-progress .progress-bar {
    width: 100px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.lesson-progress .progress-fill {
    height: 100%;
    background: white;
    transition: width 0.3s ease;
    border-radius: 3px;
}

.lesson-list {
    padding: 0.5rem;
}

.lesson-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin: 0.25rem 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.lesson-item:hover {
    background: var(--hover-bg);
}

.lesson-item.active {
    background: linear-gradient(135deg, var(--primary-color)10, var(--bg-secondary));
    border-color: var(--primary-color);
}

.lesson-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 0.75rem;
    color: var(--text-secondary);
}

.lesson-item.active .lesson-number {
    background: var(--primary-color);
    color: white;
}

.lesson-title {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.lesson-status {
    font-size: 1.1rem;
}

.lesson-controls {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
}

.btn-lesson {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-lesson:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-lesson:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lesson-theory {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.theory-content {
    padding: 1.5rem;
}

.theory-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.theory-content h3 {
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.2rem;
}

.theory-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.theory-content li {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

.code-example {
    background: var(--bg-dark, #1e1e1e);
    color: #f8f8f2;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
    overflow-x: auto;
}

.exercise-prompt {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), var(--bg-secondary));
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 2rem;
}

.exercise-prompt h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
}

.exercise-prompt p {
    margin: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Styles pour les sorties de code des cours interactifs */
.code-output-line {
    margin: 0.25rem 0;
    padding: 0.25rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.code-output-line.error {
    color: var(--error-color);
}

.code-output-line.success {
    color: var(--success-color);
}

.code-output-line.log {
    color: #f8f8f2;
}

/* Boutons de navigation des leçons dans la zone principale */
.lesson-navigation-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.lesson-info {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.lesson-navigation-buttons .btn-secondary {
    min-width: 140px;
}

