/* ==========================================================================
   84 City — Design System v2 « produit » (2026-08-07)
   Inspiré de GitHub (Primer dark) / Nitrado : retenue, densité, système.
   - Une seule couleur d'accent (bleu), surfaces plates, bordures 1 px
   - Rayons discrets (6/8/10 px), zéro lueur / dégradé / flou décoratif
   - Typographie Inter (UI) + Space Grotesk (titres) auto-hébergées
   - Données en monospace, transitions 150 ms sur hover/focus uniquement
   Chargé APRÈS le <style> inline de chaque page : ses règles priment.
   Logo 84 City inchangé.
   ========================================================================== */

/* ---------- 0 · Tokens sémantiques (toute la couleur du site est ici) ---------- */
:root {
  --bg:      #0d1117;  /* canvas principal (noir bleuté GitHub) */
  --bg2:     #161b22;  /* surfaces (cartes, hero, boîtes) */
  --bg3:     #21262d;  /* contrôles secondaires, hover */
  --inset:   #010409;  /* zones enfoncées (éditeurs, consoles) */
  --line:    #21262d;  /* bordures discrètes */
  --line2:   #30363d;  /* bordures standard */
  --line-hi: #8b949e;  /* bordure au survol */
  --t1:      #e6edf6;  /* texte principal */
  --t2:      #9198a1;  /* texte secondaire (muted) */
  --t3:      #6e7681;  /* texte tertiaire (subtle) */
  --acc:     #58a6ff;  /* liens / accent */
  --acc-em:  #1f6feb;  /* bouton primaire */
  --acc-hi:  #388bfd;  /* bouton primaire au survol */
  --ok:      #3fb950;
  --err:     #f85149;
  --err-em:  #da3633;
  --warn:    #d29922;
  --sans:    'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --disp:    'Space Grotesk', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --mono:    ui-monospace, 'SFMono-Regular', 'SF Mono', Menlo, Consolas, monospace;
  --r:       6px;      /* contrôles */
  --r-lg:    10px;     /* surfaces */
}

/* ---------- 1 · Typographie (auto-hébergée, zéro CDN) ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/fonts/space-grotesk.woff2') format('woff2');
}

body {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--t1);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Zéro décor d'arrière-plan : ni lueur, ni grille de points */
body::before, body::after { content: none; }

::selection { background: rgba(88, 166, 255, .35); color: #fff; }

/* Titres : sans-serif, couleur pleine (> Georgia / dégradé du v1) */
h1, h2, h3 {
  font-family: var(--disp);
  color: var(--t1);
  letter-spacing: -.015em;
  background: none;
  -webkit-text-fill-color: currentColor;
}
h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 600; line-height: 1.15; }
h1 span { color: var(--acc); background: none; -webkit-text-fill-color: var(--acc); font-weight: 600; }
h2 { font-size: 20px; font-weight: 600; line-height: 1.25; }
h3 { font-size: 16px; font-weight: 600; line-height: 1.3; }

.subtitle, .hero p, .card p, .note { color: var(--t2); line-height: 1.6; }

.eyebrow {
  color: var(--acc);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
}

/* ---------- 2 · Surfaces plates (bordure d'abord, pas d'ombre) ---------- */
.card, .stat, .loginbox, .rule, .event, .hero {
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-lg);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.card, .stat { transition: border-color .15s ease; }
.card:hover, .stat:hover { border-color: var(--line-hi); }

/* Barre de navigation : pleine, pas de flou */
.top, header.top {
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ---------- 3 · Boutons (style GitHub) ---------- */
a, a:visited, a:hover, a:focus, a:active { text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(240, 246, 252, .1);
  border-radius: var(--r);
  background: var(--acc-em);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  text-transform: none;
  box-shadow: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--acc-hi); text-decoration: none; }
.btn:active { background: var(--acc-em); }
.btn:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }

.btn.ghost {
  background: var(--bg3);
  border-color: var(--line2);
  color: var(--t1);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.btn.ghost:hover { background: #30363d; border-color: var(--line-hi); }

.btn.danger { background: var(--err-em); border-color: rgba(240, 246, 252, .1); color: #fff; }
.btn.danger:hover { background: var(--err); }

.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- 4 · Liens : souligné au survol, rien d'autre ---------- */
a { color: var(--acc); }
a:hover { text-decoration: underline; }
.top a:not(.btn), nav a:not(.btn) { color: var(--t2); transition: color .15s ease; }
.top a:not(.btn):hover, nav a:not(.btn):hover { color: var(--t1); text-decoration: none; }
a.btn:hover, a.btn.ghost:hover { text-decoration: none; }

/* ---------- 5 · Champs (inputs, selects, textareas) ---------- */
input:not([type='checkbox']):not([type='radio']),
select, textarea {
  background: var(--bg);
  border: 1px solid var(--line2);
  border-radius: var(--r);
  color: var(--t1);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:not([type='checkbox']):not([type='radio']):focus,
select:focus, textarea:focus {
  border-color: var(--acc-em);
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, .25);
}

/* ---------- 6 · Données en monospace ---------- */
code, pre, .mono { font-family: var(--mono); font-size: .92em; }
.small, .meta { font-family: var(--mono); }
.stat b, .stat strong { font-family: var(--mono); font-weight: 600; }

/* ---------- 7 · Tags hero (pills sobres) ---------- */
.hero-tag {
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: transparent;
  backdrop-filter: none;
  transition: border-color .15s ease, color .15s ease;
}
.hero-tag:hover { border-color: var(--line-hi); box-shadow: none; }

/* ---------- 8 · Accessibilité : focus visible partout ---------- */
a:focus-visible, button:focus-visible, .btn:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 1px;
}

/* ---------- 9 · Espacement (inchangé du v1 : respire) ---------- */
.shell { padding-bottom: 56px; }
.hero { margin: 24px 0 20px; }
.wrap { padding-top: 40px; }

/* ---------- 10 · Footer professionnel, version plate ---------- */
.site-footer {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 48px;
  padding: 32px 0 16px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--line);
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 24px;
}
.f-brand { display: flex; flex-direction: column; gap: 12px; }
.f-brand .fb-head { display: flex; align-items: center; gap: 10px; }
.f-brand img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line2); }
.f-brand b { font: 600 17px var(--disp); color: var(--t1); }
.f-brand .fb-tag { display: block; color: var(--acc); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.f-brand p { margin: 0; color: var(--t2); font-size: 12px; max-width: 280px; }

.f-col h4 {
  margin: 2px 0 10px;
  color: var(--t2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.f-col a { display: block; width: fit-content; padding: 4px 0; color: var(--t2); font-size: 12.5px; }
.f-col a:hover { color: var(--acc); }

.f-social { display: flex; gap: 8px; margin-top: 4px; }
.f-social .soc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--line2);
  border-radius: var(--r);
  background: transparent;
  color: var(--t2);
  transition: border-color .15s ease, color .15s ease;
}
.f-social .soc:hover { color: var(--t1); border-color: var(--line-hi); }
.f-social svg { width: 16px; height: 16px; }

.lang-label { display: block; margin-top: 14px; color: var(--t2); font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
select.lang {
  margin-top: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line2);
  border-radius: var(--r);
  background: var(--bg3);
  color: var(--t1);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.f-bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--t3);
  font-size: 11px;
}
.f-bottom a { color: var(--t2); }
.f-bottom a:hover { color: var(--acc); }

@media (max-width: 760px) {
  .site-footer { grid-template-columns: 1fr 1fr; }
  .f-brand { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .site-footer { grid-template-columns: 1fr; }
}

/* ---------- Animations : aucune par défaut. Respect explicite. ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- 11 · Navigation par catégories (tabs style GitHub) ---------- */
.gh-nav { margin: 14px 0 4px; }
.gh-tabs {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.gh-tabs::-webkit-scrollbar { display: none; }
.gh-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--t2);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.gh-tab svg { width: 14px; height: 14px; opacity: .85; flex: none; }
.gh-tab:hover { color: var(--t1); text-decoration: none; border-bottom-color: var(--line2); }
.gh-tab.is-active { color: var(--t1); font-weight: 600; border-bottom-color: var(--acc-em); }
.gh-tab--accent { color: var(--acc); }
.gh-kbd-hint {
  margin: 0 0 6px auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--t3);
  font: 500 11px var(--sans);
  cursor: pointer;
  white-space: nowrap;
}
.gh-kbd-hint:hover { color: var(--t2); }

