/* ==========================================================================
   WaddleWay : feuille de style
   Palette « banquise » + couleurs propres à chaque jeu.
   ========================================================================== */

@font-face {
  font-family: "Grandstander";
  src: url("../fonts/grandstander-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Couleurs de base */
  --ink: #23203F;      /* encre : texte, contours */
  --ink-soft: #4A4670; /* texte secondaire */
  --ice: #DDF0FF;      /* banquise : fond de page */
  --snow: #FFFFFF;     /* neige */
  --beak: #FF9B21;     /* bec et pattes : accent, traces de pas */
  --frost: #B7D7F0;    /* givre : ombres douces, séparations */

  --focus: var(--ink);
  --foot-color: var(--beak);

  /* Couleurs de jeu par défaut (remplacées par les classes .theme--…) */
  --g-bg: var(--snow);
  --g-ink: var(--ink);
  --g-soft: var(--ink-soft);
  --g-btn: var(--beak);
  --g-btn-fg: var(--ink);
  --g-mark: var(--beak);

  /* Typographie */
  --display: "Grandstander", "Trebuchet MS", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: 0.9rem;
  --step-0: 1.125rem;
  --step-1: 1.3rem;
  --step-2: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  --step-3: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  --step-4: clamp(2.5rem, 1.6rem + 4.2vw, 4.6rem);

  /* Mise en page */
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --line: 3px;
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--ice);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
  overflow-x: hidden;
}

img,
svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
  outline: var(--line) solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--snow);
  border-radius: 10px;
  font-weight: 700;
}
.skip:focus { top: 1rem; }

/* ---------- Boutons ---------- */

.btn {
  --btn-bg: var(--snow);
  --btn-fg: var(--ink);
  --btn-edge: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.7rem 1.5rem;
  border: var(--line) solid var(--btn-edge);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--btn-edge);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 0 var(--btn-edge); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--btn-edge); }

.btn--primary { --btn-bg: var(--beak); }
.btn--quiet { --btn-bg: var(--snow); }
.btn.is-going { --btn-bg: var(--ink); --btn-fg: var(--snow); }

/* ---------- En-tête ---------- */

.top { padding-block: 1.1rem; }

.top__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand__mark { width: 44px; height: 44px; flex: none; }

/* Le logotype se dandine : chaque lettre penche d'un côté puis de l'autre */
.wordmark {
  display: inline-flex;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}
.wordmark > span { display: inline-block; transform: rotate(-4deg); }
.wordmark > span:nth-child(even) { transform: rotate(4deg) translateY(1px); }
.brand:hover .wordmark > span { animation: letter-waddle 0.45s ease-in-out 2 alternate; }
.brand:hover .wordmark > span:nth-child(even) { animation-name: letter-waddle-alt; }

@keyframes letter-waddle { to { transform: rotate(4deg) translateY(1px); } }
@keyframes letter-waddle-alt { to { transform: rotate(-4deg); } }

.nav { display: flex; gap: 0.25rem; }
.nav a {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}
.nav a:hover,
.nav a[aria-current="page"] { background: var(--snow); }

/* ---------- Héros ---------- */

.hero { padding-top: clamp(1.5rem, 5vw, 4rem); }

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: end;
  gap: 2rem;
}

.hero h1 {
  font-size: var(--step-4);
  letter-spacing: -0.015em;
  max-width: 16ch;
}
.nowrap { white-space: nowrap; }

.hero__lede {
  margin-top: 1.4rem;
  max-width: 36em;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  margin-top: 2rem;
}

.hero__art { position: relative; display: flex; justify-content: center; }
.penguin { width: min(340px, 100%); height: auto; overflow: visible; }

/* Le pingouin se dandine quelques pas au chargement, puis au survol */
.penguin__body,
.penguin__foot { transform-box: fill-box; }
.penguin__body { transform-origin: 50% 100%; animation: waddle 0.42s ease-in-out 6 alternate both; }
.penguin__foot--l { transform-origin: 80% 100%; animation: step-l 0.42s ease-in-out 6 alternate both; }
.penguin__foot--r { transform-origin: 20% 100%; animation: step-r 0.42s ease-in-out 6 alternate both; }
.hero__art:hover .penguin__body,
.hero__art:hover .penguin__foot { animation-iteration-count: infinite; }

