/* qr.antw2ne.uk — light, neutral, one accent colour */

:root {
  /* Thème arcade sombre. Le contenant n'est plus « sobre comme la famille » :
     l'utilisateur a explicitement demandé quelque chose qui donne envie de
     jouer. Le fond très sombre fait aussi ressortir les jeux, tous rendus sur
     un canvas sombre. */
  --bg:            #0b0e1c;
  --surface:       #141935;
  --surface-2:     #1e254a;
  --border:        #29315c;
  --border-strong: #3d4780;
  --text:          #eef0ff;
  --text-muted:    #969dcc;
  --accent:        #7c6bff;
  --accent-hover:  #9788ff;
  --accent-soft:   #1c1b46;
  --danger:        #ff5d6c;
  --neon:          #22d3ee;
  --neon-2:        #ec4899;
  --radius:        10px;
  --radius-lg:     14px;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.4);
  --shadow-md:     0 8px 30px rgba(0,0,0,.5);
  --wrap:          1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Our display:flex rules would otherwise beat the browser's [hidden] rule. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 20;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand { display: flex; align-items: baseline; gap: 9px; text-decoration: none; color: var(--text); }
.brand-mark {
  font-weight: 700; font-size: 19px; letter-spacing: -0.03em;
  background: var(--text); color: #fff; border-radius: 7px;
  padding: 3px 8px; line-height: 1.25;
}
.brand-domain { font-size: 13.5px; color: var(--text-muted); letter-spacing: -0.01em; }

.lang-toggle {
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--text-muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 13px; cursor: pointer;
}
.lang-toggle:hover { background: var(--surface-2); color: var(--text); }

/* ---------- hero ---------- */

.hero { padding: 48px 0 28px; text-align: center; }
.hero h1 { font-size: clamp(28px, 4.4vw, 40px); font-weight: 700; }
.lede {
  margin: 0 auto; max-width: 60ch;
  font-size: 17px; color: var(--text-muted);
}
@media (max-width: 600px) {
  .hero { padding: 26px 0 18px; }
  .lede { font-size: 15.5px; }
}

/* ---------- ad slots ---------- */

.ad-slot { margin: 28px 0; text-align: center; }
.ad-slot:empty { display: none; }
.ad-slot::before {
  content: "Advertisement";
  display: block; margin-bottom: 6px;
  font-size: 10px; letter-spacing: .09em; text-transform: uppercase;
  color: #5b6293;
}

/* ---------- tool layout ---------- */

.tool {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 22px;
  align-items: start;
  margin-top: 8px;
}
@media (max-width: 860px) {
  .tool { grid-template-columns: 1fr; }
}

.panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.panel-form { overflow: hidden; }
.panel-preview { padding: 22px; position: sticky; top: 84px; }
@media (max-width: 860px) { .panel-preview { position: static; } }

/* ---------- tabs ---------- */

.tabs {
  display: flex; gap: 2px; overflow-x: auto;
  padding: 6px 6px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font: inherit; font-size: 14px; font-weight: 500;
  white-space: nowrap;
  color: var(--text-muted); background: transparent;
  border: 1px solid transparent; border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 9px 15px; cursor: pointer;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  color: var(--text); font-weight: 600;
  background: var(--bg);
  border-color: var(--border);
}

/* ---------- fields ---------- */

.panes { padding: 20px 20px 4px; }
.pane { display: none; }
.pane.is-active { display: block; }

