/* =====================================================================
   L'HORIZON — Centre de formation professionnelle
   Design System & Refonte Graphique Complète (Fidèle à la maquette)
   Palette officielle :
   - Turquoise principal : #0A5F7C
   - Turquoise secondaire : #1296A5
   - Rose : #E81778
   - Bleu foncé : #12365A
   - Fond général : #F4F9FC
   - Blanc : #FFFFFF
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&family=Caveat:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Couleurs de la charte officielle L'HORIZON */
    --primary: #0A5F7C;
    --primary-light: #E6F4F8;
    --primary-hover: #074B63;
    --primary-gradient: linear-gradient(135deg, #0A5F7C 0%, #1296A5 100%);
    --primary-teal: #1296A5;
    --primary-teal-light: #E0F7FA;

    --brand-rose: #E81778;
    --brand-rose-light: #FDF2F7;
    --brand-dark: #12365A;
    --admin-accent: #0A5F7C;

    /* Fonds */
    --bg-main: #F4F9FC;
    --bg-card: #FFFFFF;
    --bg-card-subtle: #F8FAFC;
    --bg-sidebar: #FFFFFF;
    
    /* Typographie */
    --text-primary: #12365A;
    --text-secondary: #475569;
    --text-muted: #8E9FAA;
    --border-color: #E2E8F0;
    --border-light: #EDF2F7;
    --border-focus: #1296A5;

    /* Nuances pastel de la maquette de référence */
    --pastel-pink-bg: #FDF2F4;
    --pastel-pink-icon: #E81778;
    --pastel-blue-bg: #EBF8FE;
    --pastel-blue-icon: #0288D1;
    --pastel-mint-bg: #EAF9EE;
    --pastel-mint-icon: #10B981;
    --pastel-purple-bg: #F5EBF9;
    --pastel-purple-icon: #8B5CF6;
    --pastel-orange-bg: #FFF7ED;
    --pastel-orange-icon: #F59E0B;

    /* Ombres et Rayons */
    --shadow-sm: 0 1px 3px rgba(18, 54, 90, 0.04), 0 1px 2px rgba(18, 54, 90, 0.02);
    --shadow-card: 0 4px 20px rgba(18, 54, 90, 0.04), 0 1px 3px rgba(18, 54, 90, 0.02);
    --shadow-hover: 0 10px 25px -3px rgba(10, 95, 124, 0.12), 0 4px 8px -2px rgba(18, 54, 90, 0.04);
    --shadow-float: 0 20px 35px -5px rgba(18, 54, 90, 0.15);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 9999px;

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-cursive: 'Caveat', 'Playpen Sans', cursive;
    --font-arabic: 'Cairo', system-ui, sans-serif;
    --transition-fast: 0.18s ease-in-out;
    --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Thème Sombre Harmonisé */
body.dark-mode {
    --bg-main: #0B132B;
    --bg-card: #121E3A;
    --bg-card-subtle: #19274A;
    --bg-sidebar: #0E1833;
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    --border-color: #203158;
    --border-light: #203158;

    --pastel-pink-bg: rgba(232, 23, 120, 0.12);
    --pastel-blue-bg: rgba(2, 136, 209, 0.12);
    --pastel-mint-bg: rgba(16, 185, 129, 0.12);
    --pastel-purple-bg: rgba(139, 92, 246, 0.12);
    --pastel-orange-bg: rgba(245, 158, 11, 0.12);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* Toast de notification */
.toast-msg {
    position: fixed;
    top: 24px;
    right: 24px;
    background: var(--brand-dark);
    color: #ffffff;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-float);
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.toast-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================================
   1. PAGE D'AUTHENTIFICATION WEB
   ===================================================================== */
.auth-page-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: #ffffff;
}

body.dark-mode .auth-page-wrapper {
    background: #0B132B;
}

/* =====================================================================
   1. PAGE D'AUTHENTIFICATION WEB L'HORIZON (REFONTE FIDÈLE À LA MAQUETTE)
   ===================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-page-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: #F4F9FC;
    overflow-x: hidden;
    position: relative;
}

/* Panneau Gauche : 56% de largeur, Image de présentation & Apprenants */
.auth-hero-panel {
    flex: 1.28;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: #EBF8FE;
    display: flex;
    align-items: stretch;
}

.auth-hero-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center left;
    display: block;
}

/* Panneau Droit : 44% de largeur, Carte de connexion blanche centrée */
.auth-form-panel {
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 32px 32px 32px;
    position: relative;
    background: linear-gradient(135deg, #F4F9FC 0%, #EAF6FC 100%);
}

/* Citation manuscrite supérieure en haut à droite */
.auth-topright-quote {
    position: absolute;
    top: 26px;
    right: 38px;
    font-family: var(--font-cursive);
    font-size: 21px;
    font-weight: 700;
    color: #0A5F7C;
    line-height: 1.18;
    text-align: right;
    transform: rotate(-3deg);
    pointer-events: none;
    opacity: 0.92;
}

.auth-topright-quote span {
    color: #12365A;
}

.auth-topright-quote em {
    font-style: normal;
    color: #0A5F7C;
}

/* Carte Blanche Élégante */
.auth-card-web {
    width: 100%;
    max-width: 425px;
    background: #FFFFFF;
    border-radius: 28px;
    box-shadow: 0 20px 50px rgba(18, 54, 90, 0.09);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.75);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    z-index: 2;
}

.auth-card-web:hover {
    box-shadow: 0 24px 56px rgba(18, 54, 90, 0.12);
}

/* Accent incurvé rose pastel en haut à gauche de la carte */
.auth-card-accent-top-left {
    position: absolute;
    top: 0;
    left: 0;
    width: 95px;
    height: 75px;
    background: radial-gradient(ellipse at 0% 0%, rgba(244, 114, 182, 0.9) 0%, rgba(232, 23, 120, 0.6) 42%, rgba(255, 255, 255, 0) 72%);
    border-top-left-radius: 28px;
    pointer-events: none;
    z-index: 1;
}

.auth-card-inner {
    padding: 34px 34px 8px 34px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

/* 1. Logo officiel L'HORIZON centré */
.auth-brand-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.auth-center-logo {
    height: 56px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.04));
}

