  :root {
  
  /* Couleurs primaires */
    --primary-blue: #1e293b;
    --primary-blue-light: #334155;
    --secondary-blue: #3b82f6;
    --accent-orange: #f59e0b;
    --accent-green: #10b981;
    
    /* Couleurs neutres */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Couleurs d'état */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Dimensions */
    --sidebar-width: 280px;
    --navbar-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
}

#app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: var(--white);
    position: fixed;
    z-index: 1000;
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-orange) 0%, #fb923c 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow);
}

.logo-text .brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.logo-text .brand-subtitle {
    font-size: 0.875rem;
    color: var(--accent-orange);
    font-weight: 500;
}

/* Navigation */
.sidebar-nav {
    padding: 1.5rem 0;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 1.5rem 1rem;
}

.nav-item {
    margin: 0.25rem 1rem;
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:hover {
    color: var(--white);
    transform: translateX(4px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #fb923c 100%);
    color: var(--white);
    box-shadow: var(--shadow);
}

.nav-link.active::before {
    opacity: 0;
}

.nav-icon {
    width: 20px;
    text-align: center;
    margin-right: 0.875rem;
    font-size: 1rem;
}

.nav-text {
    font-weight: 500;
    flex: 1;
}

.nav-indicator {
    width: 4px;
    height: 4px;
    background: var(--accent-orange);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.nav-link.active .nav-indicator {
    opacity: 1;
}

/* Panel utilisateur */
.user-panel {
    flex-shrink: 0;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1rem;
}

.user-avatar {
    position: relative;
}

.user-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary-blue);
}

.status-indicator.online {
    background: var(--success);
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--accent-orange);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* Contenu principal */
#main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.main-wrapper {
    flex: 1;
    padding: 2rem;
}

.content-container {
    max-width: 100%;
}

/* Navbar */
.navbar-main {
    height: var(--navbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 800;
    box-shadow: var(--shadow-sm);
}

.navbar-container {
    height: 100%;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.sidebar-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: background 0.2s ease;
}

.sidebar-toggle:hover {
    background: var(--gray-100);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--gray-600);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
    font-size: 0.875rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
}

.breadcrumb-item.active {
    color: var(--gray-800);
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    color: var(--gray-400);
    margin: 0 0.5rem;
}

.navbar-center {
    flex: 1;
    max-width: 500px;
}

.search-container {
    position: relative;
}

.search-form {
    width: 100%;
}

.search-input-group {
    position: relative;
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 0 1rem 0 2.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    background: var(--white);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.875rem;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    margin-top: 4px;
}

.suggestion-category {
    padding: 1rem;
}

.category-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--gray-700);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: background 0.2s ease;
}

.suggestion-item:hover {
    background: var(--gray-50);
}

