:root {
  --night: #0a0614;
  --night-soft: #130a22;
  --violet: #2a1440;
  --violet-light: #4a2670;
  --magenta: #ff5cb8;
  --magenta-deep: #b82e7e;
  --grass: #7fbf3f;
  --lantern: #ffb05c;
  --bone: #e8dfd0;
  --bone-dim: #a89e91;
  --stone: #6d6478;
  --text-dim: #a99fbd;
  --text-faint: #6f6689;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --font-pixel: "Press Start 2P", monospace;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

/* Les classes ci-dessous posent display:grid/flex : sans ça, [hidden] est ignoré. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-pixel);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

kbd {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  background: rgba(0, 0, 0, 0.4);
  font-family: var(--font-pixel);
  font-size: 0.62rem;
  line-height: 1.5;
}

/* ---------------------------------------------------------------- nav ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(10, 6, 20, 0.95), rgba(10, 6, 20, 0));
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}

.nav__dim {
  color: var(--magenta);
}

.nav__links {
  display: flex;
  gap: 26px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.nav__links a:hover {
  color: var(--bone);
}

.nav__actions,
.locale-switch {
  display: flex;
  align-items: center;
}

.nav__actions {
  gap: 12px;
}

.locale-switch {
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: rgba(10, 6, 20, 0.78);
}

.locale-switch__btn {
  padding: 6px 7px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-pixel);
  font-size: 0.48rem;
  cursor: pointer;
}

.locale-switch__btn:hover,
.locale-switch__btn.is-active {
  background: var(--magenta);
  color: #14060f;
}

/* ------------------------------------------------------------ buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  line-height: 1.4;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn--sm {
  padding: 9px 14px;
  font-size: 0.6rem;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--magenta);
  color: #2a0a1c;
  box-shadow: 0 4px 0 var(--magenta-deep), 0 14px 30px -12px var(--magenta);
}

.btn--primary:hover:not(:disabled) {
  box-shadow: 0 6px 0 var(--magenta-deep), 0 20px 40px -12px var(--magenta);
}

.btn--ghost {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--bone);
  backdrop-filter: blur(8px);
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

/* -------------------------------------------------------------- stage ---- */

.stage {
  position: relative;
  height: min(86vh, 760px);
  min-height: 460px;
  overflow: hidden;
  border-bottom: 2px solid rgba(0, 0, 0, 0.6);
}

.stage__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  touch-action: pan-y;
}

.stage__label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: rgba(10, 6, 20, 0.85);
  color: var(--bone);
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  white-space: nowrap;
  pointer-events: none;
  will-change: transform;
}

/* Pastille plantée dans le décor : confirmer avant de sauter à l'autre bout de l'allée. */
.stage__jump {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  padding: 8px 12px;
  border: 2px solid var(--magenta);
  border-radius: 0;
  background: rgba(10, 6, 20, 0.92);
  box-shadow: 0 0 0 2px rgba(10, 6, 20, 0.92), 0 0 18px rgba(255, 61, 168, 0.35);
  color: var(--bone);
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  animation: jump-pop 0.16s steps(2) both;
  will-change: transform;
}

.stage__jump::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 2px;
  height: var(--jump-tail, 22px);
  background: linear-gradient(180deg, var(--magenta), rgba(255, 61, 168, 0.25));
  transform: translateX(-50%);
}

.stage__jump:hover,
.stage__jump:focus-visible {
  background: var(--magenta);
  color: #14060f;
}

@keyframes jump-pop {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.stage__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(70px, 12vh, 120px) clamp(16px, 4vw, 48px) clamp(16px, 3vw, 32px);
  pointer-events: none;
}

.stage__overlay a,
.stage__overlay button,
.stage__overlay label,
.stage__overlay input,
.stage__overlay canvas {
  pointer-events: auto;
}

.stage__intro {
  max-width: 460px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* En balade : l'accroche et la barre disparaissent, le HUD reste lisible. */
body.is-roaming .stage__intro,
body.is-roaming .nav {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

body.is-roaming .stage__hud {
  opacity: 0.42;
}

/* Viser une pastille ou la minimap la rend nette sans devoir s'arrêter. */
body.is-roaming .stage__hud:hover,
body.is-roaming .stage__hud:focus-within {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .stage__intro,
  .stage__hud,
  .nav {
    transition: none;
  }
}

.kicker {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  color: var(--magenta);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.8);
}

.stage__title {
  margin-top: 16px;
  font-size: clamp(1.35rem, 3.6vw, 2.4rem);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.85), 0 0 34px rgba(255, 92, 184, 0.35);
}

