/*
 *  Document   : tokens.css
 *  Description: Design tokens du CRM — source de vérité unique du design system.
 *               Chargé inconditionnellement AVANT les thèmes (variables inertes
 *               pour les anciens thèmes, consommées par main-theme3.css,
 *               JDGrid-theme3.css et tw-build.css).
 *               Ne contient AUCUNE règle appliquée à un élément (hors @font-face).
 */

/* =========================================================
   POLICE — Inter (variable, auto-hébergée : perf + RGPD)
   ========================================================= */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('fonts/inter/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    /* ------ Couleurs de marque (héritées de THEME_MODERNE_README.md) ------ */
    --primary-blue: #003D7A;
    --primary-blue-light: #0052A3;
    --primary-blue-lighter: #E8F1FA;
    --primary-pink: #E6007E;
    --primary-pink-light: #FF2D9C;
    --primary-purple: #667eea;
    --primary-purple-dark: #764ba2;

    /* ------ Couleurs sémantiques ------ */
    --color-success: #16a34a;
    --color-success-bg: #ecfdf3;
    --color-warning: #d97706;
    --color-warning-bg: #fffbeb;
    --color-danger: #dc2626;
    --color-danger-bg: #fef2f2;
    --color-info: #0284c7;
    --color-info-bg: #eff6ff;

    /* ------ Couleurs neutres ------ */
    --gray-50: #f8f9fa;
    --gray-100: #f0f4f8;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* ------ Texte ------ */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    --text-inverse: #ffffff;

    /* ------ Typographie ------ */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 12.5px;
    --font-size-base: 14px;   /* moderne mais pas trop grosse */
    --font-size-md: 15px;
    --font-size-lg: 17px;
    --font-size-xl: 20px;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height-base: 1.5;

    /* ------ Espacements ------ */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;

    /* ------ Ombres ------ */
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08);
    --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.10);
    --shadow-lg: 0 8px 24px rgba(16, 24, 40, 0.12);
    --shadow-xl: 0 12px 32px rgba(16, 24, 40, 0.16);
    --focus-ring: 0 0 0 3px rgba(0, 82, 163, 0.18);

    /* ------ Rayons ------ */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-full: 999px;

    /* ------ Transitions ------ */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.45s cubic-bezier(0.16, 1, 0.3, 1);

    /* ------ Layout ------ */
    --header-height: 52px;
    --sidebar-width: 230px;
    --sidebar-width-collapsed: 60px;
    --content-max-width: 1600px;

    /* ------ Z-index ------ */
    --z-sidebar: 1030;
    --z-header: 1020;
    --z-dropdown: 1040;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-toast: 1080;
}