@keyframes waddle {
  from { transform: rotate(-5deg); }
  to   { transform: rotate(5deg); }
}
@keyframes step-l {
  from { transform: translateY(-5px) rotate(-6deg); }
  to   { transform: none; }
}
@keyframes step-r {
  from { transform: none; }
  to   { transform: translateY(-5px) rotate(6deg); }
}

/* ---------- Easter egg : le pingouin part vers les montagnes ---------- */

.penguin__walker,
.penguin__mountains { transform-box: fill-box; }
.penguin__walker { transform-origin: 50% 100%; }
.penguin__mountains {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}
.penguin__back { opacity: 0; transition: opacity 0.12s linear 0.55s; }
.penguin__shadow { transition: opacity 1.2s ease-in 1s; }

.hero__art.is-poked .penguin__walker { animation: hop 0.32s ease-out; }
@keyframes hop {
  40% { transform: translateY(-14px) scaleY(1.04); }
  70% { transform: translateY(0) scaleY(0.96); }
}

.hero__art.is-leaving .penguin__mountains { opacity: 1; transform: none; }
.hero__art.is-leaving .penguin__back { opacity: 1; }
.hero__art.is-leaving .penguin__shadow { opacity: 0; }
.hero__art.is-leaving .penguin__walker { animation: walk-away 3.2s cubic-bezier(.45, .05, .55, .95) 0.75s forwards; }
.hero__art.is-leaving .penguin__body,
.hero__art.is-leaving .penguin__foot { animation-iteration-count: infinite; }
@keyframes walk-away {
  to { transform: translate(-16px, -58px) scale(0.07); }
}

.hero__whisper {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  margin: 0;
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transition: opacity 0.6s ease-out 1.4s;
}
.hero__art.is-leaving .hero__whisper { opacity: 1; }

/* ---------- Traces de pas ---------- */

.trail {
  position: relative;
  height: clamp(100px, 12vw, 150px);
  pointer-events: none;
}
.trail--hero { height: clamp(110px, 14vw, 170px); margin-top: -0.5rem; }

.foot {
  position: absolute;
  width: 18px;
  height: 21px;
  margin: -10.5px 0 0 -9px;
  background: var(--foot-color);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M12 27c-2.6 0-3.6-3.2-4-6.5L2.2 8.6c-.6-1.3.6-2.4 1.8-1.7L7.6 9 10.6 2.4c.6-1.2 2.2-1.2 2.8 0L16.4 9l3.6-2.1c1.2-.7 2.4.4 1.8 1.7L16 20.5c-.4 3.3-1.4 6.5-4 6.5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M12 27c-2.6 0-3.6-3.2-4-6.5L2.2 8.6c-.6-1.3.6-2.4 1.8-1.7L7.6 9 10.6 2.4c.6-1.2 2.2-1.2 2.8 0L16.4 9l3.6-2.1c1.2-.7 2.4.4 1.8 1.7L16 20.5c-.4 3.3-1.4 6.5-4 6.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(var(--a)) translateX(var(--side)) scale(var(--s, 1));
  opacity: 0;
  transition: opacity 0.2s ease-out var(--d), transform 0.25s cubic-bezier(.3, 1.6, .6, 1) var(--d);
}
.trail:not(.is-walking) .foot { --s: 0.3; }
.trail.is-walking .foot { opacity: 1; }

/* ---------- Section jeux ---------- */

.games { padding-bottom: clamp(4rem, 8vw, 6rem); }

.games__head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.games__head h2 { font-size: var(--step-3); }
.games__head p { margin-top: 0.6rem; max-width: 34em; font-size: var(--step-1); color: var(--ink-soft); }

