       /* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* Page de login */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.login-header p {
    opacity: 0.9;
    font-size: 14px;
}

.login-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-outline {
    background: transparent;
    border: 1px solid #ddd;
    color: #555;
}

.btn-outline:hover {
    background: #f8f9fa;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-logout {
    background: #e74c3c;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    margin-left: 15px;
}

.btn-logout:hover {
    background: #c0392b;
}

.alert {
    padding: 12px;
    margin: 0 30px 20px;
    border-radius: 8px;
    font-size: 14px;
}

.alert-error {
    background: #fee;
    color: #c0392b;
    border-left: 4px solid #c0392b;
}

/* Application principale */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: #2c3e50;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.nav-brand h2 {
    font-size: 20px;
}

.nav-brand span {
    font-size: 14px;
    opacity: 0.8;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Layout principal */
.main-container {
    display: flex;
    flex: 1;
}

.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e0e0e0;
    padding: 20px;
}

.sidebar-section {
    margin-bottom: 30px;
}

.sidebar-section h3 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.filter-form .form-group {
    margin-bottom: 15px;
}

.filter-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.content {
    flex: 1;
    padding: 20px;
    overflow-x: auto;
}

/* Statistiques */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #3498db;
}

.stat-label {
    color: #666;
    margin-top: 5px;
}

/* Sections */
.totaux-section,
.activites-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.totaux-section h3,
.activites-section h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* Tableaux */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .navbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 11px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
}

/* Impression */
@media print {
    .navbar,
    .sidebar,
    .btn,
    .stats-grid {
        display: none;
    }
    
    .content {
        padding: 0;
        margin: 0;
    }
    
    .data-table {
        font-size: 10pt;
    }
}
       
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: #f0f2f5;
            color: #333;
        }
        .navbar {
            background: #2c3e50;
            color: white;
            padding: 15px 30px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
        }
        .nav-brand { display: flex; align-items: baseline; gap: 10px; }
        .nav-brand h2 { font-size: 20px; }
        .nav-brand span { font-size: 14px; opacity: 0.8; }
        .nav-user { display: flex; align-items: center; gap: 15px; }
        .btn-logout {
            background: #e74c3c;
            color: white;
            padding: 8px 16px;
            border-radius: 6px;
            text-decoration: none;
            font-size: 14px;
        }
        .btn-logout:hover { background: #c0392b; }
        .main-container { display: flex; flex: 1; min-height: calc(100vh - 70px); }
        .sidebar {
            width: 280px;
            background: white;
            border-right: 1px solid #e0e0e0;
            padding: 20px;
        }
        .sidebar-section { margin-bottom: 30px; }
        .sidebar-section h3 {
            font-size: 16px;
            color: #2c3e50;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #3498db;
        }
        .filter-form .form-group { margin-bottom: 15px; }
        .filter-form label { display: block; margin-bottom: 5px; font-weight: 500; }
        .filter-form select {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 6px;
        }
        .btn {
            display: inline-block;
            padding: 10px 20px;
            border: none;
            border-radius: 6px;
            font-size: 14px;
            cursor: pointer;
            text-decoration: none;
            text-align: center;
        }
        .btn-block { display: block; width: 100%; margin-bottom: 10px; }
        .btn-secondary { background: #95a5a6; color: white; }
        .btn-secondary:hover { background: #7f8c8d; }
        .btn-outline { background: transparent; border: 1px solid #ddd; color: #555; }
        .btn-outline:hover { background: #f8f9fa; }
        .btn-success { background: #27ae60; color: white; }
        .btn-success:hover { background: #229954; }
        .content { flex: 1; padding: 20px; overflow-x: auto; }
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        .stat-card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .stat-value { font-size: 36px; font-weight: bold; color: #3498db; }
        .stat-label { color: #666; margin-top: 5px; }
        .card {
            background: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 25px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }
        .card h3 {
            margin-bottom: 20px;
            color: #2c3e50;
            font-size: 18px;
            border-left: 4px solid #3498db;
            padding-left: 12px;
        }
        .table-responsive { overflow-x: auto; }
        .data-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }
        .data-table th, .data-table td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #e0e0e0;
        }
        .data-table th { background: #f8f9fa; font-weight: 600; color: #2c3e50; }
        .data-table tr:hover { background: #f8f9fa; }
        .badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
        }
        .badge-success { background: #d4edda; color: #155724; }
        .badge-warning { background: #fff3cd; color: #856404; }
        .btn-small { padding: 4px 8px; font-size: 11px; background: #3498db; color: white; text-decoration: none; border-radius: 4px; }
        @media (max-width: 768px) {
            .main-container { flex-direction: column; }
            .sidebar { width: 100%; border-right: none; border-bottom: 1px solid #e0e0e0; }
        }
        
           .main-menu {
        background: #2c3e50;
        color: white;
        padding: 0 20px;
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    .menu-container {
        max-width: 1400px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    .menu-logo {
        display: flex;
        align-items: baseline;
        gap: 10px;
    }
    .menu-logo h3 {
        font-size: 1.2em;
    }
    .menu-logo span {
        font-size: 0.8em;
        color: #bdc3c7;
    }
    .menu-links {
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
    }
    .menu-item {
        color: white;
        text-decoration: none;
        padding: 12px 16px;
        border-radius: 6px;
        transition: background 0.3s;
        font-size: 14px;
    }
    .menu-item:hover {
        background: #34495e;
    }
    .menu-item.active {
        background: #3498db;
    }
    .menu-user {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    .logout-btn {
        color: white;
        background: #e74c3c;
        padding: 6px 12px;
        border-radius: 5px;
        text-decoration: none;
        font-size: 13px;
    }
    .logout-btn:hover {
        background: #c0392b;
    }
    @media (max-width: 768px) {
        .menu-container {
            flex-direction: column;
            padding: 10px 0;
        }
        .menu-links {
            justify-content: center;
        }
    }