/* 2 & 3. Titre et sous-titre de la carte */
.auth-card-headings {
    text-align: center;
    margin-bottom: 24px;
}

.auth-card-title {
    font-size: 22px;
    font-weight: 800;
    color: #12365A;
    letter-spacing: -0.3px;
}

.auth-card-subtitle {
    font-size: 13px;
    color: #64748B;
    margin-top: 5px;
    font-weight: 500;
}

/* Champs de saisie */
.auth-input-group {
    margin-bottom: 15px;
}

.auth-input-wrapper {
    display: flex;
    align-items: center;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    background: #FFFFFF;
    padding: 0 14px;
    height: 50px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.auth-input-wrapper:focus-within {
    border-color: #1296A5;
    box-shadow: 0 0 0 3.5px rgba(18, 150, 165, 0.14);
}

.input-glyph-lead {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    margin-right: 12px;
    flex-shrink: 0;
}

.auth-input-element {
    flex: 1;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #12365A;
    outline: none;
    height: 100%;
}

.auth-input-element::placeholder {
    color: #94A3B8;
    font-weight: 500;
}

.input-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #94A3B8;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast), transform var(--transition-fast);
    border-radius: 50%;
}

.input-action-btn:hover {
    color: #0A5F7C;
    transform: scale(1.08);
}

/* 6 & 7. Ligne Se souvenir de moi & Mot de passe oublié */
.auth-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0 20px 0;
    font-size: 13px;
}

.auth-remember-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: #475569;
    font-weight: 600;
}

.auth-remember-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-check-box {
    width: 17px;
    height: 17px;
    border: 1.5px solid #94A3B8;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    background: #FFFFFF;
}

.auth-remember-checkbox input:checked + .custom-check-box {
    background: #0A5F7C;
    border-color: #0A5F7C;
}

.auth-remember-checkbox input:checked + .custom-check-box::after {
    content: '✓';
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 900;
}

.auth-forgot-link {
    color: #0A5F7C;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: 13px;
}

