/* ========================================
   FAMILLE ZIBLI - DESIGN PROFESSIONNEL & MAGNIFIQUE
   Premium Management System
   ======================================== */

/* --- VARIABLES CSS --- */
:root {
    /* Palette Premium Blue */
    --primary-color: #0066ff;
    --primary-light: #3385ff;
    --primary-dark: #0052cc;
    --primary-gradient: linear-gradient(135deg, #0066ff 0%, #00c6ff 100%);
    
    --secondary-color: #00c6ff;
    --secondary-light: #33d4ff;
    --secondary-dark: #0099cc;
    --secondary-gradient: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    
    /* Couleurs Accentuées */
    --accent-blue: #0066ff;
    --accent-cyan: #00c6ff;
    --accent-coral: #ff6b6b;
    --accent-teal: #4ecdc4;
    --accent-orange: #ffa502;
    
    /* Couleurs de Statut Premium */
    --success-color: #00d2d3;
    --success-gradient: linear-gradient(135deg, #00d2d3 0%, #54a0ff 100%);
    
    --danger-color: #ff6b6b;
    --danger-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    
    --warning-color: #ffa502;
    --warning-gradient: linear-gradient(135deg, #ffa502 0%, #ff7f50 100%);
    
    --info-color: #54a0ff;
    --info-gradient: linear-gradient(135deg, #54a0ff 0%, #5f27cd 100%);
    
    /* Couleurs Neutres Premium */
    --gray-50: #fafbfc;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Gradients Premium Blue */
    --gradient-hero: linear-gradient(135deg, #0066ff 0%, #00c6ff 50%, #0072ff 100%);
    --gradient-mesh: 
        radial-gradient(at 40% 20%, hsla(210, 100%, 50%, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 0%, hsla(189, 100%, 50%, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 50%, hsla(200, 100%, 50%, 0.1) 0px, transparent 50%),
        radial-gradient(at 80% 50%, hsla(195, 100%, 50%, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 100%, hsla(210, 100%, 50%, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 100%, hsla(200, 100%, 50%, 0.15) 0px, transparent 50%),
        radial-gradient(at 0% 0%, hsla(195, 100%, 50%, 0.1) 0px, transparent 50%);
    
    /* Fond Premium */
    --bg-primary: #ffffff;
    --bg-secondary: #fafbfc;
    --bg-tertiary: #f3f4f6;
    --bg-glass: rgba(255, 255, 255, 0.95);
    --bg-glass-dark: rgba(17, 24, 39, 0.95);
    
    /* Texte Premium */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-light: #ffffff;
    --text-gradient: linear-gradient(135deg, #0066ff 0%, #00c6ff 100%);
    
    /* Ombres Premium Blue */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(0, 102, 255, 0.4);
    --shadow-glow-blue: 0 0 30px rgba(0, 198, 255, 0.3);
    
    /* Espacement */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border Radius Premium */
    --radius-sm: 0.375rem;
    --radius-md: 0.625rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Transitions Premium */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* --- RESET & BASE PREMIUM --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-mesh);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

/* --- LAYOUT --- */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Container principal avec largeur limitée */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Container pour le contenu principal (limité à 1200px) */
.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Classe pour limiter le contenu à 1200px */
.content-limited {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    width: 100%;
}

/* Container pleine largeur pour header et footer */
.full-width {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 var(--spacing-lg);
}

/* --- HEADER PREMIUM --- */
.header-modern {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg) 0;
    gap: var(--spacing-xl);
    max-width: 100%;
    margin: 0;
    width: 100%;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* --- FOOTER PREMIUM --- */
.footer {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    margin-top: auto;
}

.footer-content {
    max-width: 1350px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    text-align: center;
}

.footer-content p {
    margin: var(--spacing-sm) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-version {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.footer-love {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 700;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: var(--transition);
}

.logo-wrapper:hover {
    transform: scale(1.05);
}

.logo-icon {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* --- ANIMATIONS SUPPLEMENTAIRES --- */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: var(--shadow-lg), var(--shadow-glow);
    }
    50% {
        box-shadow: var(--shadow-xl), 0 0 40px rgba(0, 102, 255, 0.6);
    }
}

/* --- ANIMATION UTILITIES --- */
.animate-slide-left {
    animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-up {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-scale {
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-glow {
    animation: glowPulse 2s ease-in-out infinite;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
    font-weight: 500;
    opacity: 0.8;
}

.header-divider {
    width: 1px;
    height: 50px;
    background: linear-gradient(180deg, transparent, var(--gray-300), transparent);
}

/* --- NAVIGATION PREMIUM --- */
.main-nav {
    flex: 1;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: var(--transition-smooth);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition);
    z-index: -1;
}

.nav-link:hover {
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.nav-link.active {
    background: var(--primary-gradient);
    color: var(--text-light);
    box-shadow: var(--shadow-glow);
}

.nav-icon {
    font-size: 1.25rem;
    transition: var(--transition);
}

.nav-link:hover .nav-icon {
    transform: scale(1.2) rotate(5deg);
}

.nav-text {
    font-size: 0.9rem;
    font-weight: 600;
}

/* --- MAIN CONTENT --- */
main {
    flex: 1;
    padding: 0;
}

.main-content-wrapper {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0;
}

/* --- PAGE HEADER PREMIUM --- */
.page-header {
    margin-bottom: var(--spacing-md);
    margin-top: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-hero);
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
    letter-spacing: -1px;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.page-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 4px var(--spacing-sm);
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

/* --- DASHBOARD PREMIUM --- */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-gradient);
    transition: var(--transition);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl), var(--shadow-glow-blue);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card.danger::before {
    background: var(--danger-gradient);
}

.stat-card.success::before {
    background: var(--success-gradient);
}

.stat-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.stat-card .value {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2px;
    letter-spacing: -1px;
}

.stat-card p {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

/* --- SECTIONS PREMIUM --- */
.section {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--spacing-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-smooth);
}

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

.section-header {
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* --- ALERTS --- */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.alert-success {
    background: #ecfdf5;
    border-color: var(--success-color);
    color: var(--success-dark);
}

.alert-danger {
    background: #fef2f2;
    border-color: var(--danger-color);
    color: var(--danger-dark);
}

.alert-warning {
    background: #fffbeb;
    border-color: var(--warning-color);
    color: var(--warning-dark);
}

.alert-info {
    background: #eff6ff;
    border-color: var(--info-color);
    color: var(--info-dark);
}

/* --- BUTTONS PREMIUM --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--radius-xl);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

.btn::before {
    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, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

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

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-light);
}

.btn-success {
    background: var(--success-gradient);
    color: var(--text-light);
}

.btn-danger {
    background: var(--danger-gradient);
    color: var(--text-light);
}

.btn-warning {
    background: var(--warning-gradient);
    color: var(--text-light);
}

.btn-info {
    background: var(--info-gradient);
    color: var(--text-light);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
    color: var(--text-primary);
}

/* --- TABLES --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-md);
}

thead {
    background: var(--bg-tertiary);
}

th {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--gray-200);
}

td {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
}

tbody tr:hover {
    background: var(--bg-secondary);
}

/* --- BADGES --- */
.badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: #ecfdf5;
    color: var(--success-dark);
}

.badge-danger {
    background: #fef2f2;
    color: var(--danger-dark);
}

.badge-warning {
    background: #fffbeb;
    color: var(--warning-dark);
}

.badge-info {
    background: #eff6ff;
    color: var(--info-dark);
}

/* --- FORMS --- */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: var(--transition);
}

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

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* --- UTILITIES PREMIUM --- */
.text-success {
    color: var(--success-color);
}

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

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

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

.text-muted {
    color: var(--text-muted);
}

.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* --- NAV GRID PREMIUM --- */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.nav-link-override {
    text-decoration: none;
    color: inherit;
    display: block;
}

.nav-card {
    padding: var(--spacing-xl);
    border-radius: var(--radius-2xl);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-lg);
    color: white;
    position: relative;
    overflow: hidden;
    /* Centrage du contenu */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: var(--transition);
}

.nav-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
}

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

.nav-card-primary {
    background: var(--primary-gradient);
}

.nav-card-success {
    background: var(--success-gradient);
}

.nav-card-info {
    background: var(--info-gradient);
}

.nav-card-warning {
    background: var(--warning-gradient);
}

.nav-card-icon {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: var(--transition);
    /* S'assurer que l'icône ne subit pas de décalage */
    display: inline-block;
    line-height: 1;
}

.nav-card:hover .nav-card-icon {
    transform: scale(1.1) rotate(5deg);
}

.nav-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.5px;
}

.nav-card p {
    opacity: 0.95;
    font-size: 0.95rem;
    margin-bottom: var(--spacing-md);
}

.nav-card-action {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-lg);
    display: inline-block;
    font-weight: 700;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
}

.nav-card:hover .nav-card-action {
    background: rgba(255, 255, 255, 0.35);
    transform: translateX(5px);
}

/* --- ACTIONS GRID PREMIUM --- */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-md);
}

/* --- INFO BOX PREMIUM --- */
.info-box-premium {
    background: var(--primary-gradient);
    padding: var(--spacing-xl);
    border-radius: var(--radius-2xl);
    margin-top: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    color: white;
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.info-box-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.info-icon-premium {
    font-size: 4rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    flex-shrink: 0;
    animation: float 3s ease-in-out infinite;
}

.info-content-premium {
    flex: 1;
    position: relative;
    z-index: 1;
}

.info-content-premium h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    color: white;
    letter-spacing: -0.5px;
}

.info-content-premium p {
    opacity: 0.95;
    color: white;
    font-size: 1rem;
    line-height: 1.6;
}

/* --- RESPONSIVE PREMIUM --- */
@media (max-width: 1024px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
    
    .header-divider {
        display: none;
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: var(--spacing-xs);
    }
    
    .nav-link {
        width: 100%;
        padding: var(--spacing-md);
    }
    
    .dashboard {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .nav-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .page-header {
        padding: var(--spacing-lg);
    }
    
    .section {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .dashboard {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .nav-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .stat-card {
        padding: var(--spacing-lg);
    }
    
    .stat-card .value {
        font-size: 2rem;
    }
    
    .stat-card h3 {
        font-size: 0.9rem;
    }
    
    .nav-card {
        padding: var(--spacing-lg);
    }
    
    .nav-card-icon {
        font-size: 2.5rem;
    }
    
    .nav-card h3 {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .info-box-premium {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .info-icon-premium {
        font-size: 3rem;
    }
    
    .logo-title {
        font-size: 1.3rem;
    }
    
    .logo-subtitle {
        font-size: 0.75rem;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .stat-card .value {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.8rem;
    }
    
    .logo-title {
        font-size: 1.1rem;
    }
}

/* --- FOOTER PREMIUM --- */
.footer {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-hero);
}

.footer::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -25%;
    width: 50%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.footer-content {
    text-align: center;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-content p {
    font-size: 0.85rem;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.footer-content strong {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.footer-version {
    font-size: 0.85rem !important;
    color: var(--text-muted);
    margin-top: var(--spacing-md) !important;
}

.footer-love {
    font-size: 0.8rem !important;
    color: var(--text-muted);
    opacity: 0.7;
}

/* ========================================
   PAGE HEADER PREMIUM - GESTION STOCK
   ======================================== */

.page-header-premium {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-xl);
    margin-bottom: var(--spacing-xl);
    border: 2px solid rgba(0, 102, 255, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 1350px;
    margin-left: auto;
    margin-right: auto;
}

.page-header-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-hero);
}

.page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.page-header-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex: 1;
    min-width: 300px;
}

.page-header-icon {
    font-size: 4rem;
    filter: drop-shadow(0 4px 12px rgba(0, 102, 255, 0.3));
    animation: float 3s ease-in-out infinite;
}

.page-header-text h1 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 var(--spacing-xs) 0;
    letter-spacing: -1px;
}

.page-header-text p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.page-header-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Boutons d'action premium */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-action::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.5s;
}

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

.btn-action-primary {
    background: var(--primary-gradient);
    color: white;
    border-color: rgba(0, 102, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.btn-action-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.4);
}

.btn-action-success {
    background: var(--success-gradient);
    color: white;
    border-color: rgba(0, 210, 211, 0.3);
    box-shadow: 0 4px 15px rgba(0, 210, 211, 0.3);
}

.btn-action-success:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 210, 211, 0.4);
}

.btn-action-secondary {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(156, 163, 175, 0.1) 100%);
    color: var(--text-primary);
    border-color: rgba(107, 114, 128, 0.3);
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.2);
}

.btn-action-secondary:hover {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.2) 0%, rgba(156, 163, 175, 0.2) 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.3);
}

.btn-action-icon {
    font-size: 1.2rem;
}

.btn-action-text {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   STATISTIQUES PREMIUM - GESTION STOCK
   ======================================== */

.stats-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    max-width: 1350px;
    margin-left: auto;
    margin-right: auto;
}

.stat-premium-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-xl);
    border: 2px solid;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    transition: var(--transition-smooth);
}

