/*
================================================================================
   PlaceToWork - CSS General Consolidé
   Version: 1.0
   Description: Fichier CSS principal consolidé pour l'application PlaceToWork
   Contenu: Styles de base + styles modernes + responsive
================================================================================
*/

/* ==========================================================================
   1. Variables CSS et Configuration de base
   ========================================================================== */
:root {
    /* Primary Palette - Sophisticated Blue */
    --primary-color: #4f46e5;
    --primary-dark: #3730a3;
    --primary-light: #6366f1;
    --primary-ultra-light: #eef2ff;
    
    /* Secondary Palette - Professional Teal */
    --secondary-color: #0891b2;
    --secondary-dark: #0e7490;
    --secondary-light: #06b6d4;
    
    /* Accent Colors */
    --accent-color: #7c3aed;
    --accent-light: #a78bfa;
    
    /* Semantic Colors */
    --success-color: #059669;
    --success-light: #d1fae5;
    --warning-color: #d97706;
    --warning-light: #fed7aa;
    --danger-color: #dc2626;
    --danger-light: #fecaca;
    --info-color: #0284c7;
    --info-light: #dbeafe;
    
    /* Neutral Palette */
    --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;
    
    /* Semantic Colors */
    --border-color: #e2e8f0;
    --text-muted: #64748b;
    --light-color: #f8fafc;
    
    /* Layout Variables */
    --sidebar-width: 280px;
    --header-height: 72px;
    --content-padding: 2rem;
    --border-radius-sm: 6px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px 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);
    
    /* Background Gradients */
    --bg-primary: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    --bg-card: #ffffff;
    --bg-sidebar: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --bg-header: #ffffff;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-family-display: 'Plus Jakarta Sans', sans-serif;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #e2e8f0;
    --primary-dark: #cbd5e1;
    --primary-light: #f1f5f9;
    --primary-ultra-light: #334155;
    
    --secondary-color: #22d3ee;
    --secondary-dark: #06b6d4;
    --secondary-light: #67e8f9;
    
    --accent-color: #a78bfa;
    --accent-light: #c4b5fd;
    
    --success-color: #10b981;
    --success-light: #064e3b;
    
    --warning-color: #f59e0b;
    --warning-light: #78350f;
    
    --danger-color: #ef4444;
    --danger-light: #7f1d1d;
    
    --info-color: #0ea5e9;
    --info-light: #0c4a6e;
    
    --gray-50: #0f172a;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-800: #f1f5f9;
    --gray-900: #f8fafc;
    
    --border-color: #334155;
    --text-muted: #94a3b8;
    --light-color: #1e293b;
    
    --bg-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --bg-card: #1e293b;
    --bg-sidebar: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --bg-header: #1e293b;
}

/* ==========================================================================
   2. Reset et Styles de base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: var(--font-family);
    font-weight: 400;
    background: var(--bg-primary);
    min-height: 100vh;
    color: var(--gray-800);
    font-size: 0.9375rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    width: 100%;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

.theme-toggle:hover i {
    transform: rotate(20deg);
}

/* Settings Section */
.settings-section {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.settings-section .nav-section-content {
    max-height: none;
    padding: 0.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Locale Switcher */
.locale-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.locale-link {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
    min-width: 40px;
}

.locale-link:hover {
    color: var(--gray-700);
    background: var(--gray-200);
}

.locale-link.active {
    color: var(--gray-900);
    font-weight: 600;
    background: var(--gray-300);
}

.locale-separator {
    display: none;
}

/* Smooth Animations */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Card Hover Animations */
.modern-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.modern-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Button Animations */
.btn-modern {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-modern::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-modern:active::after {
    width: 300px;
    height: 300px;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-modern:active {
    transform: translateY(0);
}

/* Nav Link Animations */
.nav-link {
    transition: all 0.2s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    transform: scaleY(1);
}

.nav-link:hover {
    background: var(--primary-ultra-light);
    padding-left: 1.25rem;
}

/* Input Focus Animations */
.form-control-modern,
.form-select-modern {
    transition: all 0.3s ease;
}

.form-control-modern:focus,
.form-select-modern:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Table Row Hover */
.table-modern tbody tr {
    transition: background-color 0.2s ease;
}

.table-modern tbody tr:hover {
    background-color: var(--primary-ultra-light);
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* Pulse Animation for Important Elements */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

.slide-in {
    animation: slideIn 0.3s ease forwards;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.bounce {
    animation: bounce 1s ease;
}

/* Loading Spinner Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Shake Animation for Errors */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease;
}

/* Scale Animation on Click */
.scale-on-click {
    transition: transform 0.1s ease;
}

.scale-on-click:active {
    transform: scale(0.95);
}

/* Tooltip Animation */
[title]:hover::after {
    animation: fadeIn 0.2s ease;
}

/* Accessibility */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}


body {
    background: var(--bg-primary);
    color: var(--gray-700);
}

.clear {
    clear: both;
}

/* ==========================================================================
   3. Classes utilitaires
   ========================================================================== */
.floatleft { float: left }
.floatright { float: right }
.alignleft { float: left; margin-right: 15px; margin-bottom: 15px }
.alignright { float: right; margin-left: 15px; margin-bottom: 15px }
.aligncenter { display: block; margin: 0 auto 15px }

/* Marges utilitaires */
.mg-tb-40 { margin: 40px 0px; }
.mg-tb-30 { margin: 30px 0px; }
.mg-t-30 { margin-top: 30px; }
.mg-b-15 { margin-bottom: 15px; }
.mg-t-15 { margin-top: 15px; }
.mg-t-10 { margin-top: 10px; }
.mg-t-20 { margin-top: 20px; }

/* Classes cachées */
.hidden { display: none !important; }
.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/* ==========================================================================
   4. Typography - Professional & Hierarchical
   ========================================================================== */
h1, .h1 {
    font-family: var(--font-family-display);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

h2, .h2 {
    font-family: var(--font-family-display);
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.25rem;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

h3, .h3 {
    font-family: var(--font-family-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1rem;
    line-height: 1.4;
    letter-spacing: -0.025em;
}

h4, .h4 {
    font-family: var(--font-family-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.875rem;
    line-height: 1.4;
}

h5, .h5 {
    font-family: var(--font-family-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

h6, .h6 {
    font-family: var(--font-family-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.625rem;
    line-height: 1.4;
}

p {
    margin: 0 0 1rem;
    color: var(--gray-600);
    line-height: 1.6;
}

a {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

a:active, a:hover, a:focus {
    outline: none;
    text-decoration: none;
}

/* Text utilities */
.text-muted {
    color: var(--gray-500) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--gray-500) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

/* Font weights */
.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }

/* ==========================================================================
   5. Layout Principal - Professional Dashboard Design
   ========================================================================== */
/* Sidebar moderne - Élégant et fonctionnel */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

/* Collapsed sidebar override */
.modern-sidebar.collapsed .sidebar-header {
    padding: 0.5rem 0 !important;
    height: 45px !important;
    background: transparent !important;
}

.modern-sidebar.collapsed .brand .brand-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.75rem !important;
}

.modern-sidebar.collapsed .sidebar-collapse-btn {
    width: 18px !important;
    height: 18px !important;
    font-size: 0.5rem !important;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-family-display);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 100%;
    position: relative;
    z-index: 1;
    letter-spacing: -0.025em;
}

.sidebar-logo i {
    font-size: 1.75rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem;
    border-radius: var(--border-radius-lg);
    backdrop-filter: blur(10px);
}

.sidebar-nav {
    padding: 1rem 0;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-600) transparent;
}

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

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

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--gray-600);
    border-radius: 2px;
}

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

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-400);
    padding: 0.75rem 1.5rem;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    border-radius: var(--border-radius-md);
    margin: 0 0.75rem;
}

.nav-section-title:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--gray-200);
}

.nav-section-title i {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-section.expanded .nav-section-title i {
    transform: rotate(180deg);
}

.nav-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-section.expanded .nav-section-content {
    max-height: 600px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border-left: 3px solid transparent;
    border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, 
        rgba(99, 102, 241, 0.8) 0%, 
        rgba(139, 92, 246, 0.6) 50%, 
        rgba(99, 102, 241, 0.8) 100%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    z-index: -1;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.2) 50%, 
        transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
    z-index: 0;
}

.nav-link:hover {
    background: rgba(99, 102, 241, 0.08);
    color: white;
    border-left-color: var(--primary-color);
    transform: translateX(2px);
}

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

.nav-link:hover::after {
    transform: translateX(100%);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent);
    color: white;
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.nav-link.active::before {
    width: 100%;
    opacity: 0.15;
}

.nav-link.active::after {
    transform: translateX(100%);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* Main wrapper */
.main-wrapper {
    margin-left: var(--sidebar-width);
    padding-top: 100px !important;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Header */
.top-header {
    height: var(--header-height);
    background: var(--bg-header);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.search-bar {
    position: relative;
    max-width: 400px;
    flex: 1;
}

.search-bar input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-xl);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--gray-50);
    font-weight: 500;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: white;
}

.search-bar input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, var(--gray-50), white);
    border-radius: var(--border-radius-xl);
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.2s ease;
    border: 1px solid var(--gray-200);
    font-weight: 500;
}

