/* public/assets/css/style.css - Système de Design Moderne 2025 */

/* Import du système de composants unifié */
@import url('./components.css');

:root {
    /* Couleurs primaires étendues - Optimisées pour contraste */
    --primary-50: #f0f9ff;   /* Background très clair */
    --primary-100: #e0f2fe;  /* Background clair */
    --primary-200: #bae6fd;  /* Border clair */
    --primary-300: #7dd3fc;  /* Border medium */
    --primary-400: #38bdf8;  /* Accent medium */
    --primary-500: #0ea5e9;  /* Couleur principale */
    --primary-600: #0284c7;  /* Couleur principale foncée */
    --primary-700: #0369a1;  /* Texte sur fond clair */
    --primary-800: #075985;  /* Texte sur fond très clair */
    --primary-900: #0c4a6e;  /* Texte sur fond blanc */
    
    /* Couleurs accent 2025 - Optimisées pour contraste */
    --accent-50: #fffbeb;    /* Background très clair */
    --accent-100: #fef3c7;   /* Background clair */
    --accent-200: #fde68a;   /* Border clair */
    --accent-300: #fcd34d;   /* Border medium */
    --accent-400: #fbbf24;   /* Accent medium */
    --accent-500: #f59e0b;   /* Couleur principale */
    --accent-600: #d97706;   /* Couleur principale foncée */
    --accent-700: #b45309;   /* Texte sur fond clair */
    --accent-800: #92400e;   /* Texte sur fond très clair */
    --accent-900: #78350f;   /* Texte sur fond blanc */
    
    /* Couleurs neutres gamme étendue - Optimisées pour contraste */
    --gray-50: #f8fafc;      /* Background très clair */
    --gray-100: #f1f5f9;     /* Background clair */
    --gray-200: #e2e8f0;     /* Border clair */
    --gray-300: #cbd5e1;     /* Border medium */
    --gray-400: #94a3b8;     /* Texte secondaire */
    --gray-500: #64748b;     /* Texte secondaire foncé */
    --gray-600: #475569;     /* Texte principal */
    --gray-700: #334155;     /* Texte principal foncé */
    --gray-800: #1e293b;     /* Texte sur fond clair */
    --gray-900: #0f172a;     /* Texte sur fond blanc */
    
    /* Couleurs fonctionnelles modernisées - Optimisées pour contraste */
    --success-50: #f0fdf4;   /* Background très clair */
    --success-100: #dcfce7;   /* Background clair */
    --success-500: #22c55e;   /* Couleur principale */
    --success-600: #16a34a;   /* Couleur principale foncée */
    --success-700: #15803d;   /* Texte sur fond clair */
    --success-800: #166534;   /* Texte sur fond très clair */
    --success-900: #14532d;   /* Texte sur fond blanc */
    
    --warning-50: #fffbeb;   /* Background très clair */
    --warning-100: #fef3c7;   /* Background clair */
    --warning-500: #f59e0b;   /* Couleur principale */
    --warning-600: #d97706;   /* Couleur principale foncée */
    --warning-700: #b45309;   /* Texte sur fond clair */
    --warning-800: #92400e;   /* Texte sur fond très clair */
    --warning-900: #78350f;   /* Texte sur fond blanc */
    
    --error-50: #fef2f2;     /* Background très clair */
    --error-100: #fee2e2;     /* Background clair */
    --error-500: #ef4444;     /* Couleur principale */
    --error-600: #dc2626;     /* Couleur principale foncée */
    --error-700: #b91c1c;     /* Texte sur fond clair */
    --error-800: #991b1b;     /* Texte sur fond très clair */
    --error-900: #7f1d1d;     /* Texte sur fond blanc */
    
    --info-50: #f0f9ff;      /* Background très clair */
    --info-100: #e0f2fe;      /* Background clair */
    --info-500: #3b82f6;      /* Couleur principale */
    --info-600: #2563eb;      /* Couleur principale foncée */
    --info-700: #1d4ed8;      /* Texte sur fond clair */
    --info-800: #1e40af;      /* Texte sur fond très clair */
    --info-900: #1e3a8a;      /* Texte sur fond blanc */
    
    /* Couleurs de surface et background */
    --surface-primary: #ffffff;     /* Fond principal */
    --surface-secondary: #f8fafc;   /* Fond secondaire */
    --surface-tertiary: #f1f5f9;    /* Fond tertiaire */
    --surface-elevated: #ffffff;    /* Fond surélevé */
    
    /* Couleurs de texte avec contraste garanti */
    --text-primary: #0f172a;        /* Texte principal (contraste 16.5:1) */
    --text-secondary: #475569;       /* Texte secondaire (contraste 7.1:1) */
    --text-tertiary: #64748b;       /* Texte tertiaire (contraste 4.5:1) */
    --text-inverse: #ffffff;        /* Texte sur fond sombre */
    --text-disabled: #94a3b8;        /* Texte désactivé (contraste 3:1) */
    
    /* Typographie moderne */
    --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-thin: 100;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --font-weight-black: 900;
    
    /* Échelle typographique */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;      /* 36px */
    
    /* Rayons de bordure modernes */
    --radius-sm: 0.375rem;    /* 6px */
    --radius-md: 0.5rem;      /* 8px */
    --radius-lg: 0.75rem;     /* 12px */
    --radius-xl: 1rem;        /* 16px */
    --radius-2xl: 1.5rem;     /* 24px */
    --radius-full: 9999px;    /* Complet */
    
    /* Espacement cohérent (8px grid system) */
    --space-0: 0;
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;     /* 8px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-5: 1.25rem;    /* 20px */
    --space-6: 1.5rem;     /* 24px */
    --space-8: 2rem;       /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    --space-16: 4rem;       /* 64px */
    --space-20: 5rem;      /* 80px */
    
    /* Ombres modernes */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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 -1px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Bordures des composants */
    --radius-xs: 0.125rem;
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;
    
    /* Polices système natives optimisées */
    --font-family-primary: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-mono: "JetBrains Mono", "Fira Code", "Monaco", "Courier New", monospace;
    
    /* Hiérarchie typographique claire */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;      /* 36px */
    
    /* Poids de police */
    --font-thin: 100;
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    --font-black: 900;
    
    /* Breakpoints modernes pour responsive design */
    --mobile: 320px;
    --tablet: 768px;
    --laptop: 1024px;
    --desktop: 1440px;
    --ultrawide: 1920px;
    
    /* Variables existantes modernisées (compatibilité) */
    --primary-color: var(--primary-600);
    --primary-color-darker: var(--primary-700);
    --action-color: var(--accent-500);
    --action-color-darker: var(--accent-600);
    --sidebar-bg: var(--gray-800);
    --sidebar-text: var(--gray-100);
    --sidebar-accent: var(--primary-500);
    --text-color: var(--gray-900);
    --light-bg: var(--gray-50);
    --white-color: #ffffff;
    --header-height: 64px; /* Modernisé */
}

