/* Page d'accueil (client/index.html) : HTML classique, sans canvas. Le jeu est dans jeu.html.
   Couleurs et polices reprises de style.css, pour garder la même ambiance. */
:root {
  --night: #17110c;
  --night-2: #241a11;
  --parch: #f1e2bf;
  --parch-d: #d9c393;
  --ink: #3a2412;
  --wood: #5a3a1e;
  --gold: #f2c14e;
  --blood: #c0392b;
  --black: "Jacquarda Bastarda 9", Georgia, serif;
  --pix: "Pixelify Sans", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--parch);
  font-family: var(--pix);
  font-size: 17px;
  line-height: 1.5;
}

/* ---------- en-tête ---------- */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 48px 16px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 110%, rgba(192, 57, 43, .45), transparent 60%),
    radial-gradient(ellipse at 50% 0%, var(--night-2), var(--night) 70%);
}
.kicker { margin: 0; color: var(--parch-d); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
h1 {
  margin: 0;
  font-family: var(--black);
  font-weight: 400;
  font-size: clamp(56px, 13vw, 128px);
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 4px 0 var(--wood), 0 12px 32px rgba(0, 0, 0, .6);
}
.tagline { margin: 0; max-width: 34em; font-size: clamp(17px, 2.4vw, 22px); }
.hint { margin: 0; color: var(--parch-d); font-size: 14px; }

.enter {
  display: inline-block;
  margin-top: 12px;
  padding: 16px 28px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--pix);
  font-weight: 600;
  font-size: 20px;
  text-decoration: none;
  box-shadow: 0 6px 0 var(--wood);
  transition: transform .12s, box-shadow .12s;
}
.enter:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--wood); }
.enter:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--wood); }
.enter:focus-visible { outline: 3px solid var(--parch); outline-offset: 4px; }
.enter.small { font-size: 17px; padding: 12px 22px; }

/* ---------- sections ---------- */
.band { max-width: 1080px; margin: 0 auto; padding: 56px 16px; }
h2 {
  margin: 0 0 28px;
  font-family: var(--black);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 52px);
  color: var(--gold);
  text-align: center;
}

.heroes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.card {
  background: var(--parch);
  color: var(--ink);
  border: 3px solid var(--wood);
  border-radius: 8px;
  padding: 0 14px 16px;
  text-align: center;
  overflow: hidden;
}
.card img {
  display: block;
  width: calc(100% + 28px);
  margin: 0 -14px 10px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 0;
  background: linear-gradient(var(--night-2), var(--wood));
}
.card h3 { margin: 0 0 6px; font-family: var(--black); font-weight: 400; font-size: 26px; }
.card p { margin: 0; font-size: 15px; }

.quest { text-align: center; }
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0 auto;
  padding: 0;
  max-width: 720px;
  display: grid;
  gap: 14px;
  text-align: left;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 16px 14px 60px;
  border: 2px solid var(--wood);
  border-radius: 8px;
  background: var(--night-2);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blood);
  color: var(--parch);
  font-weight: 600;
}
.steps b, .threats b { color: var(--gold); font-weight: 600; }
.threats { max-width: 720px; margin: 22px auto 0; color: var(--parch-d); }

.keys {
  margin: 0 auto 28px;
  max-width: 720px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.keys div { padding: 10px 12px; border: 2px solid var(--wood); border-radius: 8px; background: var(--night-2); }
.keys dt { margin: 0 0 4px; }
.keys dd { margin: 0; color: var(--parch-d); font-size: 15px; }
kbd {
  display: inline-block;
  padding: 1px 7px;
  border: 2px solid var(--parch-d);
  border-bottom-width: 4px;
  border-radius: 4px;
  font-family: var(--pix);
  font-size: 14px;
}
#t-commandes ~ .enter { display: table; margin: 0 auto; }

footer { padding: 32px 16px 40px; text-align: center; color: var(--parch-d); font-size: 14px; }

/* ---------- petits écrans ---------- */
@media (max-width: 860px) {
  .heroes { grid-template-columns: repeat(2, 1fr); }
  .keys { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero { min-height: 86vh; }
  .enter { padding: 14px 20px; font-size: 18px; }
  .band { padding: 40px 16px; }
  .heroes { gap: 12px; }
  .card h3 { font-size: 22px; }
  .card p { font-size: 14px; }
  .keys { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .enter { transition: none; }
}