.stage__sub {
  margin-top: 16px;
  max-width: 380px;
  color: var(--text-dim);
  font-size: 0.95rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.stage__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.stage__hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: 0.78rem;
  color: var(--text-dim);
  transition: opacity 0.4s ease;
}

/* Le quartier courant : une pastille comme les autres, pas une bannière. */
.hud__zone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.hud__zone-code {
  color: var(--magenta);
  letter-spacing: 0.06em;
}

.hud__zone-name {
  max-width: 220px;
  overflow: hidden;
  color: var(--bone);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hud__zone-alley {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(143, 245, 216, 0.16);
  color: var(--grass);
  font-size: 0.5rem;
}

.hud__item {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10, 6, 20, 0.7);
  backdrop-filter: blur(6px);
}

.hud__item b {
  color: var(--grass);
  font-family: var(--font-pixel);
  font-size: 0.7rem;
}

.hud__keys {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hud__pseudo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 8px 5px 12px;
  border-color: var(--border-strong);
  cursor: text;
  transition: border-color 0.18s ease;
}

.hud__pseudo:focus-within {
  border-color: var(--magenta);
}

.hud__pseudo-label {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.hud__pseudo-input {
  width: 108px;
  padding: 3px 6px;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--magenta);
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  outline: none;
}

.hud__pseudo-input::placeholder {
  color: var(--text-faint);
}

.hud__btn {
  border-color: var(--magenta);
  color: var(--bone);
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}

.hud__btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 92, 184, 0.22);
}

.minimap-wrap {
  position: relative;
  flex: 1 1 100%;
  width: 100%;
}

.minimap {
  display: block;
  width: 100%;
  height: 36px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #120818;
  image-rendering: pixelated;
  cursor: grab;
  touch-action: none;
  transition: border-color 0.18s ease;
}

.minimap.is-inspecting {
  border-color: var(--magenta);
}

.minimap.is-dragging {
  cursor: grabbing;
}

.minimap-recenter {
  position: absolute;
  right: 6px;
  top: 50%;
  translate: 0 -50%;
  padding: 5px 8px;
  border: 1px solid var(--magenta);
  border-radius: 999px;
  background: rgba(13, 7, 24, 0.92);
  color: var(--bone);
  font-family: var(--font-pixel);
  font-size: 0.42rem;
  cursor: pointer;
}

.minimap-recenter:hover {
  background: var(--magenta);
  color: #2a0a1c;
}

.directory-toolbar {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.directory-search {
  max-width: 420px;
}

.directory-count {
  margin-bottom: 14px;
  color: var(--text-faint);
  font-family: var(--font-pixel);
  font-size: 0.5rem;
}

.pilgrim.is-active {
  border-color: var(--magenta);
  background: rgba(255, 92, 184, 0.12);
}

.pilgrim-panel {
  position: absolute;
  right: clamp(16px, 4vw, 48px);
  bottom: 82px;
  z-index: 4;
  width: min(420px, calc(100% - 32px));
  max-height: min(520px, 74%);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: rgba(13, 7, 24, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(12px);
}

.pilgrim-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.pilgrim-panel__head h2 {
  margin-top: 8px;
  font-size: 0.9rem;
}

.pilgrim-panel__intro {
  margin-top: 10px;
  color: var(--text-faint);
  font-size: 0.78rem;
}

.pilgrim-panel__close {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--bone);
  font-size: 1rem;
}

.pilgrim-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.pilgrim {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 14px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-dim);
  text-align: left;
}

.pilgrim:hover {
  border-color: var(--magenta);
  background: rgba(255, 92, 184, 0.1);
}

.pilgrim__name {
  overflow: hidden;
  color: var(--bone);
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pilgrim__offering {
  grid-column: 1;
  color: var(--magenta);
  font-size: 0.73rem;
}

.pilgrim__date {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--text-faint);
  font-size: 0.7rem;
}

