/* ===================================
   MAIN.CSS - STYLES GLOBAUX DASHBOARD
   =================================== */

/* ========== VARIABLES CSS ========== */
:root {
    /* Couleurs principales */
    --primary-color: #475569;
    --primary-dark: #334155;
    --primary-light: #64748b;
    --accent-blue: #3b82f6;
    --accent-blue-dark: #2563eb;
    
    /* Couleurs de statut */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    /* Couleurs de fond */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* Couleurs de texte */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Bordures */
    --border-color: #e2e8f0;
    --border-radius: 12px;
    
    /* Layout */
    --sidebarTogglebar-width: 260px;
    --sidebarTogglebar-collapsed-width: 70px;
    --header-height: 70px;
    
    /* Espacement */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
     --text-muted: #94a3b8;
}

/* Thème sombre */
[data-theme="dark"] {
    --bg-primary: #1e293b;
    --bg-secondary: #334155;
    --bg-tertiary: #475569;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #475569;
}

/* Ajoute ceci */
[data-theme="dark"] .sidebarTogglebar,
[data-theme="dark"] .header,
[data-theme="dark"] .card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .dropdown-menu {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    box-shadow: 0 2px 12px rgba(20, 20, 30, 0.2);
}

[data-theme="dark"] .main-content,
[data-theme="dark"] .content {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .card-header,
[data-theme="dark"] .dropdown-header {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .stat-icon,
[data-theme="dark"] .info-icon {
    background: var(--bg-tertiary) !important;
    color: var(--accent-blue) !important;
}

[data-theme="dark"] .nav-item .nav-link {
    color: var(--text-secondary) !important;
}
[data-theme="dark"] .nav-item .nav-link.active,
[data-theme="dark"] .nav-item .nav-link:hover {
    background: var(--bg-tertiary) !important;
    color: var(--accent-blue) !important;
    border-left-color: var(--accent-blue) !important;
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-secondary) !important;
}
[data-theme="dark"] .dropdown-item:hover {
    background: var(--bg-tertiary) !important;
    color: var(--accent-blue) !important;
}

/* Optionnel pour améliorer les boutons */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-outline-primary.active {
    background: var(--accent-blue-dark) !important;
    color: #fff !important;
    border-color: var(--accent-blue-dark) !important;
}

[data-theme="dark"] .btn-outline-primary {
    color: var(--accent-blue) !important;
    border-color: var(--accent-blue) !important;
    background: transparent !important;
}
[data-theme="dark"] .btn-outline-primary:hover {
    background: var(--accent-blue-dark) !important;
    color: #fff !important;
}

[data-theme="dark"] .progress,
[data-theme="dark"] .progress-bar {
    background: var(--bg-tertiary) !important;
}


/* ========== RESET ET BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    overflow-x: hidden;
}

/* ========== LAYOUT PRINCIPAL DASHBOARD ========== */
body.dashboard-page {
    background: var(--bg-secondary);
}

.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* ========== sidebarToggleBAR ========== */
.sidebarTogglebar {
    width: 260px;
    height: 100vh;
    background: white;
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.sidebarTogglebar.collapsed {
    width: 70px;
}

.sidebarTogglebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.brand-logo i {
    margin-right: 0.5rem;
    color: var(--accent-blue);
    min-width: 20px;
}

.sidebarTogglebar.collapsed .brand-text {
    opacity: 0;
    transform: translateX(-20px);
}

.sidebarTogglebar-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-secondary);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
}

.sidebarTogglebar-toggle-btn:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.sidebarTogglebar.collapsed .sidebarTogglebar-toggle-btn i {
    transform: rotate(180deg);
}

.sidebarTogglebar-toggle-btn i {
    transition: transform 0.3s ease;
}

.sidebarTogglebar-nav {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.nav-item .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    white-space: nowrap;
}

.nav-item .nav-link:hover,
.nav-item .nav-link.active {
    background: var(--bg-secondary);
    color: var(--accent-blue);
    border-left-color: var(--accent-blue);
}

.nav-item .nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.nav-item .nav-link span {
    transition: all 0.3s ease;
}

.sidebarTogglebar.collapsed .nav-item .nav-link {
    padding: 0.75rem;
    justify-content: center;
}

.sidebarTogglebar.collapsed .nav-item .nav-link i {
    margin-right: 0;
}

