/* ==========================================================================
   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 ac-gaulle.fr */
    --primary-hover: #1a7a6e;
    --primary-glow: rgba(42, 157, 143, 0.35);
    
    --discord-color: #5865F2; /* Couleur Discord */
    --discord-glow: rgba(88, 101, 242, 0.35);
    --blue-btn: #2a9d8f;
    --blue-btn-hover: #1a7a6e;
    
    --accent: #eab308; /* Or / Accentuation chaleureuse */
    --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);

    /* Cartes claires */
    --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 — activé via le bouton lune/soleil) */
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(37, 99, 235, 0.4);
    
    --nav-bg: rgba(255, 255, 255, 0.92);
    --nav-text: #334155;
    --nav-text-hover: #2563eb;
    --nav-border: #e2e8f0;
    
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.03) 0px, transparent 50%), 
        radial-gradient(at 100% 100%, rgba(37, 99, 235, 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(37, 99, 235, 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(37, 99, 235, 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 & PERSO SCROLLBAR
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 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);
    /* Grilles et mesh de fonds pour un rendu premium */
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.04) 0px, transparent 50%), 
        radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.02) 0px, transparent 50%);
}

/* Custom Scrollbar Premium */
::-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: 3rem; /* Espace généreux entre le logo+nom et le menu */
}

/* Logo à gauche (icône + texte) */
.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; /* Pousse le menu loin vers la droite */
}

.logo-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    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: #0f172a;
    letter-spacing: 1px;
    text-transform: uppercase;
}

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


/* Liens principaux alignés à droite */
.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1.6rem; /* Espacement aéré entre chaque élément du menu */
}

    gap: 2rem;
    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.35rem;
    padding: 0.4rem 0;
}

.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); }

/* Partie Droite (Discord, Service Académique, Theme Toggle) */
.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(37, 99, 235, 0.2);
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.theme-toggle {
    color: var(--nav-text);
    font-size: 1.1rem;
    text-decoration: none;
    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);
}

/* Bouton menu mobile (hamburger) */
.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 (PAGE HERO)
   ========================================================================== */
.hero {
    position: relative;
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1rem 5rem 1rem;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(248, 250, 252, 0.55) 100%), url('assets/campus.jpg') center/cover no-repeat;
    border-bottom: 1px solid rgba(42, 157, 143, 0.3);
}

body.theme-light .hero {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(248, 250, 252, 0.55) 100%), url('assets/campus.jpg') center/cover no-repeat;
}






.hero-glow {
    position: absolute;
    top: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 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; }
}

.badge-promo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.8rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

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

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

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

/* En-tête des pages secondaires */
.page-hero {
    position: relative;
    padding: 5rem 1rem 4rem 1rem;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(248, 250, 252, 0.6) 100%), url('assets/campus.jpg') center/cover no-repeat;
    border-bottom: 1px solid rgba(42, 157, 143, 0.3);
}

body.theme-light .page-hero {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(248, 250, 252, 0.6) 100%), url('assets/campus.jpg') center/cover no-repeat;
}





.page-hero-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.page-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.page-hero h1 span.highlight {
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.theme-light .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: 600px;
    margin: 0 auto;
    line-height: 1.6;
}
body.theme-light .page-hero p {
    color: #475569;
}

/* BANNIÈRE DE VERROUILLAGE */
.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;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}
.lockdown-banner.hidden { display: none; }

/* ==========================================================================
   5. STATS
   ========================================================================== */
.stats-section { padding: 3rem 0 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 rgba(37, 99, 235, 0.1);
}
.stat-card h2 {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.4rem;
}
.stat-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ==========================================================================
   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: 700;
    font-size: 0.8rem;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 0.5rem;
}
.section-header h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 0.75rem; }
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

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

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

.partner-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    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 rgba(37, 99, 235, 0.15);
    border-color: var(--border-hover);
}

body.theme-light .partner-card {
    background: var(--card-light-bg);
    border: 1px solid var(--card-light-border);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}
body.theme-light .partner-card:hover {
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.1);
    border-color: var(--border-hover);
}

.partner-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
body.theme-light .partner-card-header {
    border-bottom: 1px solid #f1f5f9;
}

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

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

.partner-card-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}
body.theme-light .partner-card-desc {
    color: #475569;
}

.partner-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    margin-top: 0.5rem;
}

.formation-details {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    font-size: 0.85rem;
}
body.theme-light .formation-details {
    border-top-color: #e2e8f0;
}
.formation-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--text-muted);
    line-height: 1.4;
}
body.theme-light .formation-detail-item {
    color: #475569;
}
.formation-detail-item strong {
    color: var(--text-main);
    font-weight: 600;
}
body.theme-light .formation-detail-item strong {
    color: #0f172a;
}
.formation-detail-item i {
    color: var(--primary);
    width: 14px;
    margin-top: 2px;
    font-size: 0.85rem;
}

