@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --bg-input: #16162a;
    --text-primary: #e8e8f0;
    --text-secondary: #9090a8;
    --text-muted: #606078;
    --accent: #8b5cf6;
    --accent-light: #a78bfa;
    --accent-dark: #7c3aed;
    --accent-glow: rgba(139, 92, 246, 0.3);
    --accent-glow-strong: rgba(139, 92, 246, 0.6);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --border: #2a2a40;
    --border-light: #353550;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
    --radius: 12px;
    --radius-sm: 10px;
    --radius-lg: 16px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

::selection {
    background: var(--accent);
    color: #fff;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-dark);
    border-radius: 4px;
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.logo-icon {
    background: var(--accent);
    color: #fff;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
}

.logo-text {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.1);
}

.nav-link.active {
    color: var(--accent-light);
}

.nav-dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
}

.nav-search {
    position: relative;
}

.nav-search input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    width: 220px;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
}

.nav-search input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    width: 280px;
}

.search-results {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    margin-top: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: rgba(139, 92, 246, 0.1);
}

.search-result-item .sr-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.search-result-item .sr-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ==================== HERO ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 2rem 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 80%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
}

.particles-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--accent-light);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--accent-light), var(--accent), var(--accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px var(--accent-glow-strong);
    color: #fff;
}

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

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    transform: translateY(-2px);
    color: var(--text-primary);
}

/* ==================== STATS ==================== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: -40px auto 0;
    padding: 0 2rem;
    position: relative;
    z-index: 3;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--accent-light);
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== SECTIONS ==================== */
.section {
    padding: 100px 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-light);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== COURSE CARDS ==================== */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    opacity: 0;
    transition: var(--transition);
}

.course-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 12px 40px var(--accent-glow);
}

.course-card:hover::before {
    opacity: 1;
}

.course-card-header {
    padding: 32px 28px 0;
}

.course-level {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.level-debutant {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.level-intermediaire {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.level-expert {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.course-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.course-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.course-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.course-card-body {
    padding: 20px 28px;
}

.course-topics {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.course-topics li {
    background: var(--bg-input);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
}

.course-card-footer {
    padding: 0 28px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.course-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.85rem;
}

/* ==================== CONTENT PAGES ==================== */
.page-hero {
    padding: 140px 2rem 60px;
    text-align: center;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
}

.page-hero .hero-badge {
    margin-bottom: 20px;
}

.page-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 16px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto;
}

.content-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 2rem;
}

.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    margin-bottom: 30px;
    transition: var(--transition);
}

.content-card:hover {
    border-color: var(--border-light);
}

.content-card h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--accent-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 24px 0 12px;
    color: var(--text-primary);
}

.content-card p {
    color: var(--text-secondary);
    margin-bottom: 14px;
    line-height: 1.8;
}

.content-card ul,
.content-card ol {
    color: var(--text-secondary);
    margin-left: 20px;
    margin-bottom: 14px;
}

.content-card li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.content-card code {
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    color: var(--accent-light);
    border: 1px solid var(--border);
}

.content-card pre {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    overflow-x: auto;
    margin: 16px 0;
}

.content-card pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin: 16px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

.diagram-box {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    margin: 20px 0;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
    white-space: pre;
    color: var(--accent-light);
}

.toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 40px;
}

.toc h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--accent-light);
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 6px;
}

.toc a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 4px 0;
    display: inline-block;
}

.toc a:hover {
    color: var(--accent-light);
}

/* ==================== QUIZ ==================== */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 140px 2rem 80px;
}

.quiz-section {
    margin-bottom: 50px;
}

.quiz-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.quiz-question {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
}

.quiz-question h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    gap: 10px;
}

.q-number {
    background: var(--accent);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.quiz-option:hover {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.05);
}

.quiz-option input[type="radio"] {
    display: none;
}

.quiz-option input[type="radio"]:checked + span {
    color: var(--accent-light);
}

.quiz-option.selected {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.1);
}

.quiz-option.correct {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.quiz-option.incorrect {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.quiz-result {
    display: none;
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 16px;
    font-weight: 600;
    text-align: center;
}

.quiz-result.show {
    display: block;
}

.quiz-score {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-light);
    margin-bottom: 8px;
}

.quiz-submit {
    margin-top: 30px;
    text-align: center;
}

/* ==================== TERMINAL ==================== */
.terminal-page {
    padding: 100px 2rem 40px;
    max-width: 1100px;
    margin: 0 auto;
}

.terminal-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-top: 30px;
}

.terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.terminal-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #f59e0b; }
.terminal-dots span:nth-child(3) { background: #10b981; }

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.terminal-body {
    height: 550px;
    overflow-y: auto;
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

.terminal-line {
    margin-bottom: 4px;
}

.terminal-line .prompt {
    color: var(--accent-light);
}

.terminal-line .cmd {
    color: var(--text-primary);
}

.terminal-line .output {
    color: var(--text-secondary);
}

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

.terminal-line .error {
    color: var(--danger);
}

.terminal-line .warning {
    color: var(--warning);
}

.terminal-line .info {
    color: var(--info);
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 4px;
}

.terminal-input-line .prompt {
    color: var(--accent-light);
    white-space: nowrap;
}

#terminalInput {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    outline: none;
    caret-color: var(--accent-light);
}

.terminal-help {
    margin-top: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.terminal-help h3 {
    color: var(--accent-light);
    margin-bottom: 16px;
}

.cmd-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
}

.cmd-item {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.cmd-item code {
    color: var(--accent-light);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    white-space: nowrap;
    min-width: 160px;
}

.cmd-item span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 60px 2rem 30px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
    line-height: 1.6;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 4px 0;
}

.footer-col a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 16px;
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-search {
        display: none;
    }
    .hero-title {
        font-size: 2rem;
    }
    .courses-grid {
        grid-template-columns: 1fr;
    }
    .stats-bar {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .page-title {
        font-size: 2rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px var(--accent-glow); }
    50% { box-shadow: 0 0 20px var(--accent-glow-strong); }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }

/* ==================== MISC ==================== */
.text-accent { color: var(--accent-light); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.text-center { text-align: center; }


/* ===== BOUTON RETOUR MENU PRINCIPAL (Horizon 5) ===== */
.nav-back {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; margin-right: 10px; flex-shrink: 0;
    border-radius: 10px; background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14); color: #fff;
    text-decoration: none; font-size: 1.3rem; font-weight: 700; line-height: 1;
    transition: background 0.25s, border-color 0.25s, transform 0.25s;
}
.nav-back:hover {
    background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.3); transform: translateX(-2px);
}

/* ===== HARMONISATION VISUELLE HORIZON 5 (audit septembre 2026) ===== */
/* Bloc additif : uniformise sans changer l'accent de la formation. */
/* Boutons : paddings et radius unifies (le bouton passe de 12px a 10px) */
.btn { padding: 14px 32px; border-radius: 10px; gap: 8px; text-decoration: none; }
/* Cartes : radius 12px */
.course-card, .module, .modal, .memo-card, .install-card, .quiz-q, .flash-card, .schema-card, .first-steps-box, .coach-zone { border-radius: 12px; }
/* Transitions unifiees a 0.25s */
.btn, .course-card, .nav-link, .dropdown-content a, .nav-back, .quiz-opt, .q-opt, .qs-chip { transition: all 0.25s ease; }
/* Focus clavier visible */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.nav-back:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Details et summary : curseur pointeur et espacement */
details summary { cursor: pointer; margin: 4px 0; }
/* Composants communs */
.disclaimer { margin-top: 8px; font-size: 0.85em; color: var(--text-secondary); line-height: 1.6; }
.course-section { margin-top: 24px; }
.course-section h4 { margin-bottom: 10px; font-size: 1.1rem; }
.course-section p { margin-bottom: 12px; font-size: 0.95rem; color: var(--text-secondary); }
.course-section ul { margin: 0 0 12px 20px; }
.course-section ul li { margin-bottom: 6px; font-size: 0.93rem; }
.course-code { font-family: 'JetBrains Mono', monospace; font-size: 0.85em; padding: 2px 6px; border-radius: 4px; }
.course-note { border-radius: 8px; padding: 14px 16px; margin: 14px 0; font-size: 0.9rem; }
/* Tableaux : defilement horizontal sur petit ecran */
.table-responsive { overflow-x: auto; }
/* Responsive minimal : hamburger, grilles en 1 colonne, tableaux scrollables */
@media (max-width: 768px) {
    .course-grid, .install-grid, .memo-grid, .level-grid, .courses-grid, .footer-grid { grid-template-columns: 1fr; }
    table.memo, .cmd-table, .exam-table { display: block; width: 100%; overflow-x: auto; }
    .hero { padding: 100px 16px 60px; }
    .section { padding: 60px 16px; }
    .nav-menu.open, .nav-menu.active { display: flex; }
}
