/**
 * Design tokens for Paper Design system
 */
:root {
    /* Primary colors */
    --color-primary: #1A1A1A;
    --color-primary-light: #333333;
    --color-primary-dark: #000000;

    /* Secondary/Accent colors */
    --color-secondary: #8B5CF6;
    --color-secondary-light: #A78BFA;
    --color-secondary-dark: #7C3AED;

    /* Semantic colors */
    --color-success: #16A34A;
    --color-success-light: #22C55E;
    --color-success-dark: #15803D;

    --color-warning: #D97706;
    --color-warning-light: #F59E0B;
    --color-warning-dark: #B45309;

    --color-danger: #DC2626;
    --color-danger-light: #EF4444;
    --color-danger-dark: #B91C1C;

    --color-info: #0284C7;
    --color-info-light: #0EA5E9;
    --color-info-dark: #0369A1;

    /* Neutral colors */
    --color-surface: #FFFFFF;
    --color-surface-secondary: #F4F4F0;
    --color-surface-tertiary: #EBEBE6;
    --color-background: #F7F7F4;

    /* Text colors */
    --color-text: #1A1A1A;
    --color-text-secondary: #4B5563;
    --color-text-tertiary: #9CA3AF;
    --color-text-inverse: #FFFFFF;

    /* Border colors */
    --color-border: #E5E7EB;
    --color-border-focus: #8B5CF6;

    /* Medication name accent colors */
    --color-med1: #8B5CF6;   /* violet — premier médicament */
    --color-med2: #0284C7;   /* bleu  — second médicament */

    /* Interaction severity colors (ANSM classification) */
    --color-niveau-ci:      #DC2626;
    --color-niveau-ci-bg:   rgba(220, 38, 38, 0.08);
    --color-niveau-ad:      #D97706;
    --color-niveau-ad-bg:   rgba(217, 119, 6, 0.08);
    --color-niveau-pe:      #CA8A04;
    --color-niveau-pe-bg:   rgba(202, 138, 4, 0.08);
    --color-niveau-aptc:    #4B5563;
    --color-niveau-aptc-bg: rgba(75, 85, 99, 0.08);

    /* Typography */
    --font-primary: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Google Sans', 'Roboto', sans-serif;
    --font-mono: 'Roboto Mono', 'SF Mono', 'Consolas', monospace;

    /* Font sizes */
    --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 */
    --text-5xl: 3rem;       /* 48px */

    /* Font weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* Line heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;

    /* Spacing scale */
    --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 */

    /* Border radius */
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.375rem;  /* 6px */
    --radius-lg: 0.5rem;    /* 8px */
    --radius-xl: 0.75rem;   /* 12px */
    --radius-2xl: 1rem;     /* 16px */
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Focus ring */
    --focus-ring: 0 0 0 3px rgba(139, 92, 246, 0.4);

    /* Z-index scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-toast: 400;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root.auto-dark {
        --color-surface: #1F2937;
        --color-surface-secondary: #374151;
        --color-surface-tertiary: #4B5563;
        --color-background: #111827;
        --color-text: #F9FAFB;
        --color-text-secondary: #D1D5DB;
        --color-text-tertiary: #9CA3AF;
        --color-border: #374151;
    }
}