/* Carte de jeu : chaque jeu garde ses propres couleurs */
.game {
  --g-tilt: -1.2deg;

  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.25rem);
  padding: clamp(1rem, 3vw, 2rem);
  border: var(--line) solid var(--ink);
  border-radius: 36px;
  background: var(--g-bg);
  color: var(--g-ink);
  scroll-margin-top: 1.5rem;
}
.game--flip { --g-tilt: 1.2deg; }
.game--flip .game__shot { order: 2; }

.game__shot {
  display: block;
  border: var(--line) solid var(--ink);
  border-radius: 22px;
  overflow: hidden;
  background: var(--ink);
  transform: rotate(var(--g-tilt));
  transition: transform 0.25s ease-out;
}
.game__shot:hover { transform: rotate(0deg) scale(1.01); }
.game__shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.game__body { padding-block: 0.5rem; }
.game__body h3 { font-size: var(--step-3); letter-spacing: -0.01em; }

.game__kind {
  margin-top: 0.35rem;
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--g-soft);
}
.game__kind + p { margin-top: 1rem; max-width: 34em; }

.game__points {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}
.game__points li {
  position: relative;
  padding-left: 1.75rem;
}
/* Puces en forme de trace de pas */
.game__points li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.3em;
  width: 0.85rem;
  height: 1rem;
  background: var(--g-mark);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M12 27c-2.6 0-3.6-3.2-4-6.5L2.2 8.6c-.6-1.3.6-2.4 1.8-1.7L7.6 9 10.6 2.4c.6-1.2 2.2-1.2 2.8 0L16.4 9l3.6-2.1c1.2-.7 2.4.4 1.8 1.7L16 20.5c-.4 3.3-1.4 6.5-4 6.5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M12 27c-2.6 0-3.6-3.2-4-6.5L2.2 8.6c-.6-1.3.6-2.4 1.8-1.7L7.6 9 10.6 2.4c.6-1.2 2.2-1.2 2.8 0L16.4 9l3.6-2.1c1.2-.7 2.4.4 1.8 1.7L16 20.5c-.4 3.3-1.4 6.5-4 6.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(-90deg);
}

.game__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.75rem;
}
.btn--game { --btn-bg: var(--g-btn); --btn-fg: var(--g-btn-fg); }
.game__url { font-size: var(--step--1); color: var(--g-soft); }

/* ---------- Palettes reprises de chaque jeu ---------- */
/* Utilisées par les cartes de l'accueil, les étiquettes et les articles du blog. */

.theme--waddleway {
  --g-bg: var(--snow);
  --g-ink: var(--ink);
  --g-soft: var(--ink-soft);
  --g-btn: var(--beak);
  --g-btn-fg: var(--ink);
  --g-mark: var(--beak);
}
.theme--brightburg {
  --g-bg: #9ED6F7;
  --g-ink: #1E2A47;
  --g-soft: #2E3D63;
  --g-btn: #C93A2C;
  --g-btn-fg: #FFFFFF;
  --g-mark: #C93A2C;
}
.theme--pingouville {
  --g-bg: #F58B6F;
  --g-ink: #1E2340;
  --g-soft: #3A2230;
  --g-btn: #1E2340;
  --g-btn-fg: #FFFFFF;
  --g-mark: #1E2340;
}
.theme--banco {
  --g-bg: #0F4732;
  --g-ink: #FFF6DF;
  --g-soft: #BFE3CC;
  --g-btn: #F4B83E;
  --g-btn-fg: #1B2B21;
  --g-mark: #F4B83E;
}
.theme--fourmis {
  --g-bg: #8DCB6C;
  --g-ink: #2B1D0E;
  --g-soft: #3D2C17;
  --g-btn: #FFF3D6;
  --g-btn-fg: #2B1D0E;
  --g-mark: #2B1D0E;
}
.theme--objets-trouves {
  --g-bg: #1B2A7E;
  --g-ink: #FFFFFF;
  --g-soft: #C9D2FF;
  --g-btn: #C9392A;
  --g-btn-fg: #FFFFFF;
  --g-mark: #ECDDB6;
}
/* Anneau de focus clair sur les cartes sombres */
.game.theme--banco,
.game.theme--objets-trouves,
.play-card.theme--banco,
.play-card.theme--objets-trouves { --focus: var(--g-ink); }

