:root {
  --black: #121212;
  --rich: #262423;
  --panel: #1e1d1c;
  --line: #34322f;
  --muted: #b1b2b5;
  --g1: #3c8527;
  --g2: #2a641c;
  --g3: #52a535;
  --g4: #6cc349;
  --px: 'Pixelify Sans', ui-monospace, Consolas, monospace;
  --body: 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  background: var(--black); color: #fff;
  font-family: var(--body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

a { color: inherit; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; }
.skip:focus { left: 8px; }

/* ---------- Boutons (même construction que minecraft.net) ---------- */
.mc-btn {
  --b: var(--g1); --bd: var(--g2); --bl: var(--g3); --fg: #fff;
  position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 54px; padding: 15px 16px 15px 28px; cursor: pointer; text-decoration: none; text-align: left;
  font: 800 18px/1.2 var(--body); letter-spacing: .54px; text-transform: uppercase; color: var(--fg);
  background-color: var(--b); border: 2px solid var(--rich);
  box-shadow: inset 0 -6px 0 var(--bd), inset 0 6px 0 var(--bl);
  transition: background-color .15s;
}
.mc-btn::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-right: 4px;
  border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(45deg);
}
.mc-btn:hover { background-image: linear-gradient(rgba(255, 255, 255, .2), rgba(255, 255, 255, .2)); }
.mc-btn:active { box-shadow: inset 0 6px 0 var(--bd), inset 0 -6px 0 var(--bl); }
.mc-btn[hidden] { display: none; }

.mc-btn--gold { --b: #ffc42b; --bd: #db9f21; --bl: #ffd953; --fg: #071927; }

.mc-btn--sm { min-height: 44px; padding: 9px 12px 9px 20px; font-size: 14px; gap: 12px; box-shadow: inset 0 -4px 0 var(--bd), inset 0 4px 0 var(--bl); }
.mc-btn--sm:active { box-shadow: inset 0 4px 0 var(--bd), inset 0 -4px 0 var(--bl); }

.mc-btn--ghost {
  min-height: 48px; padding: 10px 10px 10px 18px; font-size: 16px; font-weight: 700; letter-spacing: .51px;
  background-color: rgba(18, 18, 18, .4); border-color: #fff; box-shadow: none;
}
.mc-btn--ghost:hover { background-image: none; background-color: #fff; color: var(--rich); }
.mc-btn--ghost:active { box-shadow: none; }

.mc-btn--nav {
  min-height: 36px; padding: 6px 10px 6px 12px; gap: 10px; font-size: 12px; letter-spacing: .36px;
  color: var(--g4); background-color: transparent; border-color: var(--g1); box-shadow: none;
}
.mc-btn--nav::after { width: 7px; height: 7px; margin-right: 3px; }
.mc-btn--nav:hover { background-image: none; background-color: var(--g1); color: #fff; }
.mc-btn--nav:active { box-shadow: none; }

.cta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

/* ---------- Header ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 80px;
  display: flex; align-items: center; gap: 36px; padding: 0 clamp(16px, 3vw, 40px);
  background: rgba(38, 36, 35, .92); box-shadow: 0 4px 0 rgba(0, 0, 0, .25); backdrop-filter: blur(4px);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-logo { display: block; flex: none; width: auto; height: 50px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .45)); }
.brand-text { font: 700 26px/1 var(--px); letter-spacing: .03em; text-shadow: 3px 3px 0 #000; }
.nav-links { display: flex; align-self: stretch; gap: 8px; }
.nav-links a {
  display: flex; align-items: center; padding: 0 12px; border-bottom: 4px solid transparent; margin-bottom: -4px;
  font: 700 13px/1 var(--body); letter-spacing: 1.04px; text-transform: uppercase; text-decoration: none; color: #fff;
}
.nav-links a:hover { border-bottom-color: var(--g3); }
.nav-links a[hidden] { display: none; }
.nav-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.daynight {
  flex: none; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 2px solid #5a5856;
}
.daynight:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
.daynight i {
  display: block; width: 16px; height: 16px; background: #ffd23f;
  box-shadow: inset 4px 4px 0 #fff3a3, inset -4px -4px 0 #e0a010;
}
.daynight[aria-pressed="true"] i { background: #dfe6ff; box-shadow: inset 4px 4px 0 #fff, inset -4px -4px 0 #a9b3de; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; padding: 112px 0 128px;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; background: #0a1030; overflow: hidden; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 10, 28, .52) 0%, rgba(6, 10, 28, .2) 46%, transparent 72%);
}
#sky {
  position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated;
  scale: 1.05; translate: calc(var(--mx, 0) * -8px) calc(var(--my, 0) * -5px);
}
.fx { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

.hero-inner {
  position: relative; z-index: 1; width: 100%; max-width: 1320px; margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); align-items: center; gap: clamp(16px, 3vw, 48px);
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px 9px 12px;
  font: 800 12px/1 var(--body); letter-spacing: .18em; text-transform: uppercase; color: #8be05e;
  background: rgba(18, 18, 18, .55); border: 2px solid rgba(255, 255, 255, .18);
}
.hero-brand { display: flex; align-items: center; gap: 18px; }
.hero-logo { display: block; width: auto; height: clamp(76px, 9vw, 112px); filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .5)); }

.hero h1 {
  display: flex; flex-direction: column; font: 700 clamp(48px, 7.6vw, 112px)/.94 var(--px);
  text-transform: uppercase; letter-spacing: -.02em;
}
.hero h1 span {
  color: #ececec;
  text-shadow:
    .018em .018em 0 #8d8d8d, .036em .036em 0 #7e7e7e, .054em .054em 0 #707070, .072em .072em 0 #626262,
    .09em .09em 0 #555, .108em .108em 0 #484848, .126em .126em 0 #3b3b3b, .144em .144em 0 #2e2e2e,
    0 .22em .3em rgba(0, 0, 0, .45);
}
.hero h1 .accent {
  color: #86e05a;
  text-shadow:
    .018em .018em 0 #5fb83a, .036em .036em 0 #53a533, .054em .054em 0 #48922d, .072em .072em 0 #3d8027,
    .09em .09em 0 #326e21, .108em .108em 0 #285c1b, .126em .126em 0 #1f4a15, .144em .144em 0 #17390f,
    0 .22em .3em rgba(0, 0, 0, .45);
}

.hero .lead { max-width: 46ch; font-size: clamp(16px, 1.5vw, 19px); color: #e4e5e9; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.hero .cta { justify-content: flex-start; }

.ip-chip {
  display: inline-flex; align-items: center; gap: 14px; padding: 7px 7px 7px 16px; cursor: pointer;
  font: 700 14px/1 var(--body); letter-spacing: .3px; color: #fff;
  background: rgba(18, 18, 18, .6); border: 2px solid rgba(255, 255, 255, .22);
}
.ip-chip small {
  padding: 8px 11px; font: 800 11px/1 var(--body); letter-spacing: .14em; text-transform: uppercase;
  background: var(--g1); box-shadow: inset 0 -3px 0 var(--g2), inset 0 3px 0 var(--g3);
}
.ip-chip:hover { border-color: #fff; }
.ip-chip[hidden] { display: none; }

.island-wrap {
  position: relative; display: grid; place-items: center;
  translate: calc(var(--mx, 0) * 16px) calc(var(--my, 0) * 9px);
}
.island-wrap::before {
  content: ""; position: absolute; inset: 2% -4%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(130, 100, 235, .36), transparent 72%);
}
html[data-mode="day"] .island-wrap::before { background: radial-gradient(closest-side, rgba(255, 255, 255, .45), transparent 72%); }
#island {
  position: relative; width: auto; max-width: 100%; height: min(74vh, 720px); image-rendering: pixelated;
  filter: drop-shadow(0 34px 30px rgba(0, 0, 0, .4)); animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* Escalier de blocs qui relie le hero au reste de la page */
.steps {
  position: absolute; left: 0; right: 0; bottom: -1px; z-index: 2; height: 96px; pointer-events: none;
  background-image: var(--tex-steps); background-size: auto 100%; background-repeat: repeat-x; image-rendering: pixelated;
}

/* ---------- Sections ---------- */
.section { max-width: 1240px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) clamp(16px, 4vw, 40px); }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head h2 {
  font: 700 clamp(30px, 5.2vw, 56px)/1.05 var(--px); text-transform: uppercase; letter-spacing: -.015em; color: #fff;
}
.section-head p { max-width: 60ch; margin: 18px auto 0; color: var(--muted); }

/* ---------- Chapitres (cartes façon « Découvrez nos jeux ») ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 32px; }
.card {
  display: flex; flex-direction: column; background: var(--panel);
  box-shadow: 0 8px 0 rgba(0, 0, 0, .4); transition: translate .2s;
}
.card:hover { translate: 0 -4px; }
.card-art {
  position: relative; height: 168px; overflow: hidden; background-color: var(--c);
  background-image:
    linear-gradient(rgba(10, 10, 10, .62), rgba(10, 10, 10, .84)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 24px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 24px);
}
.card-art::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 36px;
  background-image: var(--tex-stepsPanel); background-size: auto 100%; background-repeat: repeat-x; image-rendering: pixelated;
}
.card-n {
  position: absolute; left: 24px; top: 14px; font: 700 112px/1 var(--px); color: var(--c); text-shadow: 6px 6px 0 rgba(0, 0, 0, .45);
}
.card-body { display: flex; flex: 1; flex-direction: column; padding: 8px 24px 26px; }
.card h3 { font: 700 26px/1.2 var(--px); letter-spacing: .04em; margin-bottom: 16px; }
.inf { list-style: none; display: grid; gap: 10px; margin: 0 0 24px; font-size: 14.5px; color: #cfd0d4; }
.art { font: 700 14px/1 var(--px); letter-spacing: .04em; color: var(--c, #fff); margin-right: 8px; white-space: nowrap; }
.arts { display: grid; gap: 8px; margin-bottom: 16px; }
.art-item { background: rgba(255, 255, 255, .05); padding: 10px 12px; }
.art-item summary { cursor: pointer; font-weight: 700; }
.art-item summary b { color: var(--c); margin-right: 8px; font-family: var(--px); }
.art-item p { margin-top: 8px; color: #cfd0d4; font-size: 14.5px; }
.link-btn { margin-top: auto; align-self: flex-start; }

/* ---------- Barème ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 32px; }
.tools { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.search { flex: 1 1 280px; max-width: 520px; }
.search input {
  width: 100%; height: 48px; padding: 0 14px; color: #fff; background: var(--panel); font: 16px var(--body);
  border: 2px solid #5a5856; border-radius: 0; outline: none;
}
.search input::placeholder { color: #8d8e92; }
.search input:focus { border-color: #fff; }
.count { font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip {
  cursor: pointer; padding: 8px 14px; color: #fff; background: transparent; border: 2px solid #fff;
  font: 700 12px/1.4 var(--body); letter-spacing: .6px; text-transform: uppercase;
}
.chip:hover { background: #fff; color: var(--rich); }
.chip[aria-pressed="true"] { background: var(--g1); border-color: var(--rich); color: #fff; box-shadow: inset 0 -4px 0 var(--g2), inset 0 4px 0 var(--g3); }

.table-wrap { background: var(--panel); overflow: hidden; box-shadow: 0 8px 0 rgba(0, 0, 0, .4); }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 16px 16px; text-align: left; background: var(--rich);
  font: 700 12px/1.4 var(--body); letter-spacing: 1.04px; text-transform: uppercase; color: var(--muted);
}
tbody td { padding: 16px; vertical-align: top; border-top: 1px solid var(--line); }
tbody tr:hover { background: rgba(255, 255, 255, .04); }
.cell-inf { font-weight: 600; min-width: 220px; }
td.cell-s { min-width: 170px; }
.sv { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.extra { font-size: 12.5px; color: var(--muted); }

.tag {
  --sc: #ffc42b; --sd: #db9f21; --sl: #ffd953; --st: #071927;
  display: inline-block; padding: 7px 11px; font: 800 12px/1.25 var(--body); letter-spacing: .4px; text-transform: uppercase;
  color: var(--st); background: var(--sc); border: 2px solid var(--rich); box-shadow: inset 0 -3px 0 var(--sd), inset 0 3px 0 var(--sl);
}
.tag.mute { --sc: #4fe3e0; --sd: #2bb5b2; --sl: #8ff3f0; }
.tag.ban { --sc: #ffa41f; --sd: #ff791a; --sl: #ffd953; }
.tag.perma { --sc: #e5483a; --sd: #b23326; --sl: #ff7a6b; --st: #fff; }
.tag.none { background: none; border: 0; box-shadow: none; color: #6d6e73; padding-left: 0; }
.empty { padding: 40px 16px; text-align: center; color: var(--muted); font: 700 18px var(--px); }

/* ---------- Pied de page ---------- */
.footer { margin-top: 56px; background: #111; border-top: 4px solid var(--rich); }
.footer-main {
  max-width: 1240px; margin: 0 auto; padding: 56px clamp(16px, 4vw, 40px);
  display: grid; grid-template-columns: 1.3fr 1.7fr 1fr; gap: 40px;
}
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font: 700 24px/1 var(--px); text-shadow: 3px 3px 0 #000; }
.footer-logo { display: block; width: auto; height: 64px; }
.footer-id p:last-child { color: var(--muted); font-size: 14px; max-width: 34ch; }
.footer h3 { font: 700 22px/1.2 var(--px); letter-spacing: .04em; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 8px; font-size: 14px; }
.footer ul.cols { display: block; columns: 2; column-gap: 24px; }
.footer ul.cols li { break-inside: avoid; margin-bottom: 8px; }
.footer a { color: var(--g4); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-legal { padding: 20px clamp(16px, 4vw, 40px); background: var(--black); text-align: center; font-size: 12.5px; color: #9a9b9e; }
.footer-legal p { max-width: 90ch; margin: 0 auto; }

/* ---------- Apparition au scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease var(--d, 0ms), transform .6s cubic-bezier(.2, .8, .2, 1) var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Tablette / mobile ---------- */
@media (max-width: 960px) {
  .hero { align-items: flex-start; padding: 104px 0 104px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hero-copy { align-items: center; text-align: center; }
  .hero .cta { justify-content: center; }
  .hero h1 { align-items: center; }
  .island-wrap { margin-top: 4px; }
  #island { width: min(100%, 520px); height: auto; }
  .footer-main { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 760px) {
  .nav { height: 64px; gap: 12px; }
  .nav-links { display: none; }
  .brand-text { font-size: 22px; }
  .brand-logo { height: 40px; }
  .hero-brand { gap: 14px; }
  .steps { height: 72px; }
  .mc-btn { font-size: 16px; padding-left: 20px; }
  .card-art { height: 140px; }
  .card-n { font-size: 92px; }

  thead { position: absolute; left: -9999px; }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr { padding: 16px; border-top: 3px solid #000; }
  tbody td { border: 0; padding: 4px 0; }
  .cell-inf { min-width: 0; padding-bottom: 10px; }
  td.cell-s { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
  td.cell-s::before { content: attr(data-label); flex: 0 0 112px; font: 700 11px/1.5 var(--body); letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