.field { display: block; margin-bottom: 14px; }
.field-label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
input[type=text], input[type=url], input[type=email], input[type=tel], textarea, select {
  width: 100%;
  font: inherit; font-size: 15px; color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
}
textarea { resize: vertical; min-height: 76px; }
select { cursor: pointer; }
input:focus-visible, textarea:focus-visible, select:focus-visible,
button:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input::placeholder, textarea::placeholder { color: #a2a8b3; }

#in-url { font-size: 16px; padding: 12px 14px; }

.field-help {
  margin: 2px 0 14px;
  font-size: 13px; color: var(--text-muted);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-2 .field-wide { grid-column: 1 / -1; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }

.field-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; align-self: center; margin-top: 4px;
}
.field-check input { width: auto; accent-color: var(--accent); }

/* ---------- options ---------- */

.options { border-top: 1px solid var(--border); }
.options > summary {
  padding: 14px 20px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--text-muted);
  list-style: none;
}
.options > summary::-webkit-details-marker { display: none; }
.options > summary::before {
  content: "+"; display: inline-block; width: 16px;
  font-weight: 400; color: var(--accent);
}
.options[open] > summary { color: var(--text); }
.options[open] > summary::before { content: "\2013"; }
.options-body { padding: 2px 20px 20px; }

.opt-row {
  display: grid; grid-template-columns: 132px 1fr;
  gap: 12px; align-items: center;
  padding: 9px 0;
}
@media (max-width: 520px) { .opt-row { grid-template-columns: 1fr; gap: 6px; } }
.opt-label { font-size: 13px; font-weight: 600; }
.opt-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.opt-controls select { width: auto; min-width: 190px; font-size: 14px; padding: 7px 10px; }
.opt-note { font-size: 12.5px; color: var(--text-muted); }

.color-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
input[type=color] {
  width: 34px; height: 30px; padding: 2px;
  border: 1px solid var(--border-strong); border-radius: 7px;
  background: var(--bg); cursor: pointer;
}

.swatches { display: flex; gap: 6px; margin-left: auto; }
.swatch {
  width: 24px; height: 24px; padding: 0; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 6px;
  background: linear-gradient(135deg, var(--s) 0 50%, var(--s2, #fff) 50% 100%);
}
.swatch:hover { transform: scale(1.1); }

input[type=range] { accent-color: var(--accent); max-width: 190px; }
#opt-margin-out { font-size: 13px; color: var(--text-muted); min-width: 12px; }
.logo-size { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }

.opt-warn {
  margin: 10px 0 0; padding: 10px 12px;
  font-size: 13px; color: #f6c561;
  background: #2a2410; border: 1px solid #5c4a1e; border-radius: var(--radius);
}

/* ---------- preview ---------- */

.qr-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
#qr-canvas {
  display: none;
  width: 100%; height: 100%;
  image-rendering: pixelated;
}
#qr-canvas.is-ready { display: block; }
.qr-placeholder {
  margin: 0; padding: 20px; text-align: center;
  font-size: 14px; color: #9aa1ac;
}
.qr-placeholder.is-hidden { display: none; }

.qr-error {
  margin: 12px 0 0; padding: 10px 12px;
  font-size: 13px; color: var(--danger);
  background: #2c1519; border: 1px solid #6b2530; border-radius: var(--radius);
}

.dl-row { display: flex; gap: 8px; margin-top: 16px; }
.preview-note { margin: 12px 0 0; font-size: 12.5px; color: var(--text-muted); text-align: center; }

/* ---------- buttons ---------- */

.btn {
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 10px 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.btn:hover:not(:disabled) { background: var(--surface); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  flex: 1;
  color: #fff; background: var(--accent); border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.btn-small { font-size: 13px; padding: 7px 12px; }

/* ---------- content ---------- */

.content { padding: 56px 20px 24px; max-width: 780px; }
.content h2 { font-size: 22px; margin-top: 40px; }
.content h2:first-child { margin-top: 0; }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 8px; }
.steps li {
  counter-increment: s;
  position: relative; padding-left: 44px; margin-bottom: 18px;
}
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  color: var(--accent); background: var(--accent-soft);
}
.steps strong { display: block; font-size: 15px; }
.steps span { font-size: 14.5px; color: var(--text-muted); }

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}
.faq summary {
  padding: 12px 0; cursor: pointer;
  font-size: 15px; font-weight: 600;
}
.faq p { margin: 0 0 14px; font-size: 14.5px; color: var(--text-muted); }

/* ---------- landing pages ---------- */

.landing-intro { max-width: 680px; margin: 0 auto; }
.landing-intro p { color: var(--text-muted); font-size: 16.5px; }

