/**
 * TXL Gen4 Design System - Design Tokens
 * 
 * Variables CSS globales pour maintenir la cohérence visuelle
 * Personnalisables par tenant via CSS variables
 */

:root {
    /* ============================================
       COULEURS PRINCIPALES
       ============================================ */
    
    /* Primary - Couleur principale de la marque */
    --color-primary-50: #e3f2fd;
    --color-primary-100: #bbdefb;
    --color-primary-200: #90caf9;
    --color-primary-300: #64b5f6;
    --color-primary-400: #42a5f5;
    --color-primary-500: #2196f3;  /* Base */
    --color-primary-600: #1e88e5;
    --color-primary-700: #1976d2;
    --color-primary-800: #1565c0;
    --color-primary-900: #0d47a1;
    
    /* Secondary - Couleur secondaire */
    --color-secondary-50: #f3e5f5;
    --color-secondary-100: #e1bee7;
    --color-secondary-200: #ce93d8;
    --color-secondary-300: #ba68c8;
    --color-secondary-400: #ab47bc;
    --color-secondary-500: #9c27b0;  /* Base */
    --color-secondary-600: #8e24aa;
    --color-secondary-700: #7b1fa2;
    --color-secondary-800: #6a1b9a;
    --color-secondary-900: #4a148c;
    
    /* Success - États de succès */
    --color-success-50: #e8f5e9;
    --color-success-100: #c8e6c9;
    --color-success-200: #a5d6a7;
    --color-success-300: #81c784;
    --color-success-400: #66bb6a;
    --color-success-500: #4caf50;  /* Base */
    --color-success-600: #43a047;
    --color-success-700: #388e3c;
    --color-success-800: #2e7d32;
    --color-success-900: #1b5e20;
    
    /* Warning - États d'avertissement */
    --color-warning-50: #fff3e0;
    --color-warning-100: #ffe0b2;
    --color-warning-200: #ffcc80;
    --color-warning-300: #ffb74d;
    --color-warning-400: #ffa726;
    --color-warning-500: #ff9800;  /* Base */
    --color-warning-600: #fb8c00;
    --color-warning-700: #f57c00;
    --color-warning-800: #ef6c00;
    --color-warning-900: #e65100;
    
    /* Error - États d'erreur */
    --color-error-50: #ffebee;
    --color-error-100: #ffcdd2;
    --color-error-200: #ef9a9a;
    --color-error-300: #e57373;
    --color-error-400: #ef5350;
    --color-error-500: #f44336;  /* Base */
    --color-error-600: #e53935;
    --color-error-700: #d32f2f;
    --color-error-800: #c62828;
    --color-error-900: #b71c1c;
    
    /* Info - États informatifs */
    --color-info-50: #e1f5fe;
    --color-info-100: #b3e5fc;
    --color-info-200: #81d4fa;
    --color-info-300: #4fc3f7;
    --color-info-400: #29b6f6;
    --color-info-500: #03a9f4;  /* Base */
    --color-info-600: #039be5;
    --color-info-700: #0288d1;
    --color-info-800: #0277bd;
    --color-info-900: #01579b;
    
    /* Neutral - Échelle de gris */
    --color-neutral-0: #ffffff;
    --color-neutral-50: #fafafa;
    --color-neutral-100: #f5f5f5;
    --color-neutral-200: #eeeeee;
    --color-neutral-300: #e0e0e0;
    --color-neutral-400: #bdbdbd;
    --color-neutral-500: #9e9e9e;
    --color-neutral-600: #757575;
    --color-neutral-700: #616161;
    --color-neutral-800: #424242;
    --color-neutral-900: #212121;
    --color-neutral-1000: #000000;
    
    /* ============================================
       COULEURS SÉMANTIQUES
       ============================================ */
    
    --color-background: var(--color-neutral-0);
    --color-background-alt: var(--color-neutral-50);
    --color-surface: var(--color-neutral-0);
    --color-surface-hover: var(--color-neutral-50);
    
    --color-text-primary: var(--color-neutral-900);
    --color-text-secondary: var(--color-neutral-600);
    --color-text-disabled: var(--color-neutral-400);
    --color-text-inverse: var(--color-neutral-0);
    
    --color-border: var(--color-neutral-300);
    --color-border-light: var(--color-neutral-200);
    --color-border-dark: var(--color-neutral-400);
    
    --color-link: var(--color-primary-600);
    --color-link-hover: var(--color-primary-800);
    --color-link-visited: var(--color-secondary-600);
    
    /* ============================================
       TYPOGRAPHIE
       ============================================ */
    
    /* Familles de polices */
    --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-serif: 'Georgia', 'Times New Roman', serif;
    --font-family-mono: 'Fira Code', 'Courier New', monospace;
    
    /* Tailles de police */
    --font-size-xs: 0.75rem;      /* 12px */
    --font-size-sm: 0.875rem;     /* 14px */
    --font-size-base: 1rem;       /* 16px */
    --font-size-lg: 1.125rem;     /* 18px */
    --font-size-xl: 1.25rem;      /* 20px */
    --font-size-2xl: 1.5rem;      /* 24px */
    --font-size-3xl: 1.875rem;    /* 30px */
    --font-size-4xl: 2.25rem;     /* 36px */
    --font-size-5xl: 3rem;        /* 48px */
    --font-size-6xl: 3.75rem;     /* 60px */
    
    /* Hauteurs de ligne */
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;
    
    /* Poids de police */
    --font-weight-thin: 100;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    --font-weight-black: 900;
    
    /* Espacement des lettres */
    --letter-spacing-tight: -0.05em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    --letter-spacing-widest: 0.1em;
    
    /* ============================================
       ESPACEMENTS
       ============================================ */
    
    --spacing-0: 0;
    --spacing-1: 0.25rem;   /* 4px */
    --spacing-2: 0.5rem;    /* 8px */
    --spacing-3: 0.75rem;   /* 12px */
    --spacing-4: 1rem;      /* 16px */
    --spacing-5: 1.25rem;   /* 20px */
    --spacing-6: 1.5rem;    /* 24px */
    --spacing-8: 2rem;      /* 32px */
    --spacing-10: 2.5rem;   /* 40px */
    --spacing-12: 3rem;     /* 48px */
    --spacing-16: 4rem;     /* 64px */
    --spacing-20: 5rem;     /* 80px */
    --spacing-24: 6rem;     /* 96px */
    --spacing-32: 8rem;     /* 128px */
    
    /* ============================================
       RAYONS DE BORDURE
       ============================================ */
    
    --radius-none: 0;
    --radius-sm: 0.125rem;    /* 2px */
    --radius-base: 0.25rem;   /* 4px */
    --radius-md: 0.375rem;    /* 6px */
    --radius-lg: 0.5rem;      /* 8px */
    --radius-xl: 0.75rem;     /* 12px */
    --radius-2xl: 1rem;       /* 16px */
    --radius-3xl: 1.5rem;     /* 24px */
    --radius-full: 9999px;
    
    /* ============================================
       OMBRES
       ============================================ */
    
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-2xl: 0 50px 100px -20px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    
    /* ============================================
       TRANSITIONS
       ============================================ */
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* ============================================
       Z-INDEX
       ============================================ */
    
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    
    /* ============================================
       BREAKPOINTS
       ============================================ */
    
    --breakpoint-xs: 0;
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
    
    /* ============================================
       CONTENEURS
       ============================================ */
    
    --container-xs: 100%;
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1536px;
    
    /* ============================================
       OPACITÉS
       ============================================ */
    
    --opacity-0: 0;
    --opacity-10: 0.1;
    --opacity-20: 0.2;
    --opacity-30: 0.3;
    --opacity-40: 0.4;
    --opacity-50: 0.5;
    --opacity-60: 0.6;
    --opacity-70: 0.7;
    --opacity-80: 0.8;
    --opacity-90: 0.9;
    --opacity-100: 1;
}

/* ============================================
   THÈME SOMBRE (Dark Mode)
   ============================================ */

[data-theme="dark"] {
    --color-background: var(--color-neutral-900);
    --color-background-alt: var(--color-neutral-800);
    --color-surface: var(--color-neutral-800);
    --color-surface-hover: var(--color-neutral-700);
    
    --color-text-primary: var(--color-neutral-50);
    --color-text-secondary: var(--color-neutral-400);
    --color-text-disabled: var(--color-neutral-600);
    --color-text-inverse: var(--color-neutral-900);
    
    --color-border: var(--color-neutral-700);
    --color-border-light: var(--color-neutral-800);
    --color-border-dark: var(--color-neutral-600);
}

/* ============================================
   PERSONNALISATION TENANT
   ============================================ */

/* Les tenants peuvent surcharger ces variables dans leur CSS personnalisé */
[data-tenant-theme] {
    /* Exemple de surcharge tenant :
    --color-primary-500: #your-brand-color;
    --font-family-sans: 'Your Brand Font', sans-serif;
    --radius-base: 0.5rem;
    */
}