.user-menu:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: var(--shadow-sm);
}

/* Content area */
.content-area {
    padding: var(--content-padding);
    background: var(--bg-primary);
    min-height: calc(100vh - var(--header-height));
    margin-top: 0;
    padding-top: 5px !important;
}

/* ==========================================================================
   6. Cartes et Composants - Design Élégant et Moderne
   ========================================================================== */
.modern-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-200), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modern-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--gray-300);
}

.modern-card:hover::before {
    opacity: 1;
}

.card-header-modern {
    padding: 1.75rem;
    border-bottom: 1px solid var(--gray-100);
    background: linear-gradient(135deg, var(--gray-50), white);
    position: relative;
}

.card-header-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1.75rem;
    right: 1.75rem;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    opacity: 0.1;
}

.card-body-modern {
    padding: 1.75rem;
    background: var(--bg-card);
}

.card-footer-modern {
    padding: 1rem 1.75rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Card variants */
.card-interactive {
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-interactive:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-xl);
}

.card-interactive:active {
    transform: translateY(-1px) scale(1.005);
}

.card-elevated {
    box-shadow: var(--shadow-md);
    border: none;
}

.card-elevated:hover {
    box-shadow: var(--shadow-xl);
}

.card-compact .card-body-modern {
    padding: 1.25rem;
}

.card-compact .card-header-modern {
    padding: 1.25rem;
}

/* ==========================================================================
   7. Boutons - Design Professionnel et Interactif
   ========================================================================== */
.btn-modern {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    border: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    text-transform: none;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-modern:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.25);
}

.btn-modern:active {
    transform: translateY(1px);
}

.btn-primary-modern {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: 1px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

.btn-primary-modern:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-outline-modern {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
    font-weight: 500;
}

.btn-outline-modern:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success-modern {
    background: linear-gradient(135deg, var(--success-color), #047857);
    color: white;
    border: 1px solid var(--success-color);
    box-shadow: var(--shadow-sm);
}

.btn-success-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #10b981, var(--success-color));
}

.btn-warning-modern {
    background: linear-gradient(135deg, var(--warning-color), #b45309);
    color: white;
    border: 1px solid var(--warning-color);
    box-shadow: var(--shadow-sm);
}

.btn-warning-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #f59e0b, var(--warning-color));
}

.btn-danger-modern {
    background: linear-gradient(135deg, var(--danger-color), #b91c1c);
    color: white;
    border: 1px solid var(--danger-color);
    box-shadow: var(--shadow-sm);
}

.btn-danger-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #ef4444, var(--danger-color));
}

.btn-info-modern {
    background: linear-gradient(135deg, var(--info-color), #0369a1);
    color: white;
    border: 1px solid var(--info-color);
    box-shadow: var(--shadow-sm);
}

.btn-info-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #0ea5e9, var(--info-color));
}

/* Button sizes */
.btn-modern-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: var(--border-radius-sm);
}

.btn-modern-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    border-radius: var(--border-radius-lg);
}

/* Button states */
.btn-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-modern.loading {
    color: transparent;
    pointer-events: none;
}

.btn-modern.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Icon buttons */
.btn-icon {
    padding: 0.75rem;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.btn-icon-sm {
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    font-size: 0.875rem;
}

.btn-icon-lg {
    padding: 1rem;
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
}

/* ==========================================================================
   8. Alerts - Design Moderne et Professionnel
   ========================================================================== */
.alert-modern {
    border-radius: var(--border-radius-lg);
    border: none;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.alert-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
    opacity: 0.8;
}

.alert-modern i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
    opacity: 0.9;
}

