/* ─── Vis-Ma-Classe.fr — Design System v2.2 ─────────────── */

:root {
    --bg-color: #0b0f19;
    --bg-surface: #111827;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --primary-color: #3b82f6;
    --accent-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #f43f5e;
    --glass-bg: rgba(30, 41, 59, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius: 16px;
    --radius-sm: 10px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.12), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.12), transparent 25%);
    background-attachment: fixed;
    overflow-x: hidden;
}

h1, h2, h3, .logo {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Screen Reader Only ────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ─── Glassmorphism ─────────────────────────────────────── */
.glassmorphism, .glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* ─── Header ────────────────────────────────────────────── */
.main-header {
    position: sticky;
    top: 16px;
    z-index: 100;
    padding: 14px 24px;
    margin: 0 auto;
    max-width: 1160px;
    border-radius: 20px;
    transition: box-shadow 0.3s;
}
.main-header:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.logo span {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.main-header nav a {
    margin-left: 24px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
}
.main-header nav a:hover {
    color: var(--primary-color);
}
.main-header nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}
.main-header nav a:hover::after {
    width: 100%;
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 110;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    margin: 5px 0;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
    padding: 100px 0 50px;
    text-align: center;
}
.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 28px;
    color: var(--text-muted);
    border-radius: 40px;
}
.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #fff;
    letter-spacing: -1px;
}
.hero-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color), #f472b6);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 50px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Search ────────────────────────────────────────────── */
.search-container, .search-page-form {
    display: inline-flex;
    align-items: center;
    padding: 8px;
    width: 100%;
    max-width: 650px;
    position: relative;
    z-index: 50;
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.65);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 10px 40px rgba(0,0,0,0.2);
    transition: box-shadow 0.3s ease;
}
.search-container:focus-within, .search-page-form:focus-within {
    box-shadow: 0 0 0 2px var(--primary-color), 0 10px 40px rgba(59, 130, 246, 0.2);
}
.search-icon {
    margin-left: 16px;
    flex-shrink: 0;
}
.search-container input, .search-page-form input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 16px 16px;
    font-size: 1.05rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}
.search-container input::placeholder, .search-page-form input::placeholder {
    color: #64748b;
}
.search-container button, .search-page-form button {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 28px;
    height: 48px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    white-space: nowrap;
}
.search-container button:hover, .search-page-form button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.results-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    z-index: 50;
    border-radius: var(--radius);
    overflow: hidden;
    animation: fadeIn 0.2s ease-out forwards;
}
.results-dropdown .result-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.15s;
}
.results-dropdown .result-item:hover {
    background: rgba(59, 130, 246, 0.1);
}
.results-dropdown .result-item:last-child {
    border-bottom: none;
}
.result-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    vertical-align: middle;
}

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

/* ─── Stats Bar ─────────────────────────────────────────── */
.stats-bar {
    padding: 50px 0 30px;
}
.stats-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 6px;
}
.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}
.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--glass-border);
}

/* ─── Features ──────────────────────────────────────────── */
.features {
    padding: 40px 0 80px;
}
.features .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.feature-card {
    padding: 36px 30px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: default;
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}
.feature-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── Breadcrumb ────────────────────────────────────────── */
.breadcrumb {
    padding: 80px 0 0;
    font-size: 0.88rem;
}
.breadcrumb a {
    color: var(--primary-color);
    transition: opacity 0.2s;
}
.breadcrumb a:hover {
    opacity: 0.8;
}
.breadcrumb .sep {
    margin: 0 8px;
    color: #475569;
}
.breadcrumb .current {
    color: var(--text-muted);
}

/* ─── Dashboard ─────────────────────────────────────────── */
.dashboard-container {
    max-width: 1100px;
    margin: 30px auto 60px;
    padding: 0 20px;
}
.dashboard-header {
    padding: 40px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}