.stat-premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.stat-premium-card::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.stat-premium-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.stat-premium-card:hover::after {
    opacity: 1;
}

/* Variantes de couleurs */
.stat-premium-blue {
    border-color: rgba(0, 102, 255, 0.2);
}

.stat-premium-blue::before {
    background: var(--primary-gradient);
}

.stat-premium-blue:hover {
    box-shadow: 0 20px 40px rgba(0, 102, 255, 0.3);
}

.stat-premium-purple {
    border-color: rgba(95, 39, 205, 0.2);
}

.stat-premium-purple::before {
    background: linear-gradient(135deg, #5f27cd 0%, #a855f7 100%);
}

.stat-premium-purple:hover {
    box-shadow: 0 20px 40px rgba(95, 39, 205, 0.3);
}

.stat-premium-green {
    border-color: rgba(0, 210, 211, 0.2);
}

.stat-premium-green::before {
    background: var(--success-gradient);
}

.stat-premium-green:hover {
    box-shadow: 0 20px 40px rgba(0, 210, 211, 0.3);
}

.stat-premium-orange {
    border-color: rgba(255, 165, 2, 0.2);
}

.stat-premium-orange::before {
    background: var(--warning-gradient);
}

.stat-premium-orange:hover {
    box-shadow: 0 20px 40px rgba(255, 165, 2, 0.3);
}

/* Icône des statistiques */
.stat-premium-icon {
    font-size: 3rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    flex-shrink: 0;
    animation: float 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* Contenu des statistiques */
.stat-premium-content {
    flex: 1;
    min-width: 0;
}

.stat-premium-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-xs);
}

