/* ==========================================================================
   1. VARIABLES & CONFIGURATION DU THEME
   ========================================================================== */
:root {
    --bg-dark: #090d16;
    --bg-card: #0e131f;
    --bg-card-hover: #141b2d;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --primary: #2a9d8f; /* Vert Émeraude / Teal */
    --primary-hover: #1a7a6e;
    --primary-glow: rgba(42, 157, 143, 0.35);
    
    --discord-color: #5865F2;
    --discord-glow: rgba(88, 101, 242, 0.35);
    --blue-btn: #2a9d8f;
    --blue-btn-hover: #1a7a6e;
    
    --accent: #eab308;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(42, 157, 143, 0.3);

    --nav-bg: rgba(9, 13, 22, 0.85);
    --nav-text: #94a3b8;
    --nav-text-hover: #2a9d8f;
    --nav-border: rgba(255, 255, 255, 0.05);

    --card-light-bg: #ffffff;
    --card-light-border: #e2e8f0;
    --card-light-text: #0f172a;
    --card-light-muted: #64748b;

    --font-sans: 'Quicksand', 'Inter', system-ui, -apple-system, sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 50px;

    --transition-fast: 0.2s ease;
    --transition-med: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Thème clair (White Mode) */
body.theme-light {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: #e2e8f0;
    --border-hover: rgba(42, 157, 143, 0.4);
    
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-text: #334155;
    --nav-text-hover: #2a9d8f;
    --nav-border: #e2e8f0;
    
    background-image: 
        radial-gradient(at 0% 0%, rgba(42, 157, 143, 0.04) 0px, transparent 50%), 
        radial-gradient(at 100% 100%, rgba(42, 157, 143, 0.02) 0px, transparent 50%);
}

body.theme-light .hero-content h1 span.highlight {
    background: linear-gradient(to right, #0f172a, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.theme-light .partner-card,
body.theme-light .stat-card,
body.theme-light .facility-card-centered,
body.theme-light .staff-card-centered,
body.theme-light .contact-info-card,
body.theme-light .contact-form,
body.theme-light .admin-sidebar,
body.theme-light .admin-topbar,
body.theme-light .metric-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

body.theme-light .partner-card:hover,
body.theme-light .facility-card-centered:hover,
body.theme-light .staff-card-centered:hover {
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(42, 157, 143, 0.12);
}

body.theme-light input,
body.theme-light select,
body.theme-light textarea {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}
body.theme-light input:focus,
body.theme-light select:focus,
body.theme-light textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15);
}

body.theme-light .admin-table th {
    background: #f1f5f9;
    color: #0f172a;
    border-bottom-color: #cbd5e1;
}

body.theme-light .admin-table td {
    color: #1e293b;
    border-bottom-color: #f1f5f9;
}

body.theme-light .admin-menu-item {
    color: #475569;
}
body.theme-light .admin-menu-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}
body.theme-light .admin-menu-item.active {
    background: #eff6ff;
    color: var(--primary);
}