/* Le hub est le seul endroit qui explique les quartiers : ici, on peut lire. */
.zone-hub-list {
  display: grid;
  /* Sans ça, une carte pleine d'allées élargit sa colonne au lieu de défiler. */
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.zone-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.zone-card.is-active {
  border-color: var(--magenta);
  background: rgba(255, 92, 184, 0.1);
}

.zone-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.zone-card__code {
  padding: 6px 7px;
  border: 1px solid var(--magenta-deep);
  border-radius: 7px;
  background: rgba(255, 92, 184, 0.14);
  color: var(--magenta);
  font-family: var(--font-pixel);
  font-size: 0.62rem;
}

.zone-card__title {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.zone-card__title strong {
  color: var(--bone);
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  font-weight: 400;
}

.zone-card__meta {
  color: var(--text-faint);
  font-size: 0.72rem;
}

.zone-card__go {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--magenta);
  border-radius: 999px;
  color: var(--bone);
  font-family: var(--font-pixel);
  font-size: 0.45rem;
}

.zone-card__head:hover .zone-card__go {
  background: rgba(255, 92, 184, 0.24);
}

.zone-card__pitch {
  margin-top: 9px;
  color: var(--bone-dim);
  font-size: 0.8rem;
}

.zone-card__hint {
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 0.75rem;
  line-height: 1.55;
}

.alley-nav {
  min-width: 0;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

/* Une seule ligne qui défile : trois cents allées ne repoussent pas la carte. */
.alley-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--magenta-deep) transparent;
}

.alley-row:focus-visible {
  outline: 1px solid var(--magenta);
  outline-offset: 3px;
}

.alley-row::-webkit-scrollbar {
  height: 6px;
}

.alley-row::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.alley-row::-webkit-scrollbar-thumb {
  background: var(--magenta-deep);
  border-radius: 999px;
}

.alley-jump {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.alley-jump__label {
  color: var(--text-faint);
  font-size: 0.72rem;
}

.alley-jump__input {
  width: 88px;
  padding: 5px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--bone);
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  outline: none;
}

.alley-jump__input:focus {
  border-color: var(--magenta);
}

.alley-jump__btn {
  padding: 6px 9px;
  border: 1px solid var(--magenta);
  border-radius: 999px;
  background: rgba(255, 92, 184, 0.14);
  color: var(--bone);
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  cursor: pointer;
}

.alley-jump__btn:hover {
  background: rgba(255, 92, 184, 0.3);
}

.alley-chip {
  display: inline-flex;
  flex: 0 0 auto;
  scroll-snap-align: center;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-dim);
  font-size: 0.7rem;
  cursor: pointer;
}

.alley-chip b {
  color: var(--grass);
  font-family: var(--font-pixel);
  font-size: 0.55rem;
}

.alley-chip:hover {
  border-color: var(--grass);
}

.alley-chip.is-full {
  border-color: rgba(255, 176, 92, 0.55);
}

.alley-chip.is-full b {
  color: var(--lantern);
}

/* « Tu es ici » doit rester visible même sur une allée pleine : règle en dernier. */
.alley-chip.is-active {
  border-color: var(--magenta);
  background: rgba(255, 92, 184, 0.16);
  color: var(--bone);
}

.alley-chip--next {
  border-style: dashed;
  color: var(--text-faint);
  cursor: default;
}

.alley-chip--next b {
  color: var(--text-faint);
}

.stage__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 45%, transparent 40%, rgba(5, 2, 10, 0.75) 100%),
    linear-gradient(100deg, rgba(6, 3, 14, 0.78) 0%, rgba(6, 3, 14, 0.3) 30%, transparent 52%);
}

/* ----------------------------------------------------------- sections ---- */

.section {
  width: min(1080px, 100% - 40px);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 110px) 0;
}

.section__head {
  max-width: 660px;
  margin-bottom: 44px;
}

.section__head h2 {
  font-size: clamp(1.05rem, 2.4vw, 1.6rem);
  line-height: 1.5;
}

.section__head p {
  margin-top: 18px;
  color: var(--text-dim);
}

/* -------------------------------------------------------------- steps ---- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(74, 38, 112, 0.28), rgba(255, 255, 255, 0.02));
}

.step__num {
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--magenta);
}

.step h3 {
  margin-top: 14px;
  font-size: 0.82rem;
}

.step p {
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.quote {
  margin: 40px 0 0;
  padding: 22px 26px;
  border-left: 4px solid var(--magenta);
  background: rgba(255, 92, 184, 0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  line-height: 1.9;
}

/* -------------------------------------------------------------- plots ---- */

.plots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.plot {
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.plot:hover {
  transform: translateY(-4px);
  border-color: var(--magenta);
  background: rgba(255, 92, 184, 0.08);
}

.plot__art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 104px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(42, 20, 64, 0.9), rgba(20, 10, 34, 0.9));
  border: 1px solid var(--border);
  overflow: hidden;
}

.plot__art img {
  image-rendering: pixelated;
  transform-origin: bottom center;
  filter: drop-shadow(0 0 12px rgba(255, 92, 184, 0.25));
}