.content .tip-list { padding-left: 20px; }
.content .tip-list li { margin-bottom: 10px; font-size: 15px; }
.content p { font-size: 15.5px; color: var(--text-muted); }
.content .lead { font-size: 16.5px; }

.callout {
  margin: 18px 0;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.callout p { margin: 0; font-size: 14.5px; color: #33365e; }

.related {
  list-style: none; padding: 0; margin: 16px 0 0;
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.related a {
  display: block; height: 100%;
  padding: 14px 16px; text-decoration: none;
  background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.related a:hover { border-color: var(--accent); background: var(--accent-soft); }
.related strong { display: block; font-size: 14.5px; color: var(--text); margin-bottom: 2px; }
.related span { font-size: 13px; color: var(--text-muted); }

.alt-lang {
  margin: 14px 0 0;
  font-size: 13.5px; color: var(--text-muted);
}
.alt-lang a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.alt-lang a:hover { color: var(--accent); }

/* ---------- legal pages ---------- */

.legal { max-width: 720px; padding: 48px 20px 24px; }
.legal h1 { font-size: 30px; }
.legal h2 { font-size: 19px; margin-top: 32px; }
.legal p, .legal li { font-size: 15px; color: var(--text-muted); }
.legal ul { padding-left: 20px; }
.legal .updated { font-size: 13px; color: var(--text-muted); }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  padding-top: 22px; padding-bottom: 22px;
  font-size: 13.5px; color: var(--text-muted);
}
.footer-brand { margin: 0; }
.footer-brand a { color: var(--text-muted); text-decoration: none; }
.footer-brand a:hover { color: var(--accent); }
.footer-nav { display: flex; gap: 18px; }
.footer-nav a { color: var(--text-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }

/* ---------- consent ---------- */

.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.consent p { margin: 0; font-size: 13px; color: var(--text-muted); flex: 1 1 260px; }
.consent-actions { display: flex; gap: 8px; margin-left: auto; }

@media (prefers-reduced-motion: no-preference) {
  .swatch { transition: transform .12s ease; }
  .btn, .tab, .lang-toggle { transition: background-color .12s ease, color .12s ease, border-color .12s ease; }
}

/* ================= paste.antw2ne.uk ================= */

.editor-panel { padding: 0; overflow: hidden; }

.editor-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.editor-head .hint { margin: 0; font-size: 12.5px; color: var(--text-muted); }

#paste-input {
  display: block; width: 100%;
  min-height: 46vh; resize: vertical;
  padding: 16px;
  border: 0; border-radius: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13.5px; line-height: 1.65;
  tab-size: 2;
}
#paste-input:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.editor-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.editor-foot .grow { flex: 1 1 auto; }
.editor-foot select,
.editor-foot input[type=password] { width: auto; font-size: 14px; padding: 8px 10px; }
.editor-foot label.inline {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; color: var(--text);
}
.editor-foot input[type=checkbox] { width: auto; accent-color: var(--accent); }

.opt-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.opt-inline > span { font-size: 13px; font-weight: 600; }

.counter { font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); font-weight: 600; }

/* result */
.result { margin-top: 18px; }
.link-row {
  display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap;
}
.link-row input {
  flex: 1 1 320px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--surface);
}
.result-meta { margin: 10px 0 0; font-size: 13px; color: var(--text-muted); }

.warn-box {
  margin: 16px 0 0; padding: 12px 14px;
  font-size: 13.5px; color: #f6c561;
  background: #2a2410; border: 1px solid #5c4a1e; border-radius: var(--radius);
}
.warn-box strong { color: #ffe0a3; }

/* viewer */
.viewer-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  padding: 11px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
}
.viewer-head .tags { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }

.tag {
  display: inline-block;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em;
  background: var(--surface-2); color: var(--text-muted);
  border: 1px solid var(--border);
}
.tag.accent { background: var(--accent-soft); color: var(--accent); border-color: #d9dcfb; }
.tag.hot    { background: #2c1519; color: var(--danger); border-color: #6b2530; }

pre.code {
  margin: 0; padding: 16px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13.5px; line-height: 1.65;
  tab-size: 2;
  background: var(--bg);
}
pre.code code { font: inherit; background: none; padding: 0; }

.gate {
  padding: 40px 20px; text-align: center;
}
.gate h2 { font-size: 20px; margin-bottom: 8px; }
.gate p { margin: 0 auto 20px; max-width: 46ch; font-size: 14.5px; color: var(--text-muted); }
.gate form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.gate input[type=password] { width: auto; min-width: 220px; }

.state-msg {
  padding: 48px 20px; text-align: center;
  font-size: 15px; color: var(--text-muted);
}
.state-msg strong { display: block; font-size: 18px; color: var(--text); margin-bottom: 6px; }

pre.code.wrapped { white-space: pre-wrap; word-break: break-word; }

/* ================= s.antw2ne.uk ================= */

.form-panel { padding: 22px; }
.form-row { margin-bottom: 16px; }
.form-row:last-of-type { margin-bottom: 0; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

#in-url { font-size: 16px; padding: 12px 14px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }
.form-actions .grow { flex: 1 1 auto; }

.out-block { margin-bottom: 18px; }
.out-block > label {
  display: block; margin-bottom: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--text);
}
.out-block .link-row input { font-size: 14px; }
#out-short { font-weight: 600; }

.tiny-note { margin: 6px 0 0; font-size: 12.5px; color: var(--text-muted); }
.tiny-note a { color: var(--text-muted); }

/* graphiques et repartitions */
.chart { display: block; width: 100%; height: 52px; }
.chart.tall { height: 96px; }
.chart rect { fill: var(--accent); opacity: .85; }
.chart rect.z { fill: var(--border-strong); opacity: .5; }

.dimtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dimtable td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.dimtable tr:last-child td { border-bottom: 0; }
.dimtable td:first-child { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dimtable td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); width: 56px; }
.dimtable td.barcell { width: 45%; }
.dimtable .bar {
  display: block; height: 7px; border-radius: 4px;
  background: var(--accent); opacity: .28; min-width: 2px;
}

.range { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.range a {
  font-size: 13px; padding: 6px 12px; text-decoration: none;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg); color: var(--text-muted);
}
.range a:hover { background: var(--surface); }
.range a.on { background: var(--accent-soft); border-color: #d9dcfb; color: var(--accent); font-weight: 600; }

.stat-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.stat-head h1 {
  margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 26px; letter-spacing: -.02em;
}
.big-number { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.big-number span { font-size: 14px; font-weight: 400; color: var(--text-muted); margin-left: 5px; }

.meta-list { margin: 0 0 22px; padding: 0; list-style: none; font-size: 13.5px; }
.meta-list li { padding: 5px 0; border-bottom: 1px solid var(--border); display: flex; gap: 12px; }
.meta-list li:last-child { border-bottom: 0; }
.meta-list b { flex: 0 0 110px; font-weight: 600; color: var(--text-muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; padding-top: 1px; }
.meta-list span, .meta-list a { flex: 1 1 auto; word-break: break-all; }

/* apercu */
.preview-card { padding: 30px 26px; text-align: center; }
.preview-card h1 { font-size: 21px; margin-bottom: 6px; }
.preview-card > p { margin: 0 auto 22px; max-width: 44ch; font-size: 14.5px; color: var(--text-muted); }
.dest-host {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 20px; font-weight: 600; word-break: break-all;
}
.dest-full {
  display: block; margin: 8px auto 0; max-width: 60ch;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; color: var(--text-muted); word-break: break-all;
}
.preview-meta { margin: 16px 0 0; font-size: 12.5px; color: var(--text-muted); }

/* ==================================================================
   ip.antw2ne.uk
   ================================================================== */

/* Le bloc adresse. Il porte toute la page : un visiteur sur deux ne lira
   rien d'autre, donc il doit etre lisible d'un coup d'oeil et se selectionner
   d'un double-clic. */
.ip-hero {
  margin-top: 26px;
  padding: 26px 26px 22px;
  text-align: center;
}
.ip-label {
  margin: 0 0 10px;
  font-size: 12.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted);
}
.ip-value-row {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap;
}
.ip-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Se reduit tout seul : une IPv6 complete fait 39 caracteres et doit tenir
     sur un telephone sans passer a la ligne au milieu d'un groupe. */
  font-size: clamp(21px, 6.2vw, 38px);
  font-weight: 700; letter-spacing: -.015em;
  color: var(--text);
  /* Un double-clic doit prendre l'adresse entiere, pas un seul groupe. */
  user-select: all;
  word-break: break-all;
}
.ip-value.pending { color: var(--text-muted); font-weight: 400; font-size: 19px; }

/* Une IPv6 fait jusqu'a 39 caracteres : a la taille d'une IPv4 elle passerait
   sur deux lignes en se coupant au milieu d'un groupe, ce qui la rend
   illisible et fausse a la lecture. On la sert donc plus petite. C'est le
   script qui pose la classe, parce que seul lui connait la longueur reelle. */
.ip-value.long { font-size: clamp(14px, 3.5vw, 25px); }

/* La feuille partagee donne `flex: 1 1 0%` aux boutons, ce qui convient dans
   un formulaire mais etire celui-ci sur toute la largeur des que l'adresse
   passe a la ligne. Ici il doit garder la taille de son texte. */
.ip-value-row .btn { flex: 0 0 auto; }
.ip-sub {
  margin: 14px 0 0;
  display: flex; gap: 7px; justify-content: center; flex-wrap: wrap;
}
.ip-hero .qr-error { margin: 14px 0 0; }

/* Titres de section */
.section-title { margin: 34px 0 4px; font-size: 19px; }
.section-lede {
  margin: 0 0 16px;
  font-size: 14px; color: var(--text-muted);
  max-width: 68ch;
}

/* Grille de fiches. auto-fit plutot qu'un nombre fixe de colonnes : le contenu
   des fiches est de longueur tres variable selon la langue et le reseau. */
.cards {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
}
.card { padding: 18px 20px 16px; }
.card h3 {
  margin: 0 0 12px;
  font-size: 14px; font-weight: 600;
  padding-bottom: 9px; border-bottom: 1px solid var(--border);
}
.card .meta-list { margin-bottom: 10px; }
.card .meta-list b { flex: 0 0 96px; }
.card .meta-list span { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.card .tiny-note { line-height: 1.5; }

/* Valeur absente : grisee et non selectionnable, pour qu'un tiret ne soit
   jamais copie a la place d'une vraie donnee. */
.meta-list span.empty { color: var(--border-strong); user-select: none; }

/* User-agent brut : repliable, parce que c'est illisible et long. */
.raw-box {
  margin-top: 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
}
.raw-box summary {
  padding: 11px 15px; cursor: pointer;
  font-size: 13.5px; font-weight: 600;
}
.raw-box pre.code {
  margin: 0; border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  white-space: pre-wrap; word-break: break-all;
  font-size: 12.5px; line-height: 1.6;
}

pre.api-code {
  background: var(--text); color: #e8eaf0;
  font-size: 13.5px;
  border-radius: var(--radius);
  overflow-x: auto;
  user-select: all;
}
.content pre.api-code { margin: 14px 0 4px; }

/* ==================================================================
   jeux.antw2ne.uk
   Le contenant reste sobre comme le reste du domaine ; la couleur est
   reservee aux jeux eux-memes et aux reperes de genre.
   ================================================================== */

/* ------------------------------ catalogue ------------------------- */

.catalog-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin: 22px 0 14px;
}
.search-field { flex: 1 1 240px; min-width: 0; }
.search-field input {
  width: 100%; padding: 10px 14px;
  font-size: 15px; font-family: inherit;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
}
.search-field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 7px 13px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--text-muted); background: var(--surface);
  border: 1px solid var(--border); cursor: pointer;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.cat-count {
  margin: 0 0 18px;
  font-size: 12.5px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.empty-msg { color: var(--text-muted); font-size: 14px; padding: 20px 0; }

.section-title { margin: 30px 0 12px; font-size: 17px; }

/* Grille prevue pour des centaines de vignettes : auto-fill plutot qu'un
   nombre fixe de colonnes, pour qu'elle se remplisse a toute largeur. */
.game-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}

.game-card {
  position: relative;
  display: flex; align-items: stretch;
  background: var(--bg); color: inherit; text-decoration: none;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .12s, transform .12s, box-shadow .12s;
}
.game-card:hover {
  border-color: hsl(var(--hue) 70% 62%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.game-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Pastille de genre : la couleur derive d une seule teinte par genre, donc
   ajouter un genre ne demande qu un nombre. */
.gc-art {
  flex: 0 0 62px;
  display: grid; place-items: center;
  background: linear-gradient(150deg,
    hsl(var(--hue) 72% 58%), hsl(calc(var(--hue) + 26) 68% 48%));
}
.gc-glyph { font-size: 23px; color: #fff; opacity: .95; }

.gc-body { padding: 12px 14px; min-width: 0; display: block; }
.gc-title { display: block; font-size: 14.5px; font-weight: 650; margin-bottom: 3px; }

/* Deux lignes maximum : sans cela les vignettes n ont pas la meme hauteur et
   la grille devient irreguliere. */
.gc-sum {
  font-size: 12.5px; color: var(--text-muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.gc-meta {
  display: flex; gap: 8px; margin-top: 8px;
  font-size: 11px; color: var(--text-muted);
}
.gc-genre { font-weight: 600; color: hsl(var(--hue) 55% 42%); }

.gc-fav {
  position: absolute; top: 6px; right: 6px;
  width: 28px; height: 28px; padding: 0;
  display: grid; place-items: center;
  font-size: 15px; line-height: 1;
  color: var(--text-muted); background: transparent;
  border: 0; border-radius: 8px; cursor: pointer;
}
.gc-fav[aria-pressed="true"] { color: #f59e0b; }
.gc-fav:hover { background: var(--surface-2); }

/* ---------------------------- page de jeu -------------------------- */

.play-wrap { padding-bottom: 40px; }
.play-head { margin: 20px 0 14px; }
.back-link {
  display: inline-block; margin-bottom: 10px;
  font-size: 13px; color: var(--text-muted); text-decoration: none;
}
.back-link:hover { color: var(--accent); }
.play-head h1 { font-size: 24px; margin: 0 0 4px; }
.play-sum { margin: 0; font-size: 14px; color: var(--text-muted); }

.hud {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 10px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.hud-stat { display: flex; align-items: baseline; gap: 7px; }
.hud-stat b {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
}
.hud-stat span {
  font-size: 18px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.hud-status { font-size: 13px; color: var(--text-muted); flex: 1 1 auto; min-width: 0; }
.hud-actions { display: flex; gap: 7px; margin-left: auto; }
#btn-mute { min-width: 40px; }

/* La scene. Fond sombre : un jeu en couleurs se lit mal sur blanc, et le
   contraste marque la frontiere entre le site et la partie. */
.stage-host {
  position: relative;
  /* Volontairement DIFFERENT du fond des jeux (#12152a) : sinon la limite du
     terrain est invisible, et dans un jeu ou toucher le mur fait perdre, le
     joueur ne voit pas ce qui le tue. */
  background: #090b16;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; justify-content: center; align-items: center;
  padding: 10px;
  min-height: 180px;
}
.stage-host:focus { outline: none; }

.stage-wrap {
  width: 100%;
  /* La hauteur suit la largeur via le ratio pose par le moteur : aucun calcul
     au redimensionnement, et jamais de barre de defilement horizontale. */
  aspect-ratio: var(--ratio, 1);
  max-height: min(70vh, 620px);
  max-width: calc(min(70vh, 620px) * var(--ratio, 1));
  margin: 0 auto;
}
.stage-canvas {
  width: 100%; height: 100%; display: block;
  /* Le lisere marque le bord du terrain de jeu. */
  border: 1px solid #313760;
  border-radius: 8px;
  touch-action: none;   /* sinon un balayage fait defiler la page */
}

/* Jeux en DOM (cartes, grilles) plutot qu en canvas. */
.board {
  width: 100%; max-width: 620px; margin: 0 auto;
  color: #eef0ff;
}

/* ------------------------- commandes tactiles ---------------------- */

.controls-host {
  display: flex; align-items: center; justify-content: center;
  gap: 22px; flex-wrap: wrap;
  margin-top: 12px;
}
.controls-host:empty { display: none; }

.dpad {
  display: grid; gap: 5px;
  grid-template-columns: repeat(3, 52px);
  grid-template-rows: repeat(3, 52px);
}
.dpad-b {
  border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: 10px; cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.dpad-b:active { background: var(--accent-soft); border-color: var(--accent); }

/* Triangles dessines en CSS : pas d image, pas de police a charger. */
.dpad-b::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 0; height: 0; border: 8px solid transparent;
}
.dpad-up    { grid-area: 1 / 2; } .dpad-up::after    { border-bottom-color: var(--text); margin-top: 14px; }
.dpad-left  { grid-area: 2 / 1; } .dpad-left::after  { border-right-color: var(--text);  margin-left: 14px; }
.dpad-right { grid-area: 2 / 3; } .dpad-right::after { border-left-color: var(--text);   margin-right: 14px; }
.dpad-down  { grid-area: 3 / 2; } .dpad-down::after  { border-top-color: var(--text);    margin-bottom: 14px; }

.act-b {
  min-width: 84px; height: 56px; padding: 0 18px;
  font: inherit; font-size: 15px; font-weight: 650;
  color: #fff; background: var(--accent);
  border: 0; border-radius: 12px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.act-b:active { background: var(--accent-hover); }

/* ----------------------------- fin de partie ----------------------- */

.overlay {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(12, 15, 26, .62);
}
.overlay-card {
  width: 100%; max-width: 340px;
  padding: 26px 24px; text-align: center;
  background: var(--bg); border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px rgba(10, 14, 30, .3);
}
.overlay-card h2 { margin: 0 0 8px; font-size: 20px; }
.overlay-card > p { margin: 0 0 6px; font-size: 14.5px; color: var(--text-muted); }
.ov-record { margin: 10px 0 0 !important; font-weight: 700; color: #fcd34d !important; }
.overlay-actions { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }

.load-error {
  margin: 14px 0; padding: 12px 14px;
  font-size: 14px; color: var(--danger);
  background: #2c1519; border: 1px solid #6b2530; border-radius: var(--radius);
}

.play-info, .play-more { margin-top: 30px; }
.play-info h2, .play-more h2 { font-size: 17px; margin-bottom: 8px; }
.play-info p { font-size: 14px; line-height: 1.65; color: var(--text); margin: 0 0 6px; }

@media (max-width: 560px) {
  .play-head h1 { font-size: 20px; }
  .hud { gap: 12px; padding: 9px 11px; }
  .hud-stat span { font-size: 16px; }
  .hud-actions { width: 100%; margin-left: 0; }
  #btn-restart { flex: 1 1 auto; }
  .stage-wrap { max-height: 56vh; max-width: calc(56vh * var(--ratio, 1)); }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .gc-art { flex-basis: 48px; }
}

/* ==================================================================
   Couche « arcade » : ce qui donne au catalogue un air de salle de jeux
   sans toucher à la structure. Uniquement du décor — aucune règle ici
   n'est nécessaire au fonctionnement.
   ================================================================== */

/* Fond : une grille en perspective très discrète, fixe. Elle donne de la
   profondeur sans distraire, et ne coûte qu'un dégradé. */
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 50% -10%, #1a1c44 0%, transparent 70%),
    linear-gradient(#161a3a 1px, transparent 1px),
    linear-gradient(90deg, #161a3a 1px, transparent 1px);
  background-size: 100% 100%, 46px 46px, 46px 46px;
  background-position: 0 0, 0 0, 0 0;
  background-attachment: fixed;
}

.site-header {
  background: rgba(11, 14, 28, .82);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--border);
}

/* Le logo devient une pastille lumineuse. */
.brand-mark {
  background: linear-gradient(135deg, var(--accent), var(--neon-2));
  color: #fff;
  box-shadow: 0 0 18px rgba(124, 107, 255, .5);
}
.brand-domain { color: var(--text-muted); }

.lang-toggle { background: var(--surface); }
.lang-toggle:hover { border-color: var(--accent); color: var(--text); }

/* Titre d'accueil : dégradé néon, comme une enseigne. */
.hero h1,
.landing-intro h1 {
  background: linear-gradient(100deg, #a78bff 0%, var(--neon) 55%, var(--neon-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(124, 107, 255, .25);
}

/* Barre de recherche : légère lueur au focus. */
.search-field input {
  background: var(--surface);
  color: var(--text);
}
.search-field input::placeholder { color: #5b6293; }
.search-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 107, 255, .18), 0 0 24px rgba(124, 107, 255, .12);
}

/* Filtres de genre : plus contrastés, la puce active brille. */
.chip { background: var(--surface); border-color: var(--border); }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.on {
  background: linear-gradient(135deg, var(--accent), #6d5cff);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 16px rgba(124, 107, 255, .4);
}

/* Vignettes : fond sombre, la pochette de genre garde ses couleurs vives et
   projette sa propre lueur au survol. */
.game-card {
  background: var(--surface);
  border-color: var(--border);
}
.game-card:hover {
  border-color: hsl(var(--hue) 85% 62%);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .5),
              0 0 22px hsl(var(--hue) 85% 55% / .28);
}
.gc-art {
  background: linear-gradient(150deg,
    hsl(var(--hue) 80% 60%), hsl(calc(var(--hue) + 28) 72% 46%));
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
}
.gc-title { color: var(--text); }
.gc-genre { color: hsl(var(--hue) 75% 70%); }
.gc-fav:hover { background: var(--surface-2); }

.section-title { color: var(--text); }
.cat-count { color: var(--text-muted); }

/* Boutons : le primaire devient une touche d'arcade lumineuse. */
.btn { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--accent); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6a58ff);
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(124, 107, 255, .35);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-hover), #7d6cff);
  box-shadow: 0 0 26px rgba(124, 107, 255, .5);
}

/* HUD de jeu : cadre net, chiffres qui ressortent. */
.hud {
  background: linear-gradient(180deg, var(--surface), #10152e);
  border-color: var(--border-strong);
}
.hud-stat span { color: var(--text); text-shadow: 0 0 12px rgba(124, 107, 255, .3); }
.hud-stat b { color: #7f88bd; }

/* La scène : liseré lumineux, pour bien séparer le jeu du site. */
.stage-host {
  border-color: #3a4680;
  box-shadow: 0 0 0 1px rgba(124, 107, 255, .25), 0 20px 60px rgba(0, 0, 0, .6);
}
.stage-canvas { border-color: #3a4680; }

/* Écran de fin : carte sombre, titre lumineux. */
.overlay { background: rgba(5, 7, 16, .74); }
.overlay-card {
  background: linear-gradient(180deg, #171c3a, #10142c);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7), 0 0 40px rgba(124, 107, 255, .15);
}
.overlay-card h2 { color: var(--text); }

/* Pied de page et bandeau cookies : cohérents avec le fond. */
.site-footer { background: rgba(11, 14, 28, .6); border-top-color: var(--border); }
.consent {
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

/* Étapes numérotées de l'accueil. */
.steps li::before { box-shadow: 0 0 14px rgba(124, 107, 255, .35); }

/* Cartes du bloc « dans le même genre » sur la page de jeu. */
.play-more .game-card, .play-info { color: var(--text); }

@media (prefers-reduced-motion: no-preference) {
  .game-card { transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease; }
  .btn-primary { transition: box-shadow .16s ease, background .16s ease; }
}