.stat-premium-value {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
    letter-spacing: -1px;
    line-height: 1;
}

.stat-premium-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Trend indicator */
.stat-premium-trend {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.stat-trend-up {
    background: linear-gradient(135deg, rgba(0, 210, 211, 0.2) 0%, rgba(84, 160, 255, 0.2) 100%);
    border: 1px solid rgba(0, 210, 211, 0.3);
}

.stat-trend-down {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2) 0%, rgba(238, 90, 111, 0.2) 100%);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.stat-trend-neutral {
    background: linear-gradient(135deg, rgba(156, 163, 175, 0.2) 0%, rgba(107, 114, 128, 0.2) 100%);
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.trend-icon {
    font-size: 1.2rem;
}

/* Responsive pour les statistiques */
@media (max-width: 1024px) {
    .stats-premium {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .stats-premium {
        grid-template-columns: 1fr;
    }

    .page-header-icon {
        font-size: 3rem;
    }

    .page-header-text h1 {
        font-size: 1.5rem;
    }

    .stat-premium-value {
        font-size: 1.5rem;
    }
}

/* ========================================
   TABLEAU PREMIUM - GESTION STOCK
   ======================================== */

.table-premium-container {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-xl);
    border: 2px solid rgba(0, 102, 255, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 1350px;
    margin-left: auto;
    margin-right: auto;
}

.table-premium-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-hero);
}

