/* ==========================================================================
   84 City — theme.css v1 (2026-08-09)
   Variantes de thème. Sombre par défaut (aucun changement sans choix explicite)
   ; clair quand theme.js pose html[data-theme=light].
   Deux familles de tokens à couvrir :
   - les tokens partagés de buttons.css (--bg, --bg2, --t1, --acc, …)
   - les tokens des palettes inline des pages (--panel, --cream, --gold, …)
   html[data-theme=light] (0,1,1) bat :root (0,1,0) à n'importe quel ordre de
   chargement — pas besoin de trier les <link> des 13 pages.
   ========================================================================== */

:root { color-scheme: dark; }

html[data-theme=light] {
  color-scheme: light;

  /* --- famille partagée (tokens buttons.css) --- */
  --bg:      #f6f8fa;
  --bg2:     #ffffff;
  --bg3:     #eaeef2;
  --inset:   #eff1f3;
  --line:    #d1d9e0;
  --line2:   #d1d9e0;
  --line-hi: #8c959f;
  --t1:      #1f2328;
  --t2:      #59636e;
  --t3:      #6e7781;
  --acc:     #0969da;
  --acc-em:  #0969da;
  --acc-hi:  #0860ca;
  --ok:      #1a7f37;
  --err:     #cf222e;
  --err-em:  #cf222e;
  --warn:    #9a6700;

  /* --- famille pages (palettes :root inline) --- */
  --panel:   #ffffff;
  --cream:   #1f2328;
  --muted:   #59636e;
  --dim:     #6e7781;
  --gold:    #0969da;
  --green:   #1a7f37;
  --red:     #cf222e;
  --amber:   #9a6700;
  --blue:    #0969da;
}

/* Les ombres portées sombres se lisent mieux atténuées en clair. */
html[data-theme=light] .gh-app,
html[data-theme=light] .card,
html[data-theme=light] .box {
  box-shadow: 0 1px 3px rgba(31, 35, 40, .08);
}

/* Frise de disponibilité (page statut) : en clair, les jours « sans donnée »
   doivent se distinguer de la boîte grise qui les contient. */
html[data-theme=light] .uptime-bars i.none { background: #b9c2cb; }

/* Composants volontairement sombres en toute saison (rail d'identité de
   l'accueil : dégradé quasiment noir en dur) : on y re-verrouille les
   variables au thème sombre, sinon ses textes passent en foncé sur fond
   foncé et disparaissent. */
html[data-theme=light] .brand-rail {
  --bg: #0d1117;
  --bg2: #161b22;
  --bg3: #21262d;
  --panel: #161b22;
  --line: #30363d;
  --line2: #30363d;
  --t1: #e6edf6;
  --t2: #9198a1;
  --t3: #6e7681;
  --cream: #e6edf6;
  --muted: #9198a1;
  --dim: #6e7681;
  --gold: #58a6ff;
  --acc: #58a6ff;
  --green: #9fe179;
}


/* --- Passe light complète (surfaces & composants) --- */
html[data-theme=light] {
  --orange: #9a6700;
  --blue: #0969da;
}

html[data-theme=light] .gh-app {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
html[data-theme=light] .gh-app-mark img,
html[data-theme=light] .gh-app-avatar img {
  border-color: var(--line2);
  background: #fff;
}
html[data-theme=light] .gh-tab.is-active {
  border-bottom-color: var(--acc-em);
}
html[data-theme=light] .gh-drawer {
  background: #ffffff;
  border-right-color: var(--line);
}
html[data-theme=light] .gh-drawer-overlay {
  background: rgba(31, 35, 40, .35);
}
html[data-theme=light] .gh-notif-menu,
html[data-theme=light] .gh-app-menu {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 12px 32px rgba(31, 35, 40, .14);
}
html[data-theme=light] .gh-toast {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 8px 24px rgba(31, 35, 40, .12);
  color: var(--t1);
}
html[data-theme=light] .hm-cell { background: #eaeef2; }
html[data-theme=light] .hm-cell.hm-l0 { background: #eaeef2; }
html[data-theme=light] .hm-cell.hm-l1 { background: #ffcecb; }
html[data-theme=light] .hm-cell.hm-l2 { background: #ffaba8; }
html[data-theme=light] .hm-cell.hm-l3 { background: #ff8182; }
html[data-theme=light] .hm-cell.hm-l4 { background: #fa4549; }
html[data-theme=light] .site-footer {
  border-top-color: var(--line);
  background: #f6f8fa;
}
html[data-theme=light] .footer {
  border-top-color: var(--line);
}
html[data-theme=light] .scorebar,
html[data-theme=light] .ubar,
html[data-theme=light] .audit-bar {
  background: #eaeef2;
}
html[data-theme=light] .players .row:hover,
html[data-theme=light] .list .row:hover {
  background: rgba(9, 105, 218, .05);
}
/* Accueil : rail déjà verrouillé sombre ; le main suit le thème clair */
html[data-theme=light] .site-shell {
  background: var(--bg);
}
