/* noidz.xyz — terminal à phosphore, mêmes teintes que les images */
:root {
  --bg: #050706;
  --panel: #0a0f0b;
  --panel-2: #0d140f;
  --line: #1b281f;
  --fg: #cdeed5;
  --bright: #eafff0;
  --dim: #82a88d;
  --muted: #557560;
  --green: #39ff6a;
  --green-dim: #1f8a3e;
  --gold: #ffd34d;
  --gold-dim: #6e5a1c;
  --epic: #be6eff;
  --rare: #4696ff;
  --uncommon: #50dc6e;
  --common: #a0a0a0;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
  --radius: 4px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.65 var(--mono); }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
}
[hidden] { display: none !important; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
img { max-width: 100%; }
code { font-family: var(--mono); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--gold); color: #000; padding: 6px 10px; }

/* En-tête */
.site-head { border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.logo { font-weight: 700; font-size: 20px; letter-spacing: .12em; color: var(--bright); }
.logo:hover { text-decoration: none; }
.cursor { color: var(--green); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.nav a { color: var(--dim); }
.nav a[aria-current="page"] { color: var(--green); }

/* Titres et sections */
h1 { font-size: clamp(24px, 4.6vw, 38px); line-height: 1.2; margin: 0 0 14px; color: var(--bright); }
h2 { font-size: 15px; color: var(--green); margin: 0 0 16px; text-transform: uppercase; letter-spacing: .1em; }
h2::before { content: "## "; color: var(--muted); }
h3 { font-size: 15px; margin: 0 0 6px; color: var(--bright); }
p { margin: 0 0 14px; }
.lead { color: var(--dim); font-size: 16px; max-width: 62ch; }
.section { padding: 40px 0; border-top: 1px solid var(--line); }
.page-head { padding: 36px 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Boutons */
.btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-block; border: 1px solid var(--green); color: var(--green); padding: 10px 16px; border-radius: var(--radius); font: inherit; font-weight: 700; background: none; cursor: pointer; }
.btn:hover { background: rgba(57,255,106,.08); text-decoration: none; }
.btn-primary { background: var(--green); color: #031006; }
.btn-primary:hover { background: #6bff92; }
.btn-small { padding: 3px 9px; font-size: 12px; font-weight: 400; }

/* Accueil : terminal et compte à rebours */
.hero { display: grid; gap: 28px; padding: 28px 0 40px; }
@media (min-width: 880px) { .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; padding-top: 56px; } }
.term { background: #030504; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.term-bar { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.term-screen { padding: 22px 10px 16px; }
.ascii { font-size: clamp(15px, 4.4vw, 25px); line-height: 1.18; font-weight: 700; min-height: calc(9 * 1.18em); display: flex; flex-direction: column; justify-content: center; }
.ascii .l { white-space: pre; text-align: center; min-height: 1.18em; }
.ascii .eye { position: relative; }
.ascii .tic { position: absolute; left: 100%; margin-left: .6ch; }
.term-caption { display: block; margin-top: 14px; color: var(--muted); font-size: 13px; min-height: 1.6em; overflow-wrap: anywhere; }
.count { margin-top: 22px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 16px; }
.count-label { color: var(--dim); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.count-big { font-size: clamp(30px, 7vw, 46px); color: var(--green); font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; line-height: 1.2; margin: 4px 0; }
.count-sub { color: var(--muted); font-size: 13px; }
.count-sub b { color: var(--fg); font-weight: 400; }

/* Recherche par numéro */
.find { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.find input { width: 9em; }
input, select { background: #030504; color: var(--fg); border: 1px solid var(--line); padding: 9px 10px; font: inherit; font-size: 14px; border-radius: var(--radius); min-width: 0; }

/* Chiffres clés */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 14px; }
.stat b { display: block; font-size: 26px; color: var(--bright); line-height: 1.2; }
.stat span { color: var(--dim); font-size: 13px; }

/* Paliers */
.tiers { display: grid; gap: 10px; }
.tier-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 10px 14px; }
.chip { width: 12px; height: 12px; border-radius: 2px; background: currentColor; }
.tier-row .n { color: var(--dim); font-variant-numeric: tabular-nums; }
.c-legendary { color: var(--gold); } .c-epic { color: var(--epic); } .c-rare { color: var(--rare); }
.c-uncommon { color: var(--uncommon); } .c-common { color: var(--common); }

/* Vagues */
.waves { display: grid; gap: 12px; }
@media (min-width: 800px) { .waves { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wave { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 16px; }
.wave .when { color: var(--dim); font-size: 13px; margin-bottom: 8px; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 10px 0 4px; }
.bar i { display: block; height: 100%; background: var(--green); }

/* Cartes et galerie */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--fg); }
.card:hover { border-color: var(--green-dim); text-decoration: none; }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 1; background: #000; }
.card-meta { display: flex; justify-content: space-between; gap: 6px; padding: 7px 9px 2px; font-size: 13px; }
.card-status { display: block; padding: 0 9px 8px; font-size: 12px; color: var(--muted); min-height: 1.6em; }
.card.t-legendary { border-color: var(--gold-dim); }
.tier { font-weight: 700; }
.t-legendary .tier { color: var(--gold); } .t-epic .tier { color: var(--epic); } .t-rare .tier { color: var(--rare); }
.t-uncommon .tier { color: var(--uncommon); } .t-common .tier { color: var(--common); }
.s-listed { color: var(--green) !important; } .s-sold { color: var(--muted); }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 18px 0 10px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--dim); }
.filters select, .filters input { width: 100%; }
.filter-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; color: var(--dim); font-size: 13px; }

/* Fiche d'un Noidz */
.crumbs { font-size: 13px; color: var(--muted); padding-top: 22px; }
.noid { display: grid; gap: 28px; padding: 18px 0 36px; }
@media (min-width: 880px) { .noid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.noid-img img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #000; }
.noid-img .small { margin-top: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.badge { border: 1px solid currentColor; border-radius: var(--radius); padding: 2px 9px; font-size: 13px; font-weight: 700; }
.badge.plain { color: var(--dim); font-weight: 400; }
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 18px; margin: 0 0 18px; }
dl.kv dt { color: var(--dim); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { dl.kv { grid-template-columns: minmax(0, 1fr); gap: 0; } dl.kv dd { margin-bottom: 10px; } }
.freq { color: var(--muted); font-size: 13px; }
code.hash { word-break: break-all; color: var(--fg); }
.box { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 16px; margin-bottom: 18px; }
.box.gold { border-color: var(--gold-dim); }
details { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; background: var(--panel); margin-bottom: 14px; }
details summary { cursor: pointer; color: var(--green); }
details[open] summary { margin-bottom: 10px; }
ol, ul { padding-left: 22px; margin: 0 0 14px; }
li { margin-bottom: 6px; }
pre.code { background: #030504; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; overflow-x: auto; font-size: 13px; line-height: 1.5; margin: 0 0 14px; }
.pager { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 16px 0 40px; }
.motto { color: var(--gold); font-size: 17px; margin-bottom: 16px; }
.classified { font-weight: 700; color: var(--gold); white-space: pre; text-align: center; font-size: clamp(14px, 3.6vw, 22px); line-height: 1.2; padding: 40px 0; border: 1px solid var(--gold-dim); border-radius: var(--radius); background: #07060a; }

/* Tableaux */
.table-wrap { overflow-x: auto; margin-bottom: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--dim); font-weight: 400; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.trait-tables { display: grid; gap: 14px; }
@media (min-width: 800px) { .trait-tables { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Étapes */
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 14px 16px 14px 56px; position: relative; margin: 0; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 16px; top: 14px; color: var(--green); font-weight: 700; }
.warn { border-left: 3px solid var(--gold); padding: 10px 14px; background: var(--panel); margin-bottom: 14px; }

/* Pied */
footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 13px; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }
.spacer { height: 40px; }
.section-after { margin-top: 36px; }
.more-filters { margin: 0 0 10px; }
.more-filters .filters { margin: 4px 0 4px; }
#filters > .filters { margin-bottom: 10px; }
.ascii .ghost { visibility: hidden; }
