/* Page d'accueil de Magister. Couleurs de l'interface du jeu : nuit violette, or du titre, texte clair.
   Une seule police, Fredoka (SIL OFL, OFL-Fredoka.txt), servie par ce site : aucune police externe. */
@font-face {
  font-family: 'Fredoka';
  src: url('/site/fredoka.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --nuit: #17122b;
  --nuit-haut: #241a4a;
  --plaque: #241d3d;
  --plaque-bord: #3a2f5e;
  --texte: #f3eefc;
  --doux: #bdb2d8;
  --pale: #8f84ad;
  --or: #ffc94d;
  --or-sombre: #b8862a;
  --encre: #2a1c06;
  --gouttiere: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--nuit) linear-gradient(180deg, var(--nuit-haut) 0, var(--nuit) 640px) no-repeat;
  color: var(--texte);
  font: 500 17px/1.5 'Fredoka', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--or); }

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: calc(28px + env(safe-area-inset-top)) max(var(--gouttiere), env(safe-area-inset-right)) 0 max(var(--gouttiere), env(safe-area-inset-left));
}

/* ---------- Haut : présentation + vidéo ---------- */
.haut { display: grid; gap: 32px; justify-items: center; text-align: center; }
.presentation { max-width: 520px; }
.icone { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }
h1 {
  margin: 0;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.05;
  color: var(--or);
  letter-spacing: .5px;
  text-shadow: 0 3px 0 #3b2370;
}
.sous-titre { margin: 6px 0 18px; font-size: 19px; color: var(--doux); }
.accroche { margin: 0 0 8px; font-size: 19px; font-weight: 600; text-wrap: balance; }
.accroche.douce { font-weight: 500; color: var(--doux); font-size: 17px; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 24px 0 10px; }
.store {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 158px;
  padding: 9px 18px 10px;
  border-radius: 14px;
  background: var(--or);
  color: var(--encre);
  text-decoration: none;
  line-height: 1.1;
  box-shadow: 0 4px 0 var(--or-sombre);
  transition: transform .08s, box-shadow .08s;
}
.store .petit { font-size: 13px; font-weight: 500; }
.store .grand { font-size: 21px; font-weight: 700; }
.store[href]:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--or-sombre); }
.store[href]:focus-visible { outline: 3px solid var(--texte); outline-offset: 3px; }
.store[aria-disabled='true'] {
  background: var(--plaque);
  color: var(--doux);
  box-shadow: inset 0 0 0 2px var(--plaque-bord);
  cursor: default;
}
.note { margin: 4px 0 0; font-size: 14px; color: var(--pale); }

/* Le cadre de téléphone : la vidéo (ou son affiche) au format 9:16. */
.telephone {
  margin: 0;
  width: min(300px, 78vw);
  padding: 8px;
  border-radius: 34px;
  background: #0c0918;
  box-shadow: 0 0 0 2px var(--plaque-bord), 0 20px 50px rgba(0, 0, 0, .5);
}
.telephone .video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 27px;
  background: var(--plaque);
}

/* ---------- Galerie ---------- */
.galerie { margin-top: 56px; }
h2 { margin: 0 0 14px; font-size: 26px; font-weight: 700; text-align: center; }
.bande {
  list-style: none;
  margin: 0 calc(-1 * var(--gouttiere));
  padding: 4px var(--gouttiere) 16px;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gouttiere);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.bande li { flex: 0 0 58%; scroll-snap-align: start; }
.bande img {
  width: 100%;
  aspect-ratio: 540 / 1169;
  object-fit: cover;
  border-radius: 18px;
  background: var(--plaque);
  box-shadow: 0 0 0 2px var(--plaque-bord);
}

/* ---------- Le jeu en bref ---------- */
.points { display: grid; gap: 12px; margin: 40px 0 0; }
.point { padding: 16px 18px; border-radius: 16px; background: var(--plaque); box-shadow: inset 0 0 0 2px var(--plaque-bord); }
h3 { margin: 0 0 4px; font-size: 19px; font-weight: 700; color: var(--or); }
.point p { margin: 0; color: var(--doux); font-size: 16px; }

/* ---------- Pied de page ---------- */
footer {
  max-width: 1120px;
  margin: 56px auto 0;
  padding: 24px var(--gouttiere) calc(32px + env(safe-area-inset-bottom));
  border-top: 2px solid var(--plaque);
  text-align: center;
  color: var(--pale);
  font-size: 14px;
}
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; margin-bottom: 10px; font-size: 15px; }
footer a { color: var(--doux); }
footer p { margin: 4px 0; }

/* ---------- Ordinateur et tablette ---------- */
@media (min-width: 900px) {
  main { padding-top: 64px; }
  .haut { grid-template-columns: 1fr auto; gap: 64px; align-items: center; justify-items: start; text-align: left; }
  .presentation { max-width: 560px; }
  .icone { margin: 0 0 18px; width: 112px; height: 112px; border-radius: 26px; }
  h1 { font-size: 84px; }
  .sous-titre { font-size: 22px; }
  .accroche { font-size: 22px; }
  .accroche.douce { font-size: 19px; }
  .stores { justify-content: flex-start; }
  .telephone { width: 340px; }
  .galerie { margin-top: 88px; }
  h2 { font-size: 30px; }
  .bande { margin: 0; padding: 4px 0 8px; overflow: visible; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
  .points { grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 56px; }
}
@media (min-width: 560px) and (max-width: 899px) {
  .bande li { flex-basis: 36%; }
  .points { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .store { transition: none; }
}
