/* ============================================================
   EduManager Pro — Charte Graphique v2.0
   Couleur principale : #255CC1 (bleu institutionnel)
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&display=swap");

/* ══════════════════════════════════════════════════════════
   VARIABLES
══════════════════════════════════════════════════════════ */
:root {
    /* Palette principale */
    --edu-primary:       #255cc1;
    --edu-primary-dark:  #1a4aaa;
    --edu-primary-light: #eef4fc;
    --edu-primary-mid:   #d0e2f7;

    /* Neutrals */
    --edu-bg:            #f0f4f9;
    --edu-surface:       #ffffff;
    --edu-border:        #dde4ee;
    --edu-text:          #1a2a4a;
    --edu-text-muted:    #6b7a99;

    /* Sémantiques */
    --edu-success:       #17a34a;
    --edu-warning:       #d97706;
    --edu-danger:        #dc2626;
    --edu-info:          #0284c7;

    /* Bootstrap overrides */
    --bs-primary:        #255cc1;
    --bs-primary-rgb:    37, 92, 193;
    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --bs-body-bg:        #f0f4f9;
}

/* ══════════════════════════════════════════════════════════
   BASE
══════════════════════════════════════════════════════════ */
html {
    overflow-x: hidden !important;
}

html, body {
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background-color: #f0f4f9 !important;
    color: #1a2a4a !important;
    overflow-x: hidden !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--edu-text);
    font-family: 'Inter', sans-serif;
}

code, .code, .matricule {
    font-family: 'JetBrains Mono', monospace;
    background: var(--edu-primary-light);
    color: var(--edu-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* ══════════════════════════════════════════════════════════
   LAYOUT SIDEBAR + TOPBAR
   Couleur sidebar : #1B74E8 (bleu vif Metronic)
══════════════════════════════════════════════════════════ */
:root {
    --sb-w:      265px;
    --sb-blue:   #1B74E8;
    --sb-blue2:  #1561cc;
    --top-h:     68px;
}

/* ══════ LAYOUT ══════ */
.edu-layout {
    display: block !important;
    min-height: 100vh !important;
}

/* ════════════════════════════════
   LOGOS — thème clair / sombre
════════════════════════════════ */
.edu-logo-dark  { display: none !important; }
.edu-logo-light { display: block !important; height: 52px !important; width: auto !important; object-fit: contain !important; }

[data-bs-theme="dark"] .edu-logo-light { display: none !important; }
[data-bs-theme="dark"] .edu-logo-dark  { display: block !important; height: 52px !important; width: auto !important; object-fit: contain !important; }

/* ════════════════════════════════
   SIDEBAR — menu seulement, sous le header
════════════════════════════════ */
.edu-sidebar {
    width: var(--sb-w) !important;
    top: var(--top-h) !important;
    height: calc(100vh - var(--top-h)) !important;
    background: #1B74E8 !important;
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    left: 0 !important;
    z-index: 1050 !important;
    transform: translateX(-100%) !important;
    transition: transform .28s cubic-bezier(.4,0,.2,1), box-shadow .28s !important;
    overflow: hidden !important;
}
.edu-sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 6px 0 30px rgba(0,0,0,.18) !important;
}



/* Nav scroll area */
.edu-sidebar-nav {
    flex: 1 !important;
    padding: 14px 10px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin !important;
    scrollbar-color: rgba(255,255,255,.15) transparent !important;
}

/* Section label */
.edu-nav-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 1.4px !important;
    text-transform: uppercase !important;
    color: rgba(255,255,255,.42) !important;
    padding: 14px 14px 5px !important;
    margin-top: 2px !important;
}
.edu-nav-label:first-child { padding-top: 4px !important; }

/* Nav item */
.edu-nav-item {
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
    color: rgba(255,255,255,.75) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    border: none !important;
    background: transparent !important;
    text-decoration: none !important;
    transition: background .18s, color .18s !important;
    width: 100% !important;
    margin-bottom: 2px !important;
    line-height: 1.3 !important;
}
.edu-nav-item:hover {
    background: rgba(255,255,255,.13) !important;
    color: #fff !important;
    text-decoration: none !important;
}
/* Item actif : pilule blanche avec texte bleu — très lisible sur fond bleu */
.edu-nav-item.active {
    background: #ffffff !important;
    color: var(--sb-blue) !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,.15) !important;
}
.edu-nav-icon {
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,.12) !important;
    transition: background .18s !important;
}
.edu-nav-item:hover .edu-nav-icon { background: rgba(255,255,255,.20) !important; }
.edu-nav-item.active .edu-nav-icon {
    background: rgba(27,116,232,.12) !important;
}
/* Icônes de l'item actif en bleu */
.edu-nav-item.active .ki-duotone [class^="path"],
.edu-nav-item.active .ki-duotone [class*=" path"] {
    color: var(--sb-blue) !important;
}
.edu-arrow {
    transition: transform .22s !important;
    opacity: .5 !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
}
.edu-nav-toggle.open .edu-arrow { transform: rotate(90deg) !important; opacity: .9 !important; }

