/* =====================================================================
   SubScale — identité (25/11/2026), chargée EN DERNIER dans l'appli (app.html, claude.html, mini.html).
   Noir et blanc, sobre : fond #0E0E0D (sombre) / #FAFAF8 (clair), cartes à bordure fine, rayons modestes,
   accent = blanc sur sombre / noir sur clair (boutons pleins), une seule couleur pour les données (vert / rouge).
   Les jetons sont posés en !important : ils l'emportent sur les anciennes couches (themes.css, ds.css, app.css…)
   et sur la palette choisie dans Apparence (l'accent de la marque n'est plus réglable).
   Polices servies par le site (public/fonts, licence SIL OFL 1.1) : Plus Jakarta Sans (titres, logo) + Inter (texte).
   ===================================================================== */
@font-face { font-family: "Plus Jakarta Sans"; src: url("/fonts/PlusJakartaSans.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ---------- sombre (par défaut) ---------- */
:root:not([data-theme="light"]), :root.studio-ui.studio-ui:not([data-theme="light"]) {
  --bg: #0E0E0D !important; --bg-2: #111110 !important; --surface: #141413 !important; --surface-2: #1A1A19 !important; --surface-3: #21211F !important;
  --line: #262624 !important; --line-2: #333331 !important;
  --fg: #F4F4F1 !important; --fg-2: #C9C9C4 !important; --muted: #8E8E88 !important; --muted-2: #62625D !important;
  --ok: #34C759 !important; --danger: #F0524A !important;
  --accent: #F4F4F1 !important; --accent-btn: #F4F4F1 !important; --accent-2: #D4D4CF !important; --accent-soft: rgba(244, 244, 241, .08) !important;
  --accent-ink: #0E0E0D !important; --on-accent: #0E0E0D !important; --grad: linear-gradient(#F4F4F1, #F4F4F1) !important; --lilac: #D4D4CF !important;
  --sel-bg: #1C1C1B !important; --chip-bg: #1F1F1E !important; --chip-fg: #E8E8E4 !important; --chip-fg-2: #F4F4F1 !important; --tile-bg: #161615 !important; --tile-fg: #E8E8E4 !important;
  --bubble-me: #2A2A28 !important; --bubble-me-fg: #F4F4F1 !important;
  --glow: transparent !important; --bg-glow: transparent !important;
}
/* ---------- clair ---------- */
:root[data-theme="light"], :root.studio-ui.studio-ui[data-theme="light"] {
  --bg: #FAFAF8 !important; --bg-2: #F3F3F0 !important; --surface: #FFFFFF !important; --surface-2: #F4F4F1 !important; --surface-3: #EBEBE7 !important;
  --line: #E4E4DF !important; --line-2: #D4D4CF !important;
  --fg: #0E0E0D !important; --fg-2: #3A3A37 !important; --muted: #6B6B66 !important; --muted-2: #9C9C96 !important;
  --ok: #15803D !important; --danger: #C8312A !important;
  --accent: #0E0E0D !important; --accent-btn: #0E0E0D !important; --accent-2: #3A3A37 !important; --accent-soft: rgba(14, 14, 13, .06) !important;
  --accent-ink: #FFFFFF !important; --on-accent: #FFFFFF !important; --grad: linear-gradient(#0E0E0D, #0E0E0D) !important; --lilac: #3A3A37 !important;
  --sel-bg: #EFEFEB !important; --chip-bg: #EFEFEB !important; --chip-fg: #1A1A19 !important; --chip-fg-2: #0E0E0D !important; --tile-bg: #F4F4F1 !important; --tile-fg: #0E0E0D !important;
  --bubble-me: #0E0E0D !important; --bubble-me-fg: #FFFFFF !important;
  --glow: transparent !important; --bg-glow: transparent !important;
}
/* pastilles de rubrique : plus de couleur par catégorie (une seule couleur, réservée aux données) */
:root, :root[data-theme] {
  --g-top: #3A3A37 !important; --g-messagerie: #3A3A37 !important; --g-contenus: #3A3A37 !important; --g-auto: #3A3A37 !important; --g-createurs: #3A3A37 !important;
  --g-revenus: #3A3A37 !important; --g-equipe: #3A3A37 !important; --g-ia: #3A3A37 !important; --g-croissance: #3A3A37 !important; --g-admin: #3A3A37 !important;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif !important;
  --font-display: "Plus Jakarta Sans", "Inter", "Segoe UI", system-ui, sans-serif !important;
  --r-sm: 6px !important; --r: 8px !important; --r-lg: 10px !important; --radius: 8px !important;
}
/* zones qui redéfinissent leurs couleurs (fenêtres de connexion, page web du compte) : mêmes valeurs que le thème */
:root:not([data-theme="light"]) :is(.lock, .web-gate, .co-modal, .lock-pitch) {
  --accent: #F4F4F1 !important; --accent-btn: #F4F4F1 !important; --accent-soft: rgba(244, 244, 241, .08) !important; --on-accent: #0E0E0D !important; --accent-ink: #0E0E0D !important; --lilac: #D4D4CF !important;
}
:root[data-theme="light"] :is(.lock, .web-gate, .co-modal, .lock-pitch) {
  --accent: #0E0E0D !important; --accent-btn: #0E0E0D !important; --accent-soft: rgba(14, 14, 13, .06) !important; --on-accent: #FFFFFF !important; --accent-ink: #FFFFFF !important; --lilac: #3A3A37 !important;
}
/* page « Ouvre SubScale » (#web-gate.wg2) : toujours sombre */
html body #web-gate.wg2, :root[data-theme="light"] body #web-gate.wg2 {
  --bg: #0E0E0D !important; --surface: #141413 !important; --surface-2: #1A1A19 !important; --line: #262624 !important; --fg: #F4F4F1 !important; --fg-2: #B8B8B2 !important; --muted: #8E8E88 !important;
  --accent: #F4F4F1 !important; --accent-btn: #F4F4F1 !important; --accent-soft: rgba(244, 244, 241, .08) !important; --on-accent: #0E0E0D !important; --accent-ink: #0E0E0D !important; --lilac: #D4D4CF !important;
  background: #0E0E0D !important;
}

/* ---------- base ---------- */
html body { font-family: var(--font-body) !important; }
h1, h2, h3, .vb h1, .viewbar h1, .brand, .wg-title { font-family: var(--font-display) !important; letter-spacing: -.025em; }
::selection { background: color-mix(in srgb, var(--fg) 22%, transparent); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--fg) 55%, transparent) !important; outline-offset: 2px; }

