@font-face {
  font-family: "Chakra Petch";
  src: url(/fonts/chakra-petch-500-latin.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Chakra Petch";
  src: url(/fonts/chakra-petch-600-latin.woff2) format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url(/fonts/ibm-plex-sans-latin.woff2) format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url(/fonts/jetbrains-mono-latin.woff2) format("woff2");
  font-weight: 400 500;
  font-display: swap;
}

:root {
  --bg: #0a0b0d;
  --panel: #111317;
  --line: #23262d;
  --text: #e9e7e2;
  --muted: #959aa3;
  --amber: #ffb000;
  --display: "Chakra Petch", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 "IBM Plex Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--amber); color: var(--bg); }

a { color: var(--amber); text-underline-offset: 3px; }

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

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

/* En-tête */

header { border-bottom: 1px solid var(--line); }

header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

@media (min-width: 720px) {
  header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgb(10 11 13 / 0.88);
    backdrop-filter: blur(10px);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand img { width: 40px; height: auto; display: block; }

.word {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

.word small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--amber);
}

nav { display: flex; gap: 8px; }

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

nav a:hover, nav a[aria-current] { color: var(--text); }
nav a[aria-current] { border-bottom: 2px solid var(--amber); padding-top: 2px; }

/* Contenu */

main.wrap { padding-top: 56px; padding-bottom: 88px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; }

h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
  margin: 56px 0 14px;
}

h3 { font-size: 1.1rem; margin: 28px 0 6px; }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.muted { color: var(--muted); font-size: 0.95rem; }

.status {
  margin: -6px 0 18px;
  font: 500 14px/1.4 var(--mono);
  color: var(--amber);
}

.more { font-weight: 600; text-decoration: none; }
.more span { display: inline-block; transition: transform 0.15s ease; }
.more:hover span { transform: translateX(3px); }

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  margin-top: 12px;
  background: var(--amber);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: transform 0.15s ease;
}

.button:hover { transform: translateY(-1px); }
.button span { transition: transform 0.15s ease; }
.button:hover span { transform: translateX(3px); }

/* Accueil */

.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 24px 0 72px;
}

.hero-cat { width: 100%; max-width: 440px; height: auto; justify-self: end; overflow: visible; position: relative; z-index: 1; margin-bottom: -132px; }

/* Le chat cligne des yeux de temps en temps */
.lid { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); animation: blink 6s infinite 2s; }
@keyframes blink {
  0%, 94%, 100% { transform: scaleY(0); }
  96% { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) { .lid { animation: none; } }

.game {
  display: grid;
  grid-template-columns: minmax(0, 440px) 1fr;
  align-items: center;
  gap: 56px;
  padding: 72px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.game h2 { margin: 0 0 14px; font-size: clamp(2rem, 4vw, 2.8rem); }

.phone {
  width: 270px;
  padding: 9px;
  background: #1d2026;
  border: 1px solid #3a3f49;
  border-radius: 38px;
}

.phone img { display: block; width: 100%; height: auto; border-radius: 30px; }

.features { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.features li { padding-left: 22px; position: relative; }
.features li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 2px; background: var(--amber); }
.features strong { font-weight: 600; }

.about { max-width: 640px; }

/* Vitrine du jeu : le téléphone et un éventail de cartes qui déborde sur son coin */
.showcase { position: relative; width: 100%; aspect-ratio: 440 / 600; }
.showcase .phone { position: absolute; left: 0; top: 0; width: 61%; }
.showcase .card {
  position: absolute;
  width: 35%;
  height: auto;
  border-radius: 7% / 4.7%;
  box-shadow: 0 18px 40px -12px rgb(0 0 0 / 0.7);
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.showcase .c1 { left: 50%; top: 30%; transform: rotate(-5deg); }
.showcase .c2 { left: 63%; top: 35%; transform: rotate(9deg); }
.showcase .c3 { left: 45%; top: 47%; transform: rotate(2deg); }
@media (min-width: 761px) { .showcase.large .c1 { left: 47%; top: 22%; transform: rotate(-10deg); } }
.showcase:hover .c1 { transform: translate(-6%, -4%) rotate(-10deg); }
.showcase:hover .c2 { transform: translate(8%, -2%) rotate(15deg); }
.showcase:hover .c3 { transform: translateY(-3%) rotate(0deg); }
@media (prefers-reduced-motion: reduce) { .showcase .card { transition: none; } }


.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: minmax(0, 300px) 1fr;
  align-items: baseline;
  gap: 8px 40px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.row h2 { margin: 0; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.row p { margin: 0; max-width: 34em; color: var(--muted); font-size: 1.1rem; }

.closing { padding: 72px 0 8px; }
.closing h2 { margin-top: 0; }

.legal-line { margin-top: 48px; color: var(--muted); font-size: 0.95rem; }
.legal-line a { color: var(--muted); }

@media (max-width: 760px) {
  main.wrap { padding-top: 32px; }
  .showcase, .showcase.large { justify-self: center; width: min(360px, 92vw); }
  .row { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; gap: 16px; padding-bottom: 48px; }
  .hero-cat { max-width: 200px; grid-row: 1; justify-self: start; margin-bottom: 0; }
  .game { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
  .game > .phone { width: min(260px, 72vw); justify-self: center; }
}

/* Pages de texte */

.notice {
  padding: 14px 18px;
  border-left: 2px solid var(--amber);
  background: var(--panel);
  font-size: 0.95rem;
}

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}

th { font-size: 0.85rem; font-weight: 600; color: var(--muted); }

.table-scroll { overflow-x: auto; }

hr { border: 0; border-top: 1px solid var(--line); margin: 64px 0; }

/* Longueur de ligne confortable pour les pages de texte */
main > p, main > ul, main > ol, main section > p, main section > ol { max-width: 720px; }

/* Pied de page */

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-size: 14px;
}

footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
footer nav { flex-wrap: wrap; gap: 0 20px; }
footer nav a { min-height: 36px; font-size: 14px; font-weight: 400; padding: 0; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

.game-page { border: 0; padding: 16px 0 56px; grid-template-columns: 1fr minmax(0, 500px); }
.game-page h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
@media (max-width: 760px) { .game-page { grid-template-columns: 1fr; } }

/* L'ancre du bouton ne doit pas finir sous l'en-tête collant */
#battle-maidens { scroll-margin-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Page 404 */
.lost { display: grid; grid-template-columns: minmax(0, 260px) 1fr; align-items: center; gap: 48px; min-height: 60vh; }
.lost-cat { width: 100%; height: auto; }
@media (max-width: 760px) { .lost { grid-template-columns: 1fr; gap: 24px; min-height: 0; } .lost-cat { max-width: 160px; } }