.plot__price {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: var(--grass);
}

.plot__name {
  margin-top: 10px;
  font-size: 0.75rem;
}

.plot__pitch {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 0.86rem;
  min-height: 46px;
}

.plot__perks {
  margin: 14px 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  font-size: 0.84rem;
  color: var(--text-dim);
}

.plot__perks li::before {
  content: "† ";
  color: var(--magenta);
}

.plot__btn {
  margin-top: auto;
  width: 100%;
}

/* --------------------------------------------------------------- form ---- */

/* Un seul rythme vertical pour tout le formulaire, au lieu de marges au cas par cas. */
.form {
  display: grid;
  gap: clamp(22px, 3vw, 32px);
  padding: clamp(22px, 3.4vw, 38px);
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: linear-gradient(160deg, rgba(74, 38, 112, 0.25), rgba(255, 255, 255, 0.02));
}

/* Choisir un quartier puis une offre, ce sont deux décisions : on les sépare.
   Le trait porte sur un conteneur, sinon le `<legend>` du fieldset s'y plante. */
.form__block {
  padding-top: clamp(20px, 2.6vw, 28px);
  border-top: 1px solid var(--border-strong);
}

.form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 18px;
}

.field {
  display: block;
  flex: 1 1 220px;
}

.field--narrow {
  flex: 0 1 130px;
}

.field__label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.field__input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(6, 3, 12, 0.7);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.field__input:focus {
  border-color: var(--magenta);
}

.tiers {
  margin: 0;
  padding: 0;
  border: none;
}

.tiers__options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tier-option {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-dim);
  font-size: 0.84rem;
  transition: all 0.18s ease;
}

.tier-option:hover {
  color: var(--bone);
  border-color: var(--magenta);
}

.tiers__help {
  max-width: 62ch;
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 0.84rem;
  line-height: 1.6;
}

/* L'aide vient après les pastilles dans « Offre » : elle a besoin d'air au-dessus. */
.tiers__options + .tiers__help {
  margin-top: 12px;
}

.zone-option {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.zone-option__code {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
}

.zone-option__name {
  font-size: 0.82rem;
}

/* Infobulle rétro : bordure franche, ombre décalée, aucune rondeur. */
.zone-tip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  z-index: 5;
  display: none;
  width: max-content;
  max-width: 300px;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  transform: translateX(-50%);
  border: 2px solid var(--magenta);
  background: #16081f;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.85);
  color: var(--bone);
  text-align: left;
  white-space: normal;
  pointer-events: none;
}

.zone-option:hover .zone-tip,
.zone-option:focus-visible .zone-tip {
  display: flex;
}

.zone-tip__head {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--magenta);
}

.zone-tip__pitch {
  font-size: 0.82rem;
  color: var(--bone);
}

.zone-tip__hint {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.zone-hint {
  margin: 16px 0 0;
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--magenta-deep);
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.6;
}

.tier-option.is-active {
  background: var(--magenta);
  border-color: var(--magenta);
  color: #2a0a1c;
  font-weight: 600;
}

/* Offre + monument à gauche, la pierre choisie à droite. */
.offer-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 30px);
  align-items: stretch;
}

.offer-row__fields {
  display: grid;
  align-content: start;
  gap: clamp(20px, 2.6vw, 28px);
  flex: 1 1 320px;
  min-width: 0;
}

.tier-option--asset {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 8px;
}

.tier-option__sprite {
  width: 30px;
  height: 32px;
  object-fit: contain;
  object-position: bottom center;
  image-rendering: pixelated;
}

.stone-preview {
  flex: 0 1 210px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.stone-preview__art {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 118px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(42, 20, 64, 0.9), rgba(20, 10, 34, 0.9));
  overflow: hidden;
}

.stone-preview__art img {
  image-rendering: pixelated;
  transform-origin: bottom center;
  filter: drop-shadow(0 0 12px rgba(255, 92, 184, 0.25));
}

.stone-preview__caption {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.stone-preview__caption strong {
  font-family: var(--font-pixel);
  font-size: 0.58rem;
  color: var(--grass);
}

.stone-preview__caption span {
  font-size: 0.8rem;
  color: var(--text-faint);
}

.legal-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.legal-consent input {
  width: 16px;
  height: 16px;
  margin: 4px 0 0;
  accent-color: var(--magenta);
}

.legal-consent a {
  color: var(--bone);
  text-decoration: underline;
  text-decoration-color: var(--magenta);
  text-underline-offset: 3px;
}

.form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding-top: clamp(20px, 2.6vw, 28px);
  border-top: 1px solid var(--border);
}