/* ==========================================================================
   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;
    transition: background var(--transition-med), border-color var(--transition-med);
}
body.theme-light .contact-info-card {
    background: var(--card-light-bg);
    border: 1px solid var(--card-light-border);
}
.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:last-child { margin-bottom: 0; }
.contact-info-row i {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.1);
    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.95rem; margin-bottom: 0.25rem; font-weight: 700; }
.contact-info-row p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.4; }
body.theme-light .contact-info-row p { color: #475569; }

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 2.5rem;
    display: grid;
    gap: 1.2rem;
    transition: background var(--transition-med), border-color var(--transition-med);
}
body.theme-light .contact-form {
    background: var(--card-light-bg);
    border: 1px solid var(--card-light-border);
}
.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.85rem; color: var(--text-muted); font-weight: 600; }
body.theme-light .form-group label { color: #475569; }
.form-group input, .form-group select, .form-group textarea {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}
body.theme-light .form-group input, body.theme-light .form-group select, body.theme-light .form-group textarea {
    background: #f8fafc;
    color: #0f172a;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.05);
}
body.theme-light .form-group input:focus, body.theme-light .form-group select:focus, body.theme-light .form-group textarea:focus {
    background: #ffffff;
    border-color: var(--primary);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ==========================================================================
   9. BOUTON RETOUR EN HAUT (BACK TO TOP)
   ========================================================================== */
.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(37, 99, 235, 0.3);
    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 AU DÉFILEMENT (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);
    transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-scale { opacity: 0; transform: scale(0.95); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); transition-delay: var(--reveal-delay, 0s); }
.reveal-scale.is-visible { opacity: 1; transform: scale(1); }

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

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.btn-gold {
    background: linear-gradient(135deg, var(--accent) 0%, #ca8a04 100%);
    color: #090d16;
    font-weight: 700;
}
.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.4rem 0.8rem;
    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: #06080e;
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 1.5rem 1.25rem 1.5rem;
    transition: background-color var(--transition-med), border-color var(--transition-med);
}
.footer-container {
    max-width: 1250px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
    gap: 2rem;
}
.footer-block h3 {
    font-weight: 800;
}
.footer-block h3 span { color: var(--primary); }
.footer-block p { color: var(--text-muted); margin-top: 0.5rem; font-size: 0.85rem; line-height: 1.5; }
.footer-block h4 { font-size: 0.95rem; color: var(--text-main); margin-bottom: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-block a { display: block; color: var(--text-muted); text-decoration: none; margin-bottom: 0.35rem; font-size: 0.85rem; 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: 1.5rem auto 0 auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}


/* ==========================================================================
   13. RESPONSIVE DESIGN (OPTIMISÉ MOBILE & TABLETTE)
   ========================================================================== */
@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 var(--border-color);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        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;
        border-radius: 12px;
    }

    .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; }

    /* Grille des chiffres clés sur tablette */
    .stats-section .container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

@media (max-width: 768px) {
    /* Événements agenda et services en 1 colonne sur mobile */
    .partners-section [style*="grid-template-columns: repeat(3, 1fr)"],
    .partners-section [style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: 1fr !important;
    }

    .news-section .grid-2col {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !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; letter-spacing: 1px; }

    .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;
        white-space: normal !important;
    }

    .back-to-top-btn { width: 42px; height: 42px; bottom: 20px; }
    .back-to-top-btn.is-visible { right: 20px; }
}

    .logo-text .sub-title { font-size: 0.65rem; }
    .discord-link { font-size: 1.2rem; }
    .back-to-top-btn { width: 40px; height: 40px; bottom: 20px; }
    .back-to-top-btn.is-visible { right: 20px; }
}

/* ==========================================================================
   14. EFFETS DYNAMIQUES ET MOUVEMENTS PREMIUM (SPOTLIGHT & TRANSITIONS)
   ========================================================================== */
.partner-card, .stat-card, .feature-card {
    position: relative;
    overflow: hidden;
}