/* Séparateur entre sections */
.edu-nav-sep {
    height: 1px !important;
    background: rgba(255,255,255,.1) !important;
    margin: 8px 12px !important;
}

/* Sous-menu */
.edu-nav-sub {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height .28s ease !important;
    margin: 0 0 4px 14px !important;
    border-left: 2px solid rgba(255,255,255,.15) !important;
    padding-left: 10px !important;
}
.edu-nav-sub.show { max-height: 600px !important; }

.edu-nav-sub-item {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 8px 10px !important;
    border-radius: 8px !important;
    color: rgba(255,255,255,.62) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    transition: all .15s !important;
    margin-bottom: 2px !important;
}
.edu-nav-sub-item:hover {
    color: #fff !important;
    background: rgba(255,255,255,.12) !important;
    text-decoration: none !important;
}
.edu-nav-sub-item.active {
    color: #fff !important;
    font-weight: 600 !important;
    background: rgba(255,255,255,.18) !important;
}
.edu-nav-sub-item i,
.edu-nav-sub-item .ki-duotone { opacity: .7 !important; flex-shrink: 0 !important; }
.edu-nav-sub-item:hover i,
.edu-nav-sub-item:hover .ki-duotone,
.edu-nav-sub-item.active i,
.edu-nav-sub-item.active .ki-duotone { opacity: 1 !important; }