.pulse-bg::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
    animation: pulseBg 6s ease-in-out infinite alternate;
}
@keyframes pulseBg {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.1); opacity: 1; }
}
.badge-type {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(59, 130, 246, 0.25);
}
.dashboard-header h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    margin-bottom: 10px;
    color: #fff;
    -webkit-text-fill-color: unset;
    background: none;
}
.location-geo {
    color: var(--text-muted);
    font-size: 1.1rem;
}
.location-details {
    color: #64748b;
    font-size: 0.95rem;
    margin-top: 6px;
}

/* REP / REP+ badges */
.rep-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    margin-left: 8px;
    vertical-align: middle;
}
.rep-badge--plus {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border-color: rgba(244, 63, 94, 0.3);
}

/* ─── Section Titles ────────────────────────────────────── */
.section-title {
    font-size: 1.4rem;
    margin-bottom: 24px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}
.year-badge {
    font-size: 0.75rem;
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    margin-left: 8px;
}

/* ─── KPI Grid ──────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}
.kpi-card {
    padding: 28px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}
.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.kpi-card--wide {
    grid-column: span 2;
}
.kpi-card h3 {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 18px;
}
.big-number {
    font-size: 3.2rem;
    font-weight: 800;
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1;
    margin-bottom: 12px;
}
.gradient-text {
    background: linear-gradient(135deg, var(--grad-color1), var(--grad-color2));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-green { color: var(--success-color); }
.text-red { color: var(--danger-color); }
.kpi-legend {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: auto;
}

/* ─── IPS Badge ─────────────────────────────────────────── */
.ips-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 14px;
}
.ips-badge--très-favorisé { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.ips-badge--favorisé { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.ips-badge--moyen { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.ips-badge--défavorisé { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.ips-badge--très-défavorisé { background: rgba(244, 63, 94, 0.2); color: #f43f5e; }

/* ─── IPS Gauge ─────────────────────────────────────────── */
.ips-gauge {
    margin: 20px 0 16px;
}
.ips-gauge__track {
    position: relative;
    height: 20px;
    border-radius: 10px;
    overflow: visible;
    margin-bottom: 50px;
}
.ips-gauge__gradient {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 10px;
    background: linear-gradient(to right, 
        #f43f5e 0%, 
        #f97316 25%, 
        #facc15 45%, 
        #10b981 65%, 
        #3b82f6 85%, 
        #8b5cf6 100%
    );
    opacity: 0.35;
}
.ips-gauge__marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}
.ips-gauge__marker--school .ips-gauge__marker-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.2), 0 4px 12px rgba(0,0,0,0.3);
    animation: pulseMarker 2s ease-in-out infinite;
}
@keyframes pulseMarker {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255,255,255,0.2), 0 4px 12px rgba(0,0,0,0.3); }
    50% { box-shadow: 0 0 0 8px rgba(255,255,255,0.1), 0 4px 16px rgba(0,0,0,0.4); }
}
.ips-gauge__marker-label {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.ips-gauge__ref-line {
    width: 2px;
    height: 32px;
    background: rgba(255,255,255,0.4);
    margin: 0 auto;
    border-radius: 1px;
}
.ips-gauge__ref-line--dept {
    background: rgba(245, 158, 11, 0.5);
}
.ips-gauge__ref-label {
    position: absolute;
    top: 36px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.ips-gauge__ref-label--bottom {
    top: 36px;
}
.ips-gauge__legend {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #475569;
    margin-top: 4px;
}
.ips-gauge__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.ips-ref-chip {
    font-size: 0.8rem;
    padding: 4px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-muted);
}

/* ─── Effectifs Bars ────────────────────────────────────── */
.effectifs-bars {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}
.eff-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.eff-bar-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 120px;
    text-align: right;
    flex-shrink: 0;
}
.eff-bar-track {
    flex: 1;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
}
.eff-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 1s ease-out;
}
.eff-bar-fill--pre {
    background: linear-gradient(90deg, #f472b6, #ec4899);
}
.eff-bar-fill--elem {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}
.eff-bar-fill--ulis {
    background: linear-gradient(90deg, #10b981, #06b6d4);
}
.eff-bar-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    min-width: 50px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ─── Niveaux Chart (Vertical Bars) ─────────────────────── */
.niveaux-chart {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
    height: 180px;
    margin-top: 16px;
    padding: 0 20px;
}
.niveau-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 80px;
}
.niveau-bar-wrap {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: flex-end;
}
.niveau-bar {
    width: 100%;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, var(--primary-color), var(--accent-color));
    min-height: 8px;
    transition: height 1s ease-out;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.2);
}
.niveau-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    color: #fff;
    margin-top: 8px;
}
.niveau-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

