@font-face { font-family: "Pixelify Sans"; src: url(fonts/pixelify-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Bitter"; src: url(fonts/bitter-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Bitter"; src: url(fonts/bitter-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }

:root {
  /* Les couleurs viennent des blocs du jeu : on descend de la prairie jusqu'au socle. */
  --wool: #faf6ec;
  --hay: #f2ce2e;
  --hay-dark: #a87c18;
  --ink: #1c130b;
  --dirt: #4a2f1c;
  --dirt-low: #3b2415;
  --stone: #4d4f56;
  --stone-low: #3a3b41;
  --pale: #2e1a66;
  --mint: #9cf0e4;
  --tide: #0d4c5e;
  --coral: #ffb3a3;
  --bedrock: #17171b;
  --tile: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bedrock);
  color: var(--wool);
  font: 400 1.125rem/1.6 "Bitter", Georgia, serif;
}

img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(1180px, 100% - 2rem * 2); margin-inline: auto; }

h1, h2, h3 { font-family: "Pixelify Sans", "Bitter", sans-serif; line-height: 1.05; margin: 0 0 .6em; font-weight: 500; }
h2 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h3 { font-size: 1.75rem; margin-top: 1.5em; }
p { margin: 0 0 1em; max-width: 62ch; }
strong { font-weight: 600; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--hay); outline-offset: 3px; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .88em; background: rgb(255 255 255 / .1); padding: .1em .35em; }

