/* Couleurs du logo (ludo_forge/src/faux_pas.rs : INK, PAPER, RED). */
:root {
  --ink: #221f1f;
  --paper: #f8f2e2;
  --paper-dark: #ece3cc;
  --red: #d62c28;
  --muted: #5d5650;
  --gutter: 16px;
}

@font-face {
  font-family: "Luckiest Guy";
  src: url("../fonts/LuckiestGuy-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Special Elite";
  src: url("../fonts/SpecialElite-Regular.ttf") format("truetype");
  font-display: swap;
}

html[lang="fr"] body [lang="en"],
html[lang="en"] body [lang="fr"] {
  display: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.55), transparent 45%),
    var(--paper);
  font: 18px/1.6 "Special Elite", "Courier New", monospace;
  overflow-x: hidden;
}

a {
  color: var(--red);
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1,
h2,
h3 {
  font-family: "Luckiest Guy", Impact, sans-serif;
  font-weight: normal;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin: 0 0 0.6em;
}

/* Titre souligné comme « GAMES » : un trait rouge de chaque côté. */
h2.ruled {
  display: flex;
  align-items: center;
  gap: 0.5em;
  text-align: center;
  justify-content: center;
}

h2.ruled span {
  white-space: nowrap;
}

h2.ruled::before,
h2.ruled::after {
  content: "";
  flex: 0 1 3em;
  min-width: 0.6em;
  height: 0.16em;
  background: var(--red);
}

/* En-tête */

.top {
  padding: 14px 0;
}

.top .wrap {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.lang-switch button {
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  background: none;
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 2px 10px;
  cursor: pointer;
}

html[lang="fr"] .lang-switch [data-set-lang="fr"],
html[lang="en"] .lang-switch [data-set-lang="en"] {
  background: var(--ink);
  color: var(--paper);
}

/* Logo et piste de pas */

.hero {
  text-align: center;
  padding: 24px 0 56px;
}

.hero h1 {
  margin: 0 auto;
  max-width: 720px;
}

.hero h1 img {
  display: block;
  width: 100%;
  height: auto;
}

.tagline {
  max-width: 34em;
  margin: 28px auto 0;
  font-size: 1.15rem;
}

.steps {
  position: relative;
  height: 120px;
  margin: 0 auto;
  max-width: 520px;
}

.steps img {
  position: absolute;
  width: 26px;
  opacity: 0;
  animation: step 0.4s ease-out forwards;
}

.steps img:nth-child(1) { left: 6%; top: 70px; transform: rotate(78deg); animation-delay: 0.3s; }
.steps img:nth-child(2) { left: 22%; top: 40px; transform: rotate(78deg) scaleX(-1); animation-delay: 0.7s; }
.steps img:nth-child(3) { left: 38%; top: 66px; transform: rotate(78deg); animation-delay: 1.1s; }
.steps img:nth-child(4) { left: 54%; top: 36px; transform: rotate(78deg) scaleX(-1); animation-delay: 1.5s; }
/* Le faux pas : le dernier glisse et part de travers. */
.steps img:nth-child(5) { left: 72%; top: 46px; transform: rotate(150deg); animation: slip 0.6s ease-out 1.9s forwards; }

@keyframes step {
  from { opacity: 0; }
  to { opacity: 0.85; }
}

@keyframes slip {
  0% { opacity: 0; translate: -30px 10px; }
  40% { opacity: 0.85; }
  100% { opacity: 0.85; translate: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .steps img,
  .steps img:nth-child(5) {
    animation: none;
    opacity: 0.85;
  }
}

/* Sections */

section {
  padding: 48px 0;
}

section.band {
  background: var(--paper-dark);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
}

.game {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px 32px;
  align-items: center;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 8px 8px 0 var(--ink);
  padding: 28px;
}

.game .banner {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  height: auto;
}

.game .general {
  width: 112px;
  height: auto;
  image-rendering: auto;
}

.game p {
  margin: 0 0 1em;
}

.btn {
  display: inline-block;
  font-family: "Luckiest Guy", Impact, sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--paper);
  background: var(--red);
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 10px 20px 6px;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s;
}

.btn:hover,
.btn:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.note {
  margin-top: 0.8em;
  color: var(--muted);
  font-size: 0.95rem;
}

.studio {
  max-width: 40em;
  margin: 0 auto;
}

.contact {
  text-align: center;
}

.contact .mail {
  font-size: 1.25rem;
}

/* Pied de page */

footer {
  border-top: 3px solid var(--ink);
  padding: 24px 0 32px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

footer a {
  color: inherit;
}

/* Mentions légales */

.legal {
  max-width: 44em;
  margin: 0 auto;
  padding-bottom: 48px;
}

.legal h1 {
  font-size: clamp(2rem, 7vw, 3.2rem);
  margin: 0 0 0.8em;
}

.legal h2 {
  font-size: 1.6rem;
  margin: 1.6em 0 0.4em;
}

.legal .home img {
  width: 180px;
  height: auto;
  display: block;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .game {
    grid-template-columns: 1fr;
    padding: 20px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .game .general {
    display: none;
  }
}

/* Mention à remplir : web_sites/deploy.sh refuse d'envoyer une page qui en contient. */
.todo {
  background: #ffe066;
  padding: 0 4px;
}