.auth-forgot-link:hover {
    color: #1296A5;
    text-decoration: underline;
}

/* 8. Bouton principal Se connecter */
.auth-btn-submit {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #0A5F7C 0%, #1296A5 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(10, 95, 124, 0.28);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
}

.auth-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(10, 95, 124, 0.36);
}

.auth-btn-submit:active {
    transform: translateY(0);
}

.auth-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-arrow-icon {
    font-size: 17px;
    font-weight: 800;
    transition: transform var(--transition-fast);
}

.auth-btn-submit:hover .btn-arrow-icon {
    transform: translateX(3px);
}

/* Séparateur "ou" */
.auth-or-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 18px 0 14px 0;
    color: #94A3B8;
    font-size: 12px;
    font-weight: 600;
}

.auth-or-divider::before,
.auth-or-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #E2E8F0;
}

.auth-or-divider span {
    padding: 0 12px;
    text-transform: lowercase;
}

/* 9. Bloc de réassurance avec cadenas */
.auth-security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 2px 0 8px 0;
}

.security-badge-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #E0F2FE;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.security-badge-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.25;
}

.security-title {
    font-size: 12px;
    font-weight: 700;
    color: #0A5F7C;
}

.security-desc {
    font-size: 11px;
    color: #8E9FAA;
    font-weight: 500;
}

/* Illustration discrète de bâtiments en bas de carte */
.auth-card-footer-sketch {
    width: 100%;
    margin-top: auto;
    overflow: hidden;
    pointer-events: none;
    line-height: 0;
}

.card-footer-buildings {
    width: 100%;
    height: auto;
    display: block;
}

/* Puces de test rapide 1-clic pour les 4 rôles */
.auth-demo-strip {
    margin-top: 18px;
    text-align: center;
    z-index: 2;
}

.demo-strip-title {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: #8E9FAA;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-strip-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.demo-pill-btn {
    background: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    color: #475569;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.demo-pill-btn:hover {
    border-color: #0A5F7C;
    color: #0A5F7C;
    transform: translateY(-1px);
}

.demo-pill-btn.active {
    background: #0A5F7C;
    color: #FFFFFF;
    border-color: #0A5F7C;
    box-shadow: 0 4px 10px rgba(10, 95, 124, 0.25);
}

/* Responsive Tablette & Mobile */
@media (max-width: 991px) {
    .auth-page-wrapper {
        flex-direction: column;
        min-height: 100vh;
    }

    .auth-hero-panel {
        display: none;
    }

    .auth-topright-quote {
        display: none;
    }

    .auth-form-panel {
        width: 100%;
        padding: 24px 16px;
        min-height: 100vh;
        justify-content: center;
    }

    .auth-card-web {
        max-width: 100%;
        margin: 0 auto;
    }

    .auth-card-inner {
        padding: 28px 20px 8px 20px;
    }
}

/* =====================================================================
   2. PORTAIL WEB D'APPLICATION (LAYOUT SIDEBAR + CONTENU)
   ===================================================================== */
.app-layout-web {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background-color: var(--bg-main);
}

/* Barre latérale (Sidebar) Blanche Épurée */
.web-sidebar {
    width: 255px;
    background: var(--bg-sidebar);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    z-index: 100;
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(10, 95, 124, 0.3) transparent;
}

/* Ascenseur élégant, ergonomique et moderne pour la Sidebar */
.web-sidebar::-webkit-scrollbar {
    width: 6px;
}

.web-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.web-sidebar::-webkit-scrollbar-thumb {
    background: rgba(10, 95, 124, 0.25);
    border-radius: 10px;
    transition: background var(--transition-fast);
}

.web-sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(10, 95, 124, 0.45);
}

.web-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Ascenseur en mode sombre */
body.dark-mode .web-sidebar {
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

body.dark-mode .web-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

body.dark-mode .web-sidebar:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
}

body.dark-mode .web-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-teal);
}

.sidebar-top-container {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
}

.sidebar-brand-box {
    padding: 20px 18px 16px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    background: var(--bg-sidebar);
    z-index: 10;
}

