/* ==========================================================================
   ReCyF Tool — CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* --- Brand Colors --- */
  --color-primary: #2b7a0f;
  --color-primary-hover: #246a0c;
  --color-primary-light: #34921a;
  --color-primary-bg: rgba(43, 122, 15, 0.08);
  --color-primary-border: rgba(43, 122, 15, 0.25);
  --color-primary-text: #246a0c;

  /* --- Status Colors --- */
  --color-success: #2b7a0f;
  --color-success-bg: rgba(43, 122, 15, 0.08);
  --color-warning: #e67e22;
  --color-warning-bg: rgba(230, 126, 34, 0.08);
  --color-warning-border: rgba(230, 126, 34, 0.25);
  --color-danger: #c0392b;
  --color-danger-bg: rgba(192, 57, 43, 0.08);
  --color-danger-border: rgba(192, 57, 43, 0.25);
  --color-info: #2980b9;
  --color-info-bg: rgba(41, 128, 185, 0.08);
  --color-info-border: rgba(41, 128, 185, 0.25);

  --color-purple: #8e44ad;
  --color-purple-bg: rgba(142, 68, 173, 0.08);
  --color-purple-border: rgba(142, 68, 173, 0.25);

  /* --- Pillar Colors --- */
  --color-pillar-gov: #2980b9;       /* Gouvernance — blue */
  --color-pillar-prot: #17a2b8;      /* Protection — teal */
  --color-pillar-def: #e67e22;       /* Défense — orange */
  --color-pillar-res: #c0392b;       /* Résilience — red */
  --color-ee-only: #8e44ad;          /* EE-only objectives — purple */

  /* --- Entity Type Colors --- */
  --color-entity-ei: #e67e22;        /* Entité Importante — orange */
  --color-entity-ee: #c0392b;        /* Entité Essentielle — red */

  /* --- Score Colors --- */
  --color-score-1: #c0392b;          /* Non conforme */
  --color-score-2: #e67e22;          /* Insuffisant */
  --color-score-3: #d4a017;          /* Partiellement conforme */
  --color-score-4: #27ae60;          /* Conforme */
  --color-score-5: #2b7a0f;          /* Optimisé */

  /* --- ANSSI Level Colors --- */
  --color-anssi-eleve: #2b7a0f;
  --color-anssi-moyen: #e67e22;
  --color-anssi-faible: #95a5a6;

  /* --- Badge Level Colors --- */
  --color-level-basic: #17a2b8;
  --color-level-important: #e67e22;
  --color-level-essential: #c0392b;

  /* --- Neutrals --- */
  --color-dark: #151515;
  --color-text: #333333;
  --color-text-secondary: #555555;
  --color-text-muted: #636363;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f5;
  --color-bg-hover: #fafafa;
  --color-border: rgba(0, 0, 0, 0.10);
  --color-border-light: rgba(0, 0, 0, 0.06);
  --color-header-bg: #111111;
  --color-header-text: #ffffff;
  --color-sidebar-bg: #1a1a1a;
  --color-sidebar-text: #cccccc;
  --color-sidebar-hover: rgba(255, 255, 255, 0.12);
  --color-sidebar-active: rgba(43, 122, 15, 0.15);

  /* --- Typography --- */
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  --text-xs: 0.7rem;
  --text-sm: 0.8rem;
  --text-base: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;

  --weight-normal: 400;
  --weight-semibold: 600;
  --weight-bold: 700;

  --line-height: 1.5;
  --line-height-tight: 1.25;

  /* --- Spacing --- */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 0.75rem;
  --space-lg: 1rem;
  --space-xl: 1.5rem;
  --space-2xl: 2rem;
  --space-3xl: 3rem;

  /* --- Layout --- */
  --header-height: 72px;
  --sidebar-width: 240px;
  --sidebar-collapsed-width: 52px;
  --side-panel-width: 35%;
  --side-panel-min-width: 300px;
  --side-panel-max-width: 600px;

  /* --- Components --- */
  --radius-sm: 3px;
  --radius-md: 5px;
  --radius-lg: 8px;
  --radius-pill: 50px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.10);

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;

  /* --- Z-Index Scale --- */
  --z-sticky: 5;       /* Local sticky headers within scroll containers */
  --z-above: 10;       /* Tooltips, resize handles — above sibling content */
  --z-dropdown: 50;
  --z-sidebar: 100;
  --z-tooltip: 150;     /* Fixed-position tooltips — above sidebar, below header */
  --z-header: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-notice: 600;
  --z-skip-link: 700;

  /* --- Benchmark/Badge Colors --- */
  --color-badge-pass-bg: #d4edda;
  --color-badge-pass-text: #155724;
  --color-badge-warn-bg: #fff3cd;
  --color-badge-warn-text: #856404;
  --color-badge-pass-dot: #28a745;
  --color-badge-warn-dot: #ffc107;

  /* --- Score Badge Text Colors --- */
  --color-score-1-text: #fff;
  --color-score-2-text: #fff;
  --color-score-3-text: #3d2d00;
  --color-score-4-text: #fff;
  --color-score-5-text: #fff;

  /* --- KPI Colors --- */
  --color-kpi-warn: #d97706;

  /* --- Difficulty Badge Colors --- */
  --color-difficulty-easy-bg: #d1ecf1;
  --color-difficulty-easy-text: #0c5460;
  --color-difficulty-moderate-bg: #fff3cd;
  --color-difficulty-moderate-text: #856404;
  --color-difficulty-hard-bg: #f8d7da;
  --color-difficulty-hard-text: #721c24;

  /* --- Crosswalk Chip Colors --- */
  --color-xref-iso27001-bg: #e8f0fe;
  --color-xref-iso27001-text: #1a56db;
  --color-xref-iso27002-bg: #e3f8ff;
  --color-xref-iso27002-text: #0077a8;
  --color-xref-cisv8-bg: #fef3c7;
  --color-xref-cisv8-text: #92400e;
  --color-xref-iec62443-bg: #f3e8ff;
  --color-xref-iec62443-text: #6d28d9;
  --color-xref-nistcsf-bg: #d1fae5;
  --color-xref-nistcsf-text: #065f46;

  /* --- Border Variants --- */
  --color-border-dark: #444;

  /* --- Micro-interaction Tokens --- */
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.12);
  --primary-glow: 0 0 20px rgba(43, 122, 15, 0.25);
  --focus-ring: 0 0 0 3px rgba(43, 122, 15, 0.15);
}