/* En-tête : l'image du jeu, en entier, et le nom posé dessus en lettres de pixels. */
.hero { position: relative; min-height: min(100svh, 62vw + 12rem); display: flex; align-items: flex-end; overflow: hidden; background: #6fc6ec; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(20 40 16 / .86), rgb(20 40 16 / .45) 42%, transparent 68%); }
.hero-text { position: relative; z-index: 1; padding-block: 3rem 2.5rem; }
.hero-icon { width: 96px; margin: 0 0 .5rem -6px; filter: drop-shadow(0 4px 0 rgb(0 0 0 / .25)); }
h1 { font-size: clamp(4.5rem, 15vw, 11.5rem); line-height: .9; margin: 0 0 1.5rem; text-shadow: .045em .045em 0 var(--ink); letter-spacing: -.01em; }
.lead { font-size: clamp(1.2rem, 2.2vw, 1.55rem); line-height: 1.4; max-width: 34em; text-shadow: 0 1px 2px rgb(0 0 0 / .6); }

/* Boutons taillés comme des blocs de foin : on les enfonce en cliquant. */
.downloads { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.75rem; }
.dl {
  display: block;
  padding: .85rem 1.4rem .9rem;
  background: var(--hay);
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 4px 4px 0 #ffe88a, inset -4px -4px 0 var(--hay-dark), 0 6px 0 var(--ink);
}
.dl b { display: block; font: 500 1.5rem/1.1 "Pixelify Sans", sans-serif; }
.dl span { font-size: .92rem; }
.dl:hover { background: #f8da50; }
.dl:active { transform: translateY(4px); box-shadow: inset 4px 4px 0 #ffe88a, inset -4px -4px 0 var(--hay-dark), 0 2px 0 var(--ink); }

/* Les frontières entre les sections sont faites des vrais blocs du jeu. */
.strata { display: grid; grid-auto-flow: row; overflow: hidden; }
.strata-row { display: flex; width: max-content; }
.strata i { flex: none; width: var(--tile); height: var(--tile); background-size: 100% 100%; image-rendering: pixelated; }

.layer { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.dirt { background: var(--dirt); }
.dirt-low { background: var(--dirt-low); }
.stone { background: var(--stone); }
.pale { background: var(--pale); }
.pale h2 { color: var(--mint); }
.tide { background: var(--tide); }
.tide h2 { color: var(--coral); }
.bedrock { background: var(--bedrock); }

.split { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.flip { grid-template-columns: 6fr 5fr; }
.split.even { grid-template-columns: 1fr 1fr; align-items: start; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-bottom: 2.5rem; }
.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.columns p { margin: 0; font-size: 1.05rem; }

figure { margin: 0; }
figure img { width: 100%; box-shadow: 0 0 0 4px var(--ink); }
figcaption { font-size: .95rem; margin-top: .7rem; opacity: .85; }

.steps { list-style: none; counter-reset: pas; margin: 0; padding: 0; }
.steps li { counter-increment: pas; position: relative; padding-left: 3.25rem; margin-bottom: 1.25rem; }
.steps li::before {
  content: counter(pas);
  position: absolute; left: 0; top: .1rem;
  width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center;
  font: 600 1.1rem "Bitter", serif;
  color: var(--ink); background: var(--hay);
  box-shadow: inset 2px 2px 0 #ffe88a, inset -2px -2px 0 var(--hay-dark);
}

/* L'atelier : le mur d'objets imite le panneau de l'établi. */
.intro { font-size: 1.2rem; }
.workshop { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; margin: 2rem 0 1.25rem; }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 4px; padding: 12px; background: var(--stone-low); box-shadow: inset 0 0 0 3px var(--ink); }
.wall button { aspect-ratio: 1; padding: 6px; border: 0; cursor: pointer; background: rgb(255 255 255 / .07); }
.wall button:hover { background: rgb(255 255 255 / .2); }
.wall button[aria-pressed="true"] { background: var(--hay); }
.wall img, .need img, .detail-head img { image-rendering: pixelated; }
.wall img { width: 100%; }
.detail { position: sticky; top: 1rem; min-height: 11rem; padding: 1.25rem; background: var(--ink); box-shadow: inset 0 0 0 3px #6e5a3c; }
.detail-hint { margin: 0; opacity: .75; }
.detail-head { display: flex; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.detail-head img { width: 48px; height: 48px; }
.detail-head h3 { margin: 0; font: 600 1.3rem/1.2 "Bitter", serif; }
.way { font-size: .95rem; margin: .9rem 0 .35rem; opacity: .8; }
.need { display: flex; align-items: center; gap: .55rem; font-size: 1rem; }
.need img { width: 24px; height: 24px; }
.more { font-weight: 600; text-underline-offset: .2em; }
.progress { margin-top: 3.5rem; }
.progress h3 { margin-top: 0; font-size: clamp(1.75rem, 3vw, 2.5rem); }
.keys { margin: 1.25rem 0 0; display: grid; gap: .45rem; }
.keys div { display: flex; align-items: center; gap: .75rem; }
.keys dd { margin: 0; }
kbd { display: inline-grid; place-items: center; width: 2rem; height: 2rem; font: 600 1.05rem "Bitter", serif; color: var(--ink); background: var(--wool); box-shadow: inset -2px -2px 0 #b8b2a0, 0 3px 0 var(--ink); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 2rem 3rem; font-size: .95rem; }
.foot p { margin: 0; opacity: .75; }
.foot nav { display: flex; gap: 1.25rem; }

/* Pages de texte : recettes et guide du serveur. */
.doc-top { background: var(--dirt); padding-block: 1.25rem; }
.doc-top a { font: 500 1.6rem "Pixelify Sans", sans-serif; text-decoration: none; display: inline-flex; align-items: center; gap: .6rem; }
.doc-top img { width: 40px; height: 40px; }
.doc { padding-block: 3rem 5rem; }
.doc h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); text-shadow: none; }
.doc h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-top: 2em; }
.doc h3 { font-size: 1.5rem; }
.doc li { margin-bottom: .4em; max-width: 62ch; }
.doc pre { background: #000; padding: 1rem 1.25rem; overflow-x: auto; font-size: .9rem; line-height: 1.5; box-shadow: inset 0 0 0 2px var(--stone-low); }
.doc pre code { background: none; padding: 0; font-size: 1em; }
.doc blockquote { margin: 1.25em 0; padding: .25em 0 .25em 1.25em; border-left: 4px solid var(--hay); }
.table-scroll { overflow-x: auto; margin: 1.25em 0; }
.doc table { border-collapse: collapse; font-size: 1rem; }
.doc th { text-align: left; font-weight: 600; background: var(--stone-low); }
.doc th, .doc td { padding: .45rem .9rem; border: 1px solid var(--stone-low); vertical-align: top; }
.recipes td:first-child { white-space: nowrap; }
.recipes td img { display: inline-block; width: 24px; height: 24px; vertical-align: -6px; margin-right: .5rem; image-rendering: pixelated; }

@media (max-width: 860px) {
  :root { --tile: 40px; }
  .split, .split.flip, .split.even, .pair, .columns, .workshop { grid-template-columns: 1fr; }
  .split.flip figure { order: 1; }
  .detail { position: static; min-height: 0; order: -1; }
  .wrap { width: calc(100% - 2rem); }
  .hero { min-height: min(92svh, 760px); }
  .dl { flex: 1 1 100%; }
}