.sidebar-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.sidebar-menu {
    padding: 16px 14px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-category-title {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 800;
    padding: 10px 14px 4px 14px;
    letter-spacing: 0.8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
}

.sidebar-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.sidebar-link.active,
.sidebar-link.admin-active {
    color: #ffffff !important;
    background: var(--primary-gradient) !important;
    box-shadow: 0 4px 14px rgba(10, 95, 124, 0.28);
    font-weight: 700;
}

.sidebar-link .menu-icon {
    font-size: 18px;
    width: 22px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-link .sidebar-chevron {
    margin-left: auto;
    font-size: 16px;
    opacity: 0.45;
    font-weight: 400;
    transition: transform var(--transition-fast);
}

.sidebar-link:hover .sidebar-chevron {
    opacity: 0.85;
    transform: translateX(2px);
}

.sidebar-link.active .sidebar-chevron {
    opacity: 0.9;
    color: #ffffff;
}

.sidebar-link .badge-counter {
    margin-left: auto;
    background: var(--brand-rose);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
}

/* Widget Campus en bas de sidebar */
.sidebar-bottom-container {
    padding: 12px 14px 16px 14px;
    margin-top: auto;
    flex-shrink: 0;
}

.sidebar-campus-widget {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
    background: #ffffff;
    transition: var(--transition-fast);
}

.sidebar-campus-widget:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.sidebar-campus-graphic {
    width: 100%;
    height: auto;
    display: block;
}

/* =====================================================================
   3. HEADER SUPÉRIEUR ÉLÉGANT L'HORIZON
   ===================================================================== */
.web-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--bg-main);
}

.web-topbar {
    height: 78px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 1px 4px rgba(18, 54, 90, 0.02);
}

body.dark-mode .web-topbar {
    background: #121E3A;
}

.topbar-welcome-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.topbar-welcome-title {
    font-size: 21px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-welcome-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* Citation manuscrite centrale */
.topbar-quote-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-cursive-quote {
    font-family: var(--font-cursive);
    font-size: 23px;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.3px;
    transform: rotate(-1.5deg);
    white-space: nowrap;
}

/* Section Profil & Actions Droite */
.topbar-profile-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-bell-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.topbar-bell-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-teal);
}

.bell-glyph {
    font-size: 18px;
}

.bell-counter {
    position: absolute;
    top: -3px;
    right: -3px;
    background: var(--brand-rose);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
}

/* Capsule Profil Utilisateur */
.topbar-user-dropdown-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 5px;
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
}

.topbar-user-dropdown-pill:hover,
.topbar-user-dropdown-pill:focus {
    background: #ffffff;
    border-color: var(--primary-teal);
    box-shadow: var(--shadow-sm);
}

.user-capsule-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-teal);
}

.user-capsule-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-capsule-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-capsule-role {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.capsule-caret {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 2px;
}

/* Menu déroulant profil */
.user-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-float);
    padding: 8px;
    z-index: 200;
}

.topbar-user-dropdown-pill:focus-within .user-dropdown-panel,
.topbar-user-dropdown-pill.active .user-dropdown-panel {
    display: block;
}

.dropdown-action-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: left;
}

.dropdown-action-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.dropdown-action-btn.logout-action {
    color: #ef4444;
}

.dropdown-action-btn.logout-action:hover {
    background: #fee2e2;
}

.dropdown-sep {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 6px 0;
}

/* Date Pill */
.topbar-date-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card-subtle);
    border: 1px solid var(--border-color);
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.date-icon {
    font-size: 14px;
}

/* =====================================================================
   4. CORPS DE PAGE & GRILLE DE DASHBOARD PRINCIPALE
   ===================================================================== */
.web-page-body {
    padding: 28px 32px;
    flex: 1;
    overflow-y: auto;
}

