:root {
    /* Colors */
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-hover: #334155;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-accent: #38bdf8; /* Sky 400 */
    
    --primary: #0ea5e9; /* Sky 500 */
    --primary-hover: #0284c7; /* Sky 600 */
    --secondary: #6366f1; /* Indigo 500 */
    
    --border: #334155;
    --border-light: #475569;
    
    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    
    /* Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    
    /* Effects */
    --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);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-main);
}
.btn-secondary:hover {
    background-color: var(--bg-surface-hover);
}

.section {
    padding: var(--spacing-lg) 0;
}

.section-darker {
    background-color: rgba(0,0,0,0.2);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.2rem;
}

.logo img {
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-accent);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding-top: 70px; /* navbar height */
    overflow: hidden;
}

.background-mesh {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 15% 50%, rgba(56, 189, 248, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.08), transparent 25%);
    z-index: -1;
    pointer-events: none;
}

.hero-label {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(56, 189, 248, 0.1);
    color: var(--text-accent);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.hero-title {
    font-size: 4rem;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto var(--spacing-md);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Cards Grid (Slides) */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition-base);
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--text-accent);
}

.card-image-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-fast);
}

.card-overlay i {
    font-size: 2rem;
    color: white;
}

.card:hover .card-overlay {
    opacity: 1;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Summary Card specific */
.summary-card {
    border-style: dashed;
    border-color: var(--border-light);
    background: transparent;
}

.summary-link-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: var(--bg-surface);
}

.summary-icon {
    font-size: 3rem;
    color: var(--text-accent);
}

.slide-card-full-width {
    grid-column: 1 / -1; /* Default to full width for mobile */
    text-align: center;
}

@media (min-width: 768px) {
    .slide-card-full-width {
        grid-column: span 3; /* Span 3 columns on larger screens */
    }
}


/* List Items (Exercises) */
.grid-list {
    display: grid;
    gap: var(--spacing-sm);
}

.list-item {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    gap: 1.5rem;
}

.list-item:hover {
    background: var(--bg-surface-hover);
    border-color: var(--text-accent);
}

.list-icon {
    width: 50px;
    height: 50px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--text-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.list-details {
    flex-grow: 1;
}

.list-details h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.list-details p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.list-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
}

.badge {
    background: var(--bg-body);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: var(--text-accent);
    font-weight: 600;
}

.list-action {
    color: var(--text-muted);
}

/* Timeline (Evaluations) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px; /* adjust for mobile */
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    display: flex;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-date {
    width: 80px;
    flex-shrink: 0;
    text-align: right;
    padding-right: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    padding-top: 0.25rem;
    display: none; /* Hidden on mobile by default, shown on desktop via media query */
}

.timeline-content {
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    flex-grow: 1;
    margin-left: 40px;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -41px;
    top: 20px;
    width: 16px;
    height: 16px;
    background: var(--bg-body);
    border: 2px solid var(--text-accent);
    border-radius: 50%;
    z-index: 1;
}

.timeline-tag {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #10b981; /* Default Success green */
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* Compact Grid (DataCamp) */
.grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.compact-card {
    background: var(--bg-surface);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.compact-card:hover {
    border-color: var(--text-accent);
    background: var(--bg-surface-hover);
}

.compact-card .number {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 2rem;
    opacity: 0.1;
    font-weight: 700;
    margin-bottom: -1rem;
}

.compact-card h4 {
    position: relative;
    z-index: 1;
}

/* Table */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.styled-table th, .styled-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.styled-table th {
    background: rgba(0,0,0,0.2);
    font-weight: 600;
    color: var(--text-accent);
}

.styled-table tr:last-child td {
    border-bottom: none;
}

.highlight-row {
    background: rgba(56, 189, 248, 0.05);
}

/* Roadmap Timeline (Dynamic) */
.roadmap-container {
    position: relative;
    max-width: 800px;
    margin: 2rem auto 0;
    padding-left: 2rem; /* Space for line */
}

/* Vertical Line */
.roadmap-container::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px; /* Center of the marker width */
    width: 2px;
    background: var(--border);
    z-index: 0;
}

.roadmap-item {
    position: relative;
    margin-bottom: 2rem;
    z-index: 1;
}

.roadmap-item:last-child {
    margin-bottom: 0;
}

/* Marker Dot */
.roadmap-marker {
    position: absolute;
    left: 9px; /* Align with line center (15px) - half width (6px) = 9px */
    top: 20px;
    width: 14px;
    height: 14px;
    background: var(--bg-surface);
    border: 2px solid var(--border-light);
    border-radius: 50%;
    z-index: 2;
    transition: all 0.3s ease;
}

.roadmap-item.past .roadmap-marker {
    background: var(--text-muted);
    border-color: var(--text-muted);
}

/* Current Week Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.roadmap-item.current .roadmap-marker {
    background: var(--bg-surface);
    border: 2px solid rgba(56, 189, 248, 0.2); /* Faint ring */
    border-top-color: var(--text-accent); /* Spinning active part */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    left: 6px; /* Centered on line: 16px - 10px = 6px */
    top: 17px;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.5); /* Glow */
    animation: spin 1s linear infinite;
}