/* ---------- Questions ---------- */

.faq {
  position: relative;
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
  background: var(--snow);
}
/* Bord supérieur en congères */
.faq::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -26px;
  height: 28px;
  background: radial-gradient(circle at 30px 34px, var(--snow) 30px, transparent 31px) 0 0 / 60px 28px repeat-x;
}

.faq__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: 1.5rem clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.faq h2 { font-size: var(--step-3); }

.faq__list { border-top: var(--line) solid var(--ink); }

.faq details { border-bottom: 2px dashed var(--frost); }
.faq details:last-child { border-bottom: 0; }

.faq summary {
  position: relative;
  padding: 1.25rem 3.25rem 1.05rem 0;
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 700;
  line-height: 1.25;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 2rem;
  height: 2rem;
  margin-top: -1rem;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 0.8rem 2.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2.5px 0.8rem no-repeat,
    var(--snow);
  transition: transform 0.2s ease-out, background-color 0.2s;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
  background-color: var(--beak);
}
.faq details p {
  max-width: 38em;
  padding-bottom: 1.4rem;
  color: var(--ink-soft);
}
.faq details a { color: var(--ink); text-underline-offset: 3px; }

/* ---------- Pied de page ---------- */

.foot-site {
  --focus: var(--beak);
  padding-block: 3rem 2rem;
  background: var(--ink);
  color: var(--ice);
}

.foot-site__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}
.foot-site__name {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 900;
  color: var(--snow);
}
.foot-site__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-site__links a {
  font-weight: 700;
  text-decoration-color: var(--beak);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.foot-site__links a:hover { color: var(--beak); }

.foot-site__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(221, 240, 255, 0.25);
  font-size: var(--step--1);
  color: #B9C3E0;
}

/* Petites montagnes du pied de page */
.why {
  display: inline-flex;
  padding: 0.25rem;
  border-radius: 8px;
  color: #6E6A92;
  transition: color 0.2s;
}
.why:hover { color: var(--beak); }
.why svg { width: 48px; height: auto; }

/* ==========================================================================
   Blog
   ========================================================================== */

/* ---------- Étiquette de jeu et méta ---------- */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.75rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--g-bg);
  color: var(--g-ink);
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}
a.tag:hover { text-decoration: underline; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.1rem;
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-soft);
}

/* ---------- Carte d'article ---------- */

.post-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  border: var(--line) solid var(--ink);
  border-radius: 30px;
  overflow: hidden;
  background: var(--snow);
  color: var(--ink);
}
.post-card:focus-within { outline: var(--line) solid var(--ink); outline-offset: 4px; }

.post-card__img {
  display: grid;
  place-items: center;
  padding: clamp(0.75rem, 2vw, 1.25rem);
  background: var(--g-bg);
  border-right: var(--line) solid var(--ink);
}
.post-card__img img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: var(--line) solid var(--ink);
  border-radius: 16px;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: clamp(1.1rem, 3vw, 1.75rem);
}
.post-card__title {
  font-size: var(--step-2);
  line-height: 1.1;
}
.post-card__title a { text-decoration: none; }
.post-card__title a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.post-card__title a:focus-visible { outline: none; }
/* Toute la carte est cliquable */
.post-card__title a::after { content: ""; position: absolute; inset: 0; }
.post-card__desc { color: var(--ink-soft); max-width: 40em; }

.post-card--compact { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.post-card--compact .post-card__img { border-right: 0; border-bottom: var(--line) solid var(--ink); }
.post-card--compact .post-card__title { font-size: var(--step-1); }

/* ---------- « Du côté du blog » (accueil) et « À lire aussi » ---------- */

.news { padding-bottom: clamp(4.5rem, 9vw, 7rem); }
.news__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  margin-bottom: 1.5rem;
}
.news__head h2,
.more h2 { font-size: var(--step-3); }
.news__all {
  font-weight: 700;
  text-decoration-color: var(--beak);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}
