/* Charte commune (31/10/2026) : le style sombre « streaming » de l'accueil appliqué aux autres pages.
   Chargée APRÈS le <style> de chaque page : elle remplace les couleurs claires/sombres et le menu. */
:root, :root:not([data-x]) {
  --bg: #141617; --card: #1f2223; --fg: #fbf1c7; --muted: #a89984;
  --accent: #fe8019; --line: #3c3836; --ok: #b8bb26; --bad: #fb4934; --gold: #e3c171;
  color-scheme: dark;
}
html, body { background: var(--bg); }
body { padding-top: 0 !important; }
body { color: var(--fg); font-family: system-ui, "Kantumruy Pro", "Noto Sans Khmer", sans-serif; overflow-x: hidden; }
html[lang="km"] body { font-family: "Kantumruy Pro", "Khmer Sangam MN", "Noto Sans Khmer", "Khmer OS", system-ui, sans-serif; }
h1, h2, h3 { color: var(--fg); }

/* Menu : barre pleine largeur, floutée, avec le nom du site */
.topnav { position: sticky; top: 0; z-index: 50; width: 100vw !important; max-width: none !important; box-sizing: border-box;
          margin-top: 0 !important; padding: .7rem clamp(16px, 4vw, 56px) !important; gap: .3rem !important;
          background: rgba(20,22,23,.92) !important; backdrop-filter: blur(10px); border-bottom: 1px solid var(--line) !important; }
.topnav .brand { font: 800 1.15rem Georgia, serif !important; letter-spacing: .28em; color: var(--gold) !important;
                 text-decoration: none; margin-right: 1rem; padding: 0 !important; background: none !important; }
.topnav a:not(.brand) { color: #ebdbb2 !important; white-space: nowrap; }
.topnav a:not(.brand):hover { background: rgba(255,255,255,.08) !important; }
.topnav a[aria-current="page"] { background: var(--accent) !important; color: #1d2021 !important; }
.topnav .lang button { color: #ebdbb2; }
.topnav .lang button[aria-pressed="true"] { border-color: rgba(251,241,199,.4); color: #fff; }
@media (max-width: 560px) { .topnav .brand { display: none; } .topnav a:not(.brand) { padding: .35rem .5rem !important; font-size: .82rem !important; } }

/* Pages plus larges (l'ancienne colonne de 64rem faisait « vieux site ») */
main > section, header, #cat, .cards, .feature, .back, .grid { max-width: 80rem !important; }
main { max-width: 80rem !important; }

/* Cartes, encadrés, champs : surfaces sombres */
.box, .card, .notice, dialog, .feature.light, .step, .panel, .tabs, details { background-color: var(--card); border-color: var(--line); }
input, select, textarea { background: #141617; color: var(--fg); border-color: var(--line); }
.btn.ghost { color: var(--fg); }
a { color: inherit; }
::selection { background: rgba(254,128,25,.35); }
