:root {
  --gold: #c8ced8;
  --gold2: #eef1f5;
  --gold-soft: rgba(200, 206, 216, 0.12);
  --accent-top: #f3f5f8;
  --accent-bot: #9aa3b2;
  --accent-ink: #12141a;
  --accent-rgb: 200, 206, 216;
  --link: #2563eb;
  --link-hover: #3b82f6;
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --bg: #000000;
  --surface: #0c0c10;
  --surface-2: #0a0a0e;
  --surface-bar: #121218;
  --text: #f5f5f5;
  --text-2: #c4c4c8;
  --muted: #9ca3af;
  --line: rgba(255, 255, 255, 0.08);
  --ok: #86efac;
  --warn: #f0d9a0;
  --bad: #fca5a5;
  --radius: 14px;
  --radius-sm: 11px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Chakra Petch", Manrope, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 1.5rem 1.15rem 2.5rem;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.wrap.wide { max-width: 1100px; }
.wrap.narrow { max-width: 760px; }

/* Navigation */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem;
  max-width: 880px;
  margin: 0 auto 1.4rem;
  padding: 0.35rem;
  border-radius: var(--radius);
  background: rgba(8, 8, 11, 0.85);
  border: 1px solid var(--line);
}

.site-nav a {
  color: #9aa3b8;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  transition: background 0.16s ease, color 0.16s ease;
}

.site-nav a:hover:not(.active) {
  color: var(--gold2);
  background: rgba(255, 255, 255, 0.05);
}

.site-nav a.active {
  color: var(--accent-ink);
  font-weight: 700;
  background: linear-gradient(180deg, var(--accent-top), var(--accent-bot));
}

/* En-têtes */
.page-head {
  text-align: center;
  margin-bottom: 1.3rem;
}

.page-head img { width: 60px; height: 60px; margin-bottom: 0.6rem; }

.page-title {
  font-size: clamp(1.35rem, 3vw, 1.6rem);
  font-weight: 800;
  color: var(--gold2);
  margin-bottom: 0.4rem;
}

.lead {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
  max-width: 560px;
  margin: 0 auto;
}

.lead .hi,
.hi { color: var(--gold2); font-weight: 600; }

.kicker {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.block-title {
  margin: 1.45rem 0 0.65rem;
  color: var(--gold2);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.block-title.upper {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Panneaux premium (ex-console) */
.console {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 10, 0.92);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.console + .block-title { margin-top: 1.55rem; }

.console-bar {
  display: none;
}

.console-body {
  padding: 1.15rem 1.2rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-2);
}

.console-body.flush { padding: 0; }

.console-body p { margin: 0 0 0.65rem; }
.console-body p:last-child { margin-bottom: 0; }
.console-body ul,
.console-body ol { margin: 0.4rem 0 0.6rem 1.15rem; }
.console-body li { margin: 0.3rem 0; }

.console-body a {
  color: var(--link);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.console-body code,
code.mono {
  font-family: var(--mono);
  font-size: 0.8em;
  color: var(--gold2);
  word-break: break-word;
}

/* Grille champs */
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1rem;
}

.field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}

.field .value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ececf0;
  overflow-wrap: anywhere;
}

.field.full { grid-column: 1 / -1; }

.value.hash {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--gold2);
  line-height: 1.5;
}

/* Boutons */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 46px;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-gold { color: var(--accent-ink); background: linear-gradient(180deg, var(--accent-top), var(--accent-bot)); }
.btn-discord { color: #fff; background: var(--discord); }
.btn-discord:hover { background: var(--discord-hover); }

.btn-ghost {
  color: var(--gold2);
  background: transparent;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
}

.btn-ghost:hover { background: var(--gold-soft); }

/* Lignes */
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line);
}

.row:first-child { border-top: none; }

.row .name {
  font-weight: 650;
  font-size: 0.9rem;
  color: #ececf0;
  overflow-wrap: anywhere;
}

.row .name .hi {
  text-decoration: underline;
  text-decoration-color: rgba(var(--accent-rgb), 0.4);
  text-underline-offset: 3px;
  font-weight: 700;
}