.sidebarTogglebar.collapsed .nav-item .nav-link span {
    opacity: 0;
    transform: translateX(-20px);
    position: absolute;
    left: 60px;
    background: var(--primary-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    pointer-events: none;
    z-index: 1001;
    white-space: nowrap;
}

.sidebarTogglebar.collapsed .nav-item .nav-link:hover span {
    opacity: 1;
    transform: translateX(0);
}

.sidebarTogglebar.collapsed .nav-item .nav-link span:before {
    content: '';
    position: absolute;
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: var(--primary-dark);
}

/* ========== MAIN CONTENT ========== */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.sidebarTogglebar.collapsed + .main-content {
    margin-left: 70px;
}

/* ========== HEADER ========== */
.header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebarTogglebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-secondary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.sidebarTogglebar-toggle:hover {
    background: var(--bg-secondary);
}

.search-bar {
    position: relative;
    max-width: 400px;
    flex: 1;
    margin: 0 2rem;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-secondary);
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: var(--text-secondary);
    transition: background 0.2s;
    cursor: pointer;
}

.notification-btn:hover {
    background: var(--bg-secondary);
}

.notification-badge {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    border-radius: 0.5rem;
    min-width: 1.2rem;
    text-align: center;
    line-height: 1;
}

/* ========== USER DROPDOWN ========== */
.user-dropdown {
    position: relative;
    z-index: 1001;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    user-select: none;
}

.user-avatar:hover,
.user-dropdown.show .user-avatar {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
    border-color: var(--accent-blue);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1002;
    overflow: hidden;
    pointer-events: none;
}

.user-dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 15px;
    width: 16px;
    height: 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}

.dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 0.75rem 0.75rem 0 0;
}