.dashboard-ref-container {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.dashboard-main-column {
    flex: 1;
    min-width: 0;
}

.dashboard-side-column {
    width: 290px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 1. CARTES STATISTIQUES KPI PASTEL */
.stat-pastel-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.stat-pastel-card {
    border-radius: 18px;
    padding: 18px 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 148px;
    transition: var(--transition-smooth);
}

.stat-pastel-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.stat-pastel-card.pink {
    background: var(--pastel-pink-bg);
}

.stat-pastel-card.blue {
    background: var(--pastel-blue-bg);
}

.stat-pastel-card.mint {
    background: var(--pastel-mint-bg);
}

.stat-pastel-card.purple {
    background: var(--pastel-purple-bg);
}

.stat-card-top {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.stat-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.stat-icon-circle.pink {
    background: #E81778;
}

.stat-icon-circle.blue {
    background: #0288D1;
}

.stat-icon-circle.mint {
    background: #10B981;
}

.stat-icon-circle.purple {
    background: #8B5CF6;
}

.stat-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.3;
}

.stat-card-value-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 6px 0 2px 0;
}

.stat-huge-number {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.stat-badge-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
}

.stat-badge-pill.green {
    background: #dcfce7;
    color: #15803d;
}

.stat-badge-pill.blue {
    background: #e0f2fe;
    color: #0369a1;
}

.stat-badge-pill.purple {
    background: #f3e8ff;
    color: #7e22ce;
}

.stat-card-sublabel {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* 2. RANGÉE DES GRAPHIQUES (ÉVOLUTION + RÉPARTITION) */
.dashboard-charts-split {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    margin-bottom: 22px;
}

.panel-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 20px 22px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-fast);
}

body.dark-mode .panel-card {
    background: #121E3A;
}

.panel-card:hover {
    box-shadow: var(--shadow-hover);
}

.panel-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.panel-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title-icon {
    font-size: 18px;
}