.form__note {
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* ------------------------------------------------------------- recent ---- */

.recent {
  display: grid;
  gap: 8px;
}

.burial {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto 2fr auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--bone);
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.burial:hover {
  transform: translateX(4px);
  border-color: var(--magenta);
  background: rgba(255, 92, 184, 0.08);
}

.burial__name {
  font-family: var(--font-pixel);
  font-size: 0.66rem;
}

/* Le statut vit dans la cellule du nom, sinon il ajouterait une 5ᵉ colonne. */
.burial__status {
  margin-left: 10px;
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.42rem;
  vertical-align: middle;
  color: var(--lantern);
}

.burial__status[data-status="private"] {
  color: var(--text-dim);
}

.burial__status[data-status="rejected"] {
  color: var(--magenta);
}

.burial__dates {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--text-faint);
}

.burial__epitaph {
  color: var(--text-dim);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.burial__plot {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-faint);
  white-space: nowrap;
}

/* -------------------------------------------------------------- pager ---- */

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
}

.pager--top {
  margin-top: 0;
  margin-bottom: 14px;
}

.pager__page {
  min-width: 34px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  transition: all 0.18s ease;
}

.pager__page:hover:not(:disabled) {
  color: var(--bone);
  border-color: var(--magenta);
}

.pager__page.is-active {
  background: var(--magenta);
  border-color: var(--magenta);
  color: #2a0a1c;
}

.pager__page:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pager__gap {
  padding: 0 2px;
  color: var(--text-faint);
  font-family: var(--font-pixel);
  font-size: 0.5rem;
}

/* -------------------------------------------------------------- modal ---- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 8, 0.82);
  backdrop-filter: blur(6px);
  animation: fade 0.2s ease both;
}

.tomb {
  position: relative;
  width: min(440px, 100%);
  min-width: 0;
  max-height: 88vh;
  overflow-y: auto;
  padding: 46px 34px 28px;
  text-align: center;
  border: 2px solid #5d5569;
  border-radius: 190px 190px 14px 14px;
  /* Granit clair : le texte gravé est sombre, il lui faut un fond pâle. */
  background: linear-gradient(180deg, #cfc8d8 0%, #b9b1c6 46%, #a49bb4 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.5), inset 0 -6px 24px rgba(0, 0, 0, 0.28),
    0 40px 80px -20px #000;
  animation: rise 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
}

.tomb__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: rgba(20, 16, 26, 0.55);
  color: var(--bone);
  font-size: 1.2rem;
  line-height: 1;
}

.tomb__close:hover {
  background: rgba(20, 16, 26, 0.8);
}

.tomb__rip,
.tomb__name,
.tomb__dates,
.tomb__cause,
.tomb__epitaph {
  color: #14101a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.tomb__rip {
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  letter-spacing: 0.22em;
}

.tomb__name {
  margin-top: 18px;
  font-size: 0.95rem;
  line-height: 1.6;
  word-break: break-word;
}

.tomb__dates {
  margin-top: 10px;
  font-family: var(--font-pixel);
  font-size: 0.62rem;
}