.dropdown-user-info h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.dropdown-user-info small {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.dropdown-body {
    padding: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.dropdown-item i {
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
}

.dropdown-item.danger {
    color: var(--danger-color);
}

.dropdown-item.danger:hover {
    background: var(--danger-color);
    color: white;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* ========== CONTENT AREA ========== */
.content {
    padding: 2rem;
}

/* ========== STAT CARDS ========== */
.stat-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stat-card.success { border-left: 4px solid var(--success-color); }
.stat-card.warning { border-left: 4px solid var(--warning-color); }

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.positive { color: var(--success-color); }
.stat-change.negative { color: var(--danger-color); }

/* ========== CARDS ET COMPOSANTS ========== */
.card {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem;
}

.card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.card-title i {
    margin-right: 0.5rem;
    color: var(--accent-blue);
}

.card-body {
    padding: 1.25rem;
}

/* ========== ACTIVITÉS ========== */
.activity-timeline {
    position: relative;
}

.activity-item {
    display: flex;
    align-items: start;
    margin-bottom: 1.5rem;
    position: relative;
}

.activity-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 20px;
    top: 40px;
    width: 2px;
    height: calc(100% + 0.5rem);
    background: var(--border-color);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 1rem;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.activity-content {
    flex: 1;
    padding-top: 0.25rem;
}

/* ========== INFO ITEMS ========== */
.info-item {
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.info-item:hover {
    background: var(--bg-secondary);
}

.info-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
}

/* ========== PROGRESS BARS ========== */
.progress {
    background-color: var(--bg-secondary);
    border-radius: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
    border-radius: 0.5rem;
}

/* ========== BOUTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs) var(--spacing-md);
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    line-height: 1.4;
    gap: var(--spacing-xs);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.btn-primary:hover {
    background: var(--accent-blue-dark);
    border-color: var(--accent-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline-primary {
    background: transparent;
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.btn-outline-primary:hover {
    background: var(--accent-blue);
    color: white;
}

.btn-outline-primary.active {
    background: var(--accent-blue);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
    border-color: var(--warning-color);
}

.btn-sm {
    padding: 6px var(--spacing-sm);
    font-size: 0.8rem;
}

.btn-group {
    display: flex;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: 8px 0 0 8px;
}

.btn-group .btn:last-child {
    border-radius: 0 8px 8px 0;
}

/* ========== RESPONSIVE MOBILE ========== */
@media (max-width: 768px) {
    .sidebarTogglebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebarTogglebar.show {
        transform: translateX(0);
    }
    
    .sidebarTogglebar.collapsed {
        width: 260px;
    }
    
    .main-content,
    .sidebarTogglebar.collapsed + .main-content {
        margin-left: 0;
    }
    
    .sidebarTogglebar-toggle {
        display: block;
    }
    
    .sidebarTogglebar-toggle-btn {
        display: none;
    }
    
    .search-bar {
        display: none;
    }
    
    .content {
        padding: 1rem;
    }
}

.sidebarTogglebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(30,41,59,0.5);
    z-index: 999;
}

@media (max-width: 768px) {
    .sidebarTogglebar-backdrop.show {
        display: block;
    }
}

/* ========== UTILITAIRES ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-none { display: none; }
.d-block { display: block; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.flex-column { flex-direction: column; }
.flex-grow-1 { flex-grow: 1; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.me-2 { margin-right: 0.5rem; }
.me-3 { margin-right: 1rem; }

.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }

.text-muted { color: var(--text-muted); }
.text-primary { color: var(--accent-blue); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-danger { color: var(--danger-color); }
.text-info { color: var(--info-color); }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-medium { font-weight: 500; }

.rounded { border-radius: var(--border-radius); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }

.bg-success { background-color: var(--success-color); }
.bg-info { background-color: var(--info-color); }
.bg-warning { background-color: var(--warning-color); }
.bg-danger { background-color: var(--danger-color); }
.bg-primary { background-color: var(--accent-blue); }

.gap-2 { gap: 0.5rem; }

/* ========== ANIMATIONS ========== */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.card {
    animation: fadeInUp 0.6s ease;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* ========== LAYOUT PRINCIPAL DASHBOARD - VERSION CORRIGÉE ========== */

/* État normal de la sidebar */
body.dashboard-page .main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* État collapsed - utilise une classe sur le body au lieu du sélecteur adjacent */
body.sidebar-collapsed .main-content {
    margin-left: 70px;
}

/* Alternative: utiliser une classe directe sur main-content */
.main-content.sidebar-collapsed {
    margin-left: 70px;
}

/* ========== RESPONSIVE MOBILE ========== */
@media (max-width: 768px) {
    /* Sur mobile, le main-content prend toute la largeur */
    body.dashboard-page .main-content,
    body.sidebar-collapsed .main-content {
        margin-left: 0;
    }
    
    .main-content.sidebar-collapsed {
        margin-left: 0;
    }
}

/* ========== SOLUTION ALTERNATIVE AVEC DATA ATTRIBUTE ========== */
/* Si vous préférez utiliser un data attribute */
body[data-sidebar="collapsed"] .main-content {
    margin-left: 70px;
}

body[data-sidebar="expanded"] .main-content {
    margin-left: 260px;
}



/*navigation*/
nav .user-dropdown.show .dropdown-menu,
.header .user-dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    display: block;
    z-index: 1002;
}
nav .user-dropdown .dropdown-menu,
.header .user-dropdown .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    display: block;
}



    body.dashboard-page {
        background: var(--bg-secondary);
    }
    
    .sidebarTogglebar {
        width: 260px;
        height: 100vh;
        background: white;
        border-right: 1px solid var(--border-color);
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        overflow: hidden;
    }
    
    .sidebarTogglebar.collapsed {
        width: 70px;
    }
    
    .sidebarTogglebar-brand {
        padding: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        position: relative;
    }
    
    .brand-logo {
        display: flex;
        align-items: center;
        text-decoration: none;
        color: var(--primary-dark);
        font-weight: 600;
        font-size: 1.2rem;
        transition: all 0.3s ease;
    }
    
    .brand-logo i {
        margin-right: 0.5rem;
        color: var(--accent-blue);
        min-width: 20px;
    }
    
    .sidebarTogglebar.collapsed .brand-text {
        opacity: 0;
        transform: translateX(-20px);
    }
    
    .sidebarTogglebar-toggle-btn {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        background: var(--bg-secondary);
        border: none;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s;
        font-size: 0.8rem;
    }
    
    .sidebarTogglebar-toggle-btn:hover {
        background: var(--accent-blue);
        color: white;
        transform: translateY(-50%) scale(1.1);
    }
    
    .sidebarTogglebar-nav {
        list-style: none;
        padding: 1rem 0;
        margin: 0;
    }
    
    .nav-item .nav-link {
        display: flex;
        align-items: center;
        padding: 0.75rem 1.5rem;
        color: var(--text-secondary);
        text-decoration: none;
        transition: all 0.3s ease;
        border-left: 3px solid transparent;
        position: relative;
        white-space: nowrap;
    }
    
    .nav-item .nav-link:hover,
    .nav-item .nav-link.active {
        background: var(--bg-secondary);
        color: var(--accent-blue);
        border-left-color: var(--accent-blue);
    }
    
    .nav-item .nav-link i {
        margin-right: 0.75rem;
        width: 20px;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .nav-item .nav-link span {
        transition: all 0.3s ease;
    }
    
    .sidebarTogglebar.collapsed .nav-item .nav-link {
        padding: 0.75rem;
        justify-content: center;
    }
    
    .sidebarTogglebar.collapsed .nav-item .nav-link i {
        margin-right: 0;
    }
    
    .sidebarTogglebar.collapsed .nav-item .nav-link span {
        opacity: 0;
        transform: translateX(-20px);
        position: absolute;
        left: 60px;
        background: var(--primary-dark);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        font-size: 0.85rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        pointer-events: none;
        z-index: 1001;
        white-space: nowrap;
    }
    
    .sidebarTogglebar.collapsed .nav-item .nav-link:hover span {
        opacity: 1;
        transform: translateX(0);
    }
    
    .sidebarTogglebar.collapsed .nav-item .nav-link span:before {
        content: '';
        position: absolute;
        left: -5px;
        top: 50%;
        transform: translateY(-50%);
        border: 5px solid transparent;
        border-right-color: var(--primary-dark);
    }
    
    .main-content {
        margin-left: 260px;
        min-height: 100vh;
        transition: all 0.3s ease;
    }
    
   body.sidebar-collapsed .main-content {
        margin-left: 70px;
    }
    
    .header {
        background: white;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 2rem;
        position: sticky;
        top: 0;
        z-index: 999;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .sidebarTogglebar-toggle {
        display: none;
        background: none;
        border: none;
        font-size: 1.2rem;
        color: var(--text-secondary);
        padding: 0.5rem;
        border-radius: 0.5rem;
        transition: background 0.2s;
    }
    
    .sidebarTogglebar-toggle:hover {
        background: var(--bg-secondary);
    }
    
    .search-bar {
        position: relative;
        max-width: 400px;
        flex: 1;
        margin: 0 2rem;
    }
    
    .search-input {
        width: 100%;
        padding: 0.5rem 1rem 0.5rem 2.5rem;
        border: 1px solid var(--border-color);
        border-radius: 0.5rem;
        background: var(--bg-secondary);
        transition: all 0.2s;
    }
    
    .search-input:focus {
        outline: none;
        border-color: var(--accent-blue);
        box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
    }
    
    .search-icon {
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-secondary);
    }
    
    .user-menu {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .notification-btn {
        position: relative;
        background: none;
        border: none;
        padding: 0.5rem;
        border-radius: 0.5rem;
        color: var(--text-secondary);
        transition: background 0.2s;
        cursor: pointer;
    }
    
    .notification-btn:hover {
        background: var(--bg-secondary);
    }
    
    .notification-badge {
        position: absolute;
        top: 0.2rem;
        right: 0.2rem;
        background: var(--danger-color);
        color: white;
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        border-radius: 0.5rem;
        min-width: 1.2rem;
        text-align: center;
        line-height: 1;
    }
    
    .user-dropdown {
        position: relative;
        z-index: 1001;
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        background: var(--accent-blue);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        border: 2px solid transparent;
        user-select: none;
    }
    
    .user-avatar:hover,
    .user-dropdown.show .user-avatar {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(59,130,246,0.3);
        border-color: var(--accent-blue);
    }
    
    .dropdown-menu {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        background: white;
        border: 1px solid var(--border-color);
        border-radius: 0.75rem;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
        min-width: 220px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1002;
        overflow: hidden;
        pointer-events: none;
    }
    
    .user-dropdown.show .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
    
    /* Version de debug - dropdown toujours visible temporairement */
    .dropdown-menu.debug-visible {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
        background: yellow !important;
        border: 3px solid red !important;
    }
    
    .dropdown-menu::before {
        content: '';
        position: absolute;
        top: -8px;
        right: 15px;
        width: 16px;
        height: 16px;
        background: white;
        border: 1px solid var(--border-color);
        border-bottom: none;
        border-right: none;
        transform: rotate(45deg);
    }
    
    .dropdown-header {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-secondary);
        border-radius: 0.75rem 0.75rem 0 0;
    }
    
    .dropdown-user-info h6 {
        margin: 0;
        font-weight: 600;
        color: var(--text-primary);
        font-size: 0.9rem;
    }
    
    .dropdown-user-info small {
        color: var(--text-secondary);
        font-size: 0.8rem;
    }
    
    .dropdown-body {
        padding: 0.5rem 0;
    }
    
    .dropdown-item {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        color: var(--text-secondary);
        text-decoration: none;
        transition: all 0.2s;
        border: none;
        background: none;
        width: 100%;
        text-align: left;
        cursor: pointer;
    }
    
    .dropdown-item:hover {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }
    
    .dropdown-item i {
        margin-right: 0.75rem;
        width: 16px;
        text-align: center;
    }
    
    .dropdown-item.danger {
        color: var(--danger-color);
    }
    
    .dropdown-item.danger:hover {
        background: var(--danger-color);
        color: white;
    }
    
    .dropdown-divider {
        height: 1px;
        background: var(--border-color);
        margin: 0.5rem 0;
    }
    
    .content {
        padding: 2rem;
    }
    
    .stat-card {
        background: white;
        border-radius: 0.75rem;
        padding: 1.5rem;
        border: 1px solid var(--border-color);
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    }
    
    .stat-card.success { border-left: 4px solid var(--success-color); }
    .stat-card.warning { border-left: 4px solid var(--warning-color); }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        background: var(--bg-secondary);
        border-radius: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--accent-blue);
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-value {
        font-size: 2rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 0.25rem;
    }
    
    .stat-label {
        color: var(--text-secondary);
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .stat-change {
        font-size: 0.8rem;
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }
    
    .stat-change.positive { color: var(--success-color); }
    .stat-change.negative { color: var(--danger-color); }
    
    .card {
        border: 1px solid var(--border-color);
        border-radius: 0.75rem;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .card-header {
        background: white;
        border-bottom: 1px solid var(--border-color);
        padding: 1.25rem;
    }
    
    .card-title {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-primary);
        display: flex;
        align-items: center;
    }
    
    .card-title i {
        margin-right: 0.5rem;
        color: var(--accent-blue);
    }
    
    @media (max-width: 768px) {
        .sidebarTogglebar {
            transform: translateX(-100%);
            transition: transform 0.3s;
        }
        
        .sidebarTogglebar.show {
            transform: translateX(0);
        }
        
        .sidebarTogglebar.collapsed {
            width: 260px;
        }
        
        .main-content,
        .sidebarTogglebar.collapsed  .main-content {
            margin-left: 0;
        }
        
        .sidebarTogglebar-toggle {
            display: block;
        }
        
        .sidebarTogglebar-toggle-btn {
            display: none;
        }
        
        .search-bar {
            display: none;
        }
        
        .content {
            padding: 1rem;
        }
    }
    
    .sidebarTogglebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(30,41,59,0.5);
        z-index: 999;
    }
    
    @media (max-width: 768px) {
        .sidebarTogglebar-backdrop.show {
            display: block;
        }
    }

/*fin navigation
<!-- 
==============================================
CSS CORRIGÉ À AJOUTER/REMPLACER DANS VOTRE main.css
==============================================
-->
*/

/* ========== SYSTÈME D'ICÔNES AVEC DROPDOWN PAR FAMILLE ========== */

.search-bar {
    position: relative;
    max-width: none;
    flex: 1;
    margin: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Container du système d'icônes DESKTOP */
.icon-families-system {
    display: flex;
    gap: 20px;
    align-items: center;
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* MASQUER le menu mobile par défaut */
.mobile-menu-system {
    display: none;
}

/* Famille d'icônes avec dropdown */
.family-icon-dropdown {
    position: relative;
}

/* Icône de famille */
.family-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
}

.family-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.family-icon.active {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.family-icon i {
    font-size: 20px;
    transition: all 0.3s ease;
}

/* Styles par famille */
.family-icon.contact {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
}
.family-icon.contact:hover,
.family-icon.contact.active {
    background: linear-gradient(135deg, #059669, #047857);
}

.family-icon.devis {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-dark));
    color: white;
}
.family-icon.devis:hover,
.family-icon.devis.active {
    background: linear-gradient(135deg, var(--accent-blue-dark), #1d4ed8);
}

.family-icon.facturation {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
}
.family-icon.facturation:hover,
.family-icon.facturation.active {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* Badge de notification */
.family-notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: var(--danger-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    color: white;
    border: 2px solid white;
    z-index: 1;
}

/* Menu dropdown de famille */
.family-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 260px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1002;
    overflow: hidden;
    pointer-events: none;
}

.family-icon-dropdown.show .family-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.family-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-right: none;
    transform: translateX(-50%) rotate(45deg);
}

.dropdown-header {
    padding: 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.dropdown-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dropdown-title i {
    font-size: 16px;
}

.dropdown-header.contact .dropdown-title {
    color: var(--success-color);
}

.dropdown-header.devis .dropdown-title {
    color: var(--accent-blue);
}

.dropdown-header.facturation .dropdown-title {
    color: var(--warning-color);
}

.dropdown-body {
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.dropdown-item i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 14px;
}

.dropdown-item-content {
    flex: 1;
}

.dropdown-item-title {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 2px;
}

.dropdown-item-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.family-tooltip {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-dark);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.family-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid var(--primary-dark);
}

.family-icon:hover .family-tooltip {
    opacity: 1;
}

.family-icon-dropdown.show .family-tooltip {
    opacity: 0;
}

/* ========== STYLES MOBILE ========== */

/* Styles du menu mobile */
.mobile-actions-dropdown {
    position: relative;
}

.mobile-menu-trigger {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--accent-blue);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.mobile-menu-trigger:hover {
    background: var(--accent-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.mobile-menu-trigger.active {
    background: var(--accent-blue-dark);
    transform: translateY(-1px);
}

.mobile-menu-trigger i {
    font-size: 18px;
}

/* Menu mobile dropdown */
.mobile-actions-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    width: 300px;
    max-height: 80vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1002;
    pointer-events: none;
}

.mobile-actions-dropdown.show .mobile-actions-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mobile-actions-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 15px;
    width: 16px;
    height: 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}

.mobile-menu-section {
    padding: 12px 0;
}

.mobile-menu-section:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.mobile-section-title {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-secondary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-section-title i {
    font-size: 14px;
}

.mobile-section-title.contact {
    color: var(--success-color);
}

.mobile-section-title.devis {
    color: var(--accent-blue);
}

.mobile-section-title.facturation {
    color: var(--warning-color);
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.mobile-menu-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.mobile-menu-item i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
    font-size: 14px;
}

.mobile-item-content {
    flex: 1;
}

.mobile-item-title {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 2px;
}

.mobile-item-desc {
    font-size: 12px;
    color: var(--text-muted);
}

.mobile-section-badge {
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

/* ========== RESPONSIVE - CRUCIAL ! ========== */

/* Version tablette */
@media (max-width: 992px) {
    .icon-families-system {
        gap: 15px;
        padding: 6px 12px;
    }
    
    .family-icon {
        width: 45px;
        height: 45px;
    }
    
    .family-icon i {
        font-size: 18px;
    }
    
    .family-dropdown-menu {
        min-width: 240px;
    }
}

/* Version mobile - FORCER L'AFFICHAGE */
@media (max-width: 768px) {
    /* IMPORTANT: Force l'affichage de la search-bar sur mobile */
    .search-bar {
        display: flex !important;
        margin: 0 1rem !important;
        max-width: none !important;
    }
    
    /* Masquer le système desktop */
    .icon-families-system {
        display: none !important;
    }
    
    /* FORCER l'affichage du menu mobile */
    .mobile-menu-system {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
}

/* Thème sombre */
[data-theme="dark"] .icon-families-system,
[data-theme="dark"] .family-dropdown-menu,
[data-theme="dark"] .mobile-actions-menu {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .family-dropdown-menu::before,
[data-theme="dark"] .mobile-actions-menu::before {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-header,
[data-theme="dark"] .mobile-section-title {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .mobile-menu-trigger {
    background: var(--accent-blue-dark);
}

 /* ========== SYSTÈME DE TABS ÉPURÉ ========== */

/* Container principal des tabs */
.tabs-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

/* Navigation des tabs */
.tabs-nav {
    display: flex;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    margin: 0;
}

.tab-button {
    flex: 1;
    background: none;
    border: none;
    padding: 1rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.tab-button.active {
    background: var(--bg-primary);
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
    font-weight: 600;
}

.tab-button i {
    font-size: 1rem;
    transition: transform var(--transition-fast);
}

.tab-button:hover i,
.tab-button.active i {
    transform: scale(1.1);
}

/* Badge sur les tabs */
.tab-badge {
    background: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    margin-left: 0.5rem;
    min-width: 1.2rem;
    text-align: center;
    line-height: 1;
}

.tab-button.active .tab-badge {
    background: var(--accent-blue);
}

/* Contenu des tabs */
.tabs-content {
    position: relative;
    min-height: 300px;
}

.tab-panel {
    display: none;
    padding: 2rem;
    animation: fadeInUp 0.4s ease;
}

.tab-panel.active {
    display: block;
}

/* En-tête de section dans les tabs */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bg-secondary);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-title i {
    color: var(--accent-blue);
    font-size: 1.1rem;
}

.section-actions {
    display: flex;
    gap: 1rem;
}

/* Stats en grille */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Liste épurée */
.clean-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
}

.list-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: var(--bg-primary);
}

.item-icon {
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.item-icon.success { background: var(--success-color); }
.item-icon.warning { background: var(--warning-color); }
.item-icon.info { background: var(--info-color); }
.item-icon.danger { background: var(--danger-color); }
.item-icon.primary { background: var(--accent-blue); }

.item-content {
    flex: 1;
}

.item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.item-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.item-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

/* Zone d'actions principales */
.main-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Message d'état */
.status-message {
    background: var(--bg-tertiary);
    border-left: 4px solid var(--accent-blue);
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

.status-message.success {
    border-left-color: var(--success-color);
    background: #f0fdf4;
    color: #166534;
}

.status-message.warning {
    border-left-color: var(--warning-color);
    background: #fffbeb;
    color: #92400e;
}

/* Boutons additionnels pour les tabs */
.btn-success {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.btn-success:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.btn-outline:hover {
    background: var(--accent-blue);
    color: white;
}

/* Thème sombre pour les tabs */
[data-theme="dark"] .tabs-container,
[data-theme="dark"] .tabs-nav,
[data-theme="dark"] .tab-panel {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .section-header {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .clean-list,
[data-theme="dark"] .stat-card {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .status-message {
    background: var(--bg-secondary);
}

[data-theme="dark"] .status-message.success {
    background: var(--bg-tertiary);
    color: var(--success-color);
}

[data-theme="dark"] .status-message.warning {
    background: var(--bg-tertiary);
    color: var(--warning-color);
}

/* Responsive pour les tabs */
@media (max-width: 768px) {
    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .tab-panel {
        padding: 1.5rem;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .section-actions .btn {
        flex: 1;
    }
    
    .main-actions {
        flex-direction: column;
    }
    
    .main-actions .btn {
        width: 100%;
    }
}
/* STYLES POUR BLOQUER TOUS LES ÉVÉNEMENTS PARASITES */
.no-hover-events, .no-hover-events * {
    pointer-events: none !important;
}

.modal-safe-zone {
    pointer-events: auto !important;
}

.activity-timeline {
    pointer-events: none !important;
}

.activity-timeline .activity-item {
    pointer-events: none !important;
}

/* Rendre seulement le bouton cliquable */
.btn-modal-exchanges {
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

/* CORRECTION : Permettre les clics sur les boutons de suppression dans la modale */
.modal .activity-timeline {
    pointer-events: auto !important;
}

.modal .activity-timeline .activity-item {
    pointer-events: auto !important;
}

.modal .activity-timeline .btn-supprimer {
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 10;
    position: relative;
}

/* S'assurer que les liens de suppression sont cliquables */
.btn-supprimer {
    pointer-events: auto !important;
    cursor: pointer !important;
    transition: color 0.2s ease;
}

.btn-supprimer:hover {
    color: #dc3545 !important;
    opacity: 0.8;
}
    /* Style for overdue dates */
    input[data-date-passed='true'] {
        border-color: #dc3545;
        background-color: #f8d7da;
    }
