/* Polices auto-hébergées (voir fonts/LICENSE.txt) : aucune requête vers un service tiers. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/press-start-2p-latin.woff2") format("woff2");
}

:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --ink: #1d1b26;
  --muted: #6b6878;
  --line: #e2ddd2;
  --accent: #e8473b;
  --accent-ink: #ffffff;
  --accent-2: #2f6fde;
  --ok: #2e9e5b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14131b;
    --surface: #1e1c28;
    --ink: #f1eff7;
    --muted: #a29fb3;
    --line: #2e2b3c;
    --accent: #ff5c4d;
    --accent-ink: #14131b;
    --accent-2: #6ea2ff;
    --ok: #4fd18a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 Inter, system-ui, sans-serif;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

header.hero {
  padding: 72px 0 48px;
  text-align: center;
}
.ball {
  width: 56px; height: 56px; margin: 0 auto 24px;
  border-radius: 50%;
  border: 4px solid var(--ink);
  background: linear-gradient(var(--accent) 0 46%, var(--ink) 46% 54%, var(--surface) 54%);
  position: relative;
}
.ball::after {
  content: ""; position: absolute; inset: 50% auto auto 50%;
  width: 16px; height: 16px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--surface); border: 4px solid var(--ink);
}
h1 {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(28px, 7vw, 48px);
  letter-spacing: 1px;
  margin: 0 0 16px;
}
.tagline { color: var(--muted); margin: 0; font-size: 18px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.latest h2 { margin: 0 0 4px; font-size: 20px; }
.meta { color: var(--muted); font-size: 14px; margin: 0 0 24px; }
.meta code { font-size: 13px; }

.downloads { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.dl {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-radius: 12px;
  border: 2px solid var(--line); color: var(--ink); text-decoration: none;
  font-weight: 600; transition: border-color .15s, transform .15s;
}
.dl:hover { border-color: var(--accent-2); transform: translateY(-1px); }
.dl.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dl small { font-weight: 400; opacity: .8; }

.howto { margin-top: 24px; color: var(--muted); font-size: 14px; }
.howto summary { cursor: pointer; color: var(--ink); font-weight: 600; }
.howto li { margin: 4px 0; }

section.history { margin: 40px 0 72px; }
section.history h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
.row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.row .title { font-weight: 600; overflow-wrap: anywhere; }
.row .sub { color: var(--muted); font-size: 13px; grid-column: 1; }
.row .links { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.row .links a { color: var(--accent-2); font-size: 14px; text-decoration: none; }
.row .links a:hover { text-decoration: underline; }

.empty { text-align: center; color: var(--muted); padding: 32px 0; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 32px 0 40px; }
main:has(section.history:not([hidden])) + footer { padding-top: 0; }

@media (max-width: 520px) {
  header.hero { padding: 48px 0 32px; }
  .card { padding: 20px; }
  .row { grid-template-columns: 1fr; }
  .row .links { grid-row: auto; grid-column: 1; justify-content: flex-start; }
}