.partner-card::before, .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(400px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(37, 99, 235, 0.09), transparent 50%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

body.theme-light .partner-card::before, body.theme-light .stat-card::before {
    background: radial-gradient(400px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(37, 99, 235, 0.05), transparent 50%);
}

.partner-card:hover::before, .stat-card:hover::before {
    opacity: 1;
}

.partner-card-header, .partner-card-desc, .partner-badge, .formation-details, .stat-card h2, .stat-card p {
    position: relative;
    z-index: 2;
}

.partner-icon i {
    transition: transform var(--transition-fast);
}
.partner-card:hover .partner-icon i {
    transform: scale(1.15) rotate(-3deg);
}

/* ==========================================================================
   15. MODAL OVERLAY & POPUP (GLASSMORPHISM & SLIDE UP)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(9, 13, 22, 0.75);
    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: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    width: 100%;
    max-width: 600px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    transform: translateY(40px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
body.theme-light .modal-content {
    background: var(--card-light-bg);
    border-color: var(--card-light-border);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.15);
}

.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: var(--text-muted);
    font-size: 2.2rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast), transform var(--transition-fast);
}
.modal-close-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

/* ==========================================================================
   16. RESTYLAGE PHOTO DU PERSONNEL
   ========================================================================== */
.staff-photo-container {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    background: var(--bg-card-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color var(--transition-fast);
    z-index: 2;
}

body.theme-light .staff-photo-container {
    border-color: var(--card-light-border);
    background: #f8fafc;
}

.staff-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-med);
}

.partner-card:hover .staff-photo {
    transform: scale(1.06);
}

.partner-card:hover .staff-photo-container {
    border-color: var(--border-hover);
}

.staff-info-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 1.2rem;
    z-index: 2;
}

.staff-name {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}
body.theme-light .staff-name {
    color: var(--card-light-text);
}

.staff-role {
    font-style: italic;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
body.theme-light .staff-role {
    color: var(--card-light-muted);
}

/* ==========================================================================
   17. BARRE DE PROGRESSION DU DEFILEMENT
   ========================================================================== */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    z-index: 10000;
    transition: width 0.1s ease-out;
}

/* ==========================================================================
   18. FILTRE DES FORMATIONS & PERSONNEL
   ========================================================================== */
.filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}
.btn-filter {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.6rem 1.4rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
body.theme-light .btn-filter {
    background: var(--card-light-bg);
    border-color: var(--card-light-border);
    color: var(--card-light-muted);
}
.btn-filter:hover {
    border-color: var(--border-hover);
    color: var(--text-main);
    transform: translateY(-1px);
}
body.theme-light .btn-filter:hover {
    color: var(--card-light-text);
}
.btn-filter.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* ==========================================================================
   19. TOAST NOTIFICATIONS ANIMÉES
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 9999;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    background: var(--bg-card);
    border-left: 4px solid var(--accent);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    color: var(--text-main);
    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;
}
body.theme-light .toast {
    background: var(--card-light-bg);
    border-color: var(--card-light-border);
    border-left-color: var(--accent);
    color: var(--card-light-text);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.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: var(--text-muted);
}
body.theme-light .toast-message {
    color: var(--card-light-muted);
}
.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.2rem;
    transition: color var(--transition-fast);
}
.toast-close:hover {
    color: var(--primary);
}
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    width: 100%;
    animation: toastProgress 5s linear forwards;
}
@keyframes toastSlideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ==========================================================================
   20. CONSOLE D'ADMINISTRATION COMPLÈTE & TABLEAUX DÉDIÉS
   ========================================================================== */
.admin-page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

.admin-topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.admin-brand img {
    width: 38px;
    height: 38px;
    border-radius: 6px;
}

.admin-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-main);
}