.row .name.mono {
  font-family: var(--mono);
  letter-spacing: 0.12em;
  color: var(--gold2);
  font-size: 0.88rem;
}

.row .sub {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.row .ms {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: #d4d4d8;
  min-width: 4rem;
  text-align: right;
}

.badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
}

.badge.ok { background: #052e16; color: var(--ok); }
.badge.warn { background: #3f2f10; color: var(--warn); }
.badge.bad { background: #3f1010; color: var(--bad); }
.badge.gold { background: rgba(37, 99, 235, 0.16); color: #60a5fa; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #111114;
  color: var(--text-2);
}

.err {
  color: var(--bad);
  font-size: 0.88rem;
  padding: 1.2rem;
  text-align: center;
}

.empty {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 1.4rem;
  text-align: center;
}

/* Documents légaux */
.doc h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold2);
  margin: 1.4rem 0 0.5rem;
}

.doc h2:first-of-type { margin-top: 0.35rem; }
.doc h3 { font-size: 0.9rem; font-weight: 700; color: #e4e4e7; margin: 0.9rem 0 0.35rem; }
.doc p, .doc li { color: var(--text-2); font-size: 0.9rem; line-height: 1.7; }
.doc p { margin-bottom: 0.7rem; }
.doc ul, .doc ol { margin: 0.4rem 0 0.85rem 1.2rem; }
.doc li { margin: 0.3rem 0; }
.doc a { color: var(--link); }
.doc a:hover { color: var(--link-hover); }
.doc .updated { color: var(--muted); font-size: 0.8rem; margin-bottom: 1.2rem; }

.doc .callout {
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background: rgba(var(--accent-rgb), 0.06);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin: 0.9rem 0 1rem;
}

.doc .callout p:last-child { margin-bottom: 0; }

/* Cartes */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
}

.card h3 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--gold2);
  margin-bottom: 0.35rem;
}

.card p { font-size: 0.8rem; color: #a1a1aa; line-height: 1.55; }

/* Comparatif */
.compare { display: grid; gap: 0.6rem; }

.compare-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.6rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line);
}

.compare-row:first-child { border-top: none; }
.compare-row.head { background: var(--surface-bar); }

.compare-row .feat { font-weight: 650; color: #d4d4d8; font-size: 0.86rem; }
.compare-row .col { font-size: 0.84rem; font-weight: 600; }
.compare-row.head .col { color: var(--gold2); font-weight: 800; font-size: 0.88rem; }
.compare-row.head .feat { color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; }
.col.yes { color: var(--ok); font-weight: 700; }
.col.lim { color: var(--gold2); }
.col.no { color: #9aa3b8; }

/*
 * Les liens des consoles et des documents sont dorés et soulignés : on rétablit
 * ici la couleur propre à chaque bouton, sinon le texte passe en doré sur doré.
 */
.console-body a.btn,
.doc a.btn,
.console-body a.badge,
.doc a.badge,
.detail a.btn {
  text-decoration: none;
  font-weight: 700;
}

.console-body a.btn-gold,
.doc a.btn-gold,
.detail a.btn-gold { color: #1a1406; }

.console-body a.btn-discord,
.doc a.btn-discord,
.detail a.btn-discord { color: #ffffff; }

.console-body a.btn-ghost,
.doc a.btn-ghost,
.detail a.btn-ghost { color: var(--gold2); }

/* Champs de saisie */
.field-input {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #0a0a0e;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.field-input::placeholder { color: #6b7280; }

.field-input:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.field-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.form-row { margin-bottom: 0.85rem; }

.alert {
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  line-height: 1.5;
}

.alert.bad { background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.3); color: var(--bad); }
.alert.ok { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.3); color: var(--ok); }
.alert.info { background: var(--gold-soft); border: 1px solid rgba(var(--accent-rgb), 0.28); color: var(--gold2); }

/* Onglets */
.tabs {
  display: flex;
  gap: 0.3rem;
  padding: 0.3rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  margin-bottom: 1rem;
}

.tabs button {
  flex: 1;
  min-height: 40px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #9aa3b8;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.tabs button:hover:not(.active) { color: var(--gold2); background: rgba(255, 255, 255, 0.04); }

.tabs button.active {
  color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent-top), var(--accent-bot));
}

.divider {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.hint {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.55;
}

.hint a { color: var(--link); }
.hint a:hover { color: var(--link-hover); }

/* Recherche */
.search {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.search input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #0a0a0e;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.search input::placeholder { color: #6b7280; }
.search input:focus {
  outline: none;
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

/* Documentation */
.docs-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}

.docs-side {
  position: sticky;
  top: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 10, 14, 0.9);
  padding: 0.85rem;
}

.docs-side .group {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0.75rem 0 0.35rem;
}

.docs-side .group:first-child { margin-top: 0; }

.docs-side a,
.docs-side button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #9aa3b8;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.docs-side a:hover,
.docs-side button:hover { background: rgba(255, 255, 255, 0.04); color: var(--gold2); }

.docs-side a.active,
.docs-side button.active {
  color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent-top), var(--accent-bot));
  font-weight: 700;
}

.docs-main .console {
  min-height: 420px;
}

@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-side { position: static; }
}

