/* Sidebar Styles */
.sidebar {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #333;
    width: 100%; /* Assure que la sidebar prend toute la largeur disponible */
}

#sidebarMenu {
    background-color: #f8f9fa;
    padding: 0 !important;
    min-width: 240px; /* Largeur minimum pour éviter la compression */
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: #666 !important;
    margin-bottom: 0.5rem;
    padding: 0 15px;
}

.sidebar .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px !important;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    background-color: transparent;
    color: #333;
    transition: all 0.3s ease;
    width: 100%; /* Assure que l'élément prend toute la largeur */
}

.sidebar .list-group-item:last-child {
    margin-bottom: 0;
}

.sidebar .list-group-item.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    font-weight: 500;
}

.sidebar .list-group-item:hover:not(.active) {
    background-color: #f8f9fa;
    color: #0d6efd;
}

.sidebar .list-group-item i {
    width: 1.25rem;
    text-align: center;
    margin-right: 0.5rem;
    color: #666;
}

.sidebar .text-danger {
    color: #dc3545 !important;
}

.sidebar .text-danger:hover {
    background-color: #dc3545 !important;
    color: white !important;
}

/* Section spacing */
.sidebar-section {
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    width: 100%; /* Assure que la section prend toute la largeur */
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

/* Icons in sidebar */
.sidebar i {
    opacity: 1;
}

.sidebar .list-group-item:hover i {
    color: #0d6efd;
}

.sidebar .list-group-item.active i {
    color: #fff;
}

/* Active state enhancement */
.sidebar .list-group-item.active {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Hover effect enhancement */
.sidebar .list-group-item {
    position: relative;
    overflow: hidden;
}

.sidebar .list-group-item:hover {
    transform: translateX(3px);
}

/* Main Layout Improvements */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

@media (min-width: 992px) {
    .container-fluid {
        padding-left: 30px;
        padding-right: 30px;
    }
}

/* Fix sidebar on large screens */
@media (min-width: 768px) {
    #sidebarMenu {
        height: calc(100vh - 56px);
        position: fixed;
        top: 56px;
        bottom: 0;
        left: 0;
        z-index: 100;
        box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
        overflow-y: auto;
        width: 16.67%; /* Pour col-md-2 */
        transition: width 0.3s ease;
    }
    
    .col-md-3.col-lg-2 {
        flex: 0 0 16.67%;
        max-width: 16.67%;
    }
    
    main.col-md-9 {
        flex: 0 0 83.33%;
        max-width: 83.33%;
        margin-left: 16.67%; /* Correspond à la largeur du sidebar */
        padding-left: 30px !important;
    }
    
    .col-md-9.ms-sm-auto.col-lg-10 {
        flex: 0 0 83.33%;
        max-width: 83.33%;
        margin-left: 16.67%;
    }

    .col-lg-10.col-md-9.ms-auto {
        width: 83.33%; /* 10/12 cols for desktop */
        transition: width 0.3s ease;
    }
}

/* Style for position-sticky */
.position-sticky {
    position: sticky;
    top: 0;
    padding-top: 15px;
    padding-bottom: 15px;
    height: 100%;
}

/* Content paddings */
.content-wrapper {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Card improvements */
.card {
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: none;
}

.card-header:first-child {
    border-radius: 0.5rem 0.5rem 0 0;
}

.card-body {
    padding: 1.5rem;
}

/* Fix for main content area */
main.col-md-9.ms-sm-auto.col-lg-10.px-md-4 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
} 