.admin-sub {
    font-size: 0.75rem;
    color: var(--primary);
    display: block;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.security-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-dot.green { background: #10B981; box-shadow: 0 0 8px #10B981; }

.admin-layout {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.admin-sidebar {
    width: 270px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem 0;
}

.admin-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 0.75rem;
}

.admin-menu-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.admin-menu-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    color: var(--primary);
}

.admin-menu-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.admin-menu-item.active {
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.badge-count {
    margin-left: auto;
    background: rgba(37, 99, 235, 0.2);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 50px;
}
.badge-count.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.sidebar-system-info {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sys-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
}

.admin-main-panel {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.admin-tab-content { display: none; }
.admin-tab-content.active-tab { display: block; }

.admin-section-header { margin-bottom: 2rem; }
.admin-section-header h2 { font-size: 1.75rem; font-weight: 800; display: flex; align-items: center; gap: 0.75rem; }
.admin-section-header h2 i { color: var(--primary); }
.admin-section-header p { color: var(--text-muted); margin-top: 0.25rem; }

.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.metric-card.gold .metric-icon { background: rgba(234, 179, 8, 0.15); color: var(--accent); }
.metric-card.blue .metric-icon { background: rgba(37, 99, 235, 0.15); color: var(--primary); }
.metric-card.red .metric-icon { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.metric-card.purple .metric-icon { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

.metric-number {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    display: block;
}
.metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    display: block;
}

.quick-admin-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.btn-action {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.85rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition-fast);
}

.btn-action:hover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}

/* Liens du menu sous forme de boutons arrondis (Pill buttons) */
.nav-item {
    font-weight: 600;
    font-size: 0.88rem;
    color: #334155;
    text-decoration: none;
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

body.theme-light .nav-item {
    color: #334155;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.nav-item:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.nav-item.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    font-weight: 700;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-card);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.admin-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.25rem;
    color: var(--primary);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.admin-table td {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    vertical-align: middle;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
}
.status-badge.Actif { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.status-badge.Avertissement { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.status-badge.Suspendu { background: rgba(239, 68, 68, 0.15); color: #EF4444; }

/* Document Bulletin Imprimable */
.printable-bulletin {
    background: #ffffff;
    color: #1e293b;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.bulletin-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.bulletin-seal {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.bulletin-header-titles h1 { color: #0f172a; font-size: 1.6rem; margin-bottom: 0.2rem; }
.bulletin-header-titles h3 { color: #475569; font-size: 0.85rem; }
.bulletin-subtitle { font-size: 0.75rem; color: var(--primary); font-weight: 800; letter-spacing: 1px; }

.gold-hr { border: none; height: 2px; background: var(--primary); margin: 1rem 0 1.5rem 0; }

.bulletin-identity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.bulletin-grades-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.bulletin-grades-table th { background: #0f172a; color: #ffffff; padding: 0.6rem 0.8rem; text-align: left; }
.bulletin-grades-table td { padding: 0.6rem 0.8rem; border-bottom: 1px solid #e2e8f0; color: #334155; }

.bulletin-summary-box {
    display: flex;
    justify-content: space-between;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.bulletin-remarks { background: #f8fafc; padding: 1rem; border-radius: 6px; font-size: 0.85rem; margin-bottom: 2rem; }

.bulletin-footer-signatures {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.sig-box { display: flex; flex-direction: column; gap: 2rem; }
.sig-line { border-top: 1px solid #94a3b8; padding-top: 0.25rem; font-weight: 700; }
.sig-stamp { border: 2px dashed var(--primary); padding: 0.5rem 1rem; color: var(--primary); font-weight: 800; border-radius: 6px; }

/* ==========================================================================
   22. LOADER ÉCRAN DE CHARGEMENT HAUT DE GAMME (PRELOADER NOVA)
   ========================================================================== */
.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, transform 0.25s ease-out, visibility 0.25s ease-out;
}

body.theme-light .loader-wrapper {
    background: #ffffff;
}

.loader-wrapper.fade-out {
    opacity: 0;
    transform: scale(1.02);
    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%;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(42, 157, 143, 0.25);
    z-index: 2;
}

.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;
    position: relative;
}

.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.85rem;
    font-weight: 800;
    letter-spacing: 2.5px;
    color: #0f172a;
    text-transform: uppercase;
}

.loader-subtext {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

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

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



/* ==========================================================================
   21. STYLES SPÉCIFIQUES POUR ÉTABLISSEMENTS & PERSONNEL
   ========================================================================== */

/* Cartes Établissements avec Image Ronde, Nom et Email */
.facility-card-centered {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    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(0, 0, 0, 0.15);
    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(--border-hover);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 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(37, 99, 235, 0.25);
    margin-bottom: 1.25rem;
    transition: transform var(--transition-fast);
}

.facility-card-centered:hover .facility-round-img {
    transform: scale(1.06) rotate(2deg);
}

.facility-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}
body.theme-light .facility-name {
    color: var(--card-light-text);
}

.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;
    transition: color var(--transition-fast);
}

.facility-email-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Cartes Personnel : Photo de Profil Ronde, Nom Prénom en Gras, Fonction, Bouton Arrondi Mail */
.staff-card-centered {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    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(0, 0, 0, 0.15);
    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(--border-hover);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 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(37, 99, 235, 0.2);
    margin-bottom: 1.2rem;
    background: var(--bg-card-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: var(--primary);
    transition: transform var(--transition-fast);
}

.staff-card-centered:hover .staff-avatar-round {
    transform: scale(1.06);
}

.staff-fullname {
    font-weight: 800 !important;
    font-size: 1.2rem;
    color: var(--text-main);
    margin-bottom: 0.35rem;
}
body.theme-light .staff-fullname {
    color: var(--card-light-text);
}

.staff-function {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1.4rem;
}
body.theme-light .staff-function {
    color: var(--card-light-muted);
}

/* Bouton Arrondi sur les côtés pour Email (Pill Button) */
.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(37, 99, 235, 0.3);
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-mail-rounded:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