.news__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 1.5rem;
}

.more { padding-block: 1rem clamp(4rem, 8vw, 6rem); }
.more h2 { margin-bottom: 1.5rem; }

/* ---------- Page liste ---------- */

.blog-head { padding-block: clamp(1.5rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem); }
.blog-head h1 { font-size: var(--step-4); letter-spacing: -0.015em; }
.blog-head__lede {
  margin-top: 1rem;
  max-width: 34em;
  font-size: var(--step-1);
  color: var(--ink-soft);
}
.blog-head__rss { margin-top: 1rem; }
.blog-head__rss a {
  font-weight: 700;
  text-decoration-color: var(--beak);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.post-list {
  display: grid;
  gap: 1.75rem;
  padding-bottom: clamp(4rem, 8vw, 6rem);
}
.post-list--flush { padding-bottom: 0; }
.empty { font-size: var(--step-1); color: var(--ink-soft); }

/* ---------- Page article ---------- */

.post__head { padding-top: clamp(1rem, 3vw, 2rem); }

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
  color: var(--ink-soft);
}
.crumbs li + li::before { content: "›"; margin-right: 0.5rem; color: var(--ink-soft); }
.crumbs a { color: var(--ink); text-underline-offset: 3px; }

.post__head h1 {
  max-width: 22ch;
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.75rem);
  letter-spacing: -0.015em;
}
.post__head .post-meta { margin-top: 1.25rem; }

.post__cover {
  margin: clamp(1.5rem, 4vw, 2.5rem) 0 0;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  border: var(--line) solid var(--ink);
  border-radius: 34px;
  background: var(--g-bg);
}
.post__cover img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border: var(--line) solid var(--ink);
  border-radius: 20px;
}

.post__layout {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 44rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem);
}
.post__layout--solo { grid-template-columns: minmax(0, 44rem); }

/* Sommaire */
.toc {
  position: sticky;
  top: 1.25rem;
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  padding: 1rem 1.2rem;
  border: var(--line) solid var(--ink);
  border-radius: 22px;
  background: var(--snow);
  font-size: 0.95rem;
  line-height: 1.35;
}
.toc summary {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 800;
  cursor: pointer;
}
.toc ol { margin: 0.75rem 0 0; padding: 0; list-style: none; }
.toc ol ol { margin: 0.4rem 0 0.2rem 0.25rem; padding-left: 0.8rem; border-left: 2px dashed var(--frost); }
.toc li + li { margin-top: 0.45rem; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--ink); text-decoration: underline; }
.toc > ol > li > a { color: var(--ink); font-weight: 700; }

/* Texte de l'article */
.prose {
  font-size: 1.15rem;
  line-height: 1.7;
}
.prose > :first-child { margin-top: 0; }
.prose > p:first-child { font-size: 1.3rem; line-height: 1.6; }
.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose .table-wrap,
.prose img { margin: 0 0 1.2em; }
.prose h2,
.prose h3,
.prose h4 { scroll-margin-top: 1.25rem; }
.prose h2 {
  margin: 2.4em 0 0.7em;
  padding-top: 1rem;
  border-top: var(--line) solid var(--ink);
  font-size: var(--step-3);
}
.prose h3 { margin: 1.9em 0 0.6em; font-size: 1.5rem; line-height: 1.15; }
.prose h4 { margin: 1.6em 0 0.5em; font-size: 1.2rem; }
.prose a {
  text-decoration-color: var(--beak);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose strong { font-weight: 700; }
.prose ul { padding: 0; list-style: none; }
.prose ul li { position: relative; padding-left: 1.75rem; }
.prose ul li + li { margin-top: 0.5em; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.4em;
  width: 0.85rem;
  height: 1rem;
  background: var(--beak);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M12 27c-2.6 0-3.6-3.2-4-6.5L2.2 8.6c-.6-1.3.6-2.4 1.8-1.7L7.6 9 10.6 2.4c.6-1.2 2.2-1.2 2.8 0L16.4 9l3.6-2.1c1.2-.7 2.4.4 1.8 1.7L16 20.5c-.4 3.3-1.4 6.5-4 6.5z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M12 27c-2.6 0-3.6-3.2-4-6.5L2.2 8.6c-.6-1.3.6-2.4 1.8-1.7L7.6 9 10.6 2.4c.6-1.2 2.2-1.2 2.8 0L16.4 9l3.6-2.1c1.2-.7 2.4.4 1.8 1.7L16 20.5c-.4 3.3-1.4 6.5-4 6.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(-90deg);
}
.prose ol { padding-left: 1.5rem; }
.prose blockquote {
  padding-left: 1.1rem;
  border-left: 4px solid var(--beak);
  color: var(--ink-soft);
}
.prose img { border: var(--line) solid var(--ink); border-radius: 18px; }
.prose hr { margin: 2.5em 0; border: 0; border-top: 2px dashed var(--frost); }
.prose code {
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--snow);
  font-size: 0.9em;
}