/* ---------- logo : le symbole « La marche » + le mot « subscale » (comme le logo horizontal) ---------- */
:root body :is(.logo, .brand .logo, .brand.lg .logo, .welcome-mark .logo, .lock-pitch .brand .logo, .web-gate .logo, .sm-logo, .mob-top .logo, .m-head .logo) { background-color: transparent !important; box-shadow: none !important; background: url("/brand/symbol-mono-white.svg?v=2") center / 78% no-repeat !important; border-radius: 0 !important; }
:root[data-theme="light"] body :is(.logo, .brand .logo, .brand.lg .logo, .welcome-mark .logo, .lock-pitch .brand .logo, .web-gate .logo, .sm-logo, .mob-top .logo, .m-head .logo) { background-image: url("/brand/symbol-mono-black.svg?v=2") !important; }
.brand .wm { font-family: var(--font-display); font-weight: 700; letter-spacing: -.045em; text-transform: lowercase; }
:root[data-theme="light"] body #web-gate :is(.logo, .brand .logo) { background-image: url("/brand/symbol-mono-white.svg?v=2") !important; }
.wg2-glow { display: none !important; }

/* ---------- boutons pleins : accent uni, sans halo ni dégradé ---------- */
html body :is(.btn-primary, .btn.primary, button.primary, .ui-btn.primary) { box-shadow: none !important; background-image: none !important; }

/* ---------- titres : badge dans un titre (ex. « 4 créatrices ») gardé en Inter, sans resserrer ---------- */
h1 { letter-spacing: -.02em; }
:is(h1, h2, h3) :is(span, small, .ui-badge, .badge, .pill, .chip) { letter-spacing: 0; font-family: var(--font-body); }

/* ---------- appli installée sur l'ancienne adresse : bandeau discret vers la nouvelle (app.js, HOSTMOVE) ---------- */
.hostmove { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 9000; display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 0 auto; padding: 10px 10px 10px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--fg); font-size: 13.5px; line-height: 1.4; box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .6); }
.hostmove p { flex: 1; margin: 0; }
.hostmove a { flex: none; padding: 7px 12px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.hostmove button { flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; }