/* Mode sombre complet optimisé */
[data-theme="dark"] {
    /* Couleurs neutres mode sombre - Optimisées pour contraste et lisibilité */
    --gray-50: #1a1a1a;      /* Background très sombre - moins noir */
    --gray-100: #2d2d2d;      /* Background sombre - plus clair */
    --gray-200: #404040;      /* Border sombre - plus visible */
    --gray-300: #525252;      /* Border medium - plus contrasté */
    --gray-400: #737373;      /* Texte secondaire - plus lisible */
    --gray-500: #a3a3a3;      /* Texte secondaire clair - plus visible */
    --gray-600: #d4d4d4;      /* Texte principal - plus clair */
    --gray-700: #e5e5e5;      /* Texte principal clair - très lisible */
    --gray-800: #f5f5f5;      /* Texte sur fond sombre - excellent contraste */
    --gray-900: #ffffff;      /* Texte sur fond très sombre - maximum contraste */
    
    /* Couleurs primaires mode sombre - Optimisées pour contraste */
    --primary-50: #1e3a5f;    /* Background très sombre - plus clair */
    --primary-100: #2d4a6f;   /* Background sombre - plus visible */
    --primary-200: #3d5a7f;   /* Border sombre - plus contrasté */
    --primary-300: #4d6a8f;   /* Border medium - plus lisible */
    --primary-400: #5d7a9f;   /* Accent medium - plus visible */
    --primary-500: #6d8aaf;   /* Couleur principale - plus claire */
    --primary-600: #7d9abf;   /* Couleur principale claire - très visible */
    --primary-700: #8daacf;   /* Texte sur fond sombre - excellent contraste */
    --primary-800: #9dbadf;   /* Texte sur fond très sombre - maximum contraste */
    --primary-900: #adcaef;   /* Texte sur fond noir - parfait */
    
    /* Couleurs accent mode sombre - Optimisées pour contraste */
    --accent-50: #78350f;     /* Background très sombre */
    --accent-100: #92400e;    /* Background sombre */
    --accent-200: #b45309;    /* Border sombre */
    --accent-300: #d97706;    /* Border medium */
    --accent-400: #f59e0b;    /* Accent medium */
    --accent-500: #fbbf24;    /* Couleur principale */
    --accent-600: #fcd34d;    /* Couleur principale claire */
    --accent-700: #fde68a;    /* Texte sur fond sombre */
    --accent-800: #fef3c7;    /* Texte sur fond très sombre */
    --accent-900: #fffbeb;    /* Texte sur fond noir */
    
    /* Couleurs fonctionnelles mode sombre - Optimisées pour contraste */
    --success-50: #14532d;    /* Background très sombre */
    --success-100: #166534;    /* Background sombre */
    --success-500: #22c55e;    /* Couleur principale */
    --success-600: #4ade80;    /* Couleur principale claire */
    --success-700: #86efac;    /* Texte sur fond sombre */
    --success-800: #bbf7d0;    /* Texte sur fond très sombre */
    --success-900: #dcfce7;    /* Texte sur fond noir */
    
    --warning-50: #78350f;    /* Background très sombre */
    --warning-100: #92400e;    /* Background sombre */
    --warning-500: #f59e0b;    /* Couleur principale */
    --warning-600: #fbbf24;    /* Couleur principale claire */
    --warning-700: #fcd34d;    /* Texte sur fond sombre */
    --warning-800: #fde68a;    /* Texte sur fond très sombre */
    --warning-900: #fef3c7;    /* Texte sur fond noir */
    
    --error-50: #7f1d1d;      /* Background très sombre */
    --error-100: #991b1b;      /* Background sombre */
    --error-500: #ef4444;      /* Couleur principale */
    --error-600: #f87171;      /* Couleur principale claire */
    --error-700: #fca5a5;      /* Texte sur fond sombre */
    --error-800: #fecaca;      /* Texte sur fond très sombre */
    --error-900: #fee2e2;      /* Texte sur fond noir */
    
    --info-50: #1e3a8a;       /* Background très sombre */
    --info-100: #1e40af;       /* Background sombre */
    --info-500: #3b82f6;       /* Couleur principale */
    --info-600: #60a5fa;       /* Couleur principale claire */
    --info-700: #93c5fd;       /* Texte sur fond sombre */
    --info-800: #bfdbfe;       /* Texte sur fond très sombre */
    --info-900: #dbeafe;       /* Texte sur fond noir */
    
    /* Couleurs de surface mode sombre - Améliorées pour la lisibilité */
    --surface-primary: #1a1a1a;     /* Fond principal - moins noir */
    --surface-secondary: #2d2d2d;   /* Fond secondaire - plus clair */
    --surface-tertiary: #404040;    /* Fond tertiaire - plus visible */
    --surface-elevated: #2d2d2d;    /* Fond surélevé - plus clair */
    
    /* Couleurs de texte mode sombre avec contraste garanti */
    --text-primary: #ffffff;        /* Texte principal - maximum contraste */
    --text-secondary: #d4d4d4;      /* Texte secondaire - très lisible */
    --text-tertiary: #a3a3a3;       /* Texte tertiaire - bien lisible */
    --text-inverse: #ffffff;        /* Texte sur fond sombre - CORRIGÉ : reste blanc */
    --text-disabled: #737373;        /* Texte désactivé - lisible */
    
    /* Variables existantes adaptées au mode sombre */
    --primary-color: var(--primary-600);
    --primary-color-darker: var(--primary-500);
    --action-color: var(--accent-500);
    --action-color-darker: var(--accent-400);
    --sidebar-bg: var(--surface-secondary);  /* Sidebar avec fond secondaire en mode sombre */
    --sidebar-text: var(--text-primary); /* Texte sidebar principal */
    --sidebar-accent: var(--primary-600); /* Accent sidebar plus visible */
    --text-color: var(--text-primary);
    --light-bg: var(--surface-secondary);
    --white-color: var(--surface-primary);
}

