/* Header */
.admin-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

/* Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    padding-top: 56px; /* Hauteur du header */
}

.sidebar {
    width: 280px;
    position: relative;
    overflow-y: auto;
    z-index: 100;
    transition: all 0.3s;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -280px;
        height: calc(100vh - 56px);
        top: 56px;
        background: #fff;
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .content {
        margin-left: 0 !important;
    }
}

.content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    padding-top: 20px;
    transition: margin-left 0.3s;
}

body.sidebar-collapsed .sidebar {
    left: -280px;
}

body.sidebar-collapsed .content {
    margin-left: 0;
}

/* Sidebar styles */
.sidebar .nav-link {
    padding: 12px 20px;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: #0d6efd !important;
    font-weight: bold;
    color: #4e73df !important;
}

/* Stats cards */
.stats-card {
    border-left: .25rem solid;
    border-radius: .35rem;
}

.stats-card-primary {
    border-left-color: #4e73df;
}

.stats-card-success {
    border-left-color: #1cc88a;
}

.stats-card-info {
    border-left-color: #36b9cc;
}

.stats-card-warning {
    border-left-color: #f6c23e;
}

/* Cards */
.stat-card {
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

/* Utilities */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        display: flex;
        flex-direction: row;
        padding-top: 56px;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 56px;
        bottom: 0;
        width: 280px;
        height: calc(100vh - 56px);
        transition: all 0.3s ease;
        z-index: 99;
    }

    .sidebar.show {
        left: 0;
    }

    .content {
        flex: 1;
        margin-left: 0;
        padding: 15px;
        transition: margin-left 0.3s ease;
    }

    .content.sidebar-open {
        margin-left: 280px;
    }
}

@media (max-width: 767.98px) {
    .sidebar {
        top: 5rem;
        height: calc(100vh - 5rem);
    }
}

/* Add toggle animation */
.sidebar-toggle {
    transition: left 0.3s ease;
}