body.theme-light .footer { background: #f1f5f9; border-top-color: #e2e8f0; }
body.theme-light .footer-bottom { color: #64748b; border-top-color: #e2e8f0; }


/* ==========================================================================
   2. BASES, RESET & SCROLLBAR
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 90px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    padding-top: 75px;
    transition: background-color var(--transition-med), color var(--transition-med);
    background-image: 
        radial-gradient(at 0% 0%, rgba(42, 157, 143, 0.04) 0px, transparent 50%), 
        radial-gradient(at 100% 100%, rgba(42, 157, 143, 0.02) 0px, transparent 50%);
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
    border: 2px solid var(--bg-dark);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

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

/* ==========================================================================
   3. BARRE DE NAVIGATION (Bandeau Supérieur)
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 2000;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background var(--transition-med), border-color var(--transition-med);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    gap: 2rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color var(--transition-fast);
    margin-right: auto;
}

.logo-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: transform var(--transition-fast);
}
.logo:hover .logo-img { transform: scale(1.06) rotate(-3deg); }

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.logo-text .main-title {
    font-weight: 900;
    font-size: 1.15rem;
    color: var(--text-main);
    letter-spacing: 1px;
    text-transform: uppercase;
}

body.theme-light .logo-text .main-title {
    color: #0f172a;
}

.logo-text .sub-title {
    font-weight: 700;
    font-size: 0.7rem;
    color: var(--primary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.8rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    color: var(--nav-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0;
    cursor: pointer;
}

.nav-item::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-fast);
}

.nav-item:hover { color: var(--nav-text-hover); }
.nav-item:hover::after,
.nav-item.active::after { width: 100%; }
.nav-item.active { color: var(--nav-text-hover); font-weight: 700; }

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.discord-link {
    color: var(--nav-text);
    font-size: 1.4rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast), transform var(--transition-fast);
}
.discord-link:hover {
    color: var(--discord-color);
    transform: translateY(-2px) scale(1.1);
    filter: drop-shadow(0 2px 8px var(--discord-glow));
}

.btn-client {
    background: var(--blue-btn);
    color: #fff !important;
    padding: 0.6rem 1.3rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600 !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(42, 157, 143, 0.25);
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    border: none;
    cursor: pointer;
}

.btn-client:hover {
    background: var(--blue-btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(42, 157, 143, 0.35);
}

.theme-toggle {
    color: var(--nav-text);
    font-size: 1.1rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast), transform var(--transition-fast);
    display: flex;
    align-items: center;
    padding: 0.4rem;
    border-radius: 50%;
}

.theme-toggle:hover {
    color: var(--primary);
    transform: rotate(15deg) scale(1.05);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
}
.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--nav-text);
    border-radius: 2px;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   4. HERO PRINCIPAL & SECONDAIRE
   ========================================================================== */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5rem 1rem 4rem 1rem;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(9, 13, 22, 0.88) 0%, rgba(9, 13, 22, 0.95) 100%), radial-gradient(circle at center, rgba(42, 157, 143, 0.15) 0%, transparent 70%);
    border-bottom: 1px solid rgba(42, 157, 143, 0.2);
}

body.theme-light .hero {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.95) 100%), radial-gradient(circle at center, rgba(42, 157, 143, 0.1) 0%, transparent 70%);
}

.hero-glow {
    position: absolute;
    top: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(42, 157, 143, 0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: 1;
    pointer-events: none;
    animation: glow-pulse 6s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.75; }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    margin: 0 auto;
}

.badge-promo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(42, 157, 143, 0.12);
    border: 1px solid rgba(42, 157, 143, 0.25);
    color: var(--accent);
    padding: 0.4rem 1.1rem;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 1.8rem;
}

.hero-content h1 {
    font-size: 3.4rem;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.18;
    margin-bottom: 1.4rem;
    color: var(--text-main);
}

.hero-content h1 span.highlight {
    background: linear-gradient(to right, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    color: var(--text-muted);
    font-size: 1.15rem;
    max-width: 720px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.65;
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.page-hero {
    position: relative;
    padding: 4.5rem 1rem 3.5rem 1rem;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(248, 250, 252, 0.8) 100%);
    border-bottom: 1px solid rgba(42, 157, 143, 0.2);
}

.page-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.8rem;
}

.page-hero h1 span.highlight {
    background: linear-gradient(to right, #0f172a, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
}

.lockdown-banner {
    background: linear-gradient(90deg, #DC2626 0%, #991B1B 100%);
    color: #ffffff;
    text-align: center;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}
.lockdown-banner.hidden { display: none; }

/* ==========================================================================
   5. STATS
   ========================================================================== */
.stats-section { padding: 3.5rem 0 4.5rem 0; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.stat-card:hover { 
    transform: translateY(-6px); 
    border-color: var(--border-hover);
    box-shadow: 0 10px 24px var(--primary-glow);
}
.stat-card h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 0.3rem;
}
.stat-card p { color: var(--text-muted); font-size: 0.95rem; font-weight: 600; }

/* ==========================================================================
   6. SECTIONS AVANTAGES & CONTENU
   ========================================================================== */
.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}
.section-header .sub-title {
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 0.6rem;
}
.section-header h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.75rem; line-height: 1.25; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 620px; margin: 0 auto; line-height: 1.6; }

