/* Neakio Games — feuille de style commune */
@font-face {
  font-family: "Fredoka";
  src: url("/fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --night: #2A0B4A;      /* fond prune profond */
  --grape: #5A1E96;      /* raisin */
  --orchid: #B455E0;     /* orchidée, la couleur du bocal */
  --jam: #FF4F9A;        /* confiture rose, le titre du jeu */
  --gingham: #E0314B;    /* rouge du tissu vichy */
  --cream: #FFF4E0;      /* étiquette crème */
  --honey: #F6B73C;      /* miel, les boutons */
  --ink: #2A1638;        /* l'encre des yeux des Jamlings */

  --step--1: clamp(0.92rem, 0.88rem + 0.2vw, 1rem);
  --step-0: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  --step-1: clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
  --step-2: clamp(1.7rem, 1.4rem + 1.4vw, 2.6rem);
  --step-3: clamp(2.6rem, 1.8rem + 4vw, 5.6rem);

  --page: min(1180px, 100% - 2 * clamp(1.1rem, 4vw, 3rem));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
  font-weight: 400;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--cream);
  background: var(--night);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 3px; border-radius: 6px; }

/* Langue : chaque texte existe en FR et en EN, on cache l'autre */
html[data-lang="fr"] [lang="en"]:not(html),
html[data-lang="en"] [lang="fr"]:not(html) { display: none !important; }

.wrap { width: var(--page); margin-inline: auto; }