/* ─── Indicators ────────────────────────────────────────── */
.indicator {
    font-size: 0.6rem;
    margin-right: 4px;
}
.indicator--green { color: var(--success-color); }
.indicator--yellow { color: var(--warning-color); }
.indicator--red { color: var(--danger-color); }

/* ─── Circular Chart ────────────────────────────────────── */
.circular-progress {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
}
.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 250px;
}
.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 2.5;
}
.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke: var(--stroke-color);
    animation: progress 1.2s ease-out forwards;
}
@keyframes progress {
    0% { stroke-dasharray: 0 100; }
}
.percentage {
    fill: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 8px;
    font-weight: 800;
    text-anchor: middle;
}

/* ─── Empty State ───────────────────────────────────────── */
.empty-section {
    text-align: center;
    padding: 50px 30px;
    margin-bottom: 40px;
}
.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}
.empty-section h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}
.empty-section p {
    color: var(--text-muted);
    max-width: 450px;
    margin: 0 auto;
}

/* ─── Button ────────────────────────────────────────────── */
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, filter 0.2s;
    text-decoration: none;
}
.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

/* ─── Data Source ────────────────────────────────────────── */
.data-source {
    padding: 20px 28px;
    margin-top: 30px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.data-source strong {
    color: var(--text-color);
}
.source-date {
    font-size: 0.8rem;
    margin-top: 6px;
    color: #475569;
}

/* ─── Error Page ────────────────────────────────────────── */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.error-card {
    text-align: center;
    padding: 60px 40px;
    max-width: 500px;
}
.error-card .error-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}
.error-card h1 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: #fff;
    -webkit-text-fill-color: unset;
    background: none;
}
.error-card p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ─── 404 page ──────────────────────────────────────────── */
.page-404 {
    min-height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}
.page-404 h1 {
    font-size: 6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}
.page-404 h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 14px;
}
.page-404 p {
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── About Page ────────────────────────────────────────── */
.about-page {
    max-width: 800px;
    margin: 100px auto 60px;
    padding: 0 20px;
}
.about-page h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #fff;
}
.about-section {
    padding: 30px;
    margin-bottom: 24px;
}
.about-section h2 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.about-section p, .about-section li {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}
.about-section ul {
    list-style: none;
    padding: 0;
}
.about-section ul li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}
.about-section ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* ─── Footer ────────────────────────────────────────────── */
footer {
    padding: 60px 0 30px;
    margin-top: 80px;
    border-top: 1px solid var(--glass-border);
    background: rgba(10, 14, 22, 0.5);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}
.footer-logo {
    display: inline-block;
    margin-bottom: 12px;
}
.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}
.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}
.footer-col a {
    display: block;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 4px 0;
    transition: color 0.2s;
}
.footer-col a:hover {
    color: var(--primary-color);
}
.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #475569;
}