.table-premium-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid rgba(0, 102, 255, 0.1);
}

.table-premium-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.table-premium-title h3 {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.table-premium {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.table-premium thead {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.05) 0%, rgba(0, 198, 255, 0.05) 100%);
}

.table-premium th {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(0, 102, 255, 0.2);
    position: relative;
}

.table-premium th:first-child {
    border-top-left-radius: var(--radius-lg);
}

.table-premium th:last-child {
    border-top-right-radius: var(--radius-lg);
}

.table-premium tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 102, 255, 0.05);
}

.table-premium tbody tr:hover {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.03) 0%, rgba(0, 198, 255, 0.03) 100%);
    transform: scale(1.01);
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.1);
}

.table-premium td {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.table-premium td:first-child {
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

.table-premium td:last-child {
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

/* Badges premium */
.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-premium-success {
    background: linear-gradient(135deg, rgba(0, 210, 211, 0.15) 0%, rgba(84, 160, 255, 0.15) 100%);
    color: #00a8a8;
    border: 1px solid rgba(0, 210, 211, 0.3);
}

.badge-premium-warning {
    background: linear-gradient(135deg, rgba(255, 165, 2, 0.15) 0%, rgba(255, 127, 80, 0.15) 100%);
    color: #cc8400;
    border: 1px solid rgba(255, 165, 2, 0.3);
}

.badge-premium-danger {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, rgba(238, 90, 111, 0.15) 100%);
    color: #cc4444;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

/* Boutons d'action tableau */
.btn-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 1rem;
    margin: 0 2px;
}

.btn-table-action:hover {
    transform: translateY(-2px) scale(1.1);
}

.btn-table-edit {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.15) 0%, rgba(0, 198, 255, 0.15) 100%);
    border: 1px solid rgba(0, 102, 255, 0.3);
}

