/* MiDojo · site vitrine. Couleurs et polices reprises de l'app
   (app/constants/premiumTheme.ts, FONTS) : même identité que l'écran Défi. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Enriqueta"; font-weight: 600; font-display: swap; src: url("/fonts/enriqueta-600.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --paper: #FAE6BE;        /* papier des illustrations */
  --cream: #FBF2DE;        /* serieBg : zones de récompense */
  --mint: #E6F2EC;         /* heroBand */
  --white: #FFFFFF;
  --teal: #0E8C86;
  --teal-text: #0A6A66;    /* liens : ce qui se touche */
  --gold-text: #8F5E12;
  --text: #14201E;
  --text-2: #5B6B68;       /* gris secondaire */
  --divider: rgba(20, 32, 30, 0.07);
  --border: rgba(20, 32, 30, 0.09);
  --serif: "Enriqueta", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gutter: 20px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
a { color: var(--teal-text); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

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

/* ── En-tête ─────────────────────────────────────────────────────────── */
.topbar { padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--serif); font-weight: 600; font-size: 22px; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }

/* ── Badges des stores ───────────────────────────────────────────────── */
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.stores a { display: block; border-radius: 9px; }
.stores img { height: 52px; width: auto; }
@media (max-width: 420px) { .stores { gap: 10px; } .stores img { height: 46px; } }
.stores-note { margin-top: 12px; color: var(--text-2); font-size: 15px; }

/* ── Accueil ─────────────────────────────────────────────────────────── */
.hero { background: var(--paper); position: relative; overflow: hidden; display: flex; flex-direction: column; }
/* Téléphone : le texte et les badges d'abord, la loutre ensuite. */
.hero-art { order: 2; }
.hero-text { padding: 12px 0 28px; }
.hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(34px, 8.6vw, 54px); line-height: 1.12; letter-spacing: -0.01em;
  max-width: 13em;
}
.hero .lead { margin: 16px 0 26px; font-size: 18px; color: var(--text-2); max-width: 30em; }
.hero-art { width: 100%; }
.hero-art img { width: 100%; }

.invite {
  display: none; margin: 0 0 20px; padding: 14px 16px; max-width: 30em;
  background: var(--white); border: 1px solid var(--border); border-radius: 14px;
  font-size: 15px; line-height: 1.5;
}
.invite.visible { display: block; }
.invite strong { font-weight: 600; }
.invite code { font-family: var(--sans); font-weight: 700; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }

@media (min-width: 900px) {
  /* La hauteur suit la largeur (l'image est en 3:2) : sur un écran large,
     l'image grandit sans rogner la tête de la loutre, calée vers le haut. */
  .hero { min-height: max(640px, min(50vw, 900px)); display: block; }
  .hero .topbar { width: 50%; margin-left: auto; }
  .hero-art { position: absolute; inset: 0; }
  .hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: left 25%; }
  .hero .wrap { position: relative; z-index: 1; min-height: inherit; display: flex; flex-direction: column; }
  .hero-text { margin: auto 0 auto auto; width: 50%; padding: 24px 0 72px; }
  .topbar { position: relative; z-index: 1; }
}

/* ── Sections ────────────────────────────────────────────────────────── */
.section { padding: 64px 0; }
.section h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(28px, 6vw, 38px); line-height: 1.18;
}
.section .intro { margin-top: 12px; color: var(--text-2); max-width: 36em; }
.mint { background: var(--mint); }
.cream { background: var(--cream); }

/* Écrans de l'app : défilement horizontal sur téléphone, 4 colonnes au-delà */
.shots {
  display: flex; gap: 18px; margin: 32px calc(-1 * var(--gutter)) 0; padding: 4px var(--gutter) 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.shots::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 min(68vw, 250px); scroll-snap-align: center; margin: 0; }
.shot img {
  width: 100%; border-radius: 26px; background: var(--white);
  border: 1px solid var(--border); box-shadow: 0 16px 36px rgba(20, 32, 30, 0.12);
}
.shot figcaption { margin-top: 14px; font-weight: 600; font-size: 16px; text-align: center; }
@media (min-width: 900px) {
  .shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; overflow: visible; margin: 40px 0 0; padding: 0; }
}

/* Les 6 jeux */
.games { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 620px) { .games { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .games { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.game {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--border); border-radius: 16px; padding: 18px;
}
.pastille {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 700; font-size: 22px; line-height: 1;
}
.pastille svg { width: 24px; height: 24px; fill: currentColor; }
.game h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
.game p { margin-top: 4px; color: var(--text-2); font-size: 15px; line-height: 1.45; }
.games-note { margin-top: 24px; color: var(--text-2); font-size: 15px; }

/* Comment ça marche */
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 32px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.step { display: flex; flex-direction: column; align-items: flex-start; }
.step img { height: 150px; width: auto; margin-bottom: 18px; }
.step h3 { font-size: 19px; font-weight: 600; }
.step p { margin-top: 6px; color: var(--text-2); }

/* Rappel final */
.finale { background: var(--paper); text-align: center; }
.finale-art img { width: 100%; }
.finale .wrap { padding-top: 40px; padding-bottom: 64px; }
.finale h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 6.4vw, 42px); line-height: 1.15; }
.finale .intro { margin: 10px auto 26px; color: var(--text-2); }
.finale .stores { justify-content: center; }

/* ── Pied de page ────────────────────────────────────────────────────── */
.footer { padding: 28px 0 36px; border-top: 1px solid var(--divider); font-size: 15px; color: var(--text-2); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer nav a { font-size: 14px; }

/* ── Pages de texte (confidentialité, mentions légales) ──────────────── */
.doc { max-width: 760px; margin: 0 auto; padding: 24px var(--gutter) 72px; }
.doc h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 7vw, 40px); line-height: 1.15; }
.doc .updated { margin-top: 8px; color: var(--text-2); font-size: 15px; }
.doc h2 { font-family: var(--serif); font-weight: 600; font-size: 23px; line-height: 1.25; margin: 40px 0 10px; }
.doc h3 { font-size: 17px; font-weight: 600; margin: 22px 0 6px; }
.doc p, .doc li { color: var(--text); }
.doc p + p { margin-top: 10px; }
.doc ul { margin: 8px 0 0; padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc .muted { color: var(--text-2); }
.doc table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--divider); }
.doc th { font-weight: 600; }
