@charset "utf-8";

/* ============================================================
   header-footer.css — BRIDEP Core · Global Link
    · Marc Merlin BAPPA
   Version : 1.0 · Avril 2026
   CSS global partagé par toutes les pages de l'application
   ============================================================ */
@import url('notification.css');
/* ============================================================
   IMPORTS — Fonts & Icônes
   ============================================================ */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Nunito+Sans:wght@300;400;600;700&display=swap');

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

:root {
    /* ===== Charte officielle BRIDEP Core ===== */
    --primary:      #026325;   /* Vert principal (BRIDEP) */
    --primary-mid:  #14A751;   /* Vert clair (Core.) */
    --primary-end:  #01491b;   /* Vert plus fonce (degrade) */
    --primary-light:#EAF3E7;   /* Vert tres clair (fonds) */
    --accent:       #fc9401;   /* Jaune signature (point sur le I) */
    --accent-dark:  #C66A00;   /* Jaune fonce (bordure du point) */
    --accent-light: #FFF1DD;   /* Jaune tres clair */
    --white:        #FFFFFF;
    --bg:           #F4F6FB;   /* Gris neutre legerement bleute (PAEEJ) */
    --card:         #FFFFFF;
    --text:         #1A202C;
    --text-muted:   #595959;
    --text-hint:    #94A3B8;
    --border:       #E2E8F0;
    --success:      #10B981;
    --danger:       #C00000;
    --warning:      #C55A11;
    --purple:       #8B5CF6;
    --sidebar-w:    268px;
    --sidebar-collapsed: 76px;
    --topbar-h:     72px;
    --font:         'Nunito Sans', 'Nunito', sans-serif;
    --font-display: 'Nunito', sans-serif;
    --radius:       14px;
    --radius-sm:    10px;
}

html, body { height: 100%; font-family: var(--font); background: var(--bg); color: var(--text); overflow-x: hidden; }

/* ============================
   SIDEBAR
============================ */
.sidebar {
    position: fixed;
    left: 0; top: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: linear-gradient(135deg, #026325 0%, #14A751 70%, #01491b 100%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}

.sidebar.collapsed { width: var(--sidebar-collapsed); }

/* Scrollbar */
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

/* Toggle btn */
.sidebar-toggle {
    position: absolute;
    right: -12px; top: 50%;
    transform: translateY(-50%);
    width: 24px; height: 24px;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 10px;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
    z-index: 101;
}
.sidebar-toggle:hover { background: var(--primary); color: white; transform: translateY(-50%) scale(1.1); }

/* Sidebar header */
.sidebar-header {
    padding: 20px 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.sidebar-logo-img {
    width: 100%;
    height: 64px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px 18px;
    transition: all 0.3s;
}

.sidebar.collapsed .sidebar-logo-img {
    width: 44px;
    height: 44px;
    padding: 8px;
    border-radius: 12px;
}

.sidebar-logo-img img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: all 0.3s;
}

.sidebar-logo-img .fallback {
    font-family: var(--font-display);
    font-size: 20px; font-weight: 900;
    color: #026325;
    letter-spacing: 3px;
}

/* ── Marque de la sidebar : logo + barre verticale + texte (structure du login) ── */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.sidebar-brand-logo {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; padding: 7px; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    transition: all 0.3s;
}
.sidebar-brand-logo img {
    max-width: 100%; max-height: 100%;
    width: auto; height: auto;
    object-fit: contain; display: block;
}
.sidebar-brand-logo .fallback {
    width: 100%; height: 100%;
    align-items: center; justify-content: center;
    font-family: var(--font-display), 'Nunito', sans-serif;
    font-size: 22px; font-weight: 900; color: #026325; letter-spacing: 1px;
}
.sidebar-brand-rule {
    width: 2px; align-self: stretch; min-height: 38px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.38), rgba(255,255,255,0));
    border-radius: 2px; flex-shrink: 0;
}
.sidebar-brand-titles {
    display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.sidebar-brand-title {
    font-family: var(--font-display), 'Nunito', sans-serif;
    font-size: 18px; font-weight: 800; color: #ffffff;
    line-height: 1.05; letter-spacing: -0.3px;
}
.sidebar-brand-subtitle {
    font-family: 'Nunito Sans', 'Nunito', sans-serif;
    font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.65);
    line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Mode reduit : on ne garde que le logo, centre */
.sidebar.collapsed .sidebar-brand { justify-content: center; gap: 0; }
.sidebar.collapsed .sidebar-brand-rule,
.sidebar.collapsed .sidebar-brand-titles { display: none; }
.sidebar.collapsed .sidebar-brand-logo { width: 44px; height: 44px; padding: 8px; }


/* User profile in sidebar */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.06);
    border-left: 3px solid #fc9401;
    border-radius: 0 10px 10px 0;
    overflow: hidden;
}