.btn-table-edit:hover {
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.4);
}

.btn-table-delete {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.15) 0%, rgba(238, 90, 111, 0.15) 100%);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.btn-table-delete:hover {
    background: var(--danger-gradient);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* Responsive tableau */
@media (max-width: 1024px) {
    .table-premium-container {
        padding: var(--spacing-lg);
        overflow-x: auto;
    }

    .table-premium {
        min-width: 800px;
    }
}

/* Container principal limité à 1350px */
.content-limited-1350 {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    width: 100%;
}

/* Section limitée à 1350px */
.section-limited-1350 {
    max-width: 1350px;
    margin: 0 auto var(--spacing-xl);
    padding: var(--spacing-xl);
    width: 100%;
}

/* Filtres limités à 1350px */
.filters-premium-limited {
    max-width: 1350px;
    margin: 0 auto var(--spacing-xl);
}

/* Fade in animation */
.fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========================================
   FILTRES PREMIUM - SECTION FILTRES
   ======================================== */

.filters-premium {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-xl);
    margin-bottom: var(--spacing-xl);
    border: 2px solid rgba(0, 102, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    max-width: 1350px;
    margin-left: auto;
    margin-right: auto;
}

.filters-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-hero);
}

.filters-premium:hover {
    box-shadow: var(--shadow-2xl), 0 0 30px rgba(0, 102, 255, 0.15);
    border-color: rgba(0, 102, 255, 0.2);
}

/* Header des filtres */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid rgba(0, 102, 255, 0.1);
}

.filters-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.filters-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 102, 255, 0.3));
    animation: float 3s ease-in-out infinite;
}

.filters-title h3 {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.5px;
}

/* Bouton de réinitialisation */
.btn-reset-filters {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 198, 255, 0.1) 100%);
    border: 2px solid rgba(0, 102, 255, 0.3);
    border-radius: var(--radius-xl);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.btn-reset-filters:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 102, 255, 0.3);
}

.reset-icon {
    font-size: 1rem;
    transition: var(--transition);
}

.btn-reset-filters:hover .reset-icon {
    transform: rotate(180deg);
}

/* Grille des filtres */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    transition: var(--transition);
}

.filter-item-full {
    grid-column: 1 / -1;
}

/* Labels des filtres */
.filter-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-xs);
}

.filter-label-icon {
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 102, 255, 0.2));
}

/* Wrapper pour les selects */
.filter-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-select {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-xl) var(--spacing-md) var(--spacing-md);
    background: var(--bg-primary);
    border: 2px solid rgba(0, 102, 255, 0.2);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
}

.filter-select:hover {
    border-color: rgba(0, 102, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.1);
}

.filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1), 0 0 20px rgba(0, 102, 255, 0.15);
}

.filter-select-icon {
    position: absolute;
    right: var(--spacing-md);
    pointer-events: none;
    color: var(--primary-color);
    font-size: 0.8rem;
    transition: var(--transition);
}

.filter-select-wrapper:hover .filter-select-icon {
    transform: translateY(2px);
}

/* Wrapper pour la recherche */
.filter-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-search {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-xl) var(--spacing-md) var(--spacing-md);
    background: var(--bg-primary);
    border: 2px solid rgba(0, 102, 255, 0.2);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    outline: none;
}

.filter-search::placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

.filter-search:hover {
    border-color: rgba(0, 102, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.1);
}

.filter-search:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1), 0 0 20px rgba(0, 102, 255, 0.15);
}

.filter-search-icon {
    position: absolute;
    right: var(--spacing-md);
    pointer-events: none;
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 102, 255, 0.2));
}

/* Statistiques des filtres */
.filters-stats {
    display: flex;
    gap: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 2px solid rgba(0, 102, 255, 0.1);
    flex-wrap: wrap;
}

.filter-stat {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.08) 0%, rgba(0, 198, 255, 0.08) 100%);
    border: 1px solid rgba(0, 102, 255, 0.2);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.filter-stat:hover {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.15) 0%, rgba(0, 198, 255, 0.15) 100%);
    border-color: rgba(0, 102, 255, 0.3);
    transform: translateY(-2px);
}

