/* =========================================================================
   Gerem — Colors & Type
   Source: extracted from Gerem IR Design System v2.
   Single source of truth for tokens (colors, type, spacing, radii, shadows).
   ========================================================================= */

/* ---- Fonts ---------------------------------------------------------------
   Barlow + JetBrains Mono are both available on Google Fonts (free, OFL).
   The project bundle ships them as woff2 already; if you want self-hosted,
   drop the .woff2 files into /fonts and use a local @font-face here instead.
   --------------------------------------------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* Phosphor icons — Gerem uses the .ph / .ph-* class system. CDN below. */
/* @import url("https://unpkg.com/@phosphor-icons/web@2.1.1/src/regular/style.css"); */

:root {
  /* ===== BRAND · Gerem rouge (c1 === gerem-400) ========================= */
  --c1-900:  #1A0006;
  --c1-800:  #29000A;
  --c1-700:  #4E0417;
  --c1-500:  #750622;   /* pressed */
  --c1-400:  #AB0A30;   /* primary */
  --c1:      #AB0A30;
  --c1-hover:#8C0826;
  --c1-press:#750622;
  --c1-300:  #CA687F;
  --c1-200:  #EEC1CC;
  --c1-100:  #F7E6EA;
  --c1-50:   #FDF4F6;

  /* ===== TEXT (4 levels) ================================================ */
  --fg1: #212126;   /* primary text */
  --fg2: #4A5568;   /* secondary */
  --fg3: #4F5D75;   /* caption / meta */
  --fg4: #99A3C3;   /* placeholder / tertiary */

  /* ===== SURFACES ======================================================= */
  --bg:           #F3F5FB;   /* page */
  --bg-window:    #FFFFFF;   /* card */
  --bg-subtle:    #F7FAFC;   /* zebra / inner */
  --bg-tint-cool: #EFF4FE;   /* info / ambient */
  --bg-tint-warm: #FDFBF7;   /* demo surface */
  --ns-bg-panel:  #F7F8FC;   /* neutral pastille surface */

  /* ===== BORDERS ======================================================== */
  --border1:      #E0E5EB;
  --border-soft:  #E2E8F0;
  --border-muted: rgba(226,232,240,0.5);
  --border-dashed:#CBD5E0;

  /* ===== GRAY SCALE ===================================================== */
  --gray-50:  #F7FAFC;
  --gray-100: #EDF2F7;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E0;
  --gray-400: #A0AEC0;
  --gray-500: #718096;
  --gray-600: #4A5568;
  --gray-700: #2D3748;
  --gray-800: #1A202C;

  /* ===== SECONDARIES — all share the same 100/200/400/600 ramp ========== */
  /* Jaune · alertes non bloquantes */
  --yellow-100:#FFF4E6;  --yellow-200:#FFE1BD;  --yellow-400:#FFB55B;  --yellow-600:#996D37;
  /* Violet · badges métier, déclarants */
  --violet-100:#EBE9FF;  --violet-200:#CFCBF6;  --violet-400:#867DE8;  --violet-600:#504B8B;
  /* Vert · success / importé */
  --green-100: #E6F9F2;  --green-200: #C0EEE3;  --green-400: #61D4B8;  --green-600: #3A7F6E;
  /* Corail · erreurs bloquantes (≠ rouge brand) */
  --corail-100:#FDE7DF;  --corail-200:#F9BBB7;  --corail-400:#EF632B;  --corail-600:#8F332D;
  /* Bleu · info utilisateur */
  --blue-100:  #E6F0FB;  --blue-200:  #BED5F4;  --blue-400:  #4B8CE2;  --blue-600:  #2A5A99;

  /* ===== SPACING · base 8 =============================================== */
  --sp-0: 0;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-xxs: var(--sp-1);  --sp-xs: var(--sp-2);
  --sp-sm:  var(--sp-3);  --sp-md: var(--sp-4);
  --sp-lg:  var(--sp-5);  --sp-xl: var(--sp-6);
  --sp-2xl: var(--sp-7);  --sp-3xl: var(--sp-8);

  /* ===== RADII ========================================================== */
  --r-0:   0;
  --r-xs:  4px;
  --r-sm:  6px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  16px;
  --r-2xl: 24px;
  --r-pill:999px;
  --r-circle:50%;

  /* ===== SHADOWS ======================================================== */
  --sh-0: none;
  --sh-1: 0 1px 2px rgba(0,0,0,0.06);
  --sh-2: 0 4px 16px rgba(175,21,58,0.04);     /* brand blush — card repos */
  --sh-3: 0 10px 30px rgba(25,28,30,0.06);     /* panel */
  --sh-4: 0 10px 30px rgba(129,0,32,0.30);     /* brand press — CTA */
  --sh-5: 0 18px 40px rgba(171,10,48,0.28);    /* result hero */
  --sh-focus: 0 0 0 3px rgba(171,10,48,0.12);

  /* ===== TYPOGRAPHY ===================================================== */
  --font:      "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-10: 0.625rem;
  --fs-11: 0.6875rem;
  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 1rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-32: 2rem;
  --fs-36: 2.25rem;

  --fw-regular:   400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-extrabold: 800;

  --lh-tight: 1.15;
  --lh-snug:  1.3;
  --lh-body:  1.45;
  --lh-loose: 1.6;

  /* ===== Z-INDEX ======================================================== */
  --z-local:       1;
  --z-sticky:      10;
  --z-dropdown:    100;
  --z-navigation:  500;
  --z-panel:       1000;
  --z-viewer:      1025;
  --z-modal:       1050;
  --z-modal-above: 1060;
  --z-tooltip:     1070;
  --z-pdf:         5000;
  --z-fullscreen:  100000;

  /* ===== MOTION ========================================================= */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-1: 120ms;
  --dur-2: 160ms;
  --dur-3: 240ms;
}

/* =========================================================================
   Base + semantic typography
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  font-family: var(--font);
  font-size: var(--fs-14);
  line-height: var(--lh-body);
  color: var(--fg1);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, .h1 { font-size: var(--fs-36); font-weight: var(--fw-extrabold); line-height: var(--lh-tight); letter-spacing: -0.01em; margin: 0; }
h2, .h2 { font-size: var(--fs-24); font-weight: var(--fw-semibold);  line-height: var(--lh-tight); margin: 0; }
h3, .h3 { font-size: var(--fs-18); font-weight: var(--fw-semibold);  line-height: var(--lh-snug);  margin: 0; }
h4, .h4 { font-size: var(--fs-16); font-weight: var(--fw-semibold);  line-height: var(--lh-snug);  margin: 0; }
p, .body        { font-size: var(--fs-14); line-height: var(--lh-body); margin: 0; }
small, .caption { font-size: var(--fs-12); color: var(--fg3); line-height: var(--lh-body); }
.overline {
  font-size: var(--fs-10); font-weight: var(--fw-bold);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg3);
}
.mono, code, pre { font-family: var(--font-mono); font-size: var(--fs-12); }
a { color: var(--c1); text-decoration: none; }
a:hover { color: var(--c1-hover); text-decoration: underline; }
