:root {
  --gold: #e5c65f;
  --gold2: #f6dc84;
  --gold-soft: rgba(229, 198, 95, 0.14);
  --discord: #5865f2;
  --discord-hover: #4752c4;
  --bg: #050506;
  --surface: #0c0c10;
  --surface-2: #0a0a0e;
  --surface-bar: #121218;
  --text: #f5f5f5;
  --text-2: #c4c4c8;
  --muted: #8a8a8a;
  --line: rgba(255, 255, 255, 0.08);
  --ok: #86efac;
  --warn: #fde68a;
  --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: Manrope, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.glow {
  background:
    radial-gradient(900px 420px at 50% -20%, rgba(229, 198, 95, 0.08), transparent 55%),
    var(--bg);
}

#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 3rem;
}

.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: 760px;
  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: #1a1406;
  font-weight: 700;
  background: linear-gradient(180deg, #ffe89a, #d8b342);
  box-shadow: 0 0 18px rgba(229, 198, 95, 0.18);
}

/* 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.2rem 0 0.5rem;
  color: var(--gold2);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(229, 198, 95, 0.45);
  text-underline-offset: 4px;
}

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

/* Console */
.console {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

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

.console-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  min-height: 28px;
  background: var(--surface-bar);
  border-bottom: 1px solid var(--line);
}

.console-bar .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3f3f46;
}

.console-bar .dot:nth-child(1) { background: #ef4444; }
.console-bar .dot:nth-child(2) { background: #eab308; }
.console-bar .dot:nth-child(3) { background: #22c55e; }

.console-bar .tab {
  margin-left: 0.35rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: #71717a;
}

.console-body {
  padding: 0.95rem 1.05rem 1.05rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-2);
}

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

.console-body p { margin: 0 0 0.6rem; }
.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(--gold2);
  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: #1a1406; background: linear-gradient(180deg, #ffe89a, #d8b342); }
.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(229, 198, 95, 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(229, 198, 95, 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: var(--gold-soft); color: var(--gold2); }

.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(--gold2); }
.doc .updated { color: var(--muted); font-size: 0.8rem; margin-bottom: 1.2rem; }

.doc .callout {
  border: 1px solid rgba(229, 198, 95, 0.28);
  background: rgba(229, 198, 95, 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(229, 198, 95, 0.4);
  box-shadow: 0 0 0 3px rgba(229, 198, 95, 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(229, 198, 95, 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: #1a1406;
  background: linear-gradient(180deg, #ffe89a, #d8b342);
}

.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(--gold2); }

/* 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(229, 198, 95, 0.4);
  box-shadow: 0 0 0 3px rgba(229, 198, 95, 0.1);
}

/* Documentation */
.docs-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}

.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.8rem;
}

.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 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;
}

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

.docs-side button.active {
  color: #1a1406;
  background: linear-gradient(180deg, #ffe89a, #d8b342);
  font-weight: 700;
}

/* Pied de page */
.foot {
  margin-top: 1.8rem;
  text-align: center;
  font-size: clamp(0.68rem, 1.5vw, 0.78rem);
  font-weight: 600;
  color: var(--gold);
  line-height: 1.5;
  text-wrap: balance;
}

.foot-links {
  margin-top: 0.6rem;
  text-align: center;
  font-size: 0.74rem;
  color: #6b7280;
  line-height: 1.9;
}

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

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

.foot-copy {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.72rem;
  color: #57575e;
}

/* 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; }
}
