/* ============================================================
   PMG Helpdesk — Design Foundations
   Colors + Type tokens. Import this file first.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* --------------------------------------------------------
     COLOR — Ink scale (neutrals, slightly warm)
     -------------------------------------------------------- */
  --ink-1000: #07090C;
  --ink-900:  #0B0D10;  /* logo black, headings, primary surface dark */
  --ink-800:  #16191F;
  --ink-700:  #2A2F36;
  --ink-600:  #424751;
  --ink-500:  #5B636E;  /* secondary text */
  --ink-400:  #828A94;
  --ink-300:  #B7BDC4;  /* borders strong */
  --ink-200:  #DDE1E5;  /* borders */
  --ink-150:  #E8EBEE;
  --ink-100:  #ECEEF1;  /* surface mute */
  --ink-50:   #F6F7F8;  /* surface alt */
  --ink-0:    #FFFFFF;

  /* --------------------------------------------------------
     COLOR — Accent (slate petrol — professionnel, santé)
     -------------------------------------------------------- */
  --accent-900: #0C2429;
  --accent-800: #14363D;
  --accent-700: #1A5059;
  --accent-600: #236B76;  /* primary accent */
  --accent-500: #2E8491;
  --accent-400: #4A9AA6;
  --accent-300: #8AB4BC;
  --accent-100: #D8E8EA;
  --accent-50:  #EEF4F5;

  /* --------------------------------------------------------
     COLOR — Semantic (status colors for tickets)
     -------------------------------------------------------- */
  --critical-700: #991B1B;
  --critical-600: #DC2626;   /* P1 / Down / Critical */
  --critical-100: #FEE2E2;
  --critical-50:  #FEF2F2;

  --warning-700: #92400E;
  --warning-600: #D97706;   /* Pending / Awaiting / Medium */
  --warning-100: #FEF3C7;
  --warning-50:  #FFFBEB;

  --info-700:    #1A5059;
  --info-600:    #236B76;   /* In progress / Info */
  --info-100:    #D8E8EA;
  --info-50:     #EEF4F5;

  --success-700: #166534;
  --success-600: #16A34A;   /* Resolved */
  --success-100: #DCFCE7;
  --success-50:  #F0FDF4;

  /* --------------------------------------------------------
     SEMANTIC TOKENS — what to actually use in UI
     -------------------------------------------------------- */
  --bg:           var(--ink-50);
  --bg-elev:      var(--ink-0);
  --bg-inverse:   var(--ink-900);
  --bg-subtle:    var(--ink-100);
  --bg-hover:     var(--ink-100);
  --bg-press:     var(--ink-150);
  --bg-selected:  var(--accent-50);

  --fg:           var(--ink-900);   /* fg1 — primary text */
  --fg-secondary: var(--ink-500);   /* fg2 — secondary text */
  --fg-muted:     var(--ink-400);   /* fg3 — placeholder, captions */
  --fg-inverse:   var(--ink-0);
  --fg-accent:    var(--accent-700);
  --fg-link:      var(--accent-700);

  --border:        var(--ink-200);
  --border-strong: var(--ink-300);
  --border-focus:  var(--accent-600);
  --border-inverse: var(--ink-700);

  /* --------------------------------------------------------
     SPACING — 4px base scale
     -------------------------------------------------------- */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* --------------------------------------------------------
     RADII
     -------------------------------------------------------- */
  --radius-xs: 4px;   /* badges, chips */
  --radius-sm: 6px;   /* inputs, buttons */
  --radius-md: 8px;   /* cards */
  --radius-lg: 12px;  /* modals, large surfaces */
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* --------------------------------------------------------
     SHADOWS — subtle, layered (1px border does most work)
     -------------------------------------------------------- */
  --shadow-xs: 0 1px 0 rgba(11,13,16,0.04);
  --shadow-sm: 0 1px 2px rgba(11,13,16,0.06), 0 1px 0 rgba(11,13,16,0.02);
  --shadow-md: 0 4px 12px rgba(11,13,16,0.08), 0 1px 0 rgba(11,13,16,0.02);
  --shadow-lg: 0 12px 32px rgba(11,13,16,0.12);
  --shadow-focus: 0 0 0 3px rgba(35, 107, 118, 0.22);

  /* Sidebar (light — même fond que la zone principale) */
  --sidebar-bg:     var(--bg);
  --sidebar-border: var(--border);
  --sidebar-fg:     var(--fg);
  --sidebar-muted:  var(--fg-muted);
  --sidebar-hover:  var(--ink-100);
  --sidebar-active: var(--accent-50);

  /* --------------------------------------------------------
     TYPE — families
     -------------------------------------------------------- */
  --font-sans: 'Hanken Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --font-display: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;

  /* --------------------------------------------------------
     TYPE — scale
     -------------------------------------------------------- */
  --text-xs:   11px;
  --text-sm:   12px;
  --text-base: 14px;   /* default UI text */
  --text-md:   15px;
  --text-lg:   16px;
  --text-xl:   18px;
  --text-2xl:  22px;
  --text-3xl:  28px;
  --text-4xl:  36px;
  --text-5xl:  48px;

  --leading-tight:  1.15;
  --leading-snug:   1.3;
  --leading-normal: 1.5;
  --leading-loose:  1.65;

  --tracking-tight:  -0.02em;
  --tracking-normal: 0;
  --tracking-wide:   0.04em;
  --tracking-caps:   0.08em;

  /* --------------------------------------------------------
     MOTION
     -------------------------------------------------------- */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 320ms;

  /* --------------------------------------------------------
     LAYOUT
     -------------------------------------------------------- */
  --sidebar-w: 240px;
  --topbar-h: 56px;
  --content-max: 1280px;
}

/* ============================================================
   SEMANTIC TYPE — drop these classes on elements
   ============================================================ */

html, body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.h1 {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg);
}
.h2 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg);
}
.h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 600;
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--fg);
}
.h4 {
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: var(--leading-snug);
  color: var(--fg);
}
.h5 {
  font-size: var(--text-base);
  font-weight: 600;
  line-height: var(--leading-snug);
  color: var(--fg);
}
.eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--fg-secondary);
}
.body {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--fg);
}
.body-sm {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--fg-secondary);
}
.caption {
  font-size: var(--text-xs);
  line-height: var(--leading-snug);
  color: var(--fg-muted);
}
.mono, code, pre, kbd {
  font-family: var(--font-mono);
  font-size: 0.92em;
}
.ticket-id {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fg-secondary);
}