/* Footer profil */
.edu-sidebar-footer {
    flex-shrink: 0 !important;
    padding: 10px 12px 14px !important;
    border-top: 1px solid rgba(255,255,255,.12) !important;
    background: rgba(0,0,0,.08) !important;
}
.edu-sidebar-user {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    transition: background .15s !important;
    text-decoration: none !important;
}
.edu-sidebar-user:hover { background: rgba(255,255,255,.1) !important; }
.edu-user-avatar {
    width: 38px !important; height: 38px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,.22) !important;
    color: #fff !important;
    font-weight: 700 !important; font-size: 15px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    flex-shrink: 0 !important;
    border: 1px solid rgba(255,255,255,.2) !important;
    overflow: hidden !important;
}
.edu-user-avatar img { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.edu-user-info { flex: 1 !important; min-width: 0 !important; }
.edu-user-name {
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.edu-user-role {
    color: rgba(255,255,255,.5) !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    margin-top: 1px !important;
}
.edu-logout-btn {
    color: rgba(255,255,255,.45) !important;
    background: none !important; border: none !important;
    padding: 7px !important; border-radius: 8px !important;
    cursor: pointer !important; transition: all .15s !important;
    display: flex !important; align-items: center !important;
    text-decoration: none !important;
    flex-shrink: 0 !important;
}
.edu-logout-btn:hover {
    color: #fff !important;
    background: rgba(255,255,255,.12) !important;
}
.edu-logout-btn .ki-duotone [class^="path"],
.edu-logout-btn .ki-duotone [class*=" path"] { color: inherit !important; }

/* Overlay */
.edu-overlay {
    position: fixed !important; inset: 0 !important;
    background: rgba(0,0,0,.45) !important;
    z-index: 1049 !important;
    opacity: 0 !important; pointer-events: none !important;
    transition: opacity .28s !important;
}
.edu-overlay.active { opacity: 1 !important; pointer-events: all !important; }

/* ════════════════════════════════
   ICONS BLANCS dans la sidebar
════════════════════════════════ */
.edu-sidebar .ki-duotone [class^="path"],
.edu-sidebar .ki-duotone [class*=" path"] {
    color: rgba(255,255,255,.85) !important;
}

/* ════════════════════════════════
   MAIN AREA
════════════════════════════════ */
.edu-main {
    display: flex !important;
    flex-direction: column !important;
    min-height: calc(100vh - var(--top-h)) !important;
    background: #f0f4f9 !important;
    margin-left: 0 !important;
    margin-top: var(--top-h) !important;
    transition: margin-left .28s cubic-bezier(.4,0,.2,1) !important;
}
.edu-main.sidebar-pushed {
    margin-left: var(--sb-w) !important;
}
@media (max-width: 991px) {
    .edu-main.sidebar-pushed { margin-left: 0 !important; }
}

/* ════════════════════════════════
   HEADER — full-width, sticky
   brand (gauche) + content (droite)
════════════════════════════════ */
.edu-topbar {
    height: var(--top-h) !important;
    background: #1B74E8 !important;
    display: flex !important;
    align-items: stretch !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1060 !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.08) !important;
}

/* Côté gauche : logo — même largeur que la sidebar */
.edu-topbar-brand {
    width: var(--sb-w) !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 20px !important;
    border-right: 1px solid rgba(255,255,255,.15) !important;
    transition: width .28s !important;
}
.edu-topbar-brand img {
    height: 52px !important;
    width: auto !important;
    object-fit: contain !important;
}

/* Côté droit : toggle + actions */
.edu-topbar-content {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 16px !important;
    min-width: 0 !important;
}

/* Bouton toggle sidebar */
.edu-toggle-btn {
    background: rgba(255,255,255,.12) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    width: 36px !important; height: 36px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    cursor: pointer !important;
    transition: background .15s !important;
}
.edu-toggle-btn:hover { background: rgba(255,255,255,.22) !important; }
.edu-toggle-btn .ki-duotone [class^="path"],
.edu-toggle-btn .ki-duotone [class*=" path"] { color: #fff !important; }

/* Icones topbar */
.edu-top-icon-btn {
    width: 36px !important; height: 36px !important;
    border-radius: 8px !important;
    border: none !important;
    background: transparent !important;
    color: rgba(255,255,255,.8) !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    cursor: pointer !important;
    transition: background .15s !important;
    text-decoration: none !important;
    position: relative !important;
}
.edu-top-icon-btn:hover { background: rgba(255,255,255,.15) !important; color: #fff !important; }
.edu-top-icon-btn .ki-duotone [class^="path"],
.edu-top-icon-btn .ki-duotone [class*=" path"] { color: rgba(255,255,255,.85) !important; }

/* Séparateur topbar */
.edu-top-sep { width: 1px !important; height: 26px !important; background: rgba(255,255,255,.2) !important; margin: 0 6px !important; }

/* Notification dot */
.edu-notif-dot {
    position: absolute !important;
    top: 5px !important; right: 5px !important;
    width: 8px !important; height: 8px !important;
    background: #f87171 !important;
    border-radius: 50% !important;
    border: 2px solid #1B74E8 !important;
}

/* Profile chip */
.edu-profile-chip {
    display: flex !important; align-items: center !important;
    gap: 8px !important; cursor: pointer !important;
    padding: 5px 10px !important; border-radius: 10px !important;
    transition: background .15s !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
}
.edu-profile-chip:hover { background: rgba(255,255,255,.15) !important; }

/* Avatar — fond blanc avec texte bleu en thème clair */
.edu-profile-avatar {
    width: 34px !important; height: 34px !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #1B74E8 !important;
    font-weight: 700 !important; font-size: 15px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    border: none !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.12) !important;
}

/* Avatar en thème sombre */
[data-bs-theme="dark"] .edu-profile-avatar {
    background: rgba(255,255,255,.15) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.edu-profile-name { font-size: 13px !important; font-weight: 600 !important; color: #fff !important; line-height: 1.2 !important; }

/* ════════════════════════════════
   DROPDOWN PROFIL — thème clair
════════════════════════════════ */
.edu-profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 272px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(28, 50, 91, 0.14), 0 2px 8px rgba(0,0,0,.06);
    border: 1px solid #e8edf5;
    z-index: 2000;
    overflow: hidden;
    animation: pdFadeIn .18s ease;
}
.edu-profile-dropdown.show { display: block; }

@keyframes pdFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* En-tête utilisateur */
.edu-pd-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px 14px;
    background: linear-gradient(135deg, #f0f6ff 0%, #eef4fc 100%);
}
.edu-pd-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #255cc1;
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 92, 193, 0.25);
}
.edu-pd-info { flex: 1; min-width: 0; }
.edu-pd-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a2a4a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.edu-pd-email {
    font-size: 11.5px;
    color: #6b7a99;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}
.edu-pd-badge {
    display: inline-block;
    margin-top: 5px;
    padding: 2px 8px;
    background: #255cc1;
    color: #fff;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .3px;
}

/* Séparateur */
.edu-pd-sep {
    height: 1px;
    background: #edf1f7;
    margin: 0;
}

/* Items */
.edu-pd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 13.5px;
    font-weight: 500;
    color: #1a2a4a;
    text-decoration: none;
    transition: background .13s;
}
.edu-pd-item:hover { background: #f5f8ff; text-decoration: none; color: #255cc1; }
.edu-pd-item--danger { color: #dc2626; }
.edu-pd-item--danger:hover { background: #fff5f5; color: #b91c1c; }

/* Icône dans item */
.edu-pd-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.edu-pd-icon--blue { background: #eef4fc; color: #255cc1; }
.edu-pd-icon--red  { background: #fff5f5; color: #dc2626; }
.edu-pd-icon--blue .ki-duotone [class^="path"],
.edu-pd-icon--blue .ki-duotone [class*=" path"] { color: #255cc1 !important; }
.edu-pd-icon--red .ki-duotone [class^="path"],
.edu-pd-icon--red .ki-duotone [class*=" path"]  { color: #dc2626 !important; }

/* Dark mode */
[data-bs-theme="dark"] .edu-profile-dropdown {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
[data-bs-theme="dark"] .edu-pd-header { background: linear-gradient(135deg, #1e3a5f 0%, #1a2f50 100%); }
[data-bs-theme="dark"] .edu-pd-name  { color: #f1f5f9; }
[data-bs-theme="dark"] .edu-pd-email { color: #9ca3af; }
[data-bs-theme="dark"] .edu-pd-sep   { background: #374151; }
[data-bs-theme="dark"] .edu-pd-item  { color: #e2e8f0; }
[data-bs-theme="dark"] .edu-pd-item:hover { background: #2d3748; color: #93c5fd; }
[data-bs-theme="dark"] .edu-pd-item--danger { color: #f87171; }
[data-bs-theme="dark"] .edu-pd-item--danger:hover { background: #3b1a1a; color: #fca5a5; }
[data-bs-theme="dark"] .edu-pd-icon--blue { background: #1e3a5f; }
[data-bs-theme="dark"] .edu-pd-icon--red  { background: #3b1a1a; }
.edu-profile-role { font-size: 11px !important; color: rgba(255,255,255,.65) !important; }

/* ════════════════════════════════
   CONTENT + TOOLBAR
════════════════════════════════ */
.edu-content { flex: 1 !important; }

.edu-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px 28px !important;
    background: #fff !important;
    border-bottom: 1px solid #e5eaf2 !important;
    margin-bottom: 24px !important;
}
.edu-page-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #1a2a4a !important;
    margin: 0 0 3px !important;
}
.edu-page-body {
    padding: 0 20px 32px !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
/* Empêche les row Bootstrap de déborder du container */
.edu-page-body > .row {
    --bs-gutter-x: 1.5rem;
    margin-right: 0 !important;
    margin-left:  0 !important;
}

/* ════════════════════════════════
   DARK MODE
════════════════════════════════ */
[data-bs-theme="dark"] .edu-main       { background: #111827 !important; }
[data-bs-theme="dark"] .edu-sidebar    { background: #1e293b !important; }
[data-bs-theme="dark"] .edu-topbar,
[data-bs-theme="dark"] #kt_header,
[data-bs-theme="dark"] .header         { background: #1e293b !important; background-color: #1e293b !important; }
[data-bs-theme="dark"] .edu-topbar-brand { border-right-color: rgba(255,255,255,.08) !important; }
[data-bs-theme="dark"] .edu-notif-dot  { border-color: #1e293b !important; }

[data-bs-theme="dark"] .edu-toolbar {
    background: #1f2937 !important;
    border-bottom-color: #374151 !important;
}
[data-bs-theme="dark"] .edu-page-title { color: #f1f5f9 !important; }
[data-bs-theme="dark"] .breadcrumb-item a { color: #9ca3af !important; }
[data-bs-theme="dark"] .breadcrumb-item.text-muted { color: #9ca3af !important; }

[data-bs-theme="dark"] .card {
    background: #1f2937 !important;
    border-color: #374151 !important;
}
[data-bs-theme="dark"] .card-header { border-bottom-color: #374151 !important; }
[data-bs-theme="dark"] .text-gray-800, [data-bs-theme="dark"] .text-gray-900 { color: #f1f5f9 !important; }
[data-bs-theme="dark"] .text-muted, [data-bs-theme="dark"] .text-gray-500,
[data-bs-theme="dark"] .text-gray-600, [data-bs-theme="dark"] .text-gray-700 { color: #9ca3af !important; }

[data-bs-theme="dark"] #kt_footer {
    background: #1f2937 !important;
    border-top-color: #374151 !important;
}

/* ══════════════════════════════════════════════════════════
   HEADER — alignement couleur avec sidebar
══════════════════════════════════════════════════════════ */
#kt_header,
.header,
[id="kt_header"],
.edu-topbar {
    background-color: #1B74E8 !important;
    background: #1B74E8 !important;
    box-shadow: none !important;
}

/* Onglets du header top */
.header-tabs .nav-link {
    color: rgba(255,255,255,0.65) !important;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.15s;
}
.header-tabs .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.12);
}
.header-tabs .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.18) !important;
    border-bottom: 2px solid rgba(255,255,255,0.7) !important;
}

/* Menu items dans la nav basse */
.header-menu .menu-link {
    color: rgba(255,255,255,0.75) !important;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.15s;
}
.header-menu .menu-link:hover,
.header-menu .menu-item.here > .menu-link,
.header-menu .menu-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.15) !important;
}

/* Logo */
.edu-logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: brightness(10);   /* rend le logo blanc sur fond bleu */
}

/* ══════════════════════════════════════════════════════════
   TOOLBAR (barre de titre de page)
══════════════════════════════════════════════════════════ */
.toolbar {
    background: var(--edu-surface);
    border-bottom: 1px solid var(--edu-border);
}

.page-title h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--edu-text);
}

.breadcrumb-item a {
    color: var(--edu-text-muted);
    text-decoration: none;
}
.breadcrumb-item a:hover { color: var(--edu-primary); }

/* ══════════════════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════════════════ */
.card {
    border: 1px solid var(--edu-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 1px 6px rgba(37, 92, 193, 0.06) !important;
    background: var(--edu-surface) !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--edu-border) !important;
}

/* Headers colorés sur les widgets du dashboard */
.card-header.bg-primary   { background: var(--edu-primary) !important; border: none !important; }
.card-header.bg-success   { background: var(--edu-success) !important; border: none !important; }

/* ══════════════════════════════════════════════════════════
   BOUTONS
══════════════════════════════════════════════════════════ */
.btn-primary {
    background-color: var(--edu-primary) !important;
    border-color: var(--edu-primary) !important;
    color: #fff !important;
    font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--edu-primary-dark) !important;
    border-color: var(--edu-primary-dark) !important;
    box-shadow: 0 4px 14px rgba(37,92,193,0.3) !important;
}

.btn-light-primary {
    background-color: var(--edu-primary-light) !important;
    border-color: var(--edu-primary-light) !important;
    color: var(--edu-primary) !important;
}
.btn-light-primary .path1, .btn-light-primary .path2,
.btn-light-primary .path3, .btn-light-primary .path4,
.btn-light-primary .path5 {
    color: var(--edu-primary) !important;
}

/* Le thème (style.bundle.css) bascule ces boutons en fond bleu plein
   au survol/focus/actif avec une spécificité plus forte que la nôtre :
   on reprend exactement ses sélecteurs pour garantir un texte blanc lisible. */
.btn.btn-light-primary:hover:not(.btn-active),
.btn.btn-light-primary:focus:not(.btn-active),
.btn.btn-light-primary:active:not(.btn-active),
.btn.btn-light-primary.active,
.btn.btn-light-primary.show,
.btn-check:checked + .btn.btn-light-primary,
.show > .btn.btn-light-primary {
    background-color: var(--edu-primary) !important;
    border-color: var(--edu-primary) !important;
    color: #fff !important;
}
.btn.btn-light-primary:hover:not(.btn-active) i,
.btn.btn-light-primary:hover:not(.btn-active) .path1,
.btn.btn-light-primary:hover:not(.btn-active) .path2,
.btn.btn-light-primary:focus:not(.btn-active) i,
.btn.btn-light-primary:active:not(.btn-active) i,
.btn.btn-light-primary.active i,
.btn.btn-light-primary.show i,
.btn-check:checked + .btn.btn-light-primary i,
.show > .btn.btn-light-primary i {
    color: #fff !important;
}

/* ══════════════════════════════════════════════════════════
   FORMULAIRES
══════════════════════════════════════════════════════════ */
.form-control:focus,
.form-select:focus {
    border-color: var(--edu-primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 92, 193, 0.1) !important;
}

.form-label {
    font-weight: 600;
    color: var(--edu-text);
    font-size: 13px;
}

.form-control-solid, .form-select-solid {
    background-color: var(--edu-primary-light) !important;
    border-color: var(--edu-border) !important;
}

/* ══════════════════════════════════════════════════════════
   TABLEAUX
══════════════════════════════════════════════════════════ */
.table thead th {
    background: transparent !important;
    color: var(--edu-text-muted) !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 1px dashed var(--edu-border) !important;
}

.table tbody tr:hover {
    background: var(--edu-primary-light) !important;
}
/* ══════════════════════════════════════════════════════════
   COULEURS UTILITAIRES METRONIC
══════════════════════════════════════════════════════════ */
.text-primary   { color: var(--edu-primary) !important; }
.bg-primary     { background-color: var(--edu-primary) !important; }
.border-primary { border-color: var(--edu-primary) !important; }
.link-primary   { color: var(--edu-primary) !important; }
.link-primary:hover { color: var(--edu-primary-dark) !important; }

.bg-light-primary { background-color: var(--edu-primary-light) !important; }
.text-hover-primary:hover { color: var(--edu-primary) !important; }

[data-bs-theme="light"] {
    --kt-primary:         var(--edu-primary);
    --kt-primary-active:  var(--edu-primary-dark);
    --kt-primary-light:   var(--edu-primary-light);
    --kt-primary-inverse: #ffffff;
    --kt-success:  #17a34a;
    --kt-warning:  #d97706;
    --kt-danger:   #dc2626;
    --kt-info:     #0284c7;
}

/* ══════════════════════════════════════════════════════════
   ALERTES
══════════════════════════════════════════════════════════ */
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.alert-danger  { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.alert-info    { background: var(--edu-primary-light); border-color: var(--edu-primary-mid); color: var(--edu-primary-dark); }

/* ══════════════════════════════════════════════════════════
   BADGES DE STATUT
══════════════════════════════════════════════════════════ */
.badge-paid     { background: #dcfce7; color: #14532d; }
.badge-partial  { background: #fef9c3; color: #713f12; }
.badge-late     { background: #fee2e2; color: #7f1d1d; }
.badge-approved { background: #dbeafe; color: #1e3a8a; }
.badge-draft    { background: #f1f5f9; color: #475569; }

/* ══════════════════════════════════════════════════════════
   BADGES DE RÔLE
══════════════════════════════════════════════════════════ */
.role-super-admin  { background: #1a2a4a;             color: #fff; }
.role-admin        { background: var(--edu-primary);  color: #fff; }
.role-proviseur    { background: #0284c7;             color: #fff; }
.role-censeur      { background: #7c3aed;             color: #fff; }
.role-comptable    { background: var(--edu-success);  color: #fff; }
.role-enseignant   { background: var(--edu-warning);  color: #fff; }
.role-surveillant  { background: #64748b;             color: #fff; }
.role-parent       { background: #0891b2;             color: #fff; }
.role-eleve        { background: #e2e8f0;             color: var(--edu-text); }

/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
#kt_footer {
    background: var(--edu-surface);
    border-top: 1px solid var(--edu-border);
}

/* ══════════════════════════════════════════════════════════
   SCROLLTOP
══════════════════════════════════════════════════════════ */
.scrolltop {
    background: var(--edu-primary) !important;
}
.scrolltop:hover {
    background: var(--edu-primary-dark) !important;
}

/* ══════════════════════════════════════════════════════════
   ACCÈS RAPIDES (Quick access cards)
══════════════════════════════════════════════════════════ */
.quick-access-card {
    border: 1px solid var(--edu-border);
    border-radius: 12px;
    transition: all 0.15s;
    cursor: pointer;
}
.quick-access-card:hover {
    border-color: var(--edu-primary);
    background: var(--edu-primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 92, 193, 0.15);
}

.edt-pause-row td {
    background: repeating-linear-gradient(45deg, #f8f9fb, #f8f9fb 8px, #eef0f3 8px, #eef0f3 16px);
    cursor: default;
    text-align: center;
    padding: 8px;
}
.edt-pause-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #a1a5b7;
    text-transform: uppercase;
    letter-spacing: .5px;
}