/* ==========================================================================
   7. CARTES ÉTABLISSEMENTS & FORMATIONS
   ========================================================================== */
.partners-section { padding: 4rem 0 6rem 0; }

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.partner-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2.2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.partner-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--primary-glow);
    border-color: var(--border-hover);
}

.partner-card-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding-bottom: 1.2rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-color);
}

.partner-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(42, 157, 143, 0.2);
    font-weight: 700;
    font-size: 1.4rem;
}

.partner-card-title h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}
.partner-card-title p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.partner-card-desc {
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.6;
    margin-bottom: 1.4rem;
}

.partner-badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(42, 157, 143, 0.12);
    color: var(--primary);
    margin-bottom: 1rem;
}

.formation-details {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    font-size: 0.88rem;
}

.formation-detail-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.formation-detail-item i {
    color: var(--primary);
    width: 16px;
    font-size: 0.9rem;
}

/* ==========================================================================
   8. FORMULAIRE DE CONTACT
   ========================================================================== */
.contact-section { padding: 4rem 0 6rem 0; }
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 3rem;
    align-items: start;
}

.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2.5rem;
}
.contact-info-card h3 { font-size: 1.3rem; margin-bottom: 1.8rem; font-weight: 800; }
.contact-info-row {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-bottom: 1.6rem;
}
.contact-info-row i {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(42, 157, 143, 0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}
.contact-info-row h4 { font-size: 0.98rem; margin-bottom: 0.25rem; font-weight: 700; }
.contact-info-row p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.45; }

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2.5rem;
    display: grid;
    gap: 1.3rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-size: 0.88rem; color: var(--text-muted); font-weight: 700; }
.form-group input, .form-group select, .form-group textarea {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    color: #0f172a;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ==========================================================================
   9. BOUTON RETOUR EN HAUT
   ========================================================================== */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: -60px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 1999;
    box-shadow: 0 4px 15px rgba(42, 157, 143, 0.35);
    transition: transform var(--transition-fast), background var(--transition-fast), right var(--transition-med);
}
.back-to-top-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-4px) scale(1.05);
}
.back-to-top-btn.is-visible {
    right: 30px;
}

/* ==========================================================================
   10. ANIMATIONS (Reveal)
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   11. BOUTONS GENERIQUES
   ========================================================================== */
.btn {
    padding: 0.85rem 1.9rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(42, 157, 143, 0.3);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(42, 157, 143, 0.45);
}

.btn-secondary {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}
.btn-secondary:hover {
    background: #e2e8f0;
    border-color: var(--primary);
}