.suggestion-item i {
    color: var(--gray-400);
    width: 16px;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.quick-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.stat-divider {
    width: 1px;
    height: 24px;
    background: var(--gray-300);
}

.quick-actions {
    display: flex;
    gap: 0.75rem;
}

.action-button {
    height: 40px;
    padding: 0 1rem;
    border: none;
    background: var(--secondary-blue);
    color: var(--white);
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Notifications */
.notifications-dropdown {
    position: relative;
}

.notification-trigger {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-trigger:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.6rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

.notification-menu {
    width: 380px;
    padding: 0;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    margin-top: 0.5rem;
}

.notification-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h6 {
    margin: 0;
    font-weight: 600;
    color: var(--gray-800);
}

.notification-count {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: var(--gray-50);
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.02);
    border-left: 3px solid var(--secondary-blue);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.notification-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.notification-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.notification-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.notification-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.view-all-link {
    color: var(--secondary-blue);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Profile dropdown */
.profile-dropdown {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--border-radius);
    transition: background 0.2s ease;
}

.profile-trigger:hover {
    background: var(--gray-100);
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
}

.profile-info {
    text-align: left;
}

.profile-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-800);
    display: block;
}

.profile-role {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.profile-chevron {
    font-size: 0.75rem;
    color: var(--gray-400);
    transition: transform 0.2s ease;
}

.profile-trigger[aria-expanded="true"] .profile-chevron {
    transform: rotate(180deg);
}

.profile-menu {
    width: 280px;
    padding: 0;
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    margin-top: 0.5rem;
    z-index: 9999 !important;
}

.profile-menu-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.profile-menu-header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.profile-menu-name {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.profile-menu-email {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.profile-menu-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: background 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.875rem;
}

.profile-menu-item:hover {
    background: var(--gray-50);
}

.profile-menu-item i {
    width: 16px;
    color: var(--gray-400);
}

.logout-btn {
    color: var(--danger);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.05);
}

.logout-btn i {
    color: var(--danger);
}

/* Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 900;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
}

/* Responsive */
@media (max-width: 1199.98px) {
    .quick-stats {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    #main-content {
        margin-left: 0;
    }
    
    .navbar-container {
        padding: 0 1rem;
    }
    
    .main-wrapper {
        padding: 1rem;
    }
    
    .breadcrumb-container {
        display: none !important;
    }
    
    .search-container {
        max-width: 250px;
    }
}

@media (max-width: 767.98px) {
    .navbar-container {
        gap: 1rem;
    }
    
    .search-container {
        max-width: 200px;
    }
    
    .profile-info {
        display: none !important;
    }
    
    .quick-actions .action-button span {
        display: none;
    }
    
    .quick-actions .action-button {
        width: 40px;
        padding: 0;
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .navbar-center {
        display: none;
    }
    
    .navbar-container {
        justify-content: space-between;
    }
    
    .main-wrapper {
        padding: 0.75rem;
    }
    
    .notification-menu,
    .profile-menu {
        width: 300px;
        margin-left: -100px;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar.active {
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-menu {
    animation: fadeIn 0.2s ease;
}

/* Scrollbar personnalisé */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Focus visible pour l'accessibilité */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--secondary-blue);
    outline-offset: 2px;
}/* Login Page Styles */
.login-container {
    max-width: 420px;
    margin: 0 auto;
    padding: 2.5rem;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    margin-top: 5vh;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-orange) 0%, #fb923c 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    box-shadow: var(--shadow);
}

.brand-icon svg {
    width: 24px;
    height: 24px;
}

.brand-text {
    text-align: center;
}

.brand-text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin: 0;
    line-height: 1.2;
}

.brand-text p {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-orange);
    margin: 0;
}

/* Reste du CSS identique à la version précédente */
/* .

/* Login Page */
.login-container {
    max-width: 420px;
    margin: 5vh auto;
    padding: 2.5rem;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.login-button {
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--accent-orange) 0%, #fb923c 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* ===== DESIGN SYSTEM UNIFIÉ — StockPro ===== */

/* --- Cards premium --- */
.card-custom {
    border-radius: 14px !important;
    border: none !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    background: #fff;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.card-custom:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
}

/* Card header — dégradé bleu profond avec shimmer subtil */
.card-header-custom,
.card-header-gradient {
    background: linear-gradient(135deg, #1e293b 0%, #334155 60%, #1e3a5f 100%) !important;
    color: #fff !important;
    padding: 1rem 1.5rem;
    border: none !important;
    position: relative;
    overflow: hidden;
}
.card-header-gradient::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.card-header-gradient .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}
.card-header-gradient .btn-close:hover { opacity: 1; }

/* Bouton action dans les headers sombres — dégradé orange */
.btn-header-action {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    border: none;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    box-shadow: 0 4px 14px rgba(245,158,11,0.4);
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-header-action:hover, .btn-header-action:focus {
    background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,158,11,0.55);
}
.btn-header-action:active { transform: translateY(0); }
.btn-header-action i { margin-right: 5px; }
.no-supplier { color: var(--gray-400); font-style: italic; }

/* --- Table premium --- */
.table-custom thead th {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: none !important;
    padding: 0.875rem 1rem;
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-color: #f1f5f9;
    font-size: 0.9rem;
}

.table-custom tbody tr:last-child td { border-bottom: none; }

.custom-hover tbody tr {
    transition: all 0.15s ease;
}

.custom-hover tbody tr:hover {
    background: linear-gradient(90deg, rgba(245,158,11,0.06) 0%, rgba(245,158,11,0.03) 100%) !important;
    transform: none;
}

/* Zebra subtil */
.table-custom tbody tr:nth-child(even) {
    background-color: rgba(248,250,252,0.7);
}

/* --- DataTables pagination --- */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: var(--accent-orange) !important;
    color: white !important;
    border: 1px solid var(--accent-orange) !important;
    border-radius: var(--border-radius-sm) !important;
    padding: 4px 10px !important;
    margin: 2px !important;
    font-size: 0.85rem !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #d97706 !important;
    color: white !important;
    border-color: #d97706 !important;
    box-shadow: 0 2px 6px rgba(245,158,11,0.3) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: var(--gray-300) !important;
    border-color: var(--gray-300) !important;
    color: var(--gray-500) !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* DataTables hide default sort arrows */
table.dataTable thead .sorting:after,
table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:after {
    display: none !important;
}

/* DataTables layout */
.dataTables_length {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}
.dataTables_length label { margin-bottom: 0; font-weight: 500; }
.dataTables_length select {
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gray-300);
    padding: 3px 8px;
    font-size: 0.875rem;
}
.dataTables_filter input {
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}
.dataTables_filter input:focus {
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
    outline: none;
}

/* DataTables sort column arrows */
th[data-sort] { cursor: pointer; }
th[data-sort] i { margin-left: 5px; color: rgba(255,255,255,0.6); }
th[data-sort][data-direction] i { color: var(--accent-orange); }

/* --- Table cell helpers --- */
.amount-cell { font-weight: 600; color: var(--accent-orange); }
.date-cell   { color: var(--gray-600); font-size: 0.875rem; }
.user-cell   { color: var(--secondary-blue); font-weight: 500; }
.customer-cell { color: var(--success); font-weight: 500; }

/* --- Buttons premium --- */
.btn-primary-custom {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(245,158,11,0.35);
    transition: all 0.2s ease;
}
.btn-primary-custom:hover, .btn-primary-custom:focus {
    background: linear-gradient(135deg, #d97706 0%, #ea580c 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(245,158,11,0.45);
    transform: translateY(-2px);
}
.btn-primary-custom:active { transform: translateY(0); }

.btn-danger-custom {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    box-shadow: 0 4px 14px rgba(239,68,68,0.3);
    transition: all 0.2s ease;
}
.btn-danger-custom:hover {
    box-shadow: 0 6px 20px rgba(239,68,68,0.4);
    transform: translateY(-2px);
    color: #fff;
}

.btn-info-custom {
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    box-shadow: 0 4px 14px rgba(59,130,246,0.3);
    transition: all 0.2s ease;
}
.btn-info-custom:hover {
    box-shadow: 0 6px 20px rgba(59,130,246,0.4);
    transform: translateY(-2px);
    color: #fff;
}

/* --- Alerts --- */
.alert {
    border-radius: var(--border-radius-sm) !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.alert-success { background-color: var(--success) !important; color: #fff !important; }
.alert-danger  { background-color: var(--danger)  !important; color: #fff !important; }

/* --- Badges --- */
.badge-active   { background: var(--success); color: #fff; }
.badge-inactive { background: var(--warning); color: #fff; }

.payment-badge {
    padding: 0.2rem 0.55rem;
    border-radius: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.payment-cash   { background: var(--success); color: #fff; }
.payment-wave   { background: var(--secondary-blue); color: #fff; }
.payment-orange { background: #ea580c; color: #fff; }

/* --- Modal unified --- */
.modal-content {
    border-radius: var(--border-radius) !important;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-header { border-bottom: 1px solid var(--gray-200); }
.modal-footer { border-top: 1px solid var(--gray-200); }

/* --- Mini stat cards premium --- */
.mini-stat-card {
    border-radius: 14px;
    color: #fff;
    padding: 1.5rem 1.25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.mini-stat-card::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    pointer-events: none;
}
.mini-stat-card::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none;
}
.mini-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.18);
}
.mini-stat-card h4 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    letter-spacing: -0.03em;
    position: relative;
}
.mini-stat-card p {
    font-size: 0.8rem;
    margin: 0;
    opacity: 0.85;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    position: relative;
}
.mini-stat-card i {
    font-size: 1.75rem;
    opacity: 0.9;
    margin-bottom: 0.625rem;
    position: relative;
}

.mini-stat-card.primary {
    background: linear-gradient(135deg, #1e3a5f 0%, #334155 100%);
    box-shadow: 0 8px 24px rgba(30,58,95,0.3);
}
.mini-stat-card.success {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    box-shadow: 0 8px 24px rgba(5,150,105,0.3);
}
.mini-stat-card.warning {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    box-shadow: 0 8px 24px rgba(217,119,6,0.3);
}
.mini-stat-card.info {
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    box-shadow: 0 8px 24px rgba(37,99,235,0.3);
}

/* --- Supplier badge --- */
.supplier-badge {
    background: var(--primary-blue-light);
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

/* --- Filter bar --- */
.filter-bar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* --- Table action buttons --- */
.btn-action {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.82rem;
    transition: all 0.15s ease;
}
.btn-action:hover { transform: scale(1.1); }

/* --- Page actions row --- */
.page-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===== BOUTONS PRINCIPAUX — Orange premium ===== */
.btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(245,158,11,0.35) !important;
    transition: all 0.2s ease !important;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #d97706 0%, #ea580c 100%) !important;
    color: white !important;
    box-shadow: 0 6px 20px rgba(245,158,11,0.45) !important;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(245,158,11,0.3) !important;
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #f59e0b 0%, #fb923c 100%) !important;
    box-shadow: none !important;
    opacity: 0.55;
    transform: none !important;
}

/* Outline orange */
.btn-outline-primary {
    color: #f59e0b !important;
    border-color: #f59e0b !important;
    font-weight: 600;
    transition: all 0.2s ease;
}
.btn-outline-primary:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(245,158,11,0.3) !important;
}

/* Pagination Bootstrap */
.page-item.active .page-link {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
    border-color: #f59e0b !important;
    box-shadow: 0 3px 8px rgba(245,158,11,0.3) !important;
    font-weight: 700;
}
.page-link {
    color: #f59e0b !important;
    border-color: #e2e8f0 !important;
    transition: all 0.15s ease;
}
.page-link:hover {
    background: rgba(245,158,11,0.08) !important;
    border-color: #f59e0b !important;
    color: #d97706 !important;
}

/* === MOBILE IMPROVEMENTS === */

/* -------------------------------------------------------
   1. Tables — horizontal scroll + mobile-stack layout
------------------------------------------------------- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 600px;
}

.table-responsive th,
.table-responsive td {
    min-width: 80px;
    white-space: nowrap;
}

/* .mobile-stack: switch table rows to card-like layout on <576px */
@media (max-width: 575.98px) {
    .mobile-stack thead {
        display: none;
    }

    .mobile-stack,
    .mobile-stack tbody,
    .mobile-stack tr,
    .mobile-stack td {
        display: block;
        width: 100%;
    }

    .mobile-stack tr {
        margin-bottom: 1rem;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        background: #fff;
    }

    .mobile-stack td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.6rem 1rem;
        border-bottom: 1px solid #f1f5f9;
        font-size: 0.875rem;
        white-space: normal;
        min-width: unset;
    }

    .mobile-stack td:last-child {
        border-bottom: none;
    }

    .mobile-stack td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #475569;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
        margin-right: 0.75rem;
    }
}

/* -------------------------------------------------------
   2. Cards (.card-custom) — reduce padding/shadow on mobile
------------------------------------------------------- */
@media (max-width: 575.98px) {
    .card-custom {
        border-radius: 10px !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04) !important;
    }

    .card-custom .card-body {
        padding: 0.875rem !important;
    }

    .card-header-custom,
    .card-header-gradient {
        padding: 0.75rem 1rem !important;
    }
}

/* -------------------------------------------------------
   3. Dashboard stat cards — 2 columns on <576px
------------------------------------------------------- */
@media (max-width: 575.98px) {
    .row.g-4 > [class*="col-xl-3"],
    .row.g-3 > [class*="col-xl-3"],
    .row.g-4 > [class*="col-lg-3"],
    .row.g-3 > [class*="col-lg-3"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .mini-stat-card {
        padding: 1rem 0.875rem;
    }

    .mini-stat-card h4 {
        font-size: 1.5rem;
    }

    .mini-stat-card i {
        font-size: 1.4rem;
        margin-bottom: 0.4rem;
    }
}

/* -------------------------------------------------------
   4. Forms on mobile — full-width inputs, larger touch targets
------------------------------------------------------- */
@media (max-width: 767.98px) {
    .form-control,
    .form-select,
    .form-input,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="tel"],
    input[type="date"],
    textarea,
    select {
        width: 100%;
        min-height: 44px;
        font-size: 1rem; /* prevents iOS zoom on focus */
    }

    .btn,
    button[type="submit"],
    button[type="button"] {
        min-height: 44px;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .filter-bar {
        padding: 0.75rem 1rem;
    }

    .filter-bar .row > [class*="col-"] {
        margin-bottom: 0.5rem;
    }
}

/* -------------------------------------------------------
   5. Modals — full-width on <576px
------------------------------------------------------- */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.5rem !important;
        max-width: calc(100vw - 1rem) !important;
    }

    .modal-content {
        border-radius: 12px !important;
    }

    .modal-body {
        padding: 1rem !important;
    }

    .modal-footer {
        padding: 0.75rem 1rem !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        flex: 1 1 auto;
    }
}

/* -------------------------------------------------------
   6. Notification / dropdown-menu-end width fix on small screens
------------------------------------------------------- */
@media (max-width: 575.98px) {
    .dropdown-menu-end,
    .notification-menu,
    .profile-menu {
        width: calc(100vw - 1rem) !important;
        max-width: 340px !important;
        left: auto !important;
        right: 0.5rem !important;
        transform: none !important;
    }
}

/* -------------------------------------------------------
   7. Mobile bottom navigation bar (<768px)
------------------------------------------------------- */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 767.98px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1040;
        background: #1e293b;
        height: 64px;
        align-items: stretch;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.18);
    }

    .mobile-bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: rgba(255,255,255,0.55);
        text-decoration: none;
        font-size: 0.65rem;
        font-weight: 500;
        gap: 3px;
        transition: color 0.15s ease, background 0.15s ease;
        padding: 0.25rem 0;
        border-top: 2px solid transparent;
    }

    .mobile-bottom-nav a i {
        font-size: 1.25rem;
        line-height: 1;
    }

    .mobile-bottom-nav a:hover {
        color: rgba(255,255,255,0.85);
        background: rgba(255,255,255,0.05);
    }

    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a[aria-current="page"] {
        color: #f59e0b;
        border-top-color: #f59e0b;
        background: rgba(245,158,11,0.08);
    }

    /* Push content up so it's not hidden behind the nav bar */
    .main-wrapper {
        padding-bottom: 80px !important;
    }
}

/* -------------------------------------------------------
   8. Sidebar overlay — full-screen, clickable on mobile
------------------------------------------------------- */
@media (max-width: 991.98px) {
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1029; /* just below sidebar (1030) */
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        cursor: pointer;
        transition: opacity 0.3s ease;
        opacity: 0;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Ensure sidebar sits above overlay */
    .sidebar {
        z-index: 1030;
    }
}

/* Bottom nav items & center FAB */
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #94a3b8;
    text-decoration: none;
    font-size: .62rem;
    gap: 3px;
    transition: color .2s;
    padding: 6px 0;
}
.mobile-nav-item i { font-size: 1.2rem; }
.mobile-nav-item.active { color: #f59e0b; }
.mobile-nav-item.mobile-nav-center {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg,#1e3a5f,#f59e0b);
    color: #fff;
    font-size: 1.4rem;
    flex: none;
    margin-top: -18px;
    box-shadow: 0 4px 14px rgba(245,158,11,.5);
}
.mobile-nav-item.mobile-nav-center span { display: none; }

/* =====================================================
   RESPONSIVE TABLES — amélioration mobile globale
   ===================================================== */

/* Toutes les tables dans un wrapper scrollable */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

/* Indicateur de scroll sur mobile */
@media (max-width: 767.98px) {
    .table-responsive::after {
        content: '';
        display: block;
    }

    /* Réduire padding des cellules sur mobile */
    .table > thead > tr > th,
    .table > tbody > tr > td {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    /* Boutons d'action plus petits */
    .table .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.72rem;
    }

    /* Badges plus compacts */
    .table .badge {
        font-size: 0.65rem;
        padding: 0.2em 0.5em;
    }

    /* Masquer colonnes secondaires sur mobile */
    .d-mobile-none {
        display: none !important;
    }

    /* Réduire les cards stats sur mobile */
    .stat-card {
        padding: 1rem !important;
    }

    /* Formulaires pleine largeur sur mobile */
    .form-group-mobile {
        flex-direction: column !important;
    }

    /* Filtres en colonne sur mobile */
    .filters-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .filters-row .form-select,
    .filters-row .form-control,
    .filters-row .btn {
        width: 100% !important;
    }

    /* Page header sur mobile */
    .page-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start !important;
    }

    .page-header .btn {
        width: 100%;
        text-align: center;
    }

    /* Cards en pleine largeur sur mobile */
    .col-stats-mobile {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* DataTables sur mobile */
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: left;
        margin-bottom: 0.5rem;
    }

    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none;
        text-align: center;
        margin-top: 0.5rem;
    }

    /* Pagination centrée sur mobile */
    .dataTables_paginate .paginate_button {
        padding: 0.3em 0.6em !important;
        font-size: 0.8rem;
    }
}