.filter-stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive pour les filtres */
@media (max-width: 1024px) {
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .filter-item-full {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .filters-premium {
        padding: var(--spacing-lg);
    }

    .filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .filters-title h3 {
        font-size: 1.2rem;
    }

    .filters-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .filters-stats {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .filter-stat {
        width: 100%;
    }
}

/* ========================================
   FILTRES PREMIUM - DESIGN ULTRA-MODERNE
   ======================================== */

.filters-premium {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 251, 252, 0.98) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 24px;
    padding: 36px;
    box-shadow:
        0 20px 60px rgba(0, 102, 255, 0.08),
        0 8px 24px rgba(0, 102, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.02);
    margin-bottom: 36px;
    border: 1px solid rgba(0, 102, 255, 0.12);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.filters-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #0066ff 0%, #00c6ff 50%, #0072ff 100%);
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.35);
}

.filters-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(0, 102, 255, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 198, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.filters-premium:hover {
    box-shadow:
        0 28px 72px rgba(0, 102, 255, 0.12),
        0 14px 36px rgba(0, 102, 255, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 102, 255, 0.2);
    transform: translateY(-3px);
}

/* Header des filtres */
.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid rgba(0, 102, 255, 0.08);
    position: relative;
    z-index: 1;
}

.filters-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.filters-icon {
    font-size: 2.8rem;
    filter: drop-shadow(0 4px 12px rgba(0, 102, 255, 0.3));
    animation: float 3s ease-in-out infinite;
    background: linear-gradient(135deg, #0066ff 0%, #00c6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filters-title h3 {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0066ff 0%, #00c6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.8px;
}

/* Bouton de réinitialisation */
.btn-reset-filters {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.08) 0%, rgba(0, 198, 255, 0.08) 100%);
    border: 2px solid rgba(0, 102, 255, 0.2);
    border-radius: 16px;
    color: #0066ff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.08);
}

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

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

.btn-reset-filters:hover {
    background: linear-gradient(135deg, #0066ff 0%, #00c6ff 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 102, 255, 0.35);
}

.reset-icon {
    font-size: 1.2rem;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn-reset-filters:hover .reset-icon {
    transform: rotate(360deg);
}

/* Grille des filtres */
.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s ease;
}

.filter-item:hover {
    transform: translateY(-2px);
}

.filter-item-full {
    grid-column: 1 / -1;
}

/* Labels des filtres */
.filter-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.82rem;
    color: #1f2937;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.filter-label-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 8px rgba(0, 102, 255, 0.2));
}

/* Wrapper pour les selects */
.filter-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-select {
    width: 100%;
    padding: 16px 52px 16px 18px;
    background: white;
    border: 2px solid rgba(0, 102, 255, 0.15);
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    box-shadow: 0 2px 12px rgba(0, 102, 255, 0.05);
}

.filter-select:hover {
    border-color: rgba(0, 102, 255, 0.35);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.1);
}

.filter-select:focus {
    border-color: #0066ff;
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1), 0 6px 24px rgba(0, 102, 255, 0.18);
}

.filter-select-icon {
    position: absolute;
    right: 18px;
    pointer-events: none;
    color: #0066ff;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.filter-select-wrapper:hover .filter-select-icon {
    transform: translateY(3px);
}

/* Wrapper pour la recherche */
.filter-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-search {
    width: 100%;
    padding: 16px 56px 16px 18px;
    background: white;
    border: 2px solid rgba(0, 102, 255, 0.15);
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-shadow: 0 2px 12px rgba(0, 102, 255, 0.05);
}

.filter-search::placeholder {
    color: #9ca3af;
    font-weight: 500;
}

.filter-search:hover {
    border-color: rgba(0, 102, 255, 0.35);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.1);
}

.filter-search:focus {
    border-color: #0066ff;
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1), 0 6px 24px rgba(0, 102, 255, 0.18);
}

.filter-search-icon {
    position: absolute;
    right: 18px;
    pointer-events: none;
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 8px rgba(0, 102, 255, 0.2));
}

/* Statistiques des filtres */
.filters-stats {
    display: flex;
    gap: 18px;
    padding-top: 24px;
    border-top: 2px solid rgba(0, 102, 255, 0.08);
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.filter-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.06) 0%, rgba(0, 198, 255, 0.06) 100%);
    border: 1px solid rgba(0, 102, 255, 0.15);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0, 102, 255, 0.05);
}

.filter-stat:hover {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.12) 0%, rgba(0, 198, 255, 0.12) 100%);
    border-color: rgba(0, 102, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.15);
}

.filter-stat-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.filter-stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0066ff 0%, #00c6ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive pour les filtres */
@media (max-width: 1024px) {
    .filters-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .filter-item-full {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .filters-premium {
        padding: 24px;
        border-radius: 20px;
    }

    .filters-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .filters-title h3 {
        font-size: 1.4rem;
    }

    .filters-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .filters-stats {
        flex-direction: column;
        gap: 12px;
    }

    .filter-stat {
        width: 100%;
    }
}
    .filter-stat {
        width: 100%;
    }
}

