/* ==========================================================================
   Portfolio Cheun Perret · direction « Arcade »
   Les couleurs, polices et ombres sont réglées ici, dans :root.
   ========================================================================== */

/* ---------- Polices (hébergées avec le site, licence SIL OFL) ---------- */
@font-face { font-family: 'Rubik'; font-weight: 400; font-style: normal; font-display: swap; src: url('../assets/fonts/rubik-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Rubik'; font-weight: 500; font-style: normal; font-display: swap; src: url('../assets/fonts/rubik-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Rubik'; font-weight: 700; font-style: normal; font-display: swap; src: url('../assets/fonts/rubik-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Rubik'; font-weight: 800; font-style: normal; font-display: swap; src: url('../assets/fonts/rubik-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Rubik'; font-weight: 900; font-style: normal; font-display: swap; src: url('../assets/fonts/rubik-latin-900-normal.woff2') format('woff2'); }
@font-face { font-family: 'Press Start 2P'; font-weight: 400; font-style: normal; font-display: swap; src: url('../assets/fonts/press-start-2p-latin-400-normal.woff2') format('woff2'); }

:root {
  --navy: #17123A;      /* fond principal */
  --navy-2: #231C55;    /* fond des blocs sur le bleu */
  --yellow: #FFD447;    /* accent principal */
  --coral: #FF6B4A;
  --mint: #3DDC97;
  --sky: #7FB2FF;
  --ink: #000000;       /* contours et ombres */
  --white: #FFFFFF;
  --lavender: #D9D5F2;  /* texte secondaire sur le bleu */

  --font: 'Rubik', system-ui, sans-serif;
  --px: 'Press Start 2P', ui-monospace, monospace;

  --border: 4px solid var(--ink);
  --shadow: 8px 8px 0 var(--ink);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 28px);
  --ease-out: cubic-bezier(.2, .9, .3, 1.2);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--yellow); }
h1, h2, h3, p, ul, ol { margin: 0; }
code { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: .9em; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
::selection { background: var(--yellow); color: var(--ink); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 300; background: var(--yellow); color: var(--ink); padding: 12px 16px; font-weight: 800; border: var(--border); }
.skip:focus { top: 16px; }

/* ---------- Petits éléments ---------- */
.px { font-family: var(--px); font-size: 12px; line-height: 1.7; letter-spacing: .02em; }
.px--mint { color: var(--mint); }
.px--yellow { color: var(--yellow); }

.tag {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-family: var(--px); font-size: 10px; line-height: 1.6;
  padding: 8px 10px; border: 2px solid var(--ink); color: var(--ink);
}
.tag--mint { background: var(--mint); }
.tag--coral { background: var(--coral); }
.tag--yellow { background: var(--yellow); }
.tag--white { background: var(--white); }
.tag--black { background: var(--ink); color: var(--yellow); }
.tag--sm { font-size: 8px; }
.hero .tag { font-size: 12px; padding: 10px 14px; border-width: 3px; box-shadow: 4px 4px 0 var(--ink); }
.blink { animation: blink 1s steps(1) infinite; color: var(--coral); }
@keyframes blink { 50% { opacity: 0; } }

/* Boutons « touche d'arcade » : ils s'enfoncent au clic */
.btns { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  font-weight: 800; font-size: 17px; text-decoration: none;
  border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink);
  transition: transform .12s var(--ease-out), box-shadow .12s var(--ease-out);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); transition-duration: .05s; }
.btn--accent { background: var(--yellow); color: var(--ink); }
.btn--white { background: var(--white); color: var(--ink); }
.btn--black { background: var(--ink); color: var(--yellow); box-shadow: 5px 5px 0 var(--white); }
.btn--black:hover { color: var(--yellow); box-shadow: 7px 7px 0 var(--white); }
.btn--accent:hover, .btn--white:hover { color: var(--ink); }

/* ---------- Écran PRESS START ---------- */
.intro { display: none; }
.js .intro.is-on {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 200;
  background: var(--navy); cursor: pointer; text-align: center; padding: 24px;
}
.intro__title { font-family: var(--px); font-size: clamp(28px, 7vw, 64px); line-height: 1.25; color: var(--white); text-shadow: 6px 6px 0 var(--ink); }
.intro__title span { color: var(--yellow); }
.intro__press { margin-top: 48px; font-family: var(--px); font-size: clamp(14px, 2.4vw, 20px); color: var(--mint); animation: blink 1s steps(1) infinite; }
.intro__hint { margin-top: 16px; color: var(--lavender); font-size: 15px; }

/* ---------- Barre d'XP (progression de lecture) ---------- */
.xpbar { position: fixed; inset: 0 0 auto; height: 6px; z-index: 120; background: rgba(0,0,0,.35); }
.xpbar__fill { height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: repeating-linear-gradient(90deg, var(--mint) 0 18px, #2fb67c 18px 20px); }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 100; transition: background .3s, box-shadow .3s; }
.nav.is-scrolled { background: rgba(23, 18, 58, .92); backdrop-filter: blur(8px); box-shadow: 0 4px 0 var(--ink); }
.nav__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 18px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; font-size: 21px; text-decoration: none; }
.brand__mark {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  background: var(--yellow); color: var(--ink); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--px); font-size: 12px; transition: transform .3s var(--ease-out);
}
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.08); }
.brand:hover { color: var(--white); }
.nav__links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 22px; font-weight: 700; font-size: 16px; }
.nav__links a { display: inline-block; padding: 10px 0; text-decoration: none; position: relative; }
.nav__links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 3px; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease-out); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-block: clamp(40px, 8vw, 72px) clamp(80px, 12vw, 128px); }
.hero__text { flex: 1.15 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero__title { font-weight: 900; font-size: clamp(40px, 5.4vw, 72px); line-height: .98; letter-spacing: -.03em; }
.hero__title em { font-style: normal; color: var(--yellow); }
.hero__lead { font-size: clamp(18px, 2vw, 21px); color: var(--lavender); max-width: 560px; }
.hero__lead sup, .save sup { font-size: .6em; }
.char { display: inline-block; white-space: pre; }

.hero__stack { flex: 1 1 380px; min-width: 0; position: relative; aspect-ratio: 1 / .9; }
.shot { position: absolute; width: 78%; border: var(--border); will-change: transform; }
.shot--1 { top: 0; left: 0; rotate: -5deg; box-shadow: 10px 10px 0 var(--coral); }
.shot--2 { top: 26%; right: 0; rotate: 4deg; box-shadow: 10px 10px 0 var(--yellow); }
.shot--3 { bottom: 0; left: 8%; width: 70%; rotate: -2deg; box-shadow: 10px 10px 0 var(--mint); }

/* ---------- Chess : la quête principale ---------- */
.quest { background: var(--yellow); color: var(--ink); border-block: var(--border); padding-block: clamp(72px, 10vw, 112px); overflow: hidden; }
.quest a:hover { color: var(--ink); }
.quest__tags { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.quest__tags .tag { font-size: 12px; padding: 10px 14px; }
.quest__grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.quest__text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.quest__title { font-weight: 900; font-size: clamp(48px, 7vw, 96px); line-height: .92; letter-spacing: -.03em; }
.quest__lead { font-size: clamp(18px, 2vw, 21px); font-weight: 500; }
.quest__yt { font-size: 18px; }
.quest__yt a { font-weight: 800; text-decoration-thickness: 3px; text-underline-offset: 3px; }
.quest__shot { flex: 1.2 1 460px; min-width: 0; margin: 0; }
.quest__shot img { border: var(--border); box-shadow: var(--shadow); }

.levels { margin-top: 64px; display: flex; flex-direction: column; gap: 16px; }
.levels__head { display: flex; justify-content: space-between; gap: 12px; }
.levels__grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 10px; }
@media (min-width: 1000px) { .levels__grid { grid-template-columns: repeat(11, minmax(0, 1fr)); } }
.lvl {
  display: flex; flex-direction: column; gap: 8px; min-height: 104px; padding: 12px;
  border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); background: var(--white);
}
.lvl--done { background: var(--mint); }
.lvl--locked { background: var(--white); background-image: repeating-linear-gradient(135deg, transparent 0 8px, rgba(0,0,0,.06) 8px 16px); }
.lvl__n { font-family: var(--px); font-size: 16px; }
.lvl__soon { margin-top: auto; font-family: var(--px); font-size: 8px; line-height: 1.6; opacity: .7; }
.lvl__name { font-weight: 700; font-size: 14px; line-height: 1.25; }

