/* ===================================
   Ultra Modern Sidebar Design
   Professional Light Theme
   =================================== */

/* Sidebar Base Styles - Compact & Modern */
.main-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #17a2b8 #f1f3f5;
    background: linear-gradient(to bottom, #f8f9fc 0%, #ffffff 100%) !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05) !important;
    border-right: 1px solid #e9ecef;
}

.main-sidebar::-webkit-scrollbar {
    width: 5px;
}

.main-sidebar::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.main-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #17a2b8 0%, #138496 100%);
    border-radius: 10px;
}

.main-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #138496 0%, #0f6674 100%);
}

/* Brand Container - White Background */
.brand-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.brand-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #17a2b8, transparent);
    transition: width 0.3s ease;
}

.brand-container:hover::after {
    width: 80%;
}

.brand-container img {
    transition: transform 0.3s ease, filter 0.3s ease;
    position: relative;
    z-index: 2;
}

.brand-container:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(23, 162, 184, 0.2));
}

/* Compact User Panel - Discreet Design */
.user-compact-panel {
    position: relative;
}

.user-compact-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.user-compact-btn:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
}

.user-compact-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(23, 162, 184, 0.1);
}

.user-compact-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
    flex-shrink: 0;
}

.user-compact-info {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.user-compact-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #2d3748;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-compact-menu-icon {
    color: #a0aec0;
    font-size: 0.875rem;
    transition: color 0.25s ease;
}

.user-compact-btn:hover .user-compact-menu-icon {
    color: #17a2b8;
}

/* Dropdown Menu Styles */
.dropdown-menu-compact {
    min-width: 100%;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 6px;
    margin-top: 4px;
}

.dropdown-menu-compact .dropdown-item {
    padding: 8px 12px;
    font-size: 0.8125rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #4a5568;
}

.dropdown-menu-compact .dropdown-item:hover {
    background: #f8f9fa;
    color: #17a2b8;
    padding-left: 16px;
}

.dropdown-menu-compact .dropdown-item.text-danger:hover {
    background: #fff5f5;
    color: #dc3545;
}

.dropdown-menu-compact .dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 0.875rem;
}

.dropdown-menu-compact .dropdown-divider {
    margin: 6px 0;
    border-top: 1px solid #e9ecef;
}

.modern-dropdown {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    border: 1px solid #e9ecef !important;
    margin-top: 8px !important;
    animation: slideDown 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 8px 16px !important;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 3px 6px;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, #d1ecf1 0%, #f8f9fa 100%) !important;
    padding-left: 24px !important;
    color: #17a2b8 !important;
}

/* Navigation - Ultra Modern Compact Design */
.nav-modern {
    padding: 0 8px;
}

.nav-modern .nav-item {
    margin-bottom: 2px;
}