/* ─── Department Index ──────────────────────────────────── */
.dept-index-page {
    padding-bottom: 60px;
}
.dept-index-header {
    text-align: center;
    padding: 80px 0 50px;
}
.dept-index-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}
.dept-index-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}
.region-section {
    margin-bottom: 40px;
}
.region-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 8px;
}
.region-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
}
.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.dept-card {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
    text-decoration: none;
}
.dept-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    border-color: rgba(59, 130, 246, 0.3);
}
.dept-card__code {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.dept-card__name {
    font-weight: 600;
    color: #fff;
    font-size: 0.92rem;
}
.dept-card__meta {
    display: flex;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.dept-card__ips {
    color: var(--accent-color);
    font-weight: 600;
}

/* ─── Department Page ───────────────────────────────────── */
.dept-page {
    padding-bottom: 60px;
}
.dept-header {
    padding: 36px;
    margin-top: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}
.dept-header__stats {
    display: flex;
    gap: 30px;
}
.dept-stat {
    text-align: center;
}
.dept-stat__number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 4px;
}
.dept-stat__label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Filters */
.dept-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.filter-chip {
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.2s;
    text-decoration: none;
}
.filter-chip:hover {
    color: #fff;
    border-color: rgba(59, 130, 246, 0.4);
}
.filter-chip--active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.filter-count {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Table */
.dept-table-wrap {
    overflow-x: auto;
    padding: 0;
}
.dept-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.dept-table th {
    text-align: left;
    padding: 14px 18px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}
.dept-table th:hover {
    color: var(--primary-color);
}
.dept-table th[data-sort]::after {
    content: ' ↕';
    font-size: 0.7rem;
    opacity: 0.4;
}
.dept-table th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
    color: var(--primary-color);
}
.dept-table th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
    color: var(--primary-color);
}
.dept-table td {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-color);
}
.dept-table tbody tr {
    transition: background 0.15s;
}
.dept-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.06);
}
.dept-table__link {
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.2s;
}
.dept-table__link:hover {
    color: #60a5fa;
}
.text-muted { color: var(--text-muted); }

/* Type badges for table */
.type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.type-badge--ecole { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.type-badge--college { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.type-badge--lycee { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.ips-mini {
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #fff;
}
.success-mini {
    font-weight: 600;
    color: var(--success-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px 0;
}
.pagination__btn {
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--primary-color);
    transition: all 0.2s;
    text-decoration: none;
}
.pagination__btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}
.pagination__info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ─── School Map ────────────────────────────────────────── */
.school-map-section {
    padding: 24px;
    margin-bottom: 30px;
}
.school-map-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 14px;
}
#school-map {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

/* ─── Search Page ───────────────────────────────────────── */
.search-page {
    padding-bottom: 60px;
}
.search-page-header {
    text-align: center;
    padding: 80px 0 40px;
}
.search-page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}
.search-page-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}
.search-page-form {
    margin: 0 auto 40px;
}
.search-results-section {
    margin-top: 20px;
}
.search-results-count {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.search-results-count strong {
    color: #fff;
}
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}
.search-result-card {
    padding: 20px 24px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none;
    display: block;
}
.search-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    border-color: rgba(59, 130, 246, 0.3);
}
.search-result-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.search-result-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.3;
}
.search-result-card p {
    font-size: 0.88rem;
}

/* ─── Scroll to Top ─────────────────────────────────────── */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    z-index: 90;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}
.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.5);
}

