/* MacLustr LLM API — jetons de design partagés (portail public, Playground, Dashboard).
   Identité : « graphite & aurore » — fonds graphite profonds, un accent aurore (vert menthe → cyan → violet)
   utilisé avec retenue, typographie système Apple très soignée. */

:root {
  color-scheme: dark;

  /* Typographie */
  --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter",
    "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: clamp(2.25rem, 5vw, 3.25rem);
  --text-hero: clamp(2.6rem, 7.2vw, 5.25rem);
  --tracking-tight: -0.022em;
  --tracking-hero: -0.045em;
  --leading-tight: 1.08;
  --leading-body: 1.62;

  /* Espacements, rayons */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 72px; --space-9: 112px;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 18px; --radius-xl: 28px; --radius-pill: 999px;
  --content-max: 1180px;

  /* Mouvements */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --dur-fast: 140ms; --dur-med: 260ms; --dur-slow: 620ms;

  /* Accent aurore (identique dans les deux thèmes, ajusté en luminosité) */
  --aurora-1: #5ef2c4;
  --aurora-2: #4cc9f0;
  --aurora-3: #9b8cff;
  --gradient-aurora: linear-gradient(110deg, var(--aurora-1) 0%, var(--aurora-2) 48%, var(--aurora-3) 100%);

  /* Thème sombre (défaut) */
  --bg: #07090c;
  --bg-raised: #0d1014;
  --surface: #12161b;
  --surface-2: #181d24;
  --surface-3: #1f252e;
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #eef1f5;
  --text-2: #a9b1bd;
  --text-3: #6f7986;
  --accent: #5ef2c4;
  --accent-strong: #8ff7d8;
  --accent-contrast: #04140f;
  --accent-soft: rgba(94, 242, 196, 0.11);
  --accent-ring: rgba(94, 242, 196, 0.42);
  --ok: #4ade9c; --ok-soft: rgba(74, 222, 156, 0.12);
  --warn: #f5c451; --warn-soft: rgba(245, 196, 81, 0.13);
  --danger: #ff6b7a; --danger-soft: rgba(255, 107, 122, 0.13);
  --info: #6cb6ff; --info-soft: rgba(108, 182, 255, 0.13);
  --code-bg: #0b0e12;
  --code-text: #d7dde6;
  --code-comment: #6b7684; --code-keyword: #c4a7ff; --code-string: #7ee2b8; --code-number: #f5c451;
  --code-func: #6cb6ff; --code-punct: #8b95a3;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  --shadow-3: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 32px 80px -24px rgba(0, 0, 0, 0.85);
  --glass: rgba(13, 16, 20, 0.72);
  --grid-line: rgba(255, 255, 255, 0.035);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f9;
  --bg-raised: #ffffff;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e7eaef;
  --border: rgba(12, 18, 28, 0.09);
  --border-strong: rgba(12, 18, 28, 0.17);
  --text: #0c1118;
  --text-2: #4a5462;
  --text-3: #7b8594;
  --accent: #0a8f6c;
  --accent-strong: #067356;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(10, 143, 108, 0.09);
  --accent-ring: rgba(10, 143, 108, 0.35);
  --ok: #0f9d68; --ok-soft: rgba(15, 157, 104, 0.1);
  --warn: #b7791f; --warn-soft: rgba(183, 121, 31, 0.11);
  --danger: #d6344a; --danger-soft: rgba(214, 52, 74, 0.09);
  --info: #2166d1; --info-soft: rgba(33, 102, 209, 0.09);
  --code-bg: #0f1318;
  --code-text: #d7dde6;
  --shadow-1: 0 1px 2px rgba(12, 18, 28, 0.06);
  --shadow-2: 0 1px 2px rgba(12, 18, 28, 0.05), 0 12px 32px -14px rgba(12, 18, 28, 0.18);
  --shadow-3: 0 2px 4px rgba(12, 18, 28, 0.05), 0 32px 80px -28px rgba(12, 18, 28, 0.28);
  --glass: rgba(255, 255, 255, 0.78);
  --grid-line: rgba(12, 18, 28, 0.045);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f6f7f9; --bg-raised: #ffffff; --surface: #ffffff; --surface-2: #f1f3f6; --surface-3: #e7eaef;
    --border: rgba(12, 18, 28, 0.09); --border-strong: rgba(12, 18, 28, 0.17);
    --text: #0c1118; --text-2: #4a5462; --text-3: #7b8594;
    --accent: #0a8f6c; --accent-strong: #067356; --accent-contrast: #ffffff;
    --accent-soft: rgba(10, 143, 108, 0.09); --accent-ring: rgba(10, 143, 108, 0.35);
    --ok: #0f9d68; --ok-soft: rgba(15, 157, 104, 0.1); --warn: #b7791f; --warn-soft: rgba(183, 121, 31, 0.11);
    --danger: #d6344a; --danger-soft: rgba(214, 52, 74, 0.09); --info: #2166d1; --info-soft: rgba(33, 102, 209, 0.09);
    --shadow-1: 0 1px 2px rgba(12, 18, 28, 0.06);
    --shadow-2: 0 1px 2px rgba(12, 18, 28, 0.05), 0 12px 32px -14px rgba(12, 18, 28, 0.18);
    --shadow-3: 0 2px 4px rgba(12, 18, 28, 0.05), 0 32px 80px -28px rgba(12, 18, 28, 0.28);
    --glass: rgba(255, 255, 255, 0.78); --grid-line: rgba(12, 18, 28, 0.045);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans);
  font-size: var(--text-base); line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11"; text-rendering: optimizeLegibility;
}
code, pre, kbd, samp { font-family: var(--font-mono); font-size: 0.92em; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); color: var(--text); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tabular { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; }
}