.sidebar-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(232,160,32,0.2);
    border: 2px solid rgba(232,160,32,0.5);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 13px; font-weight: 700;
    color: #fc9401;
    flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; white-space: nowrap; transition: all 0.3s; }
.sidebar-user-name { font-size: 13px; font-weight: 700; color: white; }
.sidebar-user-role { font-size: 10.5px; color: rgba(232,160,32,0.75); margin-top: 1px; }
.sidebar.collapsed .sidebar-user-info { opacity: 0; width: 0; }
.sidebar.collapsed .sidebar-user { border-radius: 50%; border-left: none; padding: 0; width: 36px; height: 36px; justify-content: center; background: rgba(232,160,32,0.2); border: 2px solid rgba(232,160,32,0.5); margin: 0 auto; }

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0 16px;
}

.nav-section-label {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: rgba(255,255,255,0.7);
    padding: 10px 20px 4px;
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar.collapsed .nav-section-label { opacity: 0; height: 0; padding: 0; }

.nav-section-label .toggle-chevron {
    font-size: 9px;
    color: rgba(255,255,255,0.55);
    transition: transform 0.25s;
}

.nav-section.open .nav-section-label .toggle-chevron { transform: rotate(180deg); }

/* Reperes d'etape dans une section (Diagnostic : Preparer / Suivre / Analyser) */
.nav-step {
    font-size: 8.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #FDE68A;
    opacity: 0.9;
    padding: 8px 20px 3px 52px;
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.3s;
}
.nav-step:first-child { padding-top: 2px; }
.sidebar.collapsed .nav-step { opacity: 0; height: 0; padding: 0; }
/* Periode courante en pied de menu : icone seule quand le menu est replie */
.sidebar.collapsed .sidebar-periode { text-align: center; padding: 10px 0 !important; }
.sidebar.collapsed .sidebar-periode i { margin-right: 0 !important; }
.sidebar.collapsed .sidebar-periode-texte { display: none; }

/* Choix de la collecte (plusieurs collectes en parallele) : tableau de bord, suivi */
.per-switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.per-switch-item {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border-radius: 999px;
    background: #fff; border: 1px solid #E2E8F0; color: #334155;
    font-size: 13px; font-weight: 700; text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
}
.per-switch-item small { font-weight: 600; color: #64748B; font-size: 11.5px; }
.per-switch-item:hover { border-color: #14A751; }
.per-switch-item.on { background: #026325; border-color: #026325; color: #fff; box-shadow: 0 4px 12px rgba(2,99,37,.18); }
.per-switch-item.on small { color: #D1FAE5; }
.per-switch-dot { width: 8px; height: 8px; border-radius: 50%; background: #94A3B8; flex: 0 0 8px; }
.per-switch-dot.per-active { background: #22C55E; }
.per-switch-dot.per-suspendue { background: #F59E0B; }
.per-switch-dot.per-planifiee { background: #3B82F6; }
.per-switch-item.on .per-switch-dot { box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
@media (max-width: 600px) {
    .per-switch { flex-direction: column; gap: 6px; }
    .per-switch-item { border-radius: 12px; font-size: 12.5px; line-height: 1.3; }
}

.nav-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-section.open .nav-section-content { max-height: 1500px; }
.sidebar.collapsed .nav-section-content { max-height: 1500px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.68);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}

.nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

.nav-item-icon {
    width: 20px;
    text-align: center;
    font-size: 15px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.nav-item-text { transition: all 0.3s; }
.sidebar.collapsed .nav-item-text { opacity: 0; width: 0; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px; }

.nav-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.sidebar.collapsed .nav-badge { display: none; }

/* ═══ BADGES ACTION (réclament une attention / action admin) ═══
   Couleurs vives + pulse pour les alertes urgentes
   Scoped à la sidebar
   ═════════════════════════════════════════════════════════════ */
.sidebar .nav-badge.badge-red    { background: rgba(239,68,68,0.28);  color: #FCA5A5; font-weight: 800; }
.sidebar .nav-badge.badge-orange { background: rgba(245,158,11,0.28); color: #FCD34D; font-weight: 800; }

/* Pulse subtil pour les badges d'alerte (couleur vive + ring animé) */
.nav-item .nav-badge.badge-red,
.nav-item .nav-badge.badge-orange {
    box-shadow: 0 0 0 0 rgba(239,68,68,0.4);
    animation: bridep-badge-pulse 2.2s ease-out infinite;
}
.nav-item .nav-badge.badge-orange { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
@keyframes bridep-badge-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.45); }
    70%  { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* ═══ BADGES COMPTEUR (info contextuelle, pas d'urgence) ═══
   Couleurs discrètes, sans animation
   Scoped à la sidebar pour éviter conflit avec badge-gray clair global
   ═════════════════════════════════════════════════════════ */
.sidebar .nav-badge.badge-blue  { background: rgba(96,165,250,0.14);  color: #B4CDEF; font-weight: 600; }
.sidebar .nav-badge.badge-gold  { background: rgba(232,160,32,0.14);  color: #E8CC8A; font-weight: 600; }
.sidebar .nav-badge.badge-green { background: rgba(16,185,129,0.14);  color: #9AD6BA; font-weight: 600; }
.sidebar .nav-badge.badge-gray  { background: rgba(148,163,184,0.14); color: #A3AFC0; font-weight: 600; }

.nav-separator {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 8px 16px;
}

/* Sidebar bottom */
.sidebar-bottom {
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}

.sidebar-bottom-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-bottom-item:hover { background: rgba(255,255,255,0.08); color: white; }
.sidebar-bottom-item.logout:hover { background: rgba(239,68,68,0.15); color: #FCA5A5; }
.sidebar.collapsed .sidebar-bottom-item { justify-content: center; }
.sidebar.collapsed .sidebar-bottom-text { opacity: 0; width: 0; }

/* ============================
   MAIN CONTENT
============================ */
.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    transition: margin-left 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed ~ .main { margin-left: var(--sidebar-collapsed); }

/* ============================
   TOPBAR
============================ */
.topbar {
    background: white;
    /* BRIDEP Diag : topbar collée au haut (alignée avec sidebar) au lieu de card flottante */
    border-radius: 0;
    margin: 0;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(13,37,80,0.06);
    border-bottom: 1px solid #E2E8F0;
    position: relative;
    top: 0;
    z-index: 50;
    gap: 16px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.topbar-page-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-mid));
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(13,37,80,0.25);
}

.topbar-page-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.topbar-breadcrumb {
    font-size: 12px;
    color: var(--text-hint);
    margin-top: 3px;
}

.topbar-breadcrumb a { color: var(--primary-mid); text-decoration: none; }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.topbar-btn {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 15px;
    transition: all 0.2s;
    position: relative;
}

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

.topbar-badge {
    position: absolute;
    top: -4px; right: -4px;
    width: 18px; height: 18px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px 7px 8px;
    background: #EAF3E7;
    border: 1px solid #A0D0A0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.topbar-user:hover { background: #DBEAFE; }

/* Dropdown utilisateur */
.topbar-user-wrap { position: relative; }
.topbar-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0; width: 220px;
    background: white; border-radius: 14px; border: 1px solid #E2E8F0;
    box-shadow: 0 12px 40px rgba(13,37,80,.15); padding: 6px;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: all .2s ease; z-index: 500;
}
.topbar-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.topbar-dd-item {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px;
    border-radius: 9px; font-size: 13px; font-weight: 600; color: #334155;
    text-decoration: none; cursor: pointer; transition: all .15s;
}
.topbar-dd-item i { font-size: 13px; color: #94A3B8; width: 18px; text-align: center; }
.topbar-dd-item:hover { background: #EAF3E7; color: #026325; }
.topbar-dd-item:hover i { color: #026325; }
.topbar-dd-sep { height: 1px; background: #E2E8F0; margin: 4px 8px; }
.topbar-dd-logout { color: #EF4444; }
.topbar-dd-logout i { color: #EF4444; }
.topbar-dd-logout:hover { background: #FEF2F2; color: #DC2626; }
.topbar-dd-logout:hover i { color: #DC2626; }
.topbar-chevron.open { transform: rotate(180deg); }

.topbar-user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-mid));
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 12px; font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.topbar-user-name { font-size: 13px; font-weight: 700; color: var(--primary); }
.topbar-user-role { font-size: 10.5px; color: var(--text-hint); }

/* ============================
   PAGE CONTENT
============================ */
.content {
    padding: 24px;
    flex: 1;
}

.content-inner {
    padding: 22px 0px 32px;
    max-width: 1600px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .content { padding: 16px; }
    .content-inner { padding: 14px 0; }
}

/* Page (shown/hidden) */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ============================
   ALERT BANNER
============================ */
.alert-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border-left: 4px solid;
    animation: slideIn 0.4s ease;
}

@keyframes slideIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }

.alert-banner.warning {
    background: #FFFBEB;
    border-left-color: var(--warning);
}

.alert-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.alert-banner.warning .alert-icon { background: var(--warning); color: white; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

.alert-text { flex: 1; }
.alert-text strong { font-size: 13.5px; font-weight: 700; color: #92400E; display: block; margin-bottom: 2px; }
.alert-text span { font-size: 12.5px; color: #B45309; }

.alert-action {
    padding: 7px 16px;
    border-radius: 8px;
    background: var(--warning);
    color: white;
    font-size: 12.5px;
    font-weight: 700;
    font-family: var(--font-display);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.alert-action:hover { background: #D97706; transform: translateY(-1px); }


/* ============================================================
   LOADERS — #loader, #loader2, #loader3
   ============================================================ */

#loader {
    display: none;
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(10, 28, 70, 0.62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#loader2 {
    display: none;
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(10, 28, 70, 0.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    z-index: 1005;
}

#loader3 {
    display: none;
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(10, 28, 70, 0.80);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    z-index: 1010;
}

#loader.show,
#loader2.show,
#loader3.show {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

#loader[style*="display: block"],
#loader[style*="display:block"],
#loader2[style*="display: block"],
#loader2[style*="display:block"],
#loader3[style*="display: block"],
#loader3[style*="display:block"] {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

#div_preloader {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   MESSAGES D'ERREUR — .message-erreur
   ============================================================ */
.message-erreur {
    display: none;
    position: relative;
    font-size: 12px;
    background: none;
    margin: 5px 0 0;
    padding: 0 0 0 15px;
    text-align: left;
    color: #BE1E2D;
    width: 100%;
}

.message-erreur::before {
    display: block;
    content: "";
    width: 0;
    height: 0;
    position: absolute;
    top: -5px;
    left: 20px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 7px solid #BE1E2D;
}

/* ============================================================
   BADGES & PILLS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-primary   { background: #EAF3E7;  color: #026325; }
.badge-success   { background: #D1FAE5;  color: #065F46; }
.badge-warning   { background: #FEF3C7;  color: #92400E; }
.badge-danger    { background: #FEF2F2;  color: #991B1B; }
.badge-info      { background: #EFF6FF;  color: #1E40AF; }
.badge-accent    { background: #FFF1DD;  color: #C66A00; }
.badge-gray      { background: #F1F5F9;  color: #475569; }

/* ============================================================
   ANIMATIONS — communes à toutes les pages
   ============================================================ */
@keyframes fadeIn  { from { opacity: 0; transform: translateY(8px);  } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse   { 0%,100% { transform: scale(1); } 50% { transform: scale(1.08); } }

/* ============================================================
   PAGE FOOTER — commun à toutes les pages
   ============================================================ */
.page-footer {
    text-align: center;
    margin-top: 40px;
    padding: 24px 30px;
    color: #64748b;
    font-size: 13px;
    background: rgba(255,255,255,0.8);
    border-radius: 15px;
    line-height: 1.8;
}
.page-footer strong { color: #026325; }

/* ============================================================
   RESPONSIVE — sidebar mobile
   ============================================================ */
@media (max-width: 768px) {
    .sidebar  { width: var(--sidebar-collapsed); }
    .main     { margin-left: var(--sidebar-collapsed); }
    .content  { padding: 16px; }
    .topbar   { margin: 12px 16px 0; padding: 12px 16px; border-radius: 14px; }
}