/* ========================================
   UTILITAIRES DE CENTRAGE (SUPER-AGENT)
   ======================================== */

/* Centrage Page Header */
.page-header-center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.page-header-center h1,
.page-header-center .page-subtitle,
.page-header-center .page-date {
    text-align: center !important;
    width: 100% !important;
}

/* Centrage Section Header */
.section-header-center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin-bottom: 1.5rem !important;
    padding-bottom: 1rem !important;
    border-bottom: 1px solid rgba(0,0,0,0.05) !important;
}

.section-header-center h2,
.section-header-center h3 {
    text-align: center !important;
    margin-bottom: 1rem !important;
}

/* Centrage Stat Cards */
.stat-card-center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

/* Centrage Empty States */
.empty-state-center {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 3rem !important;
    background-color: #f8f9fa !important;
    border-radius: 12px !important;
    border: 2px dashed #dee2e6 !important;
    margin: 1rem 0 !important;
    width: 100% !important;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Centrage Actions */
.actions-center {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    margin-top: 1rem !important;
    width: 100% !important;
}

/* ========================================
   GLOBAL CENTERING OVERRIDES (BMAD FINAL FIX)
   Force centering for all main container elements
   ======================================== */

/* 1. Centrage des En-têtes de Page (Standard & Premium) */
.page-header, 
.page-header-premium .page-header-content {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.page-header-title {
    flex-direction: column !important;
    text-align: center !important;
    justify-content: center !important;
    width: 100% !important;
}

.page-header-text {
    text-align: center !important;
    margin: 10px 0 !important;
}

.page-header-actions {
    justify-content: center !important;
    width: 100% !important;
    margin-top: 15px !important;
}

/* 2. Centrage des Titres de Section */
.section-header {
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 3. Centrage des Cartes de Statistiques Premium */
.stat-premium-card {
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 30px 20px !important;
}

.stat-premium-icon {
    margin-bottom: 15px !important;
    margin-right: 0 !important; /* Reset margin */
}

.stat-premium-content {
    width: 100%;
}

/* 4. Centrage des Cartes d'Alerte (Dashboard) */
.alert-card {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.alert-header {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
}

.alert-icon {
    order: -1;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

/* 5. Centrage des Messages d'Information */
.info-box-premium {
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
}

.info-icon-premium {
    margin-bottom: 15px;
}

/* 6. Centrage des Tableaux vides (Empty States) */
table tbody tr td[colspan] {
    text-align: center !important;
    padding: 30px !important;
    color: var(--text-muted);
    font-style: italic;
}

/* 7. Centrage des Formulaires (Container) */
.form-container, .login-container {
    margin: 0 auto;
    text-align: center;
}

.form-group-premium label {
    text-align: left; /* Les labels restent à gauche pour la lisibilité */
}

/* FIX CLIC BOUTONS LOYERS (BMAD) */
.stat-premium-card::after,
.stat-premium-card::before {
    pointer-events: none !important; /* Laisse passer le clic */
    z-index: 0 !important;
}

.stat-premium-content {
    position: relative !important;
    z-index: 10 !important; /* Contenu (et boutons) au-dessus de la déco */
}

.btn-action {
    position: relative !important;
    z-index: 20 !important; /* Boutons encore plus au-dessus */
}

/* STYLE BOUTON DECONNEXION EPURE */
.btn-deconnexion {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0.5rem !important;
    color: var(--text-secondary) !important;
    transition: all 0.3s ease !important;
    overflow: hidden;
    max-width: 40px; /* Juste la largeur de l'icône au début */
    white-space: nowrap;
}

.btn-deconnexion::before {
    display: none !important; /* Enlever les effets de bouton */
}

.btn-deconnexion .nav-text {
    opacity: 0;
    max-width: 0;
    display: inline-block;
    transition: all 0.3s ease;
    margin-left: 0;
}

.btn-deconnexion:hover {
    background: rgba(220, 53, 69, 0.1) !important; /* Léger fond rouge au survol */
    color: #dc3545 !important; /* Texte rouge */
    max-width: 150px; /* S'élargit pour montrer le texte */
    padding-right: 1rem !important;
}

.btn-deconnexion:hover .nav-text {
    opacity: 1;
    max-width: 100px;
    margin-left: 8px;
}

.btn-deconnexion .nav-icon {
    font-size: 1.2rem;
}

/* ========================================
   CORRECTIF ALIGNEMENT IMPÔT FONCIER
   ======================================== */

/* Correction pour le conteneur des cartes (singulier vs pluriel) */
.stat-premium {
    display: grid;
    /* Réduction de 250px à 180px pour permettre aux 5 cartes de tenir sur une ligne */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
}

/* S'assurer que les cartes s'étirent */
.stat-premium .stat-premium-card {
    height: 100%;
    min-height: 160px; /* Légère réduction de la hauteur min */
    padding: 15px !important; /* Réduction du padding pour gagner de la place */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Style spécifique pour la première carte (Impôt calculé) - Garde la couleur mais taille standard */
.stat-premium .stat-premium-card:first-child {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 198, 255, 0.1) 100%);
    border: 2px solid rgba(0, 102, 255, 0.2);
    /* Centrage absolu */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.stat-premium .stat-premium-card:first-child .stat-premium-icon {
    margin-right: 0;
    margin-bottom: 15px;
}

/* ============================================
   FIX ULTIME DROPDOWN (STYLE.CSS)
   ============================================ */
.dropdown-menu li:hover > a,
.dropdown-menu li a:hover,
.dropdown-menu a:hover {
    background-color: rgba(0, 102, 255, 0.08) !important;
    background-image: none !important;
    color: #0066ff !important;
}

.dropdown-menu li:hover > a *,
.dropdown-menu li a:hover *,
.dropdown-menu a:hover * {
    color: #0066ff !important;
    fill: #0066ff !important;
}

/* =========================================
   GLOBAL LOADER & TOAST (DataFetcher)
   ========================================= */

/* Loader */
#global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#global-loader.active {
    opacity: 1;
    pointer-events: auto;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color, #3498db);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

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

/* Toast Erreur */
#global-error-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: var(--danger-color, #ef4444);
    color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#global-error-toast::before {
    content: "⚠️";
}

#global-error-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Effet de chargement sur le body */
body.loading {
    cursor: wait;
}

/* ============================================
   DROPDOWN MENU CSS - CORRECTIF GLOBAL
   Ajouté par Super-Agent v5.2
   ============================================ */

:root {
    --dropdown-bg: #ffffff;
    --dropdown-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --dropdown-border: rgba(0, 102, 255, 0.12);
    --dropdown-radius: 12px;
    --dropdown-item-padding: 12px 20px;
    --primary-color: #0066ff;
}

/* Container Principal */
.nav-item.dropdown {
    position: relative;
}

/* Le Menu Dropdown */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    min-width: 240px;
    padding: 8px 0;
    margin: 8px 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: var(--dropdown-bg);
    background-clip: padding-box;
    border: 1px solid var(--dropdown-border);
    border-radius: var(--dropdown-radius);
    box-shadow: var(--dropdown-shadow);
}

/* Affichage au survol (Desktop) */
@media (min-width: 769px) {
    .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        animation: fadeIn 0.2s ease-in-out;
    }
}

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

/* Liens du menu */
.dropdown-menu > li > a {
    display: block;
    width: 100%;
    padding: var(--dropdown-item-padding);
    clear: both;
    font-weight: 500;
    color: #333;
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    transition: all 0.2s ease;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    color: #fff;
    text-decoration: none;
    background-color: var(--primary-color);
    transform: translateX(5px);
}

/* ============================================
   SOUS-MENUS (Nested Dropdowns)
   ============================================ */

.dropdown-submenu {
    position: relative;
}

/* Positionnement du sous-menu à droite */
@media (min-width: 769px) {
    .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-top: -6px;
        margin-left: 0;
        border-radius: var(--dropdown-radius);
    }

    /* Affichage du sous-menu au survol */
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }

    /* Flèche indiquant le sous-menu */
    .dropdown-submenu > a::after {
        display: block;
        content: "▶";
        float: right;
        width: 0;
        height: 0;
        border-color: transparent;
        border-style: solid;
        border-width: 5px 0 5px 5px;
        border-left-color: #ccc;
        margin-top: 5px;
        margin-right: -10px;
        font-size: 0.8em;
    }

    .dropdown-submenu:hover > a::after {
        border-left-color: #fff;
    }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-item.dropdown .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: #f8f9fa;
        border: 0;
        box-shadow: none;
        padding-left: 20px;
    }
    
    .nav-item.dropdown.active > .dropdown-menu {
        display: block;
    }

    .dropdown-menu > li > a {
        padding: 10px 15px 10px 25px;
    }
}