/* ------------------------------------------------------------ en-tête */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  padding-block: 1.1rem;
}
.top .wrap { display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand svg { width: 42px; height: 42px; }
.brand b { font-weight: 650; font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1; }
.brand small { display: block; font-size: .78rem; font-weight: 500; opacity: .72; letter-spacing: .02em; margin-top: .1rem; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.6rem); }
.top nav a { text-decoration: none; font-weight: 500; opacity: .85; }
.top nav a:hover { opacity: 1; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.lang {
  font: inherit; font-weight: 600; font-size: .9rem; color: var(--cream);
  background: rgba(255, 244, 224, .1); border: 2px solid rgba(255, 244, 224, .35);
  border-radius: 999px; padding: .3rem .8rem; cursor: pointer;
}
.lang:hover { background: rgba(255, 244, 224, .2); }

/* ------------------------------------------------------------ héros */
.hero {
  position: relative; min-height: 100svh;
  display: grid; align-items: center;
  padding-block: 7rem 4rem;
  background:
    radial-gradient(120% 80% at 70% 15%, rgba(180, 85, 224, .55), transparent 60%),
    linear-gradient(180deg, var(--grape) 0%, #3D1270 55%, var(--night) 100%);
  isolation: isolate; overflow: hidden;
}
/* rayons de lumière, comme sur l'icône du jeu */
.hero::before {
  content: ""; position: absolute; inset: -20% -10% 0; z-index: -1;
  background: repeating-conic-gradient(from 180deg at 68% -10%, rgba(255,255,255,.07) 0 4deg, transparent 4deg 13deg);
  mask: radial-gradient(90% 90% at 68% 0%, #000 30%, transparent 75%);
}
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(1rem, 4vw, 4rem); align-items: center; }
.hero h1 {
  font-size: var(--step-3); line-height: .98; font-weight: 650; letter-spacing: -0.035em;
  margin: 0 0 1.4rem; max-width: 11ch; text-wrap: balance;
}
.hero p.lede { font-size: var(--step-1); line-height: 1.4; max-width: 30ch; margin: 0 0 2rem; opacity: .9; font-weight: 400; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  padding: .85rem 1.5rem; border-radius: 999px; border: 0;
  background: var(--honey); color: var(--ink);
  box-shadow: 0 5px 0 #B9781A;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #B9781A; }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #B9781A; }
.btn.ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 2px rgba(255,244,224,.5); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--cream); }
.btn.ghost:active { transform: translateY(2px); }

/* le bocal interactif */
.stage { position: relative; width: 100%; max-width: 620px; justify-self: center; touch-action: pan-y; }
.stage svg { width: 100%; height: auto; aspect-ratio: 600 / 640; overflow: visible; }
.stage .jamling { cursor: pointer; }
.hint {
  margin: .6rem 0 0; text-align: center; font-size: var(--step--1); opacity: .8;
  display: flex; justify-content: center; align-items: center; gap: .6rem; flex-wrap: wrap;
}
.hint button {
  font: inherit; font-weight: 600; color: var(--ink); background: var(--cream);
  border: 0; border-radius: 999px; padding: .35rem .9rem; cursor: pointer;
}

/* ------------------------------------------------------------ bande vichy (la signature) */
.gingham {
  height: 64px; position: relative; z-index: 2;
  background-color: var(--cream);
  background-image:
    linear-gradient(90deg, rgba(224, 49, 75, .55) 50%, transparent 50%),
    linear-gradient(rgba(224, 49, 75, .55) 50%, transparent 50%);
  background-size: 40px 40px;
  /* bord festonné en bas, comme le couvercle du bocal */
  -webkit-mask: radial-gradient(14px at 50% 100%, transparent 98%, #000) 0 0 / 40px 100% repeat-x;
          mask: radial-gradient(14px at 50% 100%, transparent 98%, #000) 0 0 / 40px 100% repeat-x;
  filter: drop-shadow(0 6px 0 rgba(0,0,0,.18));
  margin-top: -1px;
}
.gingham + * { margin-top: -14px; }

/* ------------------------------------------------------------ Jamlings */
.game {
  position: relative; padding-block: clamp(5rem, 10vw, 8rem);
  background:
    radial-gradient(60% 50% at 20% 30%, rgba(46, 160, 110, .35), transparent 70%),
    linear-gradient(180deg, #164A3D 0%, #0F3A31 100%);
  overflow: hidden;
}
.game .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.game-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.game-head img { width: 76px; height: 76px; border-radius: 22px; box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.game-head h2 {
  margin: 0; font-size: var(--step-3); line-height: .95; font-weight: 700; letter-spacing: -0.03em;
  color: var(--jam);
  -webkit-text-stroke: 0; paint-order: stroke fill;
  text-shadow: 0 4px 0 #9C1758, 0 0 0 #fff;
}
.game .pitch { font-size: var(--step-1); line-height: 1.4; max-width: 34ch; margin: 0 0 2rem; }
.facts { list-style: none; padding: 0; margin: 0 0 2.2rem; display: grid; gap: 1.1rem; max-width: 46ch; }
.facts li { display: grid; grid-template-columns: 44px 1fr; gap: .9rem; align-items: start; }
.facts svg { width: 44px; height: 44px; }
.facts b { display: block; font-weight: 600; }
.facts span { opacity: .82; }
.label {
  display: inline-block; background: var(--cream); color: var(--ink);
  padding: .45rem 1rem; border-radius: 12px; font-weight: 600; font-size: var(--step--1);
  box-shadow: 0 4px 0 rgba(0,0,0,.25); transform: rotate(-2deg); margin-bottom: 1.2rem;
}

.phone {
  position: relative; justify-self: center; width: min(320px, 78vw);
  border-radius: 46px; padding: 12px; background: #120720;
  box-shadow: 0 0 0 2px rgba(255,255,255,.08), 0 40px 80px rgba(0,0,0,.45);
  transform: rotate(4deg);
}
.phone img { border-radius: 36px; width: 100%; height: auto; aspect-ratio: 1 / 2; object-fit: cover; }
.phone .peek { position: absolute; width: 110px; left: -62px; bottom: 70px; transform: rotate(-12deg); }

/* ------------------------------------------------------------ studio */
.studio { padding-block: clamp(5rem, 10vw, 8rem); background: var(--night); }
.studio .wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 6rem); }
.studio h2 { font-size: var(--step-2); line-height: 1.05; font-weight: 650; letter-spacing: -0.02em; margin: 0; max-width: 14ch; }
.studio p { margin: 0 0 1.2rem; max-width: 52ch; opacity: .88; }
.shelf { display: flex; gap: 1.2rem; align-items: end; margin-top: 2.2rem; flex-wrap: wrap; }
.jar-slot {
  width: 104px; height: 120px; border-radius: 26px 26px 30px 30px;
  border: 3px dashed rgba(255,244,224,.28); display: grid; place-items: center;
  font-size: .85rem; text-align: center; opacity: .7; padding: .5rem; line-height: 1.2;
}
.jar-slot.filled { border: 0; opacity: 1; padding: 0; }
.jar-slot.filled img { width: 104px; height: 104px; border-radius: 26px; box-shadow: 0 6px 0 rgba(0,0,0,.3); }

/* ------------------------------------------------------------ contact */
.contact { padding-block: clamp(4rem, 8vw, 6rem); background: var(--cream); color: var(--ink); text-align: center; }
.contact h2 { font-size: var(--step-2); line-height: 1.05; margin: 0 0 .8rem; font-weight: 650; letter-spacing: -0.02em; }
.contact p { margin: 0 auto 1.8rem; max-width: 46ch; }
.mail {
  display: inline-block; font-size: var(--step-2); font-weight: 600; color: var(--gingham);
  text-decoration: none; letter-spacing: -0.02em; border-bottom: 4px solid currentColor; line-height: 1.15;
  word-break: break-word;
}
.mail:hover { color: var(--grape); }

/* ------------------------------------------------------------ pied de page */
footer { background: var(--ink); color: var(--cream); padding-block: 2.2rem; font-size: var(--step--1); }
footer .wrap { display: flex; flex-wrap: wrap; gap: .8rem 2rem; align-items: center; }
footer a { opacity: .8; text-decoration: none; }
footer a:hover { opacity: 1; text-decoration: underline; }
footer .copy { margin-left: auto; opacity: .6; }

/* ------------------------------------------------------------ pages de texte (confidentialité, mentions) */
.doc-page { background: var(--cream); color: var(--ink); min-height: 100vh; }
.doc-page .top { position: static; background: var(--night); color: var(--cream); }
.doc { width: min(760px, 100% - 2.4rem); margin: 0 auto; padding-block: 3rem 5rem; }
.doc h1 { font-size: var(--step-2); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 .4rem; font-weight: 650; }
.doc .updated { opacity: .7; margin: 0 0 2.4rem; }
.doc h2 { font-size: var(--step-1); margin: 2.4rem 0 .6rem; font-weight: 600; }
.doc p, .doc li { max-width: 68ch; }
.doc table { width: 100%; border-collapse: collapse; font-size: var(--step--1); margin: 1rem 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: .65rem .7rem; border-bottom: 1px solid rgba(42,22,56,.15); }
.doc th { font-weight: 600; background: rgba(42,22,56,.06); }
.doc .table-scroll { overflow-x: auto; }
.doc a { color: var(--gingham); }
.todo { background: #FFE08A; padding: 0 .3rem; border-radius: 4px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 860px) {
  .hero .wrap, .game .wrap, .studio .wrap { grid-template-columns: 1fr; }
  .hero { padding-top: 6rem; }
  .hero h1 { max-width: 12ch; }
  .stage { max-width: 440px; margin-top: 1rem; }
  .phone { margin-top: 1rem; }
  .phone .peek { left: -40px; width: 84px; }
  .top nav a.hide-sm { display: none; }
  footer .copy { margin-left: 0; }
}

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