.stats { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat { background: var(--white); border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.stat__n { font-weight: 900; font-size: 44px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__l { font-size: 15px; }

/* ---------- Projets ---------- */
.projects { padding-block: clamp(88px, 12vw, 128px) 48px; display: flex; flex-direction: column; gap: 40px; }
.section-head { display: flex; flex-direction: column; gap: 14px; }
.section-title { font-weight: 900; font-size: clamp(38px, 5.4vw, 68px); line-height: 1; letter-spacing: -.03em; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 32px; }

.card {
  --shadow-color: var(--ink);
  background: var(--white); color: var(--ink); border: var(--border);
  box-shadow: 10px 10px 0 var(--shadow-color);
  display: flex; flex-direction: column; overflow: hidden;
  transition: box-shadow .25s var(--ease-out), translate .25s var(--ease-out);
  transform-style: preserve-3d;
}
.card:hover { translate: -4px -4px; box-shadow: 14px 14px 0 var(--shadow-color); }
.card a:hover { color: var(--ink); }
.card--coral { --shadow-color: var(--coral); }
.card--mint { --shadow-color: var(--mint); }
.card--yellow { --shadow-color: var(--yellow); }
.card--wide { flex-direction: row; flex-wrap: wrap; }
.card__body { flex: 1 1 340px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.card__title { font-weight: 900; font-size: clamp(28px, 3vw, 36px); line-height: 1.05; letter-spacing: -.02em; }
.card__pitch { font-size: 18px; font-weight: 500; }
.card__list { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.card__list li::marker { content: '▸ '; }
.card__stack { margin-top: auto; padding-top: 6px; font-weight: 800; font-size: 15px; }
.card__credit { font-size: 13px; color: #4A4A4A; }
.card__link { align-self: flex-start; font-weight: 800; font-size: 16px; text-decoration-thickness: 3px; text-underline-offset: 3px; }
.card__media { border-bottom: var(--border); overflow: hidden; }
.card__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; transition: scale .5s var(--ease-out); }
.card:hover .card__media img { scale: 1.04; }

/* Zombie Factory : bascule jour / nuit */
.zf { flex: 1.35 1 480px; min-width: 0; display: flex; flex-direction: column; border-right: var(--border); background: var(--ink); }
.zf__screens { position: relative; flex: 1 1 auto; aspect-ratio: 16 / 9; overflow: hidden; }
.zf__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; scale: 1.06; transition: opacity .7s ease, scale 1.2s var(--ease-out); }
.zf__img.is-on { opacity: 1; scale: 1; }
.zf__switch { display: flex; gap: 0; border-top: var(--border); }
.zf__btn {
  flex: 1; min-height: 52px; border: 0; cursor: pointer; font: 800 15px var(--font);
  background: var(--navy-2); color: var(--lavender); transition: background .25s, color .25s;
}
.zf__btn + .zf__btn { border-left: var(--border); }
.zf__btn.is-on { background: var(--yellow); color: var(--ink); }
.zf__btn:hover:not(.is-on) { background: #2E2670; color: var(--white); }

/* Illustrations des projets sans capture */
.illus { position: relative; aspect-ratio: 16 / 9; border-bottom: var(--border); display: grid; place-items: center; overflow: hidden; }
.illus--mint { background: var(--mint) radial-gradient(rgba(0,0,0,.14) 1.5px, transparent 1.5px) 0 0 / 18px 18px; }
.illus--coral { background: var(--coral) radial-gradient(rgba(0,0,0,.14) 1.5px, transparent 1.5px) 0 0 / 18px 18px; }
.illus--navy { background: var(--navy) radial-gradient(rgba(255,255,255,.08) 1.5px, transparent 1.5px) 0 0 / 18px 18px; padding: 20px; }
.illus__px { width: 96px; height: auto; image-rendering: pixelated; filter: drop-shadow(6px 6px 0 rgba(0,0,0,.9)); }
.illus .tag { position: absolute; left: 14px; bottom: 14px; }

/* Galaxy : le workflow qui s'allume étape par étape */
.flow { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 8px; counter-reset: step; }
.flow li {
  counter-increment: step; position: relative;
  font-weight: 700; font-size: 14px; color: var(--white);
  padding: 8px 12px; border: 2px solid var(--lavender); background: var(--navy-2);
  transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease-out);
}
.flow li::before { content: counter(step) ' · '; font-family: var(--px); font-size: 9px; color: var(--yellow); }
.flow li:not(:last-child)::after { content: '→'; position: absolute; right: -14px; top: 50%; translate: 0 -50%; color: var(--lavender); font-size: 13px; }
.flow li.is-lit { background: var(--yellow); color: var(--ink); border-color: var(--ink); transform: translateY(-3px); }
.flow li.is-lit::before { color: var(--ink); }

/* Bonus */
.bonus { margin-top: 32px; display: flex; flex-direction: column; gap: 16px; }
.bonus__card { display: flex; gap: 20px; align-items: center; padding: 22px 24px; border: 3px dashed var(--lavender); text-decoration: none; transition: border-color .2s, background .2s; }
.bonus__card:hover { border-color: var(--yellow); background: var(--navy-2); color: var(--white); }
.bonus__card strong { display: block; font-size: 22px; }
.bonus__txt { color: var(--lavender); }
.bonus__heart { font-size: 40px; color: var(--coral); line-height: 1; transition: transform .3s var(--ease-out); }
.bonus__card:hover .bonus__heart { transform: scale(1.3) rotate(-10deg); }

/* ---------- Parcours : les sauvegardes ---------- */
.journey { padding-block: 64px clamp(88px, 12vw, 128px); display: flex; flex-direction: column; gap: 40px; }
.saves { list-style: none; padding: 0 0 0 28px; position: relative; display: flex; flex-direction: column; gap: 18px; }
.saves::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 4px; background: var(--navy-2); }
.saves::after { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 4px; background: var(--mint); transform-origin: top; transform: scaleY(var(--line, 1)); }
.save { position: relative; display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; background: var(--navy-2); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 22px 24px; }
.save::before { content: ''; position: absolute; left: -27px; top: 28px; width: 14px; height: 14px; background: var(--mint); border: 3px solid var(--ink); z-index: 1; }
.save--current { border-color: var(--yellow); }
.save--current::before { background: var(--yellow); }
.save__year { flex: 0 0 170px; font-family: var(--px); font-size: 12px; line-height: 1.6; color: var(--yellow); }
.save__body { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.save__body h3 { font-size: 20px; font-weight: 800; }
.save__where { color: var(--lavender); }
.save__body ul { padding-left: 20px; margin-top: 8px; color: var(--white); font-size: 16px; display: flex; flex-direction: column; gap: 4px; }
.save__body li::marker { content: '▸ '; color: var(--mint); }

/* ---------- Contact ---------- */
.contact { background: var(--yellow); color: var(--ink); border-top: var(--border); padding-block: clamp(80px, 11vw, 112px) 96px; }
.contact .wrap { display: flex; flex-direction: column; gap: 24px; }
.contact .px { font-size: 14px; }
.contact__title { font-weight: 900; font-size: clamp(44px, 7vw, 92px); line-height: .95; letter-spacing: -.03em; }
.contact__lead { font-size: clamp(18px, 2vw, 21px); font-weight: 500; max-width: 560px; }
.contact a:hover { color: var(--ink); }
.contact .btn--black:hover { color: var(--yellow); }
.contact__foot { margin-top: 56px; padding-top: 28px; border-top: 3px solid var(--ink); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 24px; font-size: 14px; font-weight: 500; }
/* Bouton « INSERT COIN » : 5 pièces = le mode nuit */
.coin { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.coin__btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 16px 8px 10px;
  background: var(--ink); color: var(--yellow); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--white);
  font: 400 11px/1.6 var(--px); cursor: pointer;
  transition: transform .12s var(--ease-out), box-shadow .12s var(--ease-out);
}
.coin__btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--white); }
.coin__btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--white); }
.coin__slot { position: relative; width: 26px; height: 30px; border: 2px solid var(--yellow); display: grid; place-items: center; overflow: hidden; }
.coin__slot::after { content: ''; width: 4px; height: 18px; background: var(--yellow); }
.coin__slot.is-fed::after { animation: slot-flash .35s ease-out; }
@keyframes slot-flash { 0% { background: var(--white); box-shadow: 0 0 8px var(--white); } 100% { background: var(--yellow); box-shadow: none; } }
.coin__piece { position: absolute; left: 50%; top: -16px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--yellow); box-shadow: inset -3px -3px 0 #C99A00; opacity: 0; }
.coin__credits { color: var(--white); font-size: 9px; padding-left: 12px; border-left: 2px solid #3A3A3A; }
.coin__credits.is-bump { animation: bump .3s var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.35); color: var(--mint); } }
.coin__help { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; font-size: 13px; font-weight: 500; }
.keys { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.key {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px;
  font: 700 11px/1 var(--font); color: var(--ink); background: var(--white);
  border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink);
}
.key__arrow--d { rotate: 180deg; }
.key__arrow--l { rotate: -90deg; }
.key__arrow--r { rotate: 90deg; }
@media (max-width: 640px) {
  .coin { align-items: flex-start; }
  .coin__help { justify-content: flex-start; }
}