/* Pied de page — identique sur toutes les pages */
.site-footer {
  margin-top: auto;
  padding: 2rem 0 0.35rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.foot {
  margin: 0 auto;
  padding: 0 0.75rem;
  max-width: 920px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.foot-nav {
  display: block;
  margin: 0.9rem auto 0;
  padding: 0 0.75rem;
  max-width: 920px;
  text-align: center;
  font-size: 0.76rem;
  line-height: 1.75;
  overflow: visible;
}

.foot-nav a {
  display: inline;
  color: var(--muted);
  text-decoration: none;
  font-size: inherit;
  font-weight: 600;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
}

.foot-nav a:not(:last-child)::after {
  content: "·";
  display: inline;
  margin: 0 0.55rem;
  color: #9ca3af;
  font-weight: 700;
  pointer-events: none;
}

.foot-nav a:hover {
  color: var(--text);
  text-decoration: underline;
  background: transparent;
  border-color: transparent;
}

.foot-copy {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 650;
  color: #57575e;
}

@media (max-width: 760px) {
  .foot {
    white-space: normal;
    overflow: visible;
  }
}

/* Ancien format (compat) */
.foot-links {
  margin-top: 0.6rem;
  text-align: center;
  font-size: 0.74rem;
  color: #6b7280;
  line-height: 1.9;
}

.foot-links a {
  color: var(--link);
  text-decoration: none;
  padding: 0 0.3rem;
}

.foot-links a:hover { color: var(--link-hover); }

/* ========== Thème clair (défaut site) ========== */
[data-theme="light"] {
  --gold: #0aa86a;
  --gold2: #0aa86a;
  --gold-soft: rgba(10, 168, 106, 0.14);
  --accent-top: #b8f5d4;
  --accent-bot: #0aa86a;
  --accent-ink: #063822;
  --accent-rgb: 10, 168, 106;
  --link: #12141a;
  --link-hover: #000000;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f1f4;
  --surface-bar: #ffffff;
  --text: #12141a;
  --text-2: #4b5563;
  --muted: #101828;
  --line: rgba(15, 23, 42, 0.1);
  --ok: #15803d;
  --warn: #a16207;
  --bad: #b91c1c;
  color-scheme: light;
}

[data-theme="light"] body {
  background: var(--bg);
  color: #12141a;
}

[data-theme="light"] .site-nav {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--line);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .site-nav a { color: #12141a; }
[data-theme="light"] .site-nav a:hover:not(.active) {
  color: #12141a;
  background: rgba(10, 168, 106, 0.1);
}

[data-theme="light"] .page-title,
[data-theme="light"] .kicker,
[data-theme="light"] .block-title,
[data-theme="light"] .section-label,
[data-theme="light"] .dl-label,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] label,
[data-theme="light"] .feat h3,
[data-theme="light"] .g-sec-title,
[data-theme="light"] .sec-divider {
  color: #12141a !important;
}

[data-theme="light"] .hi,
[data-theme="light"] .lead .hi,
[data-theme="light"] .doc .hi {
  color: #0aa86a !important;
  font-weight: 700;
}

[data-theme="light"] .lead,
[data-theme="light"] .sub,
[data-theme="light"] p,
[data-theme="light"] li,
[data-theme="light"] .spec,
[data-theme="light"] .meta-line,
[data-theme="light"] .rel-version,
[data-theme="light"] .rel-date,
[data-theme="light"] .doc,
[data-theme="light"] .console,
[data-theme="light"] .card,
[data-theme="light"] .feat,
[data-theme="light"] .feat p,
[data-theme="light"] .status-card,
[data-theme="light"] .live-line,
[data-theme="light"] .checked,
[data-theme="light"] .legend,
[data-theme="light"] .trust li,
[data-theme="light"] .profile-mail,
[data-theme="light"] .sec-hint,
[data-theme="light"] .field-hint,
[data-theme="light"] .tip-box,
[data-theme="light"] .auth-switch,
[data-theme="light"] .back-link,
[data-theme="light"] .spinner-line,
[data-theme="light"] .g-foot-mini,
[data-theme="light"] .g-foot-mini a,
[data-theme="light"] .g-row-label {
  color: var(--text-2) !important;
}

[data-theme="light"] .lead { color: var(--muted) !important; }

[data-theme="light"] .card,
[data-theme="light"] .console,
[data-theme="light"] .doc,
[data-theme="light"] .detail,
[data-theme="light"] .info-card,
[data-theme="light"] .feat,
[data-theme="light"] .panel {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  color: var(--text-2);
}

[data-theme="light"] .site-footer {
  border-top-color: rgba(15, 23, 42, 0.1);
}
[data-theme="light"] .foot,
[data-theme="light"] .foot-copy,
[data-theme="light"] .foot-links,
[data-theme="light"] .foot-links a,
[data-theme="light"] .foot-nav a {
  color: #6b7280 !important;
}
[data-theme="light"] .foot-nav a:hover {
  color: #12141a !important;
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
}
[data-theme="light"] .foot-links a:hover { color: #000 !important; text-decoration: underline; }

/* Boutons verts (texte blanc) */
[data-theme="light"] .btn,
[data-theme="light"] .btn-gold,
[data-theme="light"] .btn-primary {
  color: #fff !important;
  background: linear-gradient(180deg, #3ee0a4, #0aa86a);
  box-shadow: 0 10px 24px rgba(10, 168, 106, 0.22);
}
[data-theme="light"] .btn:hover,
[data-theme="light"] .btn-gold:hover,
[data-theme="light"] .btn-primary:hover {
  filter: brightness(1.05);
}
[data-theme="light"] .btn-discord { color: #fff !important; background: linear-gradient(180deg, #7289da, #5865f2) !important; }

[data-theme="light"] .btn-ghost {
  color: #12141a !important;
  border-color: rgba(15, 23, 42, 0.18);
  background: rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .btn-ghost:hover {
  background: rgba(10, 168, 106, 0.14);
  color: #12141a !important;
}

.site-theme { display: none !important; }

[data-theme="light"] .field-input,
[data-theme="light"] .field,
[data-theme="light"] input.field-input,
[data-theme="light"] textarea {
  background: #fff;
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.14);
}

[data-theme="light"] .badge.ok { background: #dcfce7; color: #166534; }
[data-theme="light"] .badge.warn { background: #fef3c7; color: #92400e; }
[data-theme="light"] .badge.bad { background: #fee2e2; color: #991b1b; }
[data-theme="light"] .badge.gold { background: rgba(10, 168, 106, 0.16); color: #12141a; }

[data-theme="light"] .alert.ok { background: #ecfdf5; border-color: #86efac; color: #166534; }
[data-theme="light"] .alert.bad { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
[data-theme="light"] .alert.info { background: rgba(10, 168, 106, 0.1); border-color: rgba(10, 168, 106, 0.28); color: #12141a; }

[data-theme="light"] .foot-copy { color: #6b7280 !important; }

/* Pages avec styles inline sombres */
[data-theme="light"] .dl-card,
[data-theme="light"] .status-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .download-page .lead { color: var(--muted); }
[data-theme="light"] .spec,
[data-theme="light"] .req {
  background: #f7f8fa;
  border-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .spec label,
[data-theme="light"] .req span:first-child { color: var(--muted); }
[data-theme="light"] .spec .value,
[data-theme="light"] .req span:last-child { color: var(--text); }
[data-theme="light"] .dl-actions { border-top-color: rgba(15, 23, 42, 0.08); }
[data-theme="light"] .verify-text,
[data-theme="light"] .before-text { color: var(--text-2); }
[data-theme="light"] .verify-cmd {
  background: #f7f8fa;
  border-color: rgba(10, 168, 106, 0.28);
}
[data-theme="light"] .docs-seo details {
  background: #ffffff;
  border-color: var(--line);
}
[data-theme="light"] .docs-seo .seo-body { color: var(--text-2); }

[data-theme="light"] .docs-side {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .docs-side .group { color: #8b93a3; }
[data-theme="light"] .docs-side a,
[data-theme="light"] .docs-side button { color: #5b6475; }
[data-theme="light"] .docs-side a:hover,
[data-theme="light"] .docs-side button:hover {
  background: rgba(10, 168, 106, 0.08);
  color: var(--gold2);
}
[data-theme="light"] .docs-side a.active,
[data-theme="light"] .docs-side button.active {
  color: var(--accent-ink);
}
[data-theme="light"] .search input {
  background: #f7f8fa;
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.12);
}
[data-theme="light"] .search input::placeholder { color: #9ca3af; }
[data-theme="light"] .doc h3 { color: var(--text); }
[data-theme="light"] .doc .callout {
  background: rgba(10, 168, 106, 0.08);
  border-color: rgba(10, 168, 106, 0.28);
}

[data-theme="light"] .field .value { color: var(--text); }
[data-theme="light"] .row .name { color: var(--text); }
[data-theme="light"] .row .name.mono { color: var(--gold); }
[data-theme="light"] .row .ms { color: var(--gold); font-weight: 650; }
[data-theme="light"] .row .sub { color: var(--muted); }
[data-theme="light"] .console-body { color: var(--text-2); }
[data-theme="light"] .detail,
[data-theme="light"] .panel,
[data-theme="light"] .card {
  color: var(--text);
}
[data-theme="light"] code.mono,
[data-theme="light"] .console-body code {
  background: #f3f4f6;
  color: #0aa86a;
  padding: 0.1em 0.35em;
  border-radius: 6px;
}
[data-theme="light"] .tabs {
  background: #ffffff;
  border-color: var(--line);
}
[data-theme="light"] .tabs button { color: #5b6475; }
[data-theme="light"] .tabs button:hover:not(.active) {
  color: var(--gold2);
  background: rgba(10, 168, 106, 0.08);
}
[data-theme="light"] .compare-row.head {
  background: #f0f1f4;
  color: var(--text);
}
[data-theme="light"] .docs-side {
  /* mobile: sidebar empilée reste claire */
  background: #ffffff !important;
}

/* Sélecteur de langue global — bas gauche */
.site-lang {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 80;
}

.site-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-2);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
}

.site-lang-btn:hover {
  color: var(--gold2);
  border-color: rgba(var(--accent-rgb), 0.45);
}

.site-lang-btn svg {
  width: 14px;
  height: 14px;
  color: var(--gold);
  flex-shrink: 0;
}

.site-lang-menu {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.45rem);
  min-width: 152px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(16px);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.site-lang-menu.open { display: block; }

.site-lang-menu button {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.site-lang-menu button .code {
  width: 1.4rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.site-lang-menu button:hover { background: rgba(15, 23, 42, 0.05); }
[data-theme="light"] .site-lang-menu button:hover { background: rgba(15, 23, 42, 0.05); }
html:not([data-theme="light"]) .site-lang-menu button:hover { background: rgba(255, 255, 255, 0.05); }

.site-lang-menu button.active {
  background: var(--gold-soft);
  color: var(--gold2);
}

.site-lang-menu button.active .code { color: var(--gold); }

/* Bouton thème — bas droite */
.site-theme {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
}

.site-theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--gold2);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  transition: transform 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.site-theme-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--gold);
}

.site-theme-btn svg {
  width: 16px;
  height: 16px;
}
.site-theme-btn svg[hidden] { display: none !important; }

@media (max-width: 640px) {
  .site-lang { left: 0.75rem; bottom: 0.75rem; }
  .site-theme { right: 0.75rem; bottom: 0.75rem; }
  .site-theme-btn {
    width: 44px;
    height: 44px;
  }
  [data-theme="light"] .docs-side,
  [data-theme="light"] .console,
  [data-theme="light"] .dl-card,
  [data-theme="light"] .status-card,
  [data-theme="light"] .doc,
  [data-theme="light"] .card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  }
  [data-theme="light"] .site-nav {
    background: #ffffff;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-side { position: static; }
}

@media (max-width: 640px) {
  .field-grid { grid-template-columns: 1fr; }
  .actions .btn { width: 100%; }
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row .ms { display: none; }
  .compare-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .compare-row.head { display: none; }
  .compare-row .col::before {
    content: attr(data-plan) " : ";
    color: var(--muted);
    font-weight: 700;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}

.site-footer-mini .foot-copy,
[data-theme="light"] .site-footer-mini .foot-copy {
  color: #0aa86a !important;
  font-weight: 750;
  text-align: center;
}



/* === site-wide Chakra Petch + textes gris → noir gras (2026-09-30) === */
html, body, button, input, select, textarea {
  font-family: "Chakra Petch", Manrope, system-ui, sans-serif !important;
}
body {
  font-weight: 600;
  color: var(--text);
}
/* Texte sombre UNIQUEMENT en thème clair (cartes blanches) */
[data-theme="light"] .lead,
[data-theme="light"] .muted,
[data-theme="light"] .sub,
[data-theme="light"] .meta,
[data-theme="light"] .kicker,
[data-theme="light"] .section-kicker,
[data-theme="light"] .foot-copy,
[data-theme="light"] .doc .updated,
[data-theme="light"] .hint,
[data-theme="light"] .rank,
[data-theme="light"] .who .meta,
[data-theme="light"] .who .ver,
[data-theme="light"] .lab-cols span,
[data-theme="light"] .product-top .meta,
[data-theme="light"] .req span:first-child,
[data-theme="light"] .row .sub,
[data-theme="light"] .field-label,
[data-theme="light"] .site-lang-menu button .code,
[data-theme="light"] .docs-side .group {
  color: #0a0a0a !important;
  -webkit-text-fill-color: #0a0a0a !important;
  font-weight: 700 !important;
}

/* Thème sombre : labels / sous-textes lisibles */
html:not([data-theme="light"]) .lead,
html:not([data-theme="light"]) .muted,
html:not([data-theme="light"]) .sub,
html:not([data-theme="light"]) .meta,
html:not([data-theme="light"]) .kicker,
html:not([data-theme="light"]) .section-kicker,
html:not([data-theme="light"]) .hint,
html:not([data-theme="light"]) .field-label,
html:not([data-theme="light"]) .req span:first-child,
html:not([data-theme="light"]) .row .sub,
html:not([data-theme="light"]) .spec label,
html:not([data-theme="light"]) label {
  color: #c4c4c8 !important;
  -webkit-text-fill-color: #c4c4c8 !important;
}
html:not([data-theme="light"]) .foot-copy,
html:not([data-theme="light"]) .doc .updated {
  color: #6ee7b7 !important;
  -webkit-text-fill-color: #6ee7b7 !important;
}
code, pre, .mono, .hash, .hash-v, .verify-cmd, .hash-console, .hc-title {
  font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace !important;
  font-weight: 600 !important;
}

.lang-flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  overflow: hidden;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.22);
}
.site-lang-btn .lang-flag,
.site-lang-menu .lang-flag { margin: 0; }
.lang-flag svg,
html.home-stlike .site-lang-btn .lang-flag svg,
html.site-shell .site-lang-btn .lang-flag svg {
  width: 18px !important;
  height: 12px !important;
  display: block;
  color: unset !important;
}
.site-lang-menu button .code {
  width: 1.8rem;
  flex: 0 0 1.8rem;
  line-height: 1;
}