.roadmap-content-wrapper {
    margin-left: 2.5rem;
    position: relative;
}

/* Roadmap Card */
.roadmap-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: transform 0.2s, border-color 0.2s;
}

.roadmap-item.current .roadmap-card {
    border-color: var(--text-accent);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    background: var(--bg-surface-hover);
}

.roadmap-item.past .roadmap-card {
    opacity: 0.7;
}

.roadmap-item.is-break .roadmap-card {
    border-style: dashed;
    background: rgba(0,0,0,0.1);
}

/* Important Evaluations (Red) */
.roadmap-item.is-important .roadmap-card {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.roadmap-item.is-important .roadmap-marker {
    background: #ef4444;
    border-color: #ef4444;
}

.roadmap-item.is-important .roadmap-week {
    color: #ef4444;
}

.roadmap-item.is-important.past .roadmap-card {
    opacity: 0.8;
}

.roadmap-item.is-important.past .roadmap-marker {
    background: #991b1b; /* Darker red for past */
    border-color: #991b1b;
}

.roadmap-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.5rem;
}

.roadmap-week {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--text-accent);
}

.roadmap-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.roadmap-body {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.roadmap-info {
    flex: 1;
    min-width: 0;
}

.roadmap-info h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.roadmap-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* Slide Thumbnail */
.roadmap-slide-thumb {
    width: 100px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
    display: block;
    background: var(--bg-surface);
    transition: transform 0.2s, box-shadow 0.2s;
}

.roadmap-slide-thumb:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-color: var(--text-accent);
}

.roadmap-slide-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    color: white;
}

.roadmap-slide-thumb:hover .slide-overlay {
    opacity: 1;
}

.roadmap-slide-thumb.is-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-accent);
    font-size: 1.5rem;
    background: rgba(56, 189, 248, 0.1);
}

/* Roadmap Actions (Right side container) */
.roadmap-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.roadmap-action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.roadmap-action-btn:hover {
    background: var(--text-accent);
    color: white;
    border-color: var(--text-accent);
    transform: translateX(3px);
    box-shadow: 0 4px 10px rgba(56, 189, 248, 0.3);
}

.roadmap-item.is-important .roadmap-action-btn {
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.roadmap-item.is-important .roadmap-action-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.roadmap-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.roadmap-tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
}

.tag-eval {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

.tag-break {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .current-indicator span {
        display: none; /* Hide text on mobile */
    }
    .current-indicator {
        left: -40px;
    }
}


/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

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

.footer-social a {
    font-size: 1.5rem;
}

/* Responsive */
@media (min-width: 768px) {
    .timeline::before {
        left: 100px;
    }
    .timeline-date {
        display: block;
    }
    .timeline-content {
        margin-left: 40px; /* Spacing from the line */
    }
    .timeline-content::before {
        left: -49px; /* Align dot with line */
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-links {
        display: none; /* Hide for now, JS toggle needed */
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }
    
    .list-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .list-icon {
        margin: 0 auto;
    }
    
    .list-meta {
        justify-content: center;
    }
    
    .list-action {
        display: none;
    }
}

/* Syllabus Iframe */
.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: var(--spacing-sm);
    background: white;
}
.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.actions-center {
    text-align: center;
    margin-top: 1rem;
}

/* Disabled State */
.disabled-item {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(100%);
}

/* Evaluation Status Colors */
.timeline-tag.status-pending {
    color: #38bdf8; /* Sky 400 (Blue) */
    background: rgba(56, 189, 248, 0.1);
}

.timeline-tag.status-active {
    color: #4ade80; /* Green 400 */
    background: rgba(74, 222, 128, 0.1);
}

.timeline-tag.status-completed {
    color: #94a3b8; /* Slate 400 (Grey) */
    background: rgba(148, 163, 184, 0.1);
}

/* Rencontres Placeholder */
.rencontres-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px; /* Or whatever height matches the iframe typically */
    background: var(--bg-surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.rencontres-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border-light);
}

.rencontres-placeholder h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.rencontres-placeholder p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}