/* ---------- Le zombie qui marche ---------- */
.walker { position: fixed; left: 0; bottom: 10px; z-index: 90; width: 48px; height: 64px; pointer-events: none; will-change: transform; }
.walker__f { position: absolute; inset: 0; width: 48px; height: 64px; image-rendering: pixelated; filter: drop-shadow(3px 3px 0 rgba(0,0,0,.5)); }
.walker__f--b { opacity: 0; }
.walker.is-step .walker__f--a { opacity: 0; }
.walker.is-step .walker__f--b { opacity: 1; }
.walker.is-left { scale: -1 1; }
.reduce-motion .walker, html:not(.js) .walker { display: none; }
@media (max-width: 640px) {
  .walker { width: 36px; height: 48px; opacity: 0; transition: opacity .3s; }
  .walker.is-moving { opacity: 1; }
  .walker__f { width: 36px; height: 48px; }
  /* Navigation compacte sur téléphone : une ligne de liens qui défile si besoin */
  .nav__inner { padding-block: 10px; gap: 4px; }
  .brand { font-size: 18px; }
  .brand__mark { width: 34px; height: 34px; font-size: 10px; }
  nav[aria-label] { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .nav__links { flex-wrap: nowrap; gap: 0 18px; font-size: 15px; white-space: nowrap; }
  .nav__links a { padding: 8px 0; }
}

/* ---------- Mode nuit (easter egg) ---------- */
.night {
  --x: 50vw; --y: 50vh;
  position: fixed; inset: 0; z-index: 150; pointer-events: none; opacity: 0; visibility: hidden;
  background: radial-gradient(circle 170px at var(--x) var(--y), transparent 0, rgba(5, 3, 20, .55) 55%, rgba(5, 3, 20, .94) 100%);
  transition: opacity .6s ease, visibility .6s;
}
.night.is-on { opacity: 1; visibility: visible; pointer-events: auto; }
.night__msg { position: absolute; top: 64px; left: 0; right: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 0 16px; }
.night__msg .px { color: var(--coral); text-shadow: 3px 3px 0 var(--ink); font-size: clamp(11px, 2vw, 14px); }
.night__sub { color: var(--lavender); font-size: 15px; }
.night__sub .px { color: var(--yellow); font-size: 11px; }
.night__close { margin-top: 8px; min-height: 44px; font-size: 15px; }
.night__horde img { cursor: crosshair; }
.night__horde img { position: absolute; width: 48px; height: 64px; image-rendering: pixelated; filter: drop-shadow(0 0 6px rgba(255, 77, 77, .6)); }

/* ---------- Styles de départ des animations (seulement si JS + animations autorisées) ---------- */
.js:not(.reduce-motion) [data-anim] { visibility: hidden; }
.js:not(.reduce-motion) .lvl,
.js:not(.reduce-motion) .shot,
.js:not(.reduce-motion) #heroTitle { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