/* ─── Search Spinner ────────────────────────────────────── */
.search-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(148, 163, 184, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spinSearch 0.6s linear infinite;
    vertical-align: middle;
}
@keyframes spinSearch {
    to { transform: rotate(360deg); }
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero { padding: 80px 0 40px; }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    
    .search-container, .search-page-form {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    .search-icon { display: none; }
    .search-container input, .search-page-form input {
        padding: 14px 12px;
        text-align: center;
    }
    .search-container button, .search-page-form button {
        width: 100%;
        padding: 14px 0;
    }
    
    .stats-grid { gap: 20px; }
    .stat-divider { display: none; }
    .stat-number { font-size: 2rem; }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    .kpi-card--wide {
        grid-column: span 1;
    }
    .big-number { font-size: 2.5rem; }
    
    .dashboard-header { padding: 24px; }
    .dashboard-header h1 { font-size: 1.6rem; }
    
    .breadcrumb { padding: 70px 0 0; font-size: 0.8rem; }
    
    .ips-gauge__meta { flex-direction: column; }
    
    .main-header { top: 8px; padding: 10px 16px; }

    /* Hamburger visible on mobile */
    .hamburger { display: block; }
    .main-header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 260px;
        height: 100vh;
        background: rgba(11, 15, 25, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        padding: 80px 30px 40px;
        transition: right 0.35s ease;
        z-index: 100;
        border-left: 1px solid var(--glass-border);
    }
    .main-header nav.nav-open {
        right: 0;
    }
    .main-header nav a {
        margin-left: 0;
        font-size: 1.1rem;
        padding: 14px 0;
        border-bottom: 1px solid var(--glass-border);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .dept-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }
    .dept-header__stats { gap: 20px; }

    .dept-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dept-table { font-size: 0.82rem; }
    .dept-table th, .dept-table td { padding: 10px 12px; }

    .scroll-top-btn { bottom: 20px; right: 20px; width: 42px; height: 42px; }

    .eff-bar-label { min-width: 90px; font-size: 0.78rem; }
    .niveaux-chart { gap: 12px; }

    .search-results-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .features .container {
        grid-template-columns: 1fr;
    }
    .dept-grid {
        grid-template-columns: 1fr;
    }
    .dept-header__stats {
        flex-wrap: wrap;
        gap: 16px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .eff-bar-label { min-width: 70px; }
}

/* ─── SEO Sections ──────────────────────────────────────── */
.seo-section {
    padding: 40px 0;
}
.seo-section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    text-align: center;
    margin-bottom: 12px;
}
.seo-section-desc {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* IPS explainer block */
.seo-block {
    display: flex;
    gap: 28px;
    padding: 36px;
    align-items: flex-start;
}
.seo-block__icon {
    font-size: 3rem;
    flex-shrink: 0;
    line-height: 1;
}
.seo-block__content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}
.seo-block__content p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.seo-block__content p:last-child {
    margin-bottom: 0;
}

/* Comparison columns */
.seo-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.seo-col {
    padding: 32px;
}
.seo-col h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}
.seo-col p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 12px;
}
.seo-col ul {
    list-style: none;
    padding: 0;
    margin: 12px 0 8px;
}
.seo-col ul li {
    padding: 8px 0 8px 22px;
    position: relative;
    color: var(--text-muted);
    font-size: 0.93rem;
    line-height: 1.5;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.seo-col ul li:last-child {
    border-bottom: none;
}
.seo-col ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 600;
}
.seo-col ul li strong {
    color: #cbd5e1;
}

/* Department chips grid */
.seo-dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}
.seo-dept-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.seo-dept-chip:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    border-color: rgba(59, 130, 246, 0.3);
}
.seo-dept-chip__code {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    min-width: 36px;
}
.seo-dept-chip__name {
    flex: 1;
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}
.seo-dept-chip__count {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    padding: 0;
    overflow: hidden;
}
.faq-item summary {
    padding: 20px 24px;
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: 300;
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 16px;
}
.faq-item[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}
.faq-item summary:hover {
    background: rgba(59, 130, 246, 0.06);
}
.faq-answer {
    padding: 0 24px 20px;
    animation: faqSlide 0.3s ease-out;
}
.faq-answer p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.93rem;
}
.faq-answer a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}
@keyframes faqSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .seo-columns {
        grid-template-columns: 1fr;
    }
    .seo-block {
        flex-direction: column;
        padding: 24px;
        gap: 16px;
    }
    .seo-dept-grid {
        grid-template-columns: 1fr 1fr;
    }
    .seo-section-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .seo-dept-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Reduced Motion ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .circle {
        animation: none;
        stroke-dasharray: var(--percent), 100;
    }
}