/* --- Catégorie déroulante (nav v3.6 : Tailnet) --- */
.gh-drop { position: relative; display: inline-flex; }
button.gh-tab.gh-drop-btn {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--t2, #9198a1);
  cursor: pointer;
}
.gh-tab.gh-drop-btn:hover { color: var(--t1, #e6edf6); border-bottom-color: var(--line2, rgba(250,228,176,.32)); }
.gh-drop-btn svg.chev { width: 11px; height: 11px; display: inline-block; transition: transform .15s ease; }
.gh-drop.open .gh-drop-btn { color: var(--t1, #e6edf6); }
.gh-drop.open .gh-drop-btn svg.chev { transform: rotate(180deg); }
.gh-drop-menu {
  display: none;
  position: fixed;
  z-index: 200;
  min-width: 210px;
  padding: 6px;
  border: 1px solid var(--line2, rgba(250,228,176,.24));
  border-radius: 10px;
  background: var(--bg2, #161b22);
  box-shadow: 0 12px 34px rgba(0,0,0,.5);
}
.gh-drop.open .gh-drop-menu { display: block; }
.gh-drop-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--t1, #e6edf6);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.gh-drop-item:hover { background: var(--bg3, #21262d); text-decoration: none; }
.gh-drop-item svg { width: 13px; height: 13px; opacity: .65; flex: none; }
.gh-drop-item .tailnet-tag { margin-left: 10px; color: var(--t3, #6e7681); font-size: 10px; font-weight: 700; letter-spacing: .06em; }
kbd.cmdk {
  border: 1px solid var(--line2);
  border-radius: 4px;
  background: var(--bg3);
  color: var(--t2);
  font: 600 10px var(--mono);
  padding: 1px 5px;
}
.gh-subtabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 2px; }
.gh-sub {
  padding: 4px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--t2);
  font-size: 12px;
  font-weight: 500;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.gh-sub:hover { color: var(--t1); text-decoration: none; background: var(--bg3); }
.gh-sub.is-active { color: var(--t1); background: var(--bg3); border-color: var(--line2); }
@media (max-width: 940px) { .gh-tab svg { display: none; } .gh-tab { padding: 8px 9px; } }
@media (max-width: 700px) { .gh-kbd-hint { display: none; } }

/* ---------- 12 · Palette de navigation Cmd+K ---------- */
.cmdk-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 12vh 16px 16px;
  background: rgba(1, 4, 9, .72);
}
.cmdk-box {
  width: min(560px, 100%);
  height: fit-content;
  background: var(--bg2);
  border: 1px solid var(--line2);
  border-radius: var(--r-lg);
  box-shadow: 0 16px 70px rgba(1, 4, 9, .6);
  overflow: hidden;
}
.cmdk-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.cmdk-input svg { width: 15px; height: 15px; color: var(--t3); }
.cmdk-input input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--t1);
  font-size: 14px;
  padding: 0;
  outline: none;
  box-shadow: none;
}
.cmdk-list { max-height: 320px; overflow-y: auto; padding: 6px; }
.cmdk-group { padding: 8px 10px 4px; color: var(--t3); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r);
  color: var(--t2);
  font-size: 13px;
  cursor: pointer;
}
.cmdk-item svg { width: 14px; height: 14px; flex: none; }
.cmdk-item .cmdk-path { margin-left: auto; font: 11px var(--mono); color: var(--t3); }
.cmdk-item:hover { text-decoration: none; }
.cmdk-item.is-sel { background: var(--bg3); color: var(--t1); }
.cmdk-empty { padding: 18px; text-align: center; color: var(--t3); font-size: 12px; }

/* ---------- 13 · Zone dangereuse (style GitHub Danger Zone) ---------- */
.card.dz { border-color: rgba(248, 81, 73, .45); }
.card.dz::before {
  content: "Zone dangereuse";
  display: block;
  margin: -4px 0 10px;
  color: var(--err);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
