:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #f59e0b;
    --accent: #10b981;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
}

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

body {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
}

/* ── Header ── */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}
.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.1);
}
.header-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--gray-900);
    font-weight: 800;
    font-size: 1.25rem;
}
.logo img { height: 2rem; margin-right: .75rem; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-link {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: color .3s;
    position: relative;
}
.nav-link:hover { color: var(--primary); }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -.25rem; left: 0;
    width: 0; height: 2px;
    background: var(--primary);
    transition: width .3s;
}
.nav-link:hover::after { width: 100%; }

/* ── Main ── */
.class-selection {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 7rem 2rem 4rem;
}
.class-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
    max-width: 860px;
    width: 100%;
}

/* ── Alertes ── */
.alert {
    border-radius: .5rem;
    padding: .875rem 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: .9rem;
}
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-danger   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── Année active ── */
.annee-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #ede9fe;
    color: var(--primary-dark);
    padding: .35rem .9rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 1.75rem;
}

/* ── Footer ── */
.footer { background: var(--gray-900); color: white; padding: 2rem; text-align: center; }
.footer p { color: var(--gray-500); font-size: .9rem; }

@media (max-width: 480px) {
    .class-card { padding: 1.5rem; }
}


 /* Accordion Styles */
    .accordion {
        margin-bottom: 12px;
    }

    .accordion-item {
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        overflow: hidden;
        background: white;
        transition: all 0.3s ease;
    }

    .accordion-item:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .accordion-header {
        width: 100%;
        padding: 18px 20px;
        background: white;
        border: none;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 16px;
        font-weight: 600;
        color: #1f2937;
        transition: all 0.2s ease;
    }

    .accordion-header:hover {
        background: #f9fafb;
    }

    .accordion-header.active {
        background: #f3f4f6;
        color: #4f46e5;
    }

    .accordion-title {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .accordion-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: linear-gradient(135deg, #4f46e5 0%, #818cf8 100%);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }

    .accordion-arrow {
        transition: transform 0.3s ease;
        color: #9ca3af;
    }

    .accordion-header.active .accordion-arrow {
        transform: rotate(180deg);
        color: #4f46e5;
    }

    .accordion-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: #fafafa;
    }

    .accordion-content.show {
        max-height: 500px;
    }

    .accordion-body {
        padding: 16px 20px;
        display: flex;
        flex-wrap: nowrap;
        gap: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    /* Class button styles */
    .class-form {
        margin: 0;
        flex-shrink: 0;
    }

    .class-button {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 16px 20px;
        background: white;
        border: 2px solid #e5e7eb;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.2s ease;
        text-decoration: none;
        min-width: 120px;
        min-height: 80px;
    }

    .class-button:hover:not(.no-list) {
        border-color: #4f46e5;
        background: #eef2ff;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
    }

    .class-button.no-list {
        opacity: 0.6;
        cursor: not-allowed;
        background: #f9fafb;
    }

    .class-button .fas {
        font-size: 24px;
        color: #4f46e5;
        margin-bottom: 8px;
    }

    .class-button.no-list .fas {
        color: #9ca3af;
    }

    .class-name {
        font-weight: 600;
        font-size: 14px;
        color: #1f2937;
    }

    .class-button.no-list .class-name {
        color: #6b7280;
    }

    .class-status {
        font-size: 11px;
        margin-top: 4px;
    }

    .class-status.available {
        color: #10b981;
    }

    .class-status.unavailable {
        color: #ef4444;
    }