/* Règles de contraste WCAG AA/AAA garanties */
/* Texte principal - Contraste AAA (7:1+) */
.text-primary { color: var(--text-primary); }
.text-primary-on-light { color: var(--gray-900); } /* 16.5:1 */
.text-primary-on-dark { color: var(--text-primary); } /* 16.5:1 */

/* Texte secondaire - Contraste AA (4.5:1+) */
.text-secondary { color: var(--text-secondary); }
.text-secondary-on-light { color: var(--gray-700); } /* 7.1:1 */
.text-secondary-on-dark { color: var(--text-secondary); } /* 7.1:1 */

/* Texte tertiaire - Contraste AA (4.5:1+) */
.text-tertiary { color: var(--text-tertiary); }
.text-tertiary-on-light { color: var(--gray-600); } /* 4.5:1 */
.text-tertiary-on-dark { color: var(--text-tertiary); } /* 4.5:1 */

/* Combinaisons de couleurs autorisées */
.bg-primary-light { background: var(--primary-50); color: var(--primary-900); }
.bg-primary-medium { background: var(--primary-500); color: var(--text-inverse); }
.bg-primary-dark { background: var(--primary-800); color: var(--text-inverse); }

.bg-success-light { background: var(--success-50); color: var(--success-900); }
.bg-success-medium { background: var(--success-500); color: var(--text-inverse); }
.bg-success-dark { background: var(--success-800); color: var(--text-inverse); }

.bg-warning-light { background: var(--warning-50); color: var(--warning-900); }
.bg-warning-medium { background: var(--warning-500); color: var(--text-inverse); }
.bg-warning-dark { background: var(--warning-800); color: var(--text-inverse); }

.bg-error-light { background: var(--error-50); color: var(--error-900); }
.bg-error-medium { background: var(--error-500); color: var(--text-inverse); }
.bg-error-dark { background: var(--error-800); color: var(--text-inverse); }

/* Surfaces avec contraste garanti */
.surface-primary { background: var(--surface-primary); color: var(--text-primary); }
.surface-secondary { background: var(--surface-secondary); color: var(--text-primary); }
.surface-tertiary { background: var(--surface-tertiary); color: var(--text-primary); }
.surface-elevated { background: var(--surface-elevated); color: var(--text-primary); }