.tomb__divider {
  width: 60px;
  height: 3px;
  margin: 20px auto;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.tomb__label {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  color: rgba(18, 14, 24, 0.92);
  margin-top: 18px;
}

.tomb__cause {
  margin-top: 6px;
  font-size: 0.95rem;
  font-weight: 600;
}

.tomb__epitaph {
  margin-top: 6px;
  font-size: 0.95rem;
  font-style: italic;
}

.tomb__author {
  margin-top: 18px;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: rgba(18, 14, 24, 0.88);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.tomb-owner {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(24, 19, 30, 0.34);
  border-radius: 12px;
  background: rgba(20, 16, 26, 0.09);
}

.tomb-owner__head,
.tomb-owner__actions,
.grave-edit__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tomb-owner__head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.tomb-owner__head .tomb__label {
  margin: 0;
}

.tomb-status {
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-pixel);
  font-size: 0.45rem;
  color: #7b5519;
  background: rgba(255, 176, 92, 0.18);
}

.tomb-status[data-status="public"] {
  color: #215f48;
  background: rgba(127, 191, 63, 0.18);
}

.tomb-status[data-status="private"] {
  color: #54476b;
  background: rgba(109, 100, 120, 0.18);
}

.tomb-status[data-status="rejected"] {
  color: #8a284c;
  background: rgba(255, 92, 184, 0.14);
}

.tomb-owner .btn--danger {
  border-color: rgba(138, 40, 76, 0.55);
  background: rgba(138, 40, 76, 0.12);
  color: #681b39;
}

.grave-edit {
  display: grid;
  gap: 12px;
}

.grave-edit .field__label {
  color: rgba(18, 14, 24, 0.72);
}

.grave-edit .field__input {
  border-color: rgba(18, 14, 24, 0.3);
  background: rgba(255, 255, 255, 0.48);
  color: #18131e;
}

.tomb__offerings {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid rgba(24, 19, 30, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
}

.tomb__offerings .tomb__label {
  margin-top: 0;
}

.tomb__offer-counts {
  margin-top: 8px;
  color: rgba(18, 14, 24, 0.9);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
}

.offering-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.offering-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 4px 7px;
  border: 1px solid rgba(24, 19, 30, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  color: #14101a;
  font-size: 0.7rem;
  font-weight: 600;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.offering-option:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.72);
}

.offering-option.is-mine {
  border-color: #7b174d;
  background: rgba(255, 92, 184, 0.42);
  box-shadow: inset 0 0 0 1px rgba(123, 23, 77, 0.4);
}

.offering-option kbd {
  padding: 2px 4px;
  border: 1px solid rgba(24, 19, 30, 0.34);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.5);
  color: #14101a;
  font-size: 0.52rem;
}

.offering-option__pixel {
  position: relative;
  display: block;
  width: 10px;
  height: 12px;
  image-rendering: pixelated;
}

.offering-option__pixel--flower {
  background: linear-gradient(90deg, transparent 4px, #477d35 4px 6px, transparent 6px);
  box-shadow: -3px 0 0 #ff5cb8, 3px 0 0 #ff8fca, 0 -3px 0 #f4c3dc;
}

.offering-option__pixel--candle {
  height: 11px;
  border-top: 3px solid #ffad4d;
  background: linear-gradient(90deg, transparent 3px, #eee0c8 3px 7px, transparent 7px);
}

.offering-option__pixel--coin {
  width: 10px;
  height: 10px;
  border: 2px solid #9b702b;
  border-radius: 50%;
  background: #e6c35c;
}

.offering-option__pixel--stone {
  width: 11px;
  height: 8px;
  margin-top: 3px;
  border-radius: 5px 5px 2px 2px;
  background: #5b5368;
  box-shadow: inset 2px 2px 0 #8b819a;
}

.tomb__offer-last {
  margin-top: 11px;
  color: rgba(18, 14, 24, 0.86);
  font-size: 0.73rem;
  font-style: italic;
}

.tomb__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(0, 0, 0, 0.28);
}

/* L'adresse pousse les deux actions ensemble à droite plutôt que de les écarter. */
.tomb__plot {
  flex: 1;
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: rgba(18, 14, 24, 0.9);
}

.tomb__foot .btn--ghost {
  border-color: rgba(0, 0, 0, 0.5);
  background: rgba(20, 16, 26, 0.88);
  color: #f2ece2;
}

/* ------------------------------------------------------------- footer ---- */

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  width: min(1080px, 100% - 40px);
  margin: 0 auto;
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-faint);
}

.footer__credit {
  margin-top: 6px;
}

.footer__credit a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__legal {
  display: flex;
  gap: 14px;
  margin-top: 12px;
}

.footer__legal a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* -------------------------------------------------------------- toast ---- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 90;
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(19, 10, 34, 0.96);
  font-size: 0.86rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------- responsive ---- */

@media (max-width: 820px) {
  .nav__links {
    display: none;
  }

  .stage {
    height: min(78vh, 620px);
  }

  .stage__sub {
    display: none;
  }

  .hud__keys {
    display: none;
  }

  .burial {
    grid-template-columns: 1fr auto;
    row-gap: 6px;
  }

  .burial__epitaph {
    grid-column: 1 / -1;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .nav__actions {
    gap: 6px;
  }

  .nav__actions > .btn {
    display: none;
  }

  .modal {
    padding: 12px;
  }

  .tomb {
    width: calc(100vw - 24px);
    padding: 46px 20px 24px;
  }

  .offering-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tomb__foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .hud__zone-name {
    max-width: 92px;
  }

  /* Pas de survol au doigt : l'infobulle laisse la place à #zone-hint. */
  .zone-tip {
    display: none !important;
  }

  .zone-option__name {
    display: none;
  }
}

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