@media (max-width: 575.98px) {
    /* Cacher colonnes tertiaires sur très petit écran */
    .d-xs-none {
        display: none !important;
    }

    /* Titre de page plus petit */
    h1, .h1 { font-size: 1.4rem !important; }
    h2, .h2 { font-size: 1.2rem !important; }

    /* Content container sans padding latéral excessif */
    .content-container {
        padding: 0.75rem !important;
    }

    /* Bouton nouvelle vente en pleine largeur */
    .btn-nouvelle-vente {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* =====================================================
   RESPONSIVE — Corrections supplémentaires
   ===================================================== */

/* Pages show: boutons d'en-tête wrappent sur mobile */
.page-top-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Alertes dans layout: wrappent sur mobile */
@media (max-width: 575.98px) {
    .alert.d-flex {
        flex-direction: column !important;
        gap: 0.5rem;
    }

    .alert.d-flex .btn {
        width: 100%;
        text-align: center;
    }

    /* container sans padding sur très petit écran */
    .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Titre h4 dans les pages show */
    h4.fw-bold { font-size: 1.1rem !important; }

    /* Boutons "Retour" dans les pages show */
    .page-top-bar .btn,
    .d-flex.flex-wrap .btn {
        font-size: 0.82rem;
        padding: 0.35rem 0.65rem;
    }

    /* Formulaire nouvelle vente: container sans padding */
    .container.py-4 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    /* Masquer texte des boutons retour sur mobile */
    .btn-retour-text { display: none; }

    /* Select2 full width */
    .select2-container { width: 100% !important; }
}

@media (max-width: 767.98px) {
    /* Abonnement plans — cartes en pleine largeur */
    .subscription-plans .col-12.col-md-4 {
        margin-bottom: 1rem;
    }

    /* Grille stats: 2 colonnes sur mobile */
    .row.g-3 > [class*="col-6"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Reports: graphiques en pleine hauteur */
    .chart-container-report {
        height: 250px;
    }

    /* Sidebar fermée par défaut sur mobile — déjà géré mais renforçons */
    .navbar-center { display: none; }
}

@media (min-width: 576px) {
    .navbar-center { display: flex !important; }
}

/* =====================================================
   FIX OVERFLOW HORIZONTAL — Correction layout mobile
   ===================================================== */

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

#app-container {
    max-width: 100vw;
    overflow-x: hidden;
}

#main-content {
    max-width: 100%;
    overflow-x: hidden;
    min-width: 0;
}

.navbar-main {
    width: 100%;
    max-width: 100vw;
    overflow: visible;
}

.navbar-container {
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.main-wrapper {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.content-container {
    max-width: 100%;
    overflow-x: hidden;
}

/* Cards ne débordent pas horizontalement */
.card, .card-custom {
    max-width: 100%;
    overflow-x: hidden;
}

/* Container fluid pleine largeur */
.container-fluid {
    max-width: 100%;
    overflow-x: hidden;
}

/* Sur mobile: navbar plus compacte */
@media (max-width: 575.98px) {
    .navbar-container {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }

    /* Cacher la barre de recherche sur très petit écran */
    .navbar-center {
        display: none !important;
    }

    /* Bouton nouvelle vente dans navbar */
    .quick-actions .action-button span {
        display: none;
    }

    .quick-actions .action-button {
        padding: 0.4rem 0.6rem;
    }

    /* Profile dropdown plus compact */
    .profile-info {
        display: none !important;
    }

    .main-wrapper {
        padding: 0.75rem;
    }
}