/* Système de thèmes automatique */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        /* Couleurs neutres mode sombre - Optimisées pour contraste et lisibilité */
        --gray-50: #1a1a1a;      /* Background très sombre - moins noir */
        --gray-100: #2d2d2d;      /* Background sombre - plus clair */
        --gray-200: #404040;      /* Border sombre - plus visible */
        --gray-300: #525252;      /* Border medium - plus contrasté */
        --gray-400: #737373;      /* Texte secondaire - plus lisible */
        --gray-500: #a3a3a3;      /* Texte secondaire clair - plus visible */
        --gray-600: #d4d4d4;      /* Texte principal - plus clair */
        --gray-700: #e5e5e5;      /* Texte principal clair - très lisible */
        --gray-800: #f5f5f5;      /* Texte sur fond sombre - excellent contraste */
        --gray-900: #ffffff;      /* Texte sur fond très sombre - maximum contraste */
        
        /* Couleurs primaires mode sombre - Optimisées pour contraste */
        --primary-50: #1e3a5f;    /* Background très sombre - plus clair */
        --primary-100: #2d4a6f;   /* Background sombre - plus visible */
        --primary-200: #3d5a7f;   /* Border sombre - plus contrasté */
        --primary-300: #4d6a8f;   /* Border medium - plus lisible */
        --primary-400: #5d7a9f;   /* Accent medium - plus visible */
        --primary-500: #6d8aaf;   /* Couleur principale - plus claire */
        --primary-600: #7d9abf;   /* Couleur principale claire - très visible */
        --primary-700: #8daacf;   /* Texte sur fond sombre - excellent contraste */
        --primary-800: #9dbadf;   /* Texte sur fond très sombre - maximum contraste */
        --primary-900: #adcaef;   /* Texte sur fond noir - parfait */
        
        /* Couleurs accent mode sombre - Optimisées pour contraste */
        --accent-50: #78350f;     /* Background très sombre */
        --accent-100: #92400e;    /* Background sombre */
        --accent-200: #b45309;    /* Border sombre */
        --accent-300: #d97706;    /* Border medium */
        --accent-400: #f59e0b;    /* Accent medium */
        --accent-500: #fbbf24;    /* Couleur principale */
        --accent-600: #fcd34d;    /* Couleur principale claire */
        --accent-700: #fde68a;    /* Texte sur fond sombre */
        --accent-800: #fef3c7;    /* Texte sur fond très sombre */
        --accent-900: #fffbeb;    /* Texte sur fond noir */
        
        /* Couleurs fonctionnelles mode sombre - Optimisées pour contraste */
        --success-50: #14532d;    /* Background très sombre */
        --success-100: #166534;    /* Background sombre */
        --success-500: #22c55e;    /* Couleur principale */
        --success-600: #4ade80;    /* Couleur principale claire */
        --success-700: #86efac;    /* Texte sur fond sombre */
        --success-800: #bbf7d0;    /* Texte sur fond très sombre */
        --success-900: #dcfce7;    /* Texte sur fond noir */
        
        --warning-50: #78350f;    /* Background très sombre */
        --warning-100: #92400e;    /* Background sombre */
        --warning-500: #f59e0b;    /* Couleur principale */
        --warning-600: #fbbf24;    /* Couleur principale claire */
        --warning-700: #fcd34d;    /* Texte sur fond sombre */
        --warning-800: #fde68a;    /* Texte sur fond très sombre */
        --warning-900: #fef3c7;    /* Texte sur fond noir */
        
        --error-50: #7f1d1d;      /* Background très sombre */
        --error-100: #991b1b;      /* Background sombre */
        --error-500: #ef4444;      /* Couleur principale */
        --error-600: #f87171;      /* Couleur principale claire */
        --error-700: #fca5a5;      /* Texte sur fond sombre */
        --error-800: #fecaca;      /* Texte sur fond très sombre */
        --error-900: #fee2e2;      /* Texte sur fond noir */
        
        --info-50: #1e3a8a;       /* Background très sombre */
        --info-100: #1e40af;       /* Background sombre */
        --info-500: #3b82f6;       /* Couleur principale */
        --info-600: #60a5fa;       /* Couleur principale claire */
        --info-700: #93c5fd;       /* Texte sur fond sombre */
        --info-800: #bfdbfe;       /* Texte sur fond très sombre */
        --info-900: #dbeafe;       /* Texte sur fond noir */
        
        /* Couleurs de surface mode sombre - Améliorées pour la lisibilité */
        --surface-primary: #1a1a1a;     /* Fond principal - moins noir */
        --surface-secondary: #2d2d2d;   /* Fond secondaire - plus clair */
        --surface-tertiary: #404040;    /* Fond tertiaire - plus visible */
        --surface-elevated: #2d2d2d;    /* Fond surélevé - plus clair */
        
        /* Couleurs de texte mode sombre avec contraste garanti */
        --text-primary: #ffffff;        /* Texte principal - maximum contraste */
        --text-secondary: #d4d4d4;      /* Texte secondaire - très lisible */
        --text-tertiary: #a3a3a3;       /* Texte tertiaire - bien lisible */
        --text-inverse: #ffffff;        /* Texte sur fond sombre - CORRIGÉ : reste blanc */
        --text-disabled: #737373;        /* Texte désactivé - lisible */
        
        /* Variables existantes adaptées au mode sombre */
        --primary-color: var(--primary-600);
        --primary-color-darker: var(--primary-500);
        --action-color: var(--accent-500);
        --action-color-darker: var(--accent-400);
        --sidebar-bg: var(--surface-secondary);  /* Sidebar avec fond secondaire en mode sombre */
        --sidebar-text: var(--text-primary); /* Texte sidebar principal */
        --sidebar-accent: var(--primary-600); /* Accent sidebar plus visible */
        --text-color: var(--text-primary);
        --light-bg: var(--surface-secondary);
        --white-color: var(--surface-primary);
    }
}