.alert-modern .alert-content {
    flex: 1;
    line-height: 1.5;
}

.alert-modern .alert-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.alert-modern .alert-message {
    font-size: 0.875rem;
    opacity: 0.9;
}

.alert-modern .btn-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    opacity: 0.6;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.alert-modern .btn-close:hover {
    opacity: 1;
    background: rgba(0,0,0,0.1);
}

.alert-success-modern {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.08), rgba(5, 150, 105, 0.04));
    color: var(--success-color);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.alert-success-modern::before {
    background: var(--success-color);
}

.alert-danger-modern {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.08), rgba(220, 38, 38, 0.04));
    color: var(--danger-color);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.alert-danger-modern::before {
    background: var(--danger-color);
}

.alert-warning-modern {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.08), rgba(217, 119, 6, 0.04));
    color: var(--warning-color);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.alert-warning-modern::before {
    background: var(--warning-color);
}

.alert-info-modern {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.08), rgba(2, 132, 199, 0.04));
    color: var(--info-color);
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.alert-info-modern::before {
    background: var(--info-color);
}

/* Alert animations */
@keyframes slideInAlert {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-modern {
    animation: slideInAlert 0.3s ease-out;
}

.alert-modern.removing {
    animation: slideOutAlert 0.3s ease-out forwards;
}

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

/* ==========================================================================
   9. Formulaires - Design Moderne et Professionnel
   ========================================================================== */
.form-modern {
    background: var(--bg-card);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.form-group-modern {
    margin-bottom: 1.5rem;
}

.form-label-modern {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.form-label-modern.required::after {
    content: ' *';
    color: var(--danger-color);
}

.form-control-modern {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: white;
    font-weight: 500;
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.form-control-modern::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

.form-select-modern {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-md);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: white;
    font-weight: 500;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
}

.form-select-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.form-textarea-modern {
    min-height: 120px;
    resize: vertical;
}

.form-check-modern {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.form-check-input-modern {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-check-input-modern:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input-modern:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-check-label-modern {
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    user-select: none;
}

.form-row-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-actions-modern {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    margin-top: 2rem;
}

/* Form validation */
.form-control-modern.is-valid {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23059669'%3e%3cpath fill-rule='evenodd' d='M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z' clip-rule='evenodd'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.form-control-modern.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23dc2626'%3e%3cpath fill-rule='evenodd' d='M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z' clip-rule='evenodd'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.invalid-feedback-modern {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.valid-feedback-modern {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* ==========================================================================
   10. Tables - Design Élégant et Moderne
   ========================================================================== */
.table-container-modern {
    background: var(--bg-card);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.table-modern thead {
    background: linear-gradient(135deg, var(--gray-50), white);
    border-bottom: 2px solid var(--gray-200);
}

.table-modern th {
    padding: 1rem 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: none;
    white-space: nowrap;
    position: relative;
}

.table-modern th:first-child {
    padding-left: 1.5rem;
    border-top-left-radius: var(--border-radius-xl);
}

.table-modern th:last-child {
    padding-right: 1.5rem;
    border-top-right-radius: var(--border-radius-xl);
}

.table-modern tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--gray-100);
}

.table-modern tbody tr:hover {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.02), transparent);
    transform: scale(1.001);
}

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

.table-modern td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    color: var(--gray-700);
    font-weight: 500;
    border-bottom: none;
}

.table-modern td:first-child {
    padding-left: 1.5rem;
}

.table-modern td:last-child {
    padding-right: 1.5rem;
}

.table-modern .text-truncate {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Table actions */
.table-actions-modern {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.table-actions-modern .btn-icon-sm {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.table-actions-modern .btn-icon-sm:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Table responsive */
.table-responsive-modern {
    overflow-x: auto;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.table-responsive-modern::-webkit-scrollbar {
    height: 8px;
}

.table-responsive-modern::-webkit-scrollbar-track {
    background: var(--gray-50);
}

.table-responsive-modern::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

.table-responsive-modern::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ==========================================================================
   11. Badges et Tags - Design Moderne
   ========================================================================== */
.badge-modern {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--border-radius-xl);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.badge-primary-modern {
    background: linear-gradient(135deg, var(--primary-ultra-light), rgba(79, 70, 229, 0.1));
    color: var(--primary-color);
    border-color: rgba(79, 70, 229, 0.2);
}

.badge-success-modern {
    background: linear-gradient(135deg, var(--success-light), rgba(5, 150, 105, 0.1));
    color: var(--success-color);
    border-color: rgba(5, 150, 105, 0.2);
}

.badge-warning-modern {
    background: linear-gradient(135deg, var(--warning-light), rgba(217, 119, 6, 0.1));
    color: var(--warning-color);
    border-color: rgba(217, 119, 6, 0.2);
}

.badge-danger-modern {
    background: linear-gradient(135deg, var(--danger-light), rgba(220, 38, 38, 0.1));
    color: var(--danger-color);
    border-color: rgba(220, 38, 38, 0.2);
}

.badge-info-modern {
    background: linear-gradient(135deg, var(--info-light), rgba(2, 132, 199, 0.1));
    color: var(--info-color);
    border-color: rgba(2, 132, 199, 0.2);
}

.badge-secondary-modern {
    background: linear-gradient(135deg, var(--gray-100), rgba(107, 114, 128, 0.1));
    color: var(--gray-600);
    border-color: rgba(107, 114, 128, 0.2);
}

/* Status badges */
.status-badge {
    position: relative;
    padding-left: 1rem;
}

.status-badge::before {
    content: '';
    position: absolute;
    left: 0.375rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-online::before {
    background: var(--success-color);
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
    animation: pulse 2s infinite;
}

.status-offline::before {
    background: var(--gray-400);
}

.status-busy::before {
    background: var(--warning-color);
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(5, 150, 105, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(5, 150, 105, 0);
    }
}
/* ==========================================================================
   12. Mobile Responsive - Design Adaptatif
   ========================================================================== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: var(--border-radius-md);
    transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: var(--gray-100);
    color: var(--primary-color);
}

@media (max-width: 1024px) {
    .content-area {
        padding: 1.5rem;
    }
    
    .form-modern {
        padding: 1.5rem;
    }
    
    .card-header-modern,
    .card-body-modern {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-bar {
        display: none;
    }

    .content-area {
        padding: 1rem;
    }
    
    .top-header {
        padding: 0 1rem;
    }
    
    .user-menu {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    /* Forms */
    .form-modern {
        padding: 1rem;
    }
    
    .form-row-modern {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-actions-modern {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-actions-modern .btn-modern {
        width: 100%;
        justify-content: center;
    }
    
    /* Cards */
    .card-header-modern,
    .card-body-modern {
        padding: 1rem;
    }
    
    .card-footer-modern {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    /* Tables */
    .table-modern th,
    .table-modern td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .table-modern th:first-child,
    .table-modern td:first-child {
        padding-left: 0.75rem;
    }
    
    .table-modern th:last-child,
    .table-modern td:last-child {
        padding-right: 0.75rem;
    }
    
    .table-actions-modern {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .table-actions-modern .btn-icon-sm {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    /* Buttons */
    .btn-modern {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
    }
    
    .btn-modern-sm {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .btn-icon {
        width: 40px;
        height: 40px;
    }
    
    .btn-icon-sm {
        width: 32px;
        height: 32px;
    }
    
    /* Alerts */
    .alert-modern {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .alert-modern i {
        font-size: 1.125rem;
    }
    
    /* Typography */
    h1, .h1 {
        font-size: 1.875rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    h3, .h3 {
        font-size: 1.25rem;
    }
    
    h4, .h4 {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .content-area {
        padding: 0.75rem;
    }
    
    .top-header {
        padding: 0 0.75rem;
    }
    
    .form-modern {
        padding: 0.75rem;
    }
    
    .card-header-modern,
    .card-body-modern {
        padding: 0.75rem;
    }
    
    .table-modern th,
    .table-modern td {
        padding: 0.5rem 0.375rem;
        font-size: 0.75rem;
    }
    
    .btn-modern {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    
    h1, .h1 {
        font-size: 1.5rem;
    }
    
    h2, .h2 {
        font-size: 1.25rem;
    }
    
    h3, .h3 {
        font-size: 1.125rem;
    }
}

/* ==========================================================================
   13. Animations et Transitions Avancées
   ========================================================================== */

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--border-radius-md);
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Page transitions */
.page-transition-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-transition-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-transition-exit {
    opacity: 1;
    transform: translateY(0);
}

.page-transition-exit-active {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Micro-interactions */
.interactive-element {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-element:hover {
    transform: translateY(-1px);
}

.interactive-element:active {
    transform: translateY(0);
}

/* Focus styles */
.focus-ring {
    outline: none;
    transition: box-shadow 0.2s ease;
}

.focus-ring:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ==========================================================================
   14. Utilitaires et Composants Spécifiques
   ========================================================================== */

/* Loading spinner */
.spinner-modern {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-modern-sm {
    width: 24px;
    height: 24px;
    border-width: 2px;
}

.spinner-modern-lg {
    width: 56px;
    height: 56px;
    border-width: 4px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty states */
.empty-state-modern {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--gray-50), white);
    border-radius: var(--border-radius-xl);
    border: 2px dashed var(--gray-200);
    color: var(--gray-500);
}

.empty-state-modern i {
    font-size: 3rem;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.empty-state-modern h3 {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.empty-state-modern p {
    color: var(--gray-400);
    margin-bottom: 1.5rem;
}

/* Progress bars */
.progress-modern {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    position: relative;
}

.progress-bar-modern {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: var(--border-radius-xl);
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Tooltips */
.tooltip-modern {
    position: relative;
    cursor: help;
}

.tooltip-modern::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-md);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    margin-bottom: 0.5rem;
}

.tooltip-modern::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--gray-800);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    margin-bottom: -0.25rem;
}

.tooltip-modern:hover::before,
.tooltip-modern:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(1.02);
}

/* ==========================================================================
   10. Animations et Composants additionnels
   ========================================================================== */
/* Loading Spinner */
.spinner-modern {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* Collapse menu styling */
.collapse .nav-link {
    padding-left: 3rem;
    font-size: 0.875rem;
}

.collapse .nav-link:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* Dropdown styling */
.nav-section-content .nav-link {
    padding-left: 2.5rem;
    font-size: 0.875rem;
}

.nav-section-content .nav-link:hover {
    background: rgba(99, 102, 241, 0.05);
}

.nav-section-content .nav-link.active {
    background: rgba(99, 102, 241, 0.15);
}

/* ==========================================================================
   11. Styles Legacy (compatibilité)
   ========================================================================== */
/* Couleurs de fond utilitaires */
.nk-red { background: #F44336; }
.nk-pink { background: #E91E63; }
.nk-purple { background: #9C27B0; }
.nk-deep-purple { background: #673AB7; }
.nk-indigo { background: #3F51B5; }
.nk-blue { background: #2196F3; }
.nk-light-blue { background: #03A9F4; }
.nk-cyan { background: #00BCD4; }
.nk-teal { background: #009688; }
.nk-green { background: #4CAF50; }
.nk-light-green { background: #8BC34A; }
.nk-lime { background: #CDDC39; }
.nk-yellow { background: #FFEB3B; }
.nk-amber { background: #FFC107; }
.nk-orange { background: #FF9800; }
.nk-deep-orange { background: #FF5722; }
.nk-brown { background: #795548; }
.nk-gray { background: #9E9E9E; }
.nk-blue-gray { background: #607D8B; }
.nk-black { background: #000000; }

/* Conteneurs avec padding */
.sale-statistic-inner, .statistic-right-area, .email-statis-inner, 
.recent-post-wrapper, .blog-inner-list, .realtime-wrap, .add-todo-list, 
.notika-chat-list, .recent-signup-inner, .ongoing-task-inner, .contact-inner, 
.contact-form, .widget-tabs-int, .visitor-sv-tm-int, .search-engine-int, 
.alert-inner, .color-wrap, .wizard-wrap-int, .dropdown-list, .modals-list, 
.accordion-wn-wp, .tooltips-inner, .popovers-list, .typography-list, 
.typography-heading, .typography-inline-pro, .tpgp-helper, .contact-list, 
.inbox-left-sd, .inbox-text-list, .view-mail-list, .normal-table-list, 
.data-table-list, .form-element-list, .range-slider-wrap, .datepicker-int, 
.colorpicker-int, .summernote-wrap, .dropdone-nk, .form-example-wrap, 
.invoice-wrap, .google-map-single, .data-map-single, .image-cropper-wp, 
.nk-cd-ed-wp, .bar-chart-wp, .line-chart-wp, .area-chart-wp, 
.wb-traffic-inner, .notika-icon-int {
    padding: 20px;
    background: #fff;
}

/* ==========================================================================
   12. Responsive Design
   ========================================================================== */
/* Normal desktop :992px */
@media (min-width: 992px) and (max-width: 1169px) {
    .header-top-area {
        position: unset;
    }
    .main-menu-area.mg-t-80-b-40 {
        margin-top: 40px;
    }
    ul.notika-menu-wrap li a {
        padding: 15px 20px;
    }
    ul.notika-main-menu-dropdown li > a {
        padding: 15px 15px;
    }
    .dk-res-mg-t-30 {
        margin-top: 30px;
    }
    .dk-res-ds {
        display: none;
    }
    .email-signle-gp {
        margin: 0px 25px;
    }
    .table-responsive {
        width: 100%;
        overflow-y: hidden;
        -ms-overflow-style: -ms-autohiding-scrollbar;
        border: 0px solid #ddd;
    }
    .table-responsive > .table > tbody > tr > td, 
    .table-responsive > .table > tbody > tr > th, 
    .table-responsive > .table > tfoot > tr > td, 
    .table-responsive > .table > tfoot > tr > th, 
    .table-responsive > .table > thead > tr > td, 
    .table-responsive > .table > thead > tr > th {
        white-space: nowrap;
    }
}

/* Tablet desktop :768px */
@media (min-width: 768px) and (max-width: 991px) {
    .main-menu-area {
        display: none;
    }
    .mobile-menu-area {
        display: block;
    }
    .header-top-area {
        position: unset;
    }
    .tb-res-mg-t-30 {
        margin-top: 30px;
    }
    .tb-res-mg-t-0 {
        margin-top: 0px;
    }
    .tb-res-ds-n {
        display: none;
    }
    .flot-chart {
        height: 300px;
    }
    .email-signle-gp {
        margin: 0px 6px;
    }
    .table-responsive {
        width: 100%;
        overflow-y: hidden;
        -ms-overflow-style: -ms-autohiding-scrollbar;
        border: 0px solid #ddd;
    }
    .table-responsive > .table > tbody > tr > td, 
    .table-responsive > .table > tbody > tr > th, 
    .table-responsive > .table > tfoot > tr > td, 
    .table-responsive > .table > tfoot > tr > th, 
    .table-responsive > .table > thead > tr > td, 
    .table-responsive > .table > thead > tr > th {
        white-space: nowrap;
    }
    .left-sidebar-pro {
        display: none;
    }
    .all-content-wrapper {
        margin-left: 0px;
    }
    .breadcomb-area {
        margin-top: 40px;
    }
    .menu-switcher-pro {
        display: none;
    }
    .logo-area {
        text-align: center;
    }
    .nav.navbar-nav.notika-top-nav {
        float: unset;
    }
    .header-top-menu {
        max-width: 255px;
        margin: 0 auto;
    }
    .header-top-menu.pull-left {
        float: unset !important;
    }
}

/* Small mobile :320px */
@media (max-width: 767px) {
    .container { width: 300px }
    .main-menu-area {
        display: none;
    }
    .mobile-menu-area {
        display: block;
    }
    .left-sidebar-pro, .menu-switcher-pro {
        display: none;
    }
    .logo-area {
        text-align: center;
    }
    .nav.navbar-nav.notika-top-nav {
        float: unset;
        margin: 0px;
    }
    .header-top-menu .nav.navbar-nav.notika-top-nav li {
        display: inline-block;
    }
    .header-top-area {
        position: unset;
    }
    .all-content-wrapper {
        margin-left: 0px;
    }
    .logo-area.logo-left {
        position: unset;
    }
    .header-top-menu {
        text-align: center;
    }
    .breadcomb-area {
        margin-top: 40px;
    }
    .sm-res-mg-t-30 {
        margin-top: 30px;
    }
    .sm-res-mg-t-0 {
        margin-top: 0px;
    }
    .sm-res-ds-n {
        display: none;
    }
    .btn-list .btn {
        margin: 5px 5px;
    }
    .notika-tl-btn .btn {
        margin: 5px 0px;
    }
    .table-responsive {
        width: 100%;
        overflow-y: hidden;
        -ms-overflow-style: -ms-autohiding-scrollbar;
        border: 0px solid #ddd;
    }
    .table-responsive .pagination-inbox {
        margin-bottom: 20px;
    }
    .navbar-nav > li > a {
        padding: 20px 15px 20px 15px;
    }
}

/* Large Mobile :480px */
@media only screen and (min-width: 480px) and (max-width: 767px) {
    .container { width: 450px }
    .main-menu-area {
        display: none;
    }
    .lg-res-mg-bl {
        display: block;
    }
    .email-round-pro {
        width: 33.33%;
    }
    .img-preview-custom {
        width: 345px;
        height: 205px;
    }
    .table-responsive {
        width: 100%;
        overflow-y: hidden;
        -ms-overflow-style: -ms-autohiding-scrollbar;
        border: 0px solid #ddd;
    }
}

/* ==========================================================================
   14. Styles spécifiques aux composants
   ========================================================================== */

/* Category cards */
.category-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.category-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.category-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Calendar cards */
.calendar-card {
    transition: all 0.3s ease;
}

.calendar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.calendar-card.done {
    opacity: 0.8;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.calendar-card.done .card-header-modern {
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
}

/* Clocking specific styles */
.modern-clocking-item {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.modern-clocking-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.btn-success-modern {
    background: linear-gradient(135deg, var(--success-color), #16a34a);
    color: white;
    border: 1px solid var(--success-color);
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-success-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.btn-danger-modern {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    border: 1px solid var(--danger-color);
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-danger-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-modern {
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-weight: 400;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 70px;
    justify-content: center;
    border-width: 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.btn-modern.btn-toggle {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    padding: 0.312rem 0.5rem;
    font-size: 0.75rem;
}

/* Enhanced card styles */
.card.shadow-sm {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

/* Enhanced form controls */
.form-control.form-control-sm {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-control.form-control-sm:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: 1px solid var(--primary-color);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Enhanced list group */
.list-group-item {
    border: none;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background: rgba(99, 102, 241, 0.02);
}

.list-group-item:last-child {
    border-bottom: none;
}

.real-time {
    font-weight: 600;
    color: var(--primary-color);
}

.diff-time {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Company and Gender cards */
.company-card, .gender-card {
    transition: all 0.3s ease;
}

.company-card:hover, .gender-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Inventory, Mark, Note, Category, Place cards */
.inventory-card, .mark-card, .category-card.inventory, .place-card {
    transition: all 0.3s ease;
}

.inventory-card:hover, .mark-card:hover, .category-card.inventory:hover, .place-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Requestor specific styles */
.requestor-card {
    transition: all 0.3s ease;
}

.requestor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Intervention card styles */
.intervention-card {
    transition: all 0.3s ease;
    border-left: 4px solid #6366f1;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.intervention-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.ticket-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px 12px 0 0;
    font-weight: bold;
}

.ticket-number {
    font-size: 1.2em;
    font-weight: bold;
}

.intervention-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85em;
}

.status-badge {
    font-size: 0.75em;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
}

.status-open {
    background-color: #fbbf24;
    color: #000;
}

.status-closed {
    background-color: #10b981;
    color: #fff;
}

.status-partial {
    background-color: #06b6d4;
    color: #fff;
}

/* Empty state */
.empty-state {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    border: 2px dashed var(--border-color);
}

/* Pagination styles */
.pagination-top {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pagination-top .pagination {
    margin-bottom: 0;
}

.pagination .page-link {
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    margin: 0 0.125rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.disabled .page-link {
    background: var(--light-color);
    color: var(--text-muted);
    border-color: var(--border-color);
}

/* Enhanced button outline primary */
.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: white;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.w-fixed {
    min-width: 120px;
}

/* Table modern styles */
.table-modern {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

.table-modern th {
    border-top: none;
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 0.5rem;
    background: transparent;
    white-space: nowrap;
}

.table-modern td {
    vertical-align: middle;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.table-modern tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.03);
}

.table-modern .text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Compact button styles */
.btn-icon-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-group-sm .btn-icon-sm {
    padding: 0.25rem 0.375rem;
    font-size: 0.7rem;
    min-width: 1.8rem;
    height: 1.8rem;
}

.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.btn-group .btn:last-child {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.btn-group .btn:not(:first-child):not(:last-child) {
    border-radius: 0;
}

/* Inline editing styles */
.inline-edit-container {
    position: relative;
}

.inline-view {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.inline-edit {
    min-width: 200px;
}

.inline-edit-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 0.125rem 0.25rem;
    font-size: 0.75rem;
    min-width: 1.5rem;
    height: 1.5rem;
}

.inline-edit-container:hover .inline-edit-btn {
    opacity: 1;
}

.form-select-sm {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    min-height: 2rem;
}

/* HTMX inline editing feedback */
.inline-edit-container.htmx-request .inline-edit-btn {
    opacity: 0;
}

.inline-edit-container.htmx-success .inline-view {
    background-color: rgba(34, 197, 94, 0.1);
    border-radius: 0.25rem;
    padding: 0.125rem 0.25rem;
    transition: background-color 0.3s ease;
    animation: fadeBackground 2s ease-out;
}

.inline-edit-container.htmx-error .inline-view {
    background-color: rgba(239, 68, 68, 0.1);
    border-radius: 0.25rem;
    padding: 0.125rem 0.25rem;
    transition: background-color 0.3s ease;
    animation: fadeBackgroundError 2s ease-out;
}

/* Background fade animations */
@keyframes fadeBackground {
    0% { background-color: rgba(34, 197, 94, 0.1); }
    100% { background-color: transparent; }
}

@keyframes fadeBackgroundError {
    0% { background-color: rgba(239, 68, 68, 0.1); }
    100% { background-color: transparent; }
}

/* View toggle animation */
.inventory-view {
    transition: opacity 0.3s ease;
}

.btn-group .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Search form styles */
.search-form .form-control {
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    line-height: 1.5;
    box-sizing: border-box;
    margin-bottom: 0;
}

.search-form .btn-modern {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin-bottom: 0;
}

.search-form .form-group {
    margin-bottom: 0;
}

.search-form .row.align-items-center {
    align-items: center !important;
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* Intervention specific styles */
.form-modern .form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.form-modern .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

.form-modern .form-label {
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-modern .form-select {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-modern .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* Enhanced button styles for intervention */
.btn-modern.intervention {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: none;
    min-height: 44px;
}

.btn-primary-modern.intervention {
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    color: white;
}

.btn-primary-modern.intervention:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-outline-modern.intervention {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-modern.intervention:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-danger-modern.intervention {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger-modern.intervention:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Form group styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control-lg, .form-select-lg {
    padding: 1rem;
    font-size: 1rem;
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* HTMX animations for intervention new */
@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

@keyframes fadeOut { 
    from { opacity: 1; } 
    to { opacity: 0; } 
}

@keyframes slideIn { 
    from { transform: translateY(20px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}

.fade-in { 
    animation: fadeIn 0.6s ease-in-out; 
}

.fade-out { 
    animation: fadeOut 0.6s ease-in-out; 
}

#categories-container {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#categories-container.htmx-swapping {
    opacity: 0;
    transform: translateY(-8px);
}

#categories-container.htmx-settling {
    opacity: 0;
    transform: translateY(8px);
}

/* Buttons variations */
.btn-outline-success-modern {
    border: 2px solid var(--success-color);
    color: var(--success-color);
    background: white;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-success-modern:hover {
    background: var(--success-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-outline-warning-modern {
    border: 2px solid var(--warning-color);
    color: var(--warning-color);
    background: white;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-warning-modern:hover {
    background: var(--warning-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-outline-duplicate-modern {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    background: white;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline-duplicate-modern:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.4);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .flex-fill {
        flex: 1 1 auto;
    }
    
    .category-icon {
        font-size: 2rem;
    }
    
    .btn-modern {
        padding: 0.312rem 0.75rem;
        font-size: 0.75rem;
        min-width: 60px;
    }
    
    .btn-modern.btn-toggle {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
        padding: 0.25rem 0.375rem;
        font-size: 0.7rem;
    }
    
    .modern-clocking-item {
        padding: 0.75rem;
    }
    
    .card-body-modern {
        padding: 1rem;
    }
    
    .btn-modern.intervention {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .form-modern .form-control,
    .form-modern .form-select {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Pagination responsive */
    .pagination-top {
        padding: 0.75rem;
    }
    
    .pagination .page-link {
        padding: 0.375rem 0.625rem;
        font-size: 0.875rem;
    }
    
    /* Table responsive */
    .table-modern {
        font-size: 0.75rem;
    }
    
    .table-modern th,
    .table-modern td {
        padding: 0.3rem 0.2rem;
    }
    
    .btn-icon-sm {
        padding: 0.15rem 0.25rem;
        font-size: 0.6rem;
        min-width: 1.4rem;
        height: 1.4rem;
    }
    
    /* Requestor responsive */
    .empty-state {
        padding: 2rem 1rem;
    }
}

/* Medium screens responsive */
@media (max-width: 1200px) {
    .table-modern th,
    .table-modern td {
        padding: 0.4rem 0.3rem;
        font-size: 0.8rem;
    }
    
    .btn-icon-sm {
        padding: 0.2rem 0.3rem;
        font-size: 0.65rem;
        min-width: 1.6rem;
        height: 1.6rem;
    }
}

/* ==========================================================================
   Modern Intervention Wizard - Design Aéré et Élégant
   ========================================================================== */
.intervention-wizard {
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.intervention-wizard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.015) 0%, transparent 50%);
    pointer-events: none;
}

.wizard-progress {
    display: none;
}

.wizard-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.wizard-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(148, 163, 184, 0.2);
    position: relative;
    overflow: hidden;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wizard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.02) 0%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wizard-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wizard-card:hover::before {
    opacity: 1;
}

.wizard-card a {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    padding: 1rem 0.75rem;
    z-index: 2;
}

.wizard-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #6366f1;
    transition: all 0.2s ease;
}

.wizard-card:hover .wizard-card-icon {
    color: #4f46e5;
    transform: scale(1.05);
}

.wizard-card-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: #1e293b;
    margin: 0;
    transition: all 0.2s ease;
    line-height: 1.2;
}

.wizard-card:hover .wizard-card-title {
    color: #4f46e5;
}

.wizard-card-subtitle {
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 0.25rem;
    font-weight: 400;
    opacity: 0.8;
    transition: all 0.2s ease;
}

.wizard-card:hover .wizard-card-subtitle {
    opacity: 1;
    color: #475569;
}

/* Category cards - Purple theme */
.wizard-card--category .wizard-card-icon {
    color: #8b5cf6;
}

.wizard-card--category:hover {
    border-color: rgba(139, 92, 246, 0.3);
}

.wizard-card--category:hover .wizard-card-icon,
.wizard-card--category:hover .wizard-card-title {
    color: #7c3aed;
}

/* Subcategory cards - Pink theme */
.wizard-card--subcategory .wizard-card-icon {
    color: #ec4899;
}

.wizard-card--subcategory:hover {
    border-color: rgba(236, 72, 153, 0.3);
}

.wizard-card--subcategory:hover .wizard-card-icon,
.wizard-card--subcategory:hover .wizard-card-title {
    color: #db2777;
}

/* Company cards - Blue theme */
.wizard-card--company .wizard-card-icon {
    color: #3b82f6;
}

.wizard-card--company:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.wizard-card--company:hover .wizard-card-icon,
.wizard-card--company:hover .wizard-card-title {
    color: #2563eb;
}

/* Requestor cards - Emerald theme */
.wizard-card--requestor .wizard-card-icon {
    color: #10b981;
}

.wizard-card--requestor:hover {
    border-color: rgba(16, 185, 129, 0.3);
}

.wizard-card--requestor:hover .wizard-card-icon,
.wizard-card--requestor:hover .wizard-card-title {
    color: #059669;
}

/* Search container */
.wizard-search {
    background: #ffffff;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.2);
    position: relative;
}

.wizard-search-input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.875rem;
    padding: 0.25rem;
    background: transparent;
    color: #1e293b;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.wizard-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.wizard-search-input:focus {
    color: #1e293b;
}

/* Loading state */
.wizard-loading {
    text-align: center;
    padding: 2rem 1rem;
    color: #64748b;
}

.wizard-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(148, 163, 184, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 0.75rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .intervention-wizard {
        padding: 1.25rem;
        border-radius: 8px;
    }
    
    .wizard-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.625rem;
    }
    
    .wizard-card {
        min-height: 85px;
    }
    
    .wizard-card a {
        padding: 0.875rem 0.625rem;
    }
    
    .wizard-card-icon {
        font-size: 1.375rem;
        margin-bottom: 0.375rem;
    }
    
    .wizard-card-title {
        font-size: 0.75rem;
    }
    
    .wizard-progress {
        margin-bottom: 1.25rem;
        padding: 0 1.5rem;
    }
    
    .wizard-step {
        width: 20px;
        height: 20px;
        font-size: 0.65rem;
    }
    
    .wizard-search {
        padding: 0.625rem 0.875rem;
    }
    
    .wizard-search-input {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .wizard-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .wizard-card {
        min-height: 80px;
    }
    
    .wizard-card a {
        padding: 0.75rem 0.5rem;
    }
    
    .wizard-card-icon {
        font-size: 1.25rem;
    }
    
    .wizard-card-title {
        font-size: 0.7rem;
    }
    
    .wizard-card-subtitle {
        font-size: 0.6rem;
    }
    
    .intervention-wizard {
        padding: 1rem;
    }
}

/* Finalize form styles */
.finalize-form {
    border: 1px solid rgba(99, 102, 241, 0.18);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(6px);
}

.finalize-form .form-label {
    color: #0f172a;
    letter-spacing: 0.01em;
}

.finalize-form .form-control {
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.finalize-form .form-control:focus {
    border-color: rgba(99, 102, 241, 0.65);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.finalize-form .form-text {
    color: #64748b;
}

/* Create button in categories container */
#categories-container .btn-create {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.25rem;
    border-radius: 10px;
    border: 1px solid rgba(99, 102, 241, 0.35);
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 55%, #8b5cf6 100%);
    color: #fff;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1;
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.25);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

#categories-container .btn-create:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(79, 70, 229, 0.28);
    filter: brightness(1.03) saturate(1.05);
}

#categories-container .btn-create:active {
    transform: translateY(0);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.22);
}

#categories-container .btn-create:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.9),
        0 0 0 8px rgba(99, 102, 241, 0.35),
        0 10px 20px rgba(79, 70, 229, 0.25);
}

/* Category card animation */
.category-card {
    animation: slideIn 0.5s ease-out forwards;
    opacity: 0;
}

/* ==========================================================================
   15. Print styles
   ========================================================================== */
@media print {
    *, *:before, *:after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a, a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    pre, blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr, img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    p, h2, h3 {
        orphans: 3;
        widows: 3;
    }

    h2, h3 {
        page-break-after: avoid;
    }
}

/* ==========================================================================
   Select2 Styles - Pour uniformiser avec les autres champs
   ========================================================================== */

/* Conteneur principal Select2 */
.select2-container--bootstrap4 .select2-selection,
.select2-container--bootstrap4.select2-company .select2-selection {
    border: 2px solid var(--gray-200) !important;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    min-height: 48px !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
}

/* Focus state */
.select2-container--bootstrap4.select2-container--focus .select2-selection,
.select2-container--bootstrap4.select2-container--open .select2-selection {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
    outline: none !important;
}

/* Flèche de sélection */
.select2-container--bootstrap4 .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 1rem !important;
    width: 20px !important;
    position: absolute !important;
}

.select2-container--bootstrap4 .select2-selection__arrow b {
    border-color: var(--gray-500) transparent transparent transparent !important;
    border-width: 6px 6px 0 6px !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

/* Placeholder */
.select2-container--bootstrap4 .select2-selection__placeholder {
    color: var(--gray-400) !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
}

/* Option sélectionnée */
.select2-container--bootstrap4 .select2-selection__rendered {
    line-height: 1.5 !important;
    padding: 0 !important;
    color: var(--gray-800) !important;
}

/* Dropdown */
.select2-dropdown {
    border: 2px solid var(--gray-200) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    margin-top: 4px !important;
}

/* Options du dropdown */
.select2-results__option {
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    color: var(--gray-700) !important;
    border-bottom: 1px solid var(--gray-100) !important;
}

.select2-results__option:last-child {
    border-bottom: none !important;
}

/* Option au survol */
.select2-results__option--highlighted {
    background-color: var(--primary-ultra-light) !important;
    color: var(--primary-dark) !important;
}

/* Option sélectionnée */
.select2-results__option[aria-selected="true"] {
    background-color: var(--primary-light) !important;
    color: #ffffff !important;
}

/* Recherche dans le dropdown */
.select2-search--dropdown {
    padding: 0.75rem !important;
    border-bottom: 2px solid var(--gray-200) !important;
}

.select2-search--dropdown .select2-search__field {
    border: 2px solid var(--gray-200) !important;
    border-radius: 6px !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem !important;
    outline: none !important;
}

.select2-search--dropdown .select2-search__field:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}

/* États de validation */
.select2-container--bootstrap4.is-invalid .select2-selection {
    border-color: var(--danger-color) !important;
}

.select2-container--bootstrap4.is-valid .select2-selection {
    border-color: var(--success-color) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .select2-container--bootstrap4 .select2-selection {
        padding: 0.6rem 0.8rem !important;
        min-height: 44px !important;
        font-size: 0.9rem !important;
    }
    
    .select2-results__option {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.85rem !important;
    }
}

/* ==========================================================================
   Requestor Table Styles - Inspiré de intervention/index
   ========================================================================== */

#tableView .table-summary-strip {
    border-bottom: 1px solid var(--gray-100);
    background: linear-gradient(135deg, var(--gray-50), #fff);
    padding: 0.9rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#tableView .summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid var(--gray-200);
    background: #fff;
    color: var(--gray-700);
}

#tableView .table-responsive {
    max-height: 72vh;
    overflow: auto;
}

#tableView .table-modern thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    backdrop-filter: blur(6px);
    box-shadow: inset 0 -1px 0 var(--gray-200);
}

#tableView .requestor-row td {
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

#tableView .requestor-row:hover td {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.06), rgba(99, 102, 241, 0.015));
}

#tableView .cell-company {
    color: var(--gray-700);
    font-weight: 600;
}

#tableView .table-actions .btn {
    border-radius: 8px !important;
}

#tableView .table-actions .btn:hover {
    transform: translateY(-1px);
}

/* ==========================================================================
   Sidebar Collapsed Mode - Réduction de la navbar
   ========================================================================== */

/* Variable pour la largeur réduite */
:root {
    --sidebar-width-collapsed: 70px;
}

/* Bouton toggle de la sidebar */
.sidebar-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.1);
}

.sidebar-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Sidebar en mode réduit */
.sidebar.collapsed {
    width: var(--sidebar-width-collapsed);
}

/* Main wrapper adapté pour la sidebar réduite */
.main-wrapper {
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed + .main-wrapper {
    margin-left: var(--sidebar-width-collapsed);
}

/* Logo en mode réduit */
.sidebar.collapsed .sidebar-logo span {
    display: none;
}

.sidebar.collapsed .sidebar-logo {
    justify-content: center;
}

.sidebar.collapsed .sidebar-logo i {
    margin: 0;
}

/* Bouton toggle en mode réduit */
.sidebar.collapsed .sidebar-toggle {
    right: 50%;
    transform: translateY(-50%) translateX(50%);
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* Navigation en mode réduit */
.sidebar.collapsed .nav-section-title {
    padding: 0.75rem 0;
    margin: 0 0.5rem;
    justify-content: center;
    text-align: center;
}

.sidebar.collapsed .nav-section-title span {
    display: none;
}

.sidebar.collapsed .nav-section-title i {
    font-size: 1rem;
}

/* Liens de navigation en mode réduit */
.sidebar.collapsed .nav-link {
    padding: 0.875rem 0;
    justify-content: center;
    border-left: none;
    border-radius: var(--border-radius-md);
    margin: 0 0.5rem;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .nav-link i {
    width: auto;
    font-size: 1.25rem;
}

.sidebar.collapsed .nav-link:hover {
    transform: scale(1.05);
    background: rgba(99, 102, 241, 0.15);
}

.sidebar.collapsed .nav-link.active {
    background: rgba(99, 102, 241, 0.2);
}

/* Sections de navigation en mode réduit - toujours étendues */
.sidebar.collapsed .nav-section-content {
    max-height: 2000px;
    padding: 0.5rem 0;
}

.sidebar.collapsed .nav-section-title i {
    display: none;
}

/* Menu de langue en mode réduit */
.sidebar.collapsed #languageMenu {
    display: none;
}

.sidebar.collapsed .nav-link[data-bs-target="#languageMenu"] {
    display: flex;
}