.nav-modern .nav-link,
.navlink-wid {
    border-radius: 8px;
    padding: 8px 12px;
    color: #4a5568;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-modern .nav-link::before,
.navlink-wid::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 0;
    width: 3px;
    background: linear-gradient(180deg, #17a2b8 0%, #138496 100%);
    border-radius: 0 4px 4px 0;
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-modern .nav-link:hover,
.navlink-wid:hover {
    background: linear-gradient(135deg, #d1ecf1 0%, #e7f6f8 100%);
    color: #17a2b8;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.12);
}

.nav-modern .nav-link:hover::before,
.navlink-wid:hover::before {
    height: 70%;
}

.nav-modern .nav-link.active,
.navlink-wid.active {
    background: linear-gradient(135deg, #d1ecf1 0%, #e7f6f8 100%);
    color: #17a2b8 !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.15);
    transform: translateX(3px);
}

.nav-modern .nav-link.active::before,
.navlink-wid.active::before {
    height: 100%;
    background: rgba(255,255,255,0.3);
}

/* Nav Icons - Enhanced Modern Style */
.nav-modern .nav-icon,
.navlink-wid > i:first-child,
.navlink-wid > i.fa-solid:not(.right) {
    font-size: 1rem;
    margin-right: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fc 0%, #e9ecef 100%);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #17a2b8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.nav-modern .nav-link:hover .nav-icon,
.navlink-wid:hover > i:first-child,
.navlink-wid:hover > i.fa-solid:not(.right) {
    transform: translateY(-2px) scale(1.08);
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.nav-modern .nav-link.active .nav-icon,
.navlink-wid.active > i:first-child,
.navlink-wid.active > i.fa-solid:not(.right) {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

/* Treeview - Sleek Submenu Design */
.nav-treeview {
    padding-left: 0;
    margin-top: 3px;
    margin-bottom: 3px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
}

.nav-treeview .nav-item,
.nav-treeview .sidebar-pad {
    margin-bottom: 1px;
}

.nav-treeview .nav-link,
.nav-treeview .navlink-wid {
    padding: 7px 12px 7px 12px;
    font-size: 0.8125rem;
    border-radius: 6px;
    margin: 0 6px;
    color: #6c757d;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-treeview .nav-icon,
.nav-treeview .nav-link > i:first-child,
.nav-treeview .nav-link > [class*="ri-"] {
    font-size: 0.875rem;
    width: 24px;
    height: 24px;
    min-width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fc 0%, #e9ecef 100%);
    border-radius: 6px;
    color: #17a2b8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-treeview .nav-link:hover,
.nav-treeview .navlink-wid:hover {
    background: linear-gradient(90deg, #d1ecf1 0%, #e7f6f8 100%);
    padding-left: 16px;
    color: #17a2b8;
    transform: translateX(2px);
}

.nav-treeview .nav-link:hover .nav-icon,
.nav-treeview .navlink-wid:hover .nav-icon,
.nav-treeview .nav-link:hover > i:first-child,
.nav-treeview .nav-link:hover > [class*="ri-"] {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.25);
    transform: scale(1.05);
}

.nav-treeview .nav-link.active,
.nav-treeview .navlink-wid.active {
    background: linear-gradient(90deg, rgba(23, 162, 184, 0.12) 0%, rgba(19, 132, 150, 0.08) 100%);
    color: #17a2b8;
    font-weight: 600;
    transform: translateX(2px);
}

.nav-treeview .nav-link.active .nav-icon,
.nav-treeview .navlink-wid.active .nav-icon,
.nav-treeview .nav-link.active > i:first-child,
.nav-treeview .nav-link.active > [class*="ri-"] {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

/* Arrow Icons - Smooth Rotation */
.nav-modern .right {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: auto;
}

.nav-modern .nav-link:hover .right {
    opacity: 1;
}

.nav-modern .menu-is-opening > .nav-link .right,
.nav-modern .menu-open > .nav-link .right {
    transform: rotate(-90deg);
    opacity: 1;
}

/* Section Dividers - Modern Gradient */
.sidebar hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #dee2e6 50%, transparent 100%);
    margin: 1rem 1.5rem;
    opacity: 0.6;
}

/* Badge/Notification - Modern Pill Style */
/* Désactivé pour ne pas écraser les badges personnalisés
.badge {
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #b8e9f0 0%, #b7edf6 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}
*/

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .main-sidebar {
        width: 240px;
    }
    
    .nav-modern .nav-link {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .nav-treeview .nav-link {
        padding: 8px 12px 8px 40px;
    }
}

/* Animation for menu items */
.nav-modern .nav-item {
    animation: fadeInLeft 0.4s ease;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Parent Menu with Open Submenu */
.nav-modern .nav-item.menu-open > .nav-link,
.nav-modern .nav-item.menu-is-opening > .nav-link,
.nav-item.menu-open > .navlink-wid,
.nav-item.menu-is-opening > .navlink-wid {
    background: linear-gradient(135deg, #d1ecf1 0%, #e7f6f8 100%);
    color: #17a2b8 !important;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.12);
}

.nav-modern .nav-item.menu-open > .nav-link p,
.nav-modern .nav-item.menu-is-opening > .nav-link p,
.nav-item.menu-open > .navlink-wid p,
.nav-item.menu-is-opening > .navlink-wid p {
    color: #17a2b8 !important;
    font-weight: 600;
}

.nav-modern .nav-item.menu-open > .nav-link .nav-icon,
.nav-item.menu-open > .navlink-wid .nav-icon,
.nav-item.menu-open > .navlink-wid i:not(.right) {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.25);
}

/* Custom scrollbar for treeview */
.nav-treeview {
    max-height: none;
    overflow: visible;
}

/* Improved focus states */
.nav-modern .nav-link:focus {
    outline: 2px solid rgba(0, 123, 255, 0.5);
    outline-offset: 2px;
}

/* Special styling for section headers */
.nav-header {
    padding: 12px 16px 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    font-weight: 600;
    margin-top: 8px;
}

/* Icon styling for remixicon */
.ri-team-fill,
.ri-list-check,
.ri-folder-chart-line {
    font-size: 1.1rem;
    margin-right: 12px;
    width: 24px;
    text-align: center;
    display: inline-block;
}



/* Smooth transitions for all interactive elements */
* {
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

/* Loading state (optional) */
.nav-modern.loading .nav-link {
    pointer-events: none;
    opacity: 0.6;
}

/* Dark mode optimizations */
@media (prefers-color-scheme: dark) {
    .main-sidebar {
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }
}

/* Print styles */
@media print {
    .main-sidebar {
        display: none;
    }
}

/* Accessibility improvements */
.nav-modern .nav-link:focus-visible {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

/* Tooltip-like effect for truncated text */
.nav-modern .nav-link p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

/* Enhanced spacing for better readability */
.sidebar {
    padding-bottom: 2rem;
}

/* Sidebar footer */
.sidebar-footer {
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, #ffffff 0%, rgba(255,255,255,0.95) 100%);
    padding: 12px;
    text-align: center;
    border-top: 1px solid #e9ecef;
    backdrop-filter: blur(10px);
}

/* Add spacing and padding improvements */
.sidebar {
    padding-bottom: 1rem;
}

/* Enhanced Focus States for Accessibility */
.nav-modern .nav-link:focus-visible {
    outline: 2px solid #17a2b8;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(23, 162, 184, 0.1);
}

/* Text Truncation for Long Menu Items */
.nav-modern .nav-link p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

/* Livewire Component Badges in Menu */
.nav-modern .nav-link [wire\:id] {
    margin-left: auto;
}

/* Icon Specific Styles */
.ri-team-fill,
.ri-list-check,
.ri-folder-chart-line {
    font-size: inherit;
}

/* Compact Mode for Smaller Screens */
@media (max-width: 768px) {
    .main-sidebar {
        width: 240px;
    }
    
    .nav-modern .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .nav-modern .nav-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .nav-treeview .nav-link {
        padding: 7px 12px 7px 40px;
        font-size: 0.8rem;
    }
}

/* Smooth Page Load Animation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.main-sidebar {
    animation: slideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient Text for Active States (Optional Enhancement) */
.nav-modern .nav-link.active p {
    color: #17a2b8;
    font-weight: 600;
}