/* Transition fluide entre thèmes */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: var(--font-family-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: 1.5;
    margin: 0;
    background-color: var(--light-bg);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.sidebar-active-overlay::before { /* Overlay pour le fond quand la sidebar est ouverte */
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 998; /* Inférieur à la sidebar */
}

/* .container global */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Moderne Simplifié et Accessible */
.main-header {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: var(--white-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--primary-200);
}

.header-container { /* Conteneur interne du header */
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-left { /* Groupe pour hamburger et logo */
    display: flex;
    align-items: center;
    flex-shrink: 0; /* Empêche de rétrécir */
}

.hamburger-menu-button {
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 1.5em;
    margin-right: 15px; /* Espace entre le hamburger et le logo */
    cursor: pointer;
    padding: 5px;
}

.logo a {
    color: var(--white-color);
    text-decoration: none;
    font-size: 1.5em;
    font-weight: bold;
    white-space: nowrap;
}

.user-nav { /* Pour le menu utilisateur connecté */
    display: flex;
    align-items: center;
    position: relative; /* Pour le positionnement du dropdown */
    flex-shrink: 0; /* Empêche de rétrécir */
}

.user-profile-menu .user-menu-trigger-button {
    background: none;
    border: none;
    color: var(--white-color);
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
.user-profile-menu .user-menu-trigger-button:hover {
    background-color: var(--primary-color-darker);
}

.user-icon {
    font-size: 1.6em;
    margin-right: 8px;
}
.user-email-display {
    display: none; /* Caché sur mobile par défaut */
    font-size: 0.9em;
    white-space: nowrap;
}
.dropdown-icon {
    margin-left: 8px;
    transition: transform 0.3s ease;
}
/* S'assurer que le sélecteur cible correctement l'icône lorsque le menu est actif */
.user-menu-dropdown.active + .user-menu-trigger-button .dropdown-icon,
.user-profile-menu .user-menu-trigger-button.dropdown-active .dropdown-icon {
    transform: rotate(180deg);
}


.user-menu-dropdown {
    list-style-type: none;
    padding: 8px 0;
    margin: 0;
    background-color: var(--white-color);
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    z-index: 1001;
    display: none;
}
.user-menu-dropdown.active {
    display: block;
}

.user-menu-dropdown .dropdown-item-text {
    padding: 0 !important;
}

.user-menu-dropdown .dropdown-credit-info {
    padding: 12px 16px;
    font-size: 0.9em;
    border-radius: var(--radius-lg);
    margin: 8px 12px;
    position: relative;
    overflow: hidden;
}

.user-menu-dropdown .dropdown-credit-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

/* Classes pour différents niveaux de crédit */
.user-menu-dropdown .dropdown-credit-info.credit-high {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
    border-color: var(--success-400);
}

.user-menu-dropdown .dropdown-credit-info.credit-medium {
    background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
    border-color: var(--warning-400);
}

.user-menu-dropdown .dropdown-credit-info.credit-low {
    background: linear-gradient(135deg, var(--error-500) 0%, var(--error-600) 100%);
    border-color: var(--error-400);
}

.user-menu-dropdown .dropdown-divider hr {
    margin: 8px 0;
    border: 0;
    border-top: 1px solid #eee;
}

.user-menu-dropdown li a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9em;
    white-space: nowrap;
}
.user-menu-dropdown li a:hover {
    background-color: #f0f0f0;
    color: var(--primary-color);
}

/* Styles spécifiques pour le toggle de thème dans le menu utilisateur */
.theme-toggle-menu-item {
    border-bottom: 1px solid var(--gray-200) !important;
    font-weight: var(--font-medium) !important;
}

.theme-toggle-menu-item:hover {
    background-color: var(--gray-100) !important;
    color: var(--primary-color) !important;
}

.theme-toggle-menu-item i {
    width: 16px;
    text-align: center;
}

/* Mode sombre pour le toggle de thème */
[data-theme="dark"] .theme-toggle-menu-item {
    border-bottom-color: var(--gray-700) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .theme-toggle-menu-item:hover {
    background-color: var(--gray-200) !important;
    color: var(--primary-600) !important;
}

/* === STYLES POUR LES TABLEAUX EN MODE SOMBRE === */
[data-theme="dark"] table {
    background-color: var(--surface-elevated);
    color: var(--text-primary);
    border-collapse: collapse;
}

[data-theme="dark"] table th {
    background-color: var(--gray-300);
    color: var(--text-primary);
    border: 1px solid var(--gray-400);
    padding: 12px 8px;
    font-weight: var(--font-semibold);
}

[data-theme="dark"] table td {
    background-color: var(--surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--gray-400);
    padding: 8px;
}

[data-theme="dark"] table tr:nth-child(even) td {
    background-color: var(--surface-secondary);
}

[data-theme="dark"] table tr:hover td {
    background-color: var(--gray-200);
}

/* === STYLES POUR LES CADRES DE RÉSUMÉ EN MODE SOMBRE === */
[data-theme="dark"] .summary-frame,
[data-theme="dark"] .call-summary,
[data-theme="dark"] .filter-summary,
[data-theme="dark"] .stats-container {
    background-color: var(--surface-elevated);
    border: 1px solid var(--gray-400);
    color: var(--text-primary);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .summary-frame h3,
[data-theme="dark"] .call-summary h3,
[data-theme="dark"] .filter-summary h3,
[data-theme="dark"] .stats-container h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: var(--font-semibold);
}

[data-theme="dark"] .summary-frame p,
[data-theme="dark"] .call-summary p,
[data-theme="dark"] .filter-summary p,
[data-theme="dark"] .stats-container p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

[data-theme="dark"] .summary-frame strong,
[data-theme="dark"] .call-summary strong,
[data-theme="dark"] .filter-summary strong,
[data-theme="dark"] .stats-container strong {
    color: var(--text-primary);
    font-weight: var(--font-bold);
}

/* === STYLES POUR LES FORMULAIRES EN MODE SOMBRE === */
[data-theme="dark"] .form-container {
    background-color: var(--surface-elevated);
    border: 1px solid var(--gray-400);
    color: var(--text-primary);
}

[data-theme="dark"] .form-group input[type="email"],
[data-theme="dark"] .form-group input[type="password"],
[data-theme="dark"] .form-group input[type="text"],
[data-theme="dark"] .form-group input[type="date"],
[data-theme="dark"] .form-group input[type="number"],
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
    background-color: var(--surface-primary);
    border: 2px solid var(--gray-400);
    color: var(--text-primary);
}

[data-theme="dark"] .form-group input[type="email"]:focus,
[data-theme="dark"] .form-group input[type="password"]:focus,
[data-theme="dark"] .form-group input[type="text"]:focus,
[data-theme="dark"] .form-group input[type="date"]:focus,
[data-theme="dark"] .form-group input[type="number"]:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(125, 154, 191, 0.1);
}

[data-theme="dark"] .form-group label {
    color: var(--text-secondary);
}

/* === STYLES POUR LES BOUTONS EN MODE SOMBRE === */
[data-theme="dark"] .btn,
[data-theme="dark"] button,
[data-theme="dark"] input[type="submit"],
[data-theme="dark"] input[type="button"] {
    background-color: var(--primary-600);
    color: var(--text-inverse);
    border: 1px solid var(--primary-500);
}

[data-theme="dark"] .btn:hover,
[data-theme="dark"] button:hover,
[data-theme="dark"] input[type="submit"]:hover,
[data-theme="dark"] input[type="button"]:hover {
    background-color: var(--primary-700);
    border-color: var(--primary-600);
}

[data-theme="dark"] .btn-secondary {
    background-color: var(--gray-300);
    color: var(--text-primary);
    border: 1px solid var(--gray-400);
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: var(--gray-400);
    border-color: var(--gray-500);
}

/* === STYLES POUR LES MESSAGES EN MODE SOMBRE === */
[data-theme="dark"] .message {
    background-color: var(--surface-elevated);
    border: 1px solid var(--gray-400);
    color: var(--text-primary);
}

[data-theme="dark"] .error-message {
    background-color: var(--error-50);
    border-color: var(--error-200);
    color: var(--error-700);
}

[data-theme="dark"] .success-message {
    background-color: var(--success-50);
    border-color: var(--success-200);
    color: var(--success-700);
}

/* === STYLES POUR LES CARDS EN MODE SOMBRE === */
[data-theme="dark"] .card,
[data-theme="dark"] .dashboard-card {
    background-color: var(--surface-elevated);
    border: 1px solid var(--gray-400);
    color: var(--text-primary);
}

[data-theme="dark"] .card:hover,
[data-theme="dark"] .dashboard-card:hover {
    border-color: var(--gray-500);
    box-shadow: var(--shadow-lg);
}

/* === STYLES POUR LES PAGINATIONS EN MODE SOMBRE === */
[data-theme="dark"] .pagination {
    background-color: var(--surface-elevated);
    border: 1px solid var(--gray-400);
}

[data-theme="dark"] .pagination a,
[data-theme="dark"] .pagination span {
    color: var(--text-primary);
    border: 1px solid var(--gray-400);
}

[data-theme="dark"] .pagination a:hover {
    background-color: var(--gray-200);
    color: var(--text-primary);
}

[data-theme="dark"] .pagination .current {
    background-color: var(--primary-600);
    color: var(--text-inverse);
    border-color: var(--primary-500);
}

/* === STYLES POUR LE CONTENU PRINCIPAL EN MODE SOMBRE === */
[data-theme="dark"] .main-content {
    background-color: var(--surface-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .main-content h1,
[data-theme="dark"] .main-content h2,
[data-theme="dark"] .main-content h3,
[data-theme="dark"] .main-content h4,
[data-theme="dark"] .main-content h5,
[data-theme="dark"] .main-content h6 {
    color: var(--text-primary);
}

[data-theme="dark"] .main-content p {
    color: var(--text-secondary);
}

[data-theme="dark"] .main-content a {
    color: var(--primary-600);
}

[data-theme="dark"] .main-content a:hover {
    color: var(--primary-700);
}

/* === STYLES POUR LES FILTRES ET OPTIONS EN MODE SOMBRE === */
[data-theme="dark"] .filter-container,
[data-theme="dark"] .options-container {
    background-color: var(--surface-elevated);
    border: 1px solid var(--gray-400);
    color: var(--text-primary);
    padding: 16px;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

[data-theme="dark"] .filter-container h4,
[data-theme="dark"] .options-container h4 {
    color: var(--text-primary);
    margin-bottom: 12px;
}

[data-theme="dark"] .filter-row,
[data-theme="dark"] .option-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

[data-theme="dark"] .filter-row label,
[data-theme="dark"] .option-row label {
    color: var(--text-secondary);
    font-weight: var(--font-medium);
    min-width: 120px;
}

/* === STYLES POUR LES STATISTIQUES EN MODE SOMBRE === */
[data-theme="dark"] .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

[data-theme="dark"] .stat-card {
    background-color: var(--surface-elevated);
    border: 1px solid var(--gray-400);
    color: var(--text-primary);
    padding: 16px;
    border-radius: var(--radius-lg);
    text-align: center;
}

[data-theme="dark"] .stat-card .stat-value {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--primary-600);
    margin-bottom: 8px;
}

[data-theme="dark"] .stat-card .stat-label {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* === STYLES POUR LES MODALES EN MODE SOMBRE === */
[data-theme="dark"] .modal {
    background-color: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .modal-content {
    background-color: var(--surface-elevated);
    border: 1px solid var(--gray-400);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-header {
    background-color: var(--surface-secondary);
    border-bottom: 1px solid var(--gray-400);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-footer {
    background-color: var(--surface-secondary);
    border-top: 1px solid var(--gray-400);
}

/* === STYLES POUR LES DROPDOWNS EN MODE SOMBRE === */
[data-theme="dark"] .dropdown-menu {
    background-color: var(--surface-elevated);
    border: 1px solid var(--gray-400);
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: var(--gray-200);
    color: var(--text-primary);
}

/* === STYLES POUR LES BADGES EN MODE SOMBRE === */
[data-theme="dark"] .badge {
    background-color: var(--primary-600);
    color: var(--text-inverse);
}

[data-theme="dark"] .badge-success {
    background-color: var(--success-600);
    color: var(--text-inverse);
}

[data-theme="dark"] .badge-warning {
    background-color: var(--warning-600);
    color: var(--text-inverse);
}

[data-theme="dark"] .badge-error {
    background-color: var(--error-600);
    color: var(--text-inverse);
}

/* === STYLES POUR LE SIDEBAR EN MODE SOMBRE === */
[data-theme="dark"] .sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    border-right-color: var(--gray-400);
}

[data-theme="dark"] .sidebar nav ul li a {
    color: var(--sidebar-text);
}

[data-theme="dark"] .sidebar nav ul li a:hover {
    background-color: var(--gray-300);
    color: var(--text-primary);
}

[data-theme="dark"] .sidebar nav ul li a.active {
    background-color: var(--primary-600);
    color: var(--text-inverse);
    border-left-color: var(--accent-500);
}

[data-theme="dark"] .sidebar nav ul li.menu-header {
    color: var(--gray-500);
}

[data-theme="dark"] .close-sidebar-button {
    color: var(--sidebar-text);
}

[data-theme="dark"] .sidebar-scroll-indicator {
    background: linear-gradient(transparent, var(--sidebar-bg));
    border-top-color: var(--gray-400);
}

[data-theme="dark"] .scroll-hint {
    color: var(--gray-500);
}

/* === STYLES POUR LE MENU UTILISATEUR EN MODE SOMBRE === */
[data-theme="dark"] .user-menu-dropdown {
    background-color: var(--surface-elevated);
    border: 1px solid var(--gray-400);
    color: var(--text-primary);
}

[data-theme="dark"] .user-menu-dropdown .dropdown-item {
    color: var(--text-primary);
}

[data-theme="dark"] .user-menu-dropdown .dropdown-item:hover {
    background-color: var(--gray-200);
    color: var(--text-primary);
}

/* Les styles de base couvrent maintenant les deux modes */

/* Mode sombre - Classes pour différents niveaux de crédit */
[data-theme="dark"] .user-menu-dropdown .dropdown-credit-info.credit-high {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
    border-color: var(--success-400);
}

[data-theme="dark"] .user-menu-dropdown .dropdown-credit-info.credit-medium {
    background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
    border-color: var(--warning-400);
}

[data-theme="dark"] .user-menu-dropdown .dropdown-credit-info.credit-low {
    background: linear-gradient(135deg, var(--error-500) 0%, var(--error-600) 100%);
    border-color: var(--error-400);
}

/* Styles optimisés pour le crédit - plus de conflits */
.user-menu-dropdown .dropdown-credit-info {
    color: #ffffff !important; /* Blanc fixe pour être visible sur fond vert */
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%) !important;
    border: 1px solid var(--success-400) !important;
    box-shadow: var(--shadow-sm) !important;
}

.user-menu-dropdown .dropdown-credit-info span {
    color: #ffffff !important; /* Blanc fixe pour être visible sur fond vert */
    font-weight: var(--font-bold) !important;
    position: relative;
    z-index: 1;
}

/* Forcer la couleur blanche pour tous les éléments de crédit */
.user-menu-dropdown .dropdown-item-text .dropdown-credit-info,
.user-menu-dropdown .dropdown-item-text .dropdown-credit-info span,
.user-menu-dropdown .dropdown-item-text .dropdown-credit-info * {
    color: #ffffff !important;
}

/* Styles spécifiques pour garantir la visibilité en mode clair */
.user-menu-dropdown .dropdown-item-text .dropdown-credit-info {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%) !important;
}

.user-menu-dropdown .dropdown-item-text .dropdown-credit-info span {
    color: #ffffff !important;
}

/* Styles spécifiques pour garantir la visibilité en mode sombre */
[data-theme="dark"] .user-menu-dropdown .dropdown-item-text .dropdown-credit-info {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%) !important;
}

[data-theme="dark"] .user-menu-dropdown .dropdown-item-text .dropdown-credit-info span {
    color: #ffffff !important;
}

/* Styles inline utilisés dans header.php pour garantir la visibilité */

/* === CLASSES GÉNÉRIQUES POUR L'AFFICHAGE DU CRÉDIT === */
.credit-display {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 0.9em;
    font-weight: var(--font-bold);
    color: #ffffff; /* Blanc fixe pour être visible sur fond coloré */
    border-radius: var(--radius-md);
    border: 1px solid;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    min-width: 80px;
    justify-content: center;
}

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

.credit-display span {
    position: relative;
    z-index: 1;
}

/* Niveaux de crédit */
.credit-display.credit-high {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
    border-color: var(--success-400);
}

.credit-display.credit-medium {
    background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
    border-color: var(--warning-400);
}

.credit-display.credit-low {
    background: linear-gradient(135deg, var(--error-500) 0%, var(--error-600) 100%);
    border-color: var(--error-400);
}

/* Les styles de base couvrent maintenant les deux modes pour les classes génériques */

[data-theme="dark"] .credit-display.credit-high {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
    border-color: var(--success-400);
}

[data-theme="dark"] .credit-display.credit-medium {
    background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
    border-color: var(--warning-400);
}

[data-theme="dark"] .credit-display.credit-low {
    background: linear-gradient(135deg, var(--error-500) 0%, var(--error-600) 100%);
    border-color: var(--error-400);
}

[data-theme="dark"] .user-menu-dropdown .dropdown-divider hr {
    border-top-color: var(--gray-400);
}

/* === STYLES POUR LE FOOTER EN MODE SOMBRE === */
[data-theme="dark"] .main-footer {
    background-color: var(--surface-secondary);
    color: var(--text-secondary);
    border-top-color: var(--gray-400);
}

/* Styles pour les pages publiques (login/register) */
.main-nav-public { /* Conteneur pour les liens publics */
    flex-shrink: 0; /* Empêche de rétrécir */
}
.main-nav-public ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}
.main-nav-public ul li {
    margin-left: 15px;
}
.main-nav-public ul li:first-child {
    margin-left: 0;
}
.main-nav-public ul li a {
    color: var(--white-color);
    text-decoration: none;
    white-space: nowrap;
}


/* Page Container & Sidebar (Mobile First) */
.page-container {
    display: flex;
    flex-grow: 1;
    position: relative;
}

.sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    width: 280px;
    position: fixed;
    top: var(--header-height);
    left: 0;
    height: calc(100vh - var(--header-height));
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    padding: 20px 20px 120px 20px; /* Padding-bottom augmenté pour iPhone */
    box-sizing: border-box;
    box-shadow: var(--shadow-lg);
    border-right: 1px solid var(--gray-700);
}
.sidebar.sidebar-open {
    transform: translateX(0);
}

.close-sidebar-button {
    background: none;
    border: none;
    color: var(--sidebar-text);
    font-size: 1.1em;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 10px;
    width: calc(100% - 30px);
    margin-left: 15px;
    justify-content: flex-start;
}
.close-sidebar-button i {
    margin-right: 8px;
}

.sidebar nav ul { list-style-type: none; padding: 0; margin: 0; }
.sidebar nav ul li a {
    display: flex;
    align-items: center;
    color: var(--sidebar-text);
    padding: var(--space-3) var(--space-5);
    margin-bottom: var(--space-1);
    text-decoration: none;
    font-weight: var(--font-medium);
    border-radius: var(--radius-lg);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
}
.sidebar nav ul li a:hover {
    background-color: var(--gray-700);
    color: var(--white-color);
    transform: translateX(4px);
}
.sidebar nav ul li a.active {
    background-color: var(--primary-600);
    color: var(--white-color);
    border-left-color: var(--accent-500);
    box-shadow: var(--shadow-sm);
}
.sidebar nav ul li.menu-header {
    padding: 15px 20px 5px;
    font-size: 0.9em;
    color: #95a5a6;
    text-transform: uppercase;
    font-weight: bold;
}

.main-content {
    flex-grow: 1;
    padding: 15px;
    transition: margin-left 0.3s ease-in-out;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}


/* Messages Modernisés */
.message { 
    padding: var(--space-4) var(--space-5); 
    margin-bottom: var(--space-5); 
    border-radius: var(--radius-lg); 
    border: 1px solid transparent; 
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
}
.error-message { 
    color: var(--error-600); 
    background-color: var(--error-50); 
    border-color: var(--error-200);
    border-left: 4px solid var(--error-500);
}
.success-message { 
    color: var(--success-600); 
    background-color: var(--success-50); 
    border-color: var(--success-200);
    border-left: 4px solid var(--success-500);
}

/* Forms Modernisés */
.form-container { 
    padding: var(--space-8); 
    margin: var(--space-8) auto; 
    width: calc(100% - var(--space-10)); 
    max-width: 480px;
    background-color: var(--white-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-family: var(--font-family-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--white-color);
    color: var(--gray-900);
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 10%);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: var(--font-semibold);
    color: var(--gray-700);
    font-size: var(--text-sm);
}


/* Footer */
.main-footer {
    background-color: var(--gray-800);
    color: var(--gray-100);
    text-align: center;
    padding: 1em 0;
    flex-shrink: 0;
    border-top: 1px solid var(--gray-700);
}


/* Breakpoints modernes 2025 */
/* Mobile landscape */
@media (min-width: 480px) {
    .form-container { 
        width: calc(100% - var(--space-16)); 
        padding: var(--space-10);
    }
}

/* Tablette */
@media (min-width: 768px) {
    .hamburger-menu-button {
        display: none;
    }
    .close-sidebar-button {
        display: none;
    }

    .sidebar {
        position: sticky;
        top: var(--header-height);
        transform: translateX(0);
        height: calc(100vh - var(--header-height));
        flex-shrink: 0;
    }

    .main-content {
        padding: 20px;
        margin-left: 0;
    }
    
    body.sidebar-active-overlay::before {
        display: none; 
    }

    .user-email-display {
        display: inline;
    }
    .logo a { font-size: 1.8em; }
    .form-container { padding: 30px; margin: 30px auto; }
}

/* Desktop spécifique */
@media (min-width: 1024px) {
    .sidebar {
        width: 300px;
    }
    
    .main-content {
        padding: var(--space-8);
    }
    
    .form-container {
        padding: var(--space-12);
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .main-content {
        padding: var(--space-10);
    }
}

/* === CORRECTIONS SPÉCIFIQUES POUR MOBILE ET iOS === */

/* Support des zones de sécurité iOS */
@supports (padding: max(0px)) {
    .sidebar {
        padding-bottom: max(120px, env(safe-area-inset-bottom, 120px));
    }
}

/* Mobile et iPhone spécifique */
@media (max-width: 768px) {
    .sidebar {
        padding-bottom: 140px; /* Espace supplémentaire pour iPhone */
        /* Support pour les zones de sécurité iOS */
        padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
    }
    
    /* Amélioration du scroll sur iOS */
    .sidebar {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* iPhone en mode paysage */
@media (max-width: 896px) and (orientation: landscape) {
    .sidebar {
        padding-bottom: 100px; /* Moins d'espace en paysage */
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
    }
}

/* iPhone avec encoche (iPhone X et plus récents) */
@media (max-width: 414px) and (max-height: 896px) {
    .sidebar {
        padding-bottom: 160px; /* Encore plus d'espace pour les iPhone récents */
        padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px));
    }
}

/* Indicateur de scroll pour la sidebar */
.sidebar-scroll-indicator {
    position: sticky;
    bottom: 0;
    background: linear-gradient(transparent, var(--gray-900));
    padding: var(--space-4) var(--space-5);
    margin-top: var(--space-4);
    text-align: center;
    border-top: 1px solid var(--gray-700);
}

.scroll-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    color: var(--gray-400);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
}

.scroll-hint i {
    font-size: var(--text-lg);
    animation: bounce 2s infinite;
}

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

/* Masquer l'indicateur sur desktop */
@media (min-width: 768px) {
    .sidebar-scroll-indicator {
        display: none;
    }
}


/* Styles Dashboard Modernisé */
.dashboard-content { 
    background-color: var(--white-color); 
    padding: var(--space-8); 
    border-radius: var(--radius-xl); 
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.dashboard-content h1 { 
    color: var(--primary-600); 
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-6);
}

.dashboard-content h2 {
    color: var(--gray-800);
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-4);
}

.dashboard-content h3 {
    color: var(--gray-700);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-3);
}