.btn-gold {
    background: linear-gradient(135deg, var(--accent) 0%, #ca8a04 100%);
    color: #090d16;
    font-weight: 800;
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(234, 179, 8, 0.35);
}

.btn-danger {
    background: #dc2626;
    color: #ffffff;
}
.btn-danger:hover { background: #b91c1c; }

.btn-danger-outline {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 0.45rem 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.btn-danger-outline:hover { background: #ef4444; color: #fff; }

.full-width { width: 100%; justify-content: center; }

/* ==========================================================================
   12. FOOTER
   ========================================================================== */
.footer {
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    padding: 3rem 1.5rem 1.5rem 1.5rem;
}
.footer-container {
    max-width: 1250px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
    gap: 2.5rem;
}
.footer-block h3 {
    font-weight: 900;
    font-size: 1.3rem;
    color: #0f172a;
}
.footer-block h3 span { color: var(--primary); }
.footer-block p { color: #64748b; margin-top: 0.6rem; font-size: 0.88rem; line-height: 1.6; }
.footer-block h4 { font-size: 0.95rem; color: #0f172a; margin-bottom: 0.85rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-block a { display: block; color: #64748b; text-decoration: none; margin-bottom: 0.4rem; font-size: 0.88rem; transition: color var(--transition-fast), transform var(--transition-fast); }
.footer-block a:hover { color: var(--primary); transform: translateX(3px); }

.footer-bottom {
    max-width: 1250px;
    margin: 2rem auto 0 auto;
    padding-top: 1.2rem;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
}

/* ==========================================================================
   13. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
    .nav-toggle { display: flex; }
    
    .nav-container {
        padding: 0.8rem 1.25rem;
        gap: 1rem;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease;
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
        z-index: 9999;
    }
    
    .nav-links.is-open {
        max-height: 500px;
        padding: 1rem 1.25rem;
    }

    .nav-links li { width: 100%; }

    .nav-item {
        padding: 0.75rem 1.25rem;
        width: 100%;
        justify-content: flex-start;
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }
    
    .hero-content h1 { font-size: 2.5rem !important; }
    .page-hero h1 { font-size: 2.1rem !important; }
    .contact-grid { grid-template-columns: 1fr !important; }
    .form-row { grid-template-columns: 1fr !important; }

    .stats-section .container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

@media (max-width: 560px) {
    .hero-content h1 { font-size: 2rem !important; }
    .page-hero h1 { font-size: 1.7rem !important; }
    .nav-container { padding: 0.65rem 1rem; }
    .logo-img { width: 36px; height: 36px; }
    .logo-text .main-title { font-size: 0.95rem; }
    .logo-text .sub-title { font-size: 0.62rem; }

    .stats-section .container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    .stat-card { padding: 1rem 0.75rem !important; }
    .stat-card h2 { font-size: 1.6rem !important; }
    .stat-card p { font-size: 0.75rem !important; }
    .back-to-top-btn { width: 42px; height: 42px; bottom: 20px; }
    .back-to-top-btn.is-visible { right: 20px; }
}

/* ==========================================================================
   14. MODAL OVERLAY & POPUP
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    width: 100%;
    max-width: 600px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
    transform: translateY(40px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.is-open .modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #64748b;
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast);
}
.modal-close-btn:hover {
    color: var(--primary);
}

/* ==========================================================================
   15. ÉTABLISSEMENTS & PERSONNEL
   ========================================================================== */
.facility-card-centered {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.facility-card-centered:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(42, 157, 143, 0.15);
}

.facility-round-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 6px 20px rgba(42, 157, 143, 0.2);
    margin-bottom: 1.25rem;
}

.facility-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.facility-email-link {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.staff-card-centered {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 2.25rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.staff-card-centered:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(42, 157, 143, 0.15);
}

.staff-avatar-round {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 6px 20px rgba(42, 157, 143, 0.2);
    margin-bottom: 1.2rem;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: var(--primary);
}

.staff-fullname {
    font-weight: 800 !important;
    font-size: 1.2rem;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.staff-function {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 1.4rem;
}

.btn-mail-rounded {
    background: var(--primary);
    color: #ffffff !important;
    padding: 0.65rem 1.4rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(42, 157, 143, 0.3);
    transition: background var(--transition-fast), transform var(--transition-fast);
    cursor: pointer;
    border: none;
}

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

/* ==========================================================================
   16. TOAST NOTIFICATIONS & PROGRESS
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 9999;
}
.toast {
    background: #ffffff;
    border-left: 4px solid var(--accent);
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 320px;
    max-width: 450px;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.toast-icon { color: var(--accent); font-size: 1.2rem; }
.toast-content { flex-grow: 1; }
.toast-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.15rem; }
.toast-message { font-size: 0.85rem; color: #64748b; }
.toast-close { background: none; border: none; color: #64748b; cursor: pointer; font-size: 1.1rem; }

@keyframes toastSlideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    z-index: 10000;
}

/* ==========================================================================
   17. STYLES SPÉCIFIQUES QUIZ
   ========================================================================== */
.quiz-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    margin-bottom: 2rem;
}

.quiz-progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.3s ease;
}

.quiz-media-container {
    width: 100%;
    max-height: 320px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-media-img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
}

.quiz-question-text {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.45;
    margin-bottom: 1.8rem;
    color: #0f172a;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-button {
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 1.1rem 1.4rem;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition-fast);
}

.option-button:hover {
    border-color: var(--primary);
    background: rgba(42, 157, 143, 0.08);
    transform: translateX(4px);
}

.option-button.selected {
    border-color: var(--primary);
    background: rgba(42, 157, 143, 0.15);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.option-badge {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(42, 157, 143, 0.15);
    color: var(--primary);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option-button.correct {
    border-color: #10B981 !important;
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10B981 !important;
}

.option-button.incorrect {
    border-color: #EF4444 !important;
    background: rgba(239, 68, 68, 0.15) !important;
    color: #EF4444 !important;
}

.explanation-box {
    background: #f0fdf4;
    border: 1px solid #10B981;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #166534;
}

/* LOADER PRELOADER */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease-out, visibility 0.25s ease-out;
}

.loader-wrapper.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
}

.loader-logo-ring {
    position: relative;
    width: 95px;
    height: 95px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-logo-img {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(42, 157, 143, 0.25);
    z-index: 2;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-orbit-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--accent);
    animation: loaderOrbit 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.loader-bar-track {
    width: 180px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 50px;
    overflow: hidden;
}

.loader-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 50px;
    animation: loaderFill 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.loader-text {
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 2.5px;
    color: #0f172a;
}

.loader-subtext {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

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

@keyframes loaderFill {
    0% { width: 0%; }
    60% { width: 80%; }
    100% { width: 100%; }
}

/* SIMULATEUR DE DISTANCE DE FREINAGE INTERACTIF */
.simulator-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.05);
    margin-top: 2.5rem;
}
.sim-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.sim-metric-badge {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}
.sim-metric-badge h4 {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary);
}
.btn-tts-speech {
    background: rgba(42, 157, 143, 0.12);
    color: var(--primary);
    border: 1px solid rgba(42, 157, 143, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}
.btn-tts-speech:hover {
    background: var(--primary);
    color: #fff;
}

/* GAME FLASHCARDS */
.flashcards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.flashcard-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}
/* DESIGN MAINTENANCE BLANC (WHITE MODE ACCORDÉ AU SITE) */
.maint-page-body-light {
    margin: 0;
    padding: 0;
    background: #f8fafc;
    color: #0f172a;
    min-height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.maint-header-light {
    position: relative;
    z-index: 10;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
}

.maint-logo-light {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #0f172a;
    font-weight: 900;
    font-size: 1.15rem;
    text-decoration: none;
}

.maint-logo-icon-light {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, #218377 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    box-shadow: 0 6px 16px rgba(42, 157, 143, 0.25);
}

.maint-main-content-light {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    flex-grow: 1;
}

.maint-card-light {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 24px;
    padding: 3.5rem 2.5rem;
    max-width: 720px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
    position: relative;
    overflow: hidden;
}

.maint-tricolor-bar-light {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(to right, #002395 33.3%, #ffffff 33.3%, #ffffff 66.6%, #ed2939 66.6%);
}

.maint-hero-circle-light {
    width: 85px;
    height: 85px;
    margin: 0 auto 1.5rem auto;
    background: rgba(42, 157, 143, 0.12);
    border: 2px solid rgba(42, 157, 143, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 2.5rem;
    box-shadow: 0 10px 25px rgba(42, 157, 143, 0.15);
}

.maint-title-light {
    font-size: 2.1rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 0.4rem;
    letter-spacing: -0.5px;
}

.maint-subtitle-light {
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.maint-comm-box-light {
    background: #f8fafc;
    border-left: 4px solid var(--primary);
    border-radius: 14px;
    padding: 1.4rem;
    text-align: left;
    margin-bottom: 2rem;
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.maint-comm-header-light {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.maint-comm-text-light {
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.maint-metrics-row-light {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 2.2rem;
}

.maint-metric-card-light {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.maint-footer-light {
    position: relative;
    z-index: 10;
    padding: 1.2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

/* UTILITIES PARALLELES MAINTENANCE CARD */
.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 11px;
}
.badge-red {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fecaca;
}
.badge-teal {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}
.btn-primary-teal {
    background: linear-gradient(135deg, #2a9d8f 0%, #218377 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(42, 157, 143, 0.3);
}
.btn-primary-teal:hover {
    background: linear-gradient(135deg, #218377 0%, #1a6b61 100%);
    transform: translateY(-2px);
}
.btn-accent-gold {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(234, 179, 8, 0.3);
}
.btn-accent-gold:hover {
    background: linear-gradient(135deg, #ca8a04 0%, #a16207 100%);
    transform: translateY(-2px);
}