.panel-title-text {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.panel-header-select {
    border: 1px solid var(--border-color);
    background: var(--bg-card-subtle);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.panel-header-select:hover {
    border-color: var(--primary-teal);
}

.panel-link-action {
    font-size: 12px;
    color: var(--primary-teal);
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

/* Courbe lissée des inscriptions */
.curve-chart-wrapper {
    width: 100%;
    height: 200px;
    position: relative;
}

/* Donut Chart */
.donut-chart-flex {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 16px;
    padding-top: 10px;
}

.donut-circle-container {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.donut-svg-element {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-center-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.donut-bold-number {
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
}

.donut-sub-text {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

.donut-legend-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.donut-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.donut-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.donut-legend-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.donut-legend-pct {
    font-weight: 700;
    color: var(--text-primary);
}

/* 3. RANGÉE DES TABLEAUX (POPULAIRES + DERNIERS INSCRITS) */
.dashboard-tables-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Formations populaires list */
.popular-courses-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.popular-course-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.course-icon-bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.course-meta-info {
    flex: 1;
}

.course-title-count {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.course-title-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.course-learner-count {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.course-progress-track {
    width: 100%;
    height: 6px;
    background: var(--border-light);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.course-progress-bar {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.course-pct-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    width: 32px;
    text-align: right;
}

/* Tableau moderne et aéré */
.table-responsive-clean {
    width: 100%;
    overflow-x: auto;
}

.table-clean-custom {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.table-clean-custom th {
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.table-clean-custom td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

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

.table-clean-custom tr:hover td {
    background: var(--bg-main);
}

.avatar-badge-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #ffffff;
    margin-right: 10px;
    flex-shrink: 0;
}

.student-name-flex {
    display: flex;
    align-items: center;
    font-weight: 700;
}

/* =====================================================================
   5. COLONNE DROITE / ACTIONS & ACTIVITÉ
   ===================================================================== */
.btn-primary-teal-pill {
    width: 100%;
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(10, 95, 124, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn-primary-teal-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(10, 95, 124, 0.4);
}

.plus-sign {
    font-size: 18px;
    font-weight: 800;
}

/* Grille 2x2 Actions Rapides */
.quick-tiles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.quick-tile-card {
    border-radius: 16px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.quick-tile-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.quick-tile-card.blue {
    background: var(--pastel-blue-bg);
}

.quick-tile-card.pink {
    background: var(--pastel-pink-bg);
}

.quick-tile-card.mint {
    background: var(--pastel-mint-bg);
}

.quick-tile-card.purple {
    background: var(--pastel-purple-bg);
}

.tile-icon-bubble {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 8px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.tile-caption {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

/* Carte Activité récente */
.timeline-activity-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.timeline-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.activity-icon-bubble {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    color: #ffffff;
}

.activity-text-block {
    flex: 1;
}

.activity-title-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.activity-action-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.activity-timestamp {
    font-size: 10px;
    color: var(--text-muted);
}

.activity-detail-desc {
    font-size: 11.5px;
    color: var(--text-secondary);
    margin-top: 2px;
    line-height: 1.3;
}

/* =====================================================================
   6. PIED DE PAGE OFFICIEL L'HORIZON
   ===================================================================== */
.web-footer {
    height: 56px;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

body.dark-mode .web-footer {
    background: #121E3A;
}

.footer-left {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-brand-title {
    font-weight: 800;
    color: var(--text-primary);
}

.footer-sep {
    color: var(--border-color);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-cursive-quote {
    font-family: var(--font-cursive);
    font-size: 20px;
    color: var(--primary);
    font-weight: 700;
}

.footer-logo-icon {
    width: 22px;
    height: 22px;
}

/* =====================================================================
   7. STYLES POUR LES AUTRES MODULES (COMPATIBILITÉ TOTALE)
   ===================================================================== */
.data-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 24px;
}

.data-table-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-table-header h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.web-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.web-table th {
    background: var(--bg-card-subtle);
    padding: 14px 20px;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.web-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.web-table tr:hover td {
    background: var(--bg-main);
}

/* Badges de Statuts Pastel */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
}

.badge-status.success {
    background: #dcfce7;
    color: #15803d;
}

.badge-status.warning {
    background: #fef3c7;
    color: #b45309;
}

.badge-status.danger {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-status.info {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-status.purple {
    background: #f3e8ff;
    color: #7e22ce;
}

/* =====================================================================
   7. DESIGN SYSTEM COMPLET : FORMULAIRES, INPUTS, MODALES & BOUTONS
   ===================================================================== */

/* Groupes de formulaires */
.form-group-web {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group-web label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group-web label .req-star {
    color: #EF4444;
}

.form-group-web small {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Champs de saisie (Inputs, Selects, Textareas) */
.input-web,
select.input-web,
textarea.input-web {
    width: 100%;
    height: 44px;
    padding: 10px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text-primary);
    background: #FFFFFF;
    transition: all var(--transition-fast);
    box-shadow: 0 1px 2px rgba(18, 54, 90, 0.03);
    outline: none;
}

body.dark-mode .input-web,
body.dark-mode select.input-web,
body.dark-mode textarea.input-web {
    background: #19274A;
    border-color: #203158;
    color: #F1F5F9;
}

.input-web:hover,
select.input-web:hover,
textarea.input-web:hover {
    border-color: #94A3B8;
}

.input-web:focus,
select.input-web:focus,
textarea.input-web:focus {
    border-color: #0A5F7C;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(10, 95, 124, 0.16);
}

body.dark-mode .input-web:focus,
body.dark-mode select.input-web:focus,
body.dark-mode textarea.input-web:focus {
    border-color: #00E5FF;
    box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.16);
}

textarea.input-web {
    height: auto;
    min-height: 85px;
    line-height: 1.5;
    padding: 12px 16px;
    resize: vertical;
}

select.input-web {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    appearance: none;
    -webkit-appearance: none;
}

[dir="rtl"] select.input-web {
    background-position: left 14px center;
    padding-right: 16px;
    padding-left: 38px;
}

/* Boutons d'Action & Soumission */
.btn-action-sm {
    border: none;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    line-height: 1;
}

.btn-action-sm.primary {
    background: linear-gradient(135deg, #0A5F7C 0%, #1296A5 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(10, 95, 124, 0.22);
}

.btn-action-sm.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(10, 95, 124, 0.35);
}

.btn-action-sm.danger {
    background: #FEE2E2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.btn-action-sm.danger:hover {
    background: #EF4444;
    color: #FFFFFF;
    border-color: #EF4444;
}

.btn-action-sm.ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-action-sm.ghost:hover {
    background: var(--bg-card-subtle);
    border-color: #94A3B8;
    color: var(--text-primary);
}

.btn-submit-web {
    background: linear-gradient(135deg, #0A5F7C 0%, #1296A5 100%);
    color: #FFFFFF;
    border: none;
    padding: 12px 26px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(10, 95, 124, 0.25);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit-web:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(10, 95, 124, 0.38);
}

.btn-submit-web:active {
    transform: translateY(0);
}

/* Modales d'Administration Épurées & Modernes */
.web-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(6, 11, 24, 0.68);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2500;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.web-modal-overlay.active {
    display: flex;
    animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.web-modal-box {
    background: var(--bg-card);
    border-radius: 22px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border-color);
    animation: modalZoomUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

@keyframes modalZoomUp {
    from { transform: scale(0.92) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.web-modal-header {
    padding: 20px 26px;
    background: linear-gradient(135deg, #0A5F7C 0%, #1296A5 100%);
    color: #FFFFFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.web-modal-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close-icon-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.web-modal-body {
    padding: 26px 28px;
    flex: 1;
    overflow-y: auto;
}

.web-modal-footer {
    padding: 16px 28px;
    background: var(--bg-card-subtle);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    border-radius: 0 0 20px 20px;
}

/* =====================================================================
   8. STYLES SPÉCIFIQUES POUR LA PAGE RAPPORTS & ÉVALUATIONS
   ===================================================================== */
.reports-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 26px;
}

.report-kpi-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.report-kpi-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.report-kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.report-kpi-meta span {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-kpi-meta h3 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 4px 0 2px;
    line-height: 1.1;
}

.report-kpi-meta small {
    font-size: 11.5px;
    color: #10B981;
    font-weight: 700;
}

.reports-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-bottom: 28px;
}

.report-card-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
}

.report-card-item:hover {
    border-color: var(--primary-teal);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.report-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.report-card-title-group h4 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 4px;
}

.report-card-title-group p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.report-card-badge {
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: #E2E8F0;
    border-radius: 9999px;
    overflow: hidden;
    margin: 8px 0;
}

body.dark-mode .progress-bar-wrap {
    background: #203158;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.6s ease;
}

/* Évaluations & Bulletins */
.eval-split-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: flex-start;
}

@media (max-width: 1024px) {
    .reports-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .reports-cards-grid {
        grid-template-columns: 1fr;
    }
    .eval-split-layout {
        grid-template-columns: 1fr;
    }
}


/* Grille Features & Cartes */
.web-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.web-feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.web-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-teal);
}

.web-feature-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.web-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .dashboard-ref-container {
        flex-direction: column;
    }
    .dashboard-side-column {
        width: 100%;
    }
    .stat-pastel-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-charts-split {
        grid-template-columns: 1fr;
    }
    .dashboard-tables-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .auth-hero-panel {
        display: none;
    }
    .auth-form-panel {
        flex: 1;
        padding: 30px 20px;
    }
    .web-sidebar {
        width: 70px;
    }
    .sidebar-brand-title, .sidebar-badge, .sidebar-link span:not(.menu-icon), .sidebar-chevron, .sidebar-bottom-container {
        display: none;
    }
    .sidebar-link {
        justify-content: center;
        padding: 12px;
    }
    .web-topbar {
        padding: 0 16px;
    }
    .topbar-quote-center {
        display: none;
    }
    .topbar-date-pill {
        display: none;
    }
    .stat-pastel-cards-grid {
        grid-template-columns: 1fr;
    }
    .web-page-body {
        padding: 16px;
    }
}

/* Impression Quittance */
@media print {
    body * {
        visibility: hidden !important;
    }
    #modal-view-receipt, #modal-view-receipt * {
        visibility: visible !important;
    }
    #modal-view-receipt {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: #ffffff !important;
        box-shadow: none !important;
        display: block !important;
        opacity: 1 !important;
    }
    .web-modal-box {
        box-shadow: none !important;
        border: none !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .web-modal-header button {
        display: none !important;
    }
}

/* Inscriptions Hub & Sub-Tabs */
.tab-pill-nav {
    display: inline-flex;
    background: #e2e8f0;
    padding: 4px;
    border-radius: 30px;
    gap: 4px;
    margin-bottom: 22px;
}
.tab-pill-btn {
    border: none;
    background: transparent;
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 13.5px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tab-pill-btn:hover {
    color: #0f172a;
}
.tab-pill-btn.active {
    background: #ffffff;
    color: #0A5F7C;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.tab-pill-btn .tab-badge {
    background: #0A5F7C;
    color: #fff;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
}
.tab-pill-btn.active .tab-badge {
    background: #E81778;
}

/* Multi-select check-list in modals */
.multi-checkbox-box {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.checkbox-item-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.15s;
}
.checkbox-item-label:hover {
    background: var(--bg-card-subtle);
}
.checkbox-item-label input[type="checkbox"] {
    accent-color: #0A5F7C;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Edit & Delete Action Buttons */
.table-action-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-action-icon {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-action-icon:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.btn-action-icon.edit:hover {
    background: #e0f2fe;
    border-color: #38bdf8;
    color: #0284c7;
}
.btn-action-icon.delete:hover {
    background: #fee2e2;
    border-color: #f87171;
    color: #dc2626;
}

/* Badges for multi-formations and multi-students */
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    background: #e0f2fe;
    color: #0284c7;
    margin: 2px 2px;
}
.tag-pill.pink {
    background: #fce7f3;
    color: #db2777;
}
.tag-pill.teal {
    background: #ccfbf1;
    color: #0d9488;
}
.tag-pill.purple {
    background: #f3e8ff;
    color: #7e22ce;
}

/* =====================================================================
   PORTAIL DES INSCRIPTIONS & ADMISSIONS (DESIGN MODERNE INSTITUTIONNEL)
   ===================================================================== */
.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card-widget {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.stat-card-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 95, 124, 0.08);
    border-color: rgba(10, 95, 124, 0.3);
}
.stat-card-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #0A5F7C;
    border-radius: 4px 0 0 4px;
}
.stat-card-widget.accent-blue::before { background: #0284C7; }
.stat-card-widget.accent-pink::before { background: #E81778; }
.stat-card-widget.accent-green::before { background: #10B981; }
.stat-card-widget.accent-amber::before { background: #F59E0B; }
.stat-card-widget.accent-purple::before { background: #8B5CF6; }

.stat-widget-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.stat-widget-info span {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted, #64748b);
}
.stat-widget-info h3 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary, #0f172a);
    margin: 2px 0 0;
    line-height: 1.1;
}
.stat-widget-info small {
    font-size: 11.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.stat-widget-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Filtres Boutons Pills */
.pill-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}
.pill-btn:hover {
    border-color: #0A5F7C;
    color: #0A5F7C;
    background: #f0fdfa;
    transform: translateY(-1px);
}
.pill-btn.active {
    background: #0A5F7C;
    color: #ffffff;
    border-color: #0A5F7C;
    box-shadow: 0 3px 8px rgba(10, 95, 124, 0.25);
}
.pill-btn .pill-counter {
    background: rgba(0, 0, 0, 0.12);
    color: inherit;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 800;
}
.pill-btn.active .pill-counter {
    background: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

/* Éléments Candidats & Admissions */
.candidate-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 13.5px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.candidate-meta-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.candidate-contact-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 12px;
}
.btn-whatsapp-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #25D366;
    color: #ffffff !important;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s, opacity 0.15s;
}
.btn-whatsapp-pill:hover {
    opacity: 0.92;
    transform: scale(1.04);
}

.badge-status.interview {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}
.badge-status.registered {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.badge-status.archived {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Modale Dossier Candidat */
.prereg-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}
@media (max-width: 768px) {
    .prereg-detail-grid {
        grid-template-columns: 1fr;
    }
}
.prereg-detail-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
}
.prereg-detail-card h4 {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    color: #0A5F7C;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.prereg-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 7px;
    font-size: 12.5px;
    gap: 10px;
}
.prereg-detail-row .label {
    color: #64748b;
    font-weight: 600;
}
.prereg-detail-row .value {
    color: #0f172a;
    font-weight: 700;
    text-align: right;
}
.prereg-notes-box {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
}

