/* Argus Forge — design tokens. Dark-mode-first, terminal/IDE feel. */

/* Fonts self-hostees (IMP-005) : zero requete tierce.
   Subsets latin (toutes familles) + greek (IBM Plex Sans, JetBrains Mono).
   IBM Plex Serif n'a pas de subset greek officiel : le grec retombe sur le fallback (Georgia). */

/* IBM Plex Sans — latin */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-300.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: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-400.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: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-500.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: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-600.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: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-latin-700.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;
}

/* IBM Plex Sans — greek (pour la tagline Ἄργος Πανόπτης et autres mots grecs) */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-greek-300.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-greek-400.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-greek-500.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-greek-600.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-greek-700.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}

/* IBM Plex Serif — latin (pas de subset greek officiel ; grec retombe sur fallback) */
@font-face {
  font-family: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-serif-latin-400.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: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-serif-latin-500.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: 'IBM Plex Serif';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-serif-latin-600.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;
}

/* JetBrains Mono — latin uniquement (jamais utilisee en grec sur le site) */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-300.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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-400.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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-500.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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-600.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;
}

:root {
  /* Slate-anvil scale */
  --ink-985: #06090E;
  --ink-950: #0A0E14;
  --ink-900: #11161F;
  --ink-850: #151B26;
  --ink-800: #1A2030;
  --ink-750: #1E2538;
  --ink-700: #232B3D;
  --ink-650: #2A334A;
  --ink-600: #313A52;
  --ink-500: #4A5573;
  --ink-450: #5C6885;
  --ink-400: #6B7693;
  --ink-300: #9099B5;
  --ink-200: #C4C9DC;
  --ink-100: #E6E8F2;

  /* Ember (forge fire) */
  --ember-700: #8C3A0F;
  --ember-600: #B84A12;
  --ember-500: #E25A18;
  --ember-400: #F2783A;
  --ember-300: #F8A26E;
  --ember-200: #FCC9A8;
  --ember-100: #FFE7D4;

  /* Copper */
  --copper-600: #8B5A2B;
  --copper-500: #B07A3A;
  --copper-400: #D49A55;
  --copper-300: #E8BB80;

  /* Semantic */
  --ok-500: #2EAA6A;
  --ok-300: #6FD49E;
  --warn-500: #D9A21B;
  --warn-300: #F0C654;
  --alert-500: #E67320;
  --alert-300: #F2A56F;
  --danger-500: #D44545;
  --danger-300: #EE7E7E;
  --info-500: #3A7BD9;
  --info-300: #7BA8EA;
  --magic-500: #7A5AD6;
  --magic-300: #AE96E8;

  /* Type */
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-serif: 'IBM Plex Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Radii */
  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-pill: 9999px;

  /* Shadows */
  --shadow-pop: 0 1px 2px rgb(0 0 0 / .35), 0 4px 14px rgb(0 0 0 / .25);
  --shadow-modal: 0 8px 40px rgb(0 0 0 / .55), 0 2px 4px rgb(0 0 0 / .4);
  --shadow-inset: inset 0 1px 0 rgb(255 255 255 / .04);
}

/* Global reset within screens */
.af, .af * {
  box-sizing: border-box;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
  min-width: 0;
}
.af .af-serif, .af h1, .af h2 { white-space: nowrap; }
.af-nowrap { white-space: nowrap; }

.af-mono { font-family: var(--font-mono); }
.af-serif { font-family: var(--font-serif); }

/* The main app frame — a windowless dark surface */
.af-screen {
  background: var(--ink-950);
  color: var(--ink-200);
  font-size: 13px;
  line-height: 1.5;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;
}

/* Faint blueprint grid for hero/empty states */
.af-grid-bg {
  background-image:
    linear-gradient(var(--ink-850) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-850) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}

/* Status pill base */
.af-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-family: var(--font-mono);
  border: 1px solid transparent;
  white-space: nowrap;
}
.af-pill .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* Buttons */
.af-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  border: 1px solid var(--ink-600);
  background: var(--ink-800);
  color: var(--ink-100);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.af-btn:hover { background: var(--ink-700); border-color: var(--ink-500); }
.af-btn-primary {
  background: var(--ember-500);
  border-color: var(--ember-600);
  color: #fff;
}
.af-btn-primary:hover { background: var(--ember-400); border-color: var(--ember-500); }
.af-btn-ghost { background: transparent; border-color: transparent; color: var(--ink-300); }
.af-btn-ghost:hover { background: var(--ink-800); color: var(--ink-100); }

/* Kbd */
.af-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 3px;
  border: 1px solid var(--ink-600);
  background: var(--ink-850);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-300);
}

/* Section-card chrome inside a screen */
.af-card {
  background: var(--ink-900);
  border: 1px solid var(--ink-700);
  border-radius: var(--r-md);
}

/* Row / table styling */
.af-row {
  display: grid;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ink-800);
  font-family: var(--font-mono);
  font-size: 12px;
}
.af-row:last-child { border-bottom: 0; }
.af-row:hover { background: var(--ink-850); }

/* Sidebar item */
.af-side-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  color: var(--ink-300);
  font-size: 12.5px;
  cursor: pointer;
  user-select: none;
}
.af-side-item:hover { background: var(--ink-850); color: var(--ink-100); }
.af-side-item.active { background: var(--ink-800); color: var(--ink-100); }
.af-side-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--ember-500);
}

/* Status bar at bottom of every screen */
.af-statusbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 12px;
  border-top: 1px solid var(--ink-800);
  background: var(--ink-985);
  color: var(--ink-400);
  font-family: var(--font-mono);
  font-size: 10.5px;
  height: 22px;
  flex-wrap: nowrap;
  overflow: hidden;
  flex-shrink: 0;
}
.af-statusbar > * {
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.af-statusbar-spacer { flex: 1; flex-shrink: 1 !important; }

/* Topbar — every screen has the same brand + breadcrumb pattern */
.af-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ink-800);
  background: var(--ink-985);
  flex-wrap: nowrap;
  overflow: hidden;
  flex-shrink: 0;
}
.af-topbar > * { white-space: nowrap; flex-shrink: 0; }

/* Small icon-button */
.af-icon-btn {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  border: none;
  background: transparent;
  color: var(--ink-400);
  cursor: pointer;
}
.af-icon-btn:hover { background: var(--ink-800); color: var(--ink-100); }

/* Custom scrollbars */
.af *::-webkit-scrollbar { width: 8px; height: 8px; }
.af *::-webkit-scrollbar-track { background: transparent; }
.af *::-webkit-scrollbar-thumb { background: var(--ink-700); border-radius: 4px; }
.af *::-webkit-scrollbar-thumb:hover { background: var(--ink-600); }

/* Heartbeat pulse — the only loop */
@keyframes af-heartbeat {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.af-pulse { animation: af-heartbeat 1s ease-in-out infinite; }

/* Argus eye blink (logo only) */
@keyframes af-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%, 97% { transform: scaleY(0.06); }
}
.af-eye-blink { animation: af-blink 4.5s ease-in-out infinite; transform-origin: center; }

/* Ember radial glow for hero only */
.af-hero-glow {
  background:
    radial-gradient(ellipse at 18% 100%, rgba(226,90,24,0.16), transparent 55%),
    radial-gradient(ellipse at 100% 0%, rgba(122,90,214,0.10), transparent 50%),
    var(--ink-950);
}

/* Truncation helper */
.af-truncate {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
