:root {
    --primary-color: #4e73df;
    --success-color: #1cc88a;
    --info-color: #36b9cc;
    --warning-color: #f6c23e;
    --danger-color: #e74a3b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fc;
}



/* Style pour le contenu principal */
main.col-md-9,
main.col-lg-10,
div[class*="col-md-9"],
div[class*="col-lg-10"] {
    margin-left: var(--sidebar-width, 250px);
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed + main,
.sidebar.collapsed ~ main,
.sidebar.collapsed ~ div main {
    margin-left: var(--sidebar-collapsed-width, 70px) !important;
    width: calc(100% - var(--sidebar-collapsed-width, 70px)) !important;
    max-width: none !important;
    flex: 0 0 auto !important;
}



.sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #4e73df 10%, #224abe 100%);
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.5rem;
    font-weight: 400;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.sidebar .nav-link i {
    margin-right: 0.5rem;
}

.card {
    border: none;
    border-radius: 0.35rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-2px);
}

.border-left-primary {
    border-left: 0.25rem solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 0.25rem solid var(--success-color) !important;
}

.border-left-info {
    border-left: 0.25rem solid var(--info-color) !important;
}

.border-left-warning {
    border-left: 0.25rem solid var(--warning-color) !important;
}

.btn {
    border-radius: 0.35rem;
    font-weight: 400;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.table th {
    font-weight: 600;
    color: white;
    
}

.table-scroll {
    max-height: 500px;
    overflow: auto;
}

.badge {
    padding: 0.5em 1em;
    font-weight: 500;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #d1d3e2;
    border-radius: 0.35rem;
    padding: 0.375rem 0.75rem;
}

@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    main.col-md-9,
    main.col-lg-10,
    div[class*="col-md-9"],
    div[class*="col-lg-10"] {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Animation de chargement */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Styles d'impression */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: none;
    }
}