.table-wrap {
  overflow-x: auto;
  border: var(--line) solid var(--ink);
  border-radius: 20px;
  background: var(--snow);
}
.table-wrap table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 1rem;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}
.table-wrap th,
.table-wrap td {
  padding: 0.7rem 1rem;
  text-align: left;
  vertical-align: top;
}
.table-wrap thead th {
  background: var(--g-bg);
  color: var(--g-ink);
  font-family: var(--display);
  font-weight: 700;
  border-bottom: var(--line) solid var(--ink);
  white-space: nowrap;
}
.table-wrap tbody tr:nth-child(even) { background: #F1F8FF; }
.table-wrap tbody td:first-child { font-weight: 700; }

/* Carte « Jouer » en fin d'article */
.play-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  margin-top: 3rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: var(--line) solid var(--ink);
  border-radius: 32px;
  background: var(--g-bg);
  color: var(--g-ink);
}
.play-card__title {
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 800;
  line-height: 1.1;
}
.play-card p + p { margin-top: 0.3rem; color: var(--g-soft); }

/* ---------- Page 404 ---------- */

.lost {
  min-height: 70vh;
  display: grid;
  place-content: center;
  justify-items: start;
  gap: 1.25rem;
  padding-block: 4rem;
}
.lost h1 { font-size: var(--step-4); max-width: 14ch; }
.lost p { max-width: 32em; font-size: var(--step-1); color: var(--ink-soft); }

/* ---------- Responsive ---------- */

@media (max-width: 999px) {
  .post__layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; }
}

@media (max-width: 899px) {
  .game,
  .faq__inner { grid-template-columns: minmax(0, 1fr); }
  .game--flip .game__shot { order: 0; }
  .game { border-radius: 28px; }
  .game__shot { border-radius: 18px; }
}

@media (max-width: 759px) {
  .post-card { grid-template-columns: minmax(0, 1fr); }
  .post-card__img { border-right: 0; border-bottom: var(--line) solid var(--ink); }
  .hero__inner { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }
  .hero__art { justify-content: flex-end; margin-top: -0.5rem; }
  .penguin { width: 150px; }
  .hero__actions .btn { flex: 1 1 12rem; }
}

@media (max-width: 479px) {
  .nav__faq { display: none; }
  .post__cover img { aspect-ratio: 16 / 10; }
  .wordmark { font-size: 1.35rem; }
  .brand__mark { width: 38px; height: 38px; }
  .nav a { padding: 0.45rem 0.55rem; font-size: 1rem; }
  .game__cta .btn { width: 100%; }
}

@media (max-width: 359px) {
  .wordmark { font-size: 1.2rem; }
  .nav { gap: 0; }
  .nav a { padding: 0.4rem 0.4rem; font-size: 0.95rem; }
}

/* ---------- Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .game__shot:hover { transform: rotate(var(--g-tilt)); }
}
