/* Kamori — portail (la borne d'arcade du studio). Mobile d'abord : c'est l'appli posée sur l'écran d'accueil. */

/* La police Fredoka est déclarée dans font.css. */

:root {
  --ink: #1D1B33;
  --night: #15142A;
  --card: #2A2752;
  --card-hi: #34306A;
  --line: rgba(255, 255, 255, 0.08);
  --cream: #FFF6EC;
  --muted: #B8B4D8;
  --coral: #FF5A3D;
  --coral-hi: #FF7A5C;
  --coral-lo: #B8321C;
  --gold: #FFC93C;
  --mint: #2BC4A0;
  --gutter: 16px;
  --max: 1120px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
/* La lueur du haut de la page : la couleur du jeu affiché dans la vitrine (fondu d'une couleur à l'autre) */
@property --amb { syntax: '<color>'; inherits: true; initial-value: #3B3574; }

* { box-sizing: border-box; }
html {
  --amb: #3B3574;
  transition: --amb 1.2s ease;
  background:
    radial-gradient(rgba(255, 255, 255, 0.045) 1.2px, transparent 1.6px) 0 0 / 22px 22px,
    radial-gradient(130% 70% at 50% -10%, #3B3574 0%, var(--ink) 52%, var(--night) 100%) fixed,
    var(--night);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Fredoka', ui-rounded, system-ui, sans-serif;
  font-weight: 400;
  color: var(--cream);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  height: 90vh;
  pointer-events: none;
  background: radial-gradient(80% 55% at 50% 0%, color-mix(in srgb, var(--amb) 30%, transparent), transparent 72%);
}
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 12px; }
[hidden] { display: none !important; }

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

/* ---------- Icônes (SVG insérés par le script) ---------- */
.ic { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.ic svg { width: 100%; height: 100%; fill: currentColor; }

/* ---------- En-tête ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: var(--safe-t);
  transition: background-color 0.25s, box-shadow 0.25s;
}
.top.scrolled {
  background: rgba(21, 20, 42, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.top-in {
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 4px; text-decoration: none; border-radius: 14px; }
.brand .joy { width: 46px; height: 46px; overflow: visible; margin: -4px -2px -2px -6px; }
.brand .word { width: 104px; height: auto; }
.top-actions { display: flex; align-items: center; gap: 8px; }

/* Mori s'agite et fait un clin d'œil de temps en temps (comme au chargement des jeux) */
.joy .stick { transform-origin: 50px 76px; animation: wag 7s ease-in-out infinite; }
.brand:hover .joy .stick { animation-duration: 1.3s; }
.joy .ew, .word .ew { opacity: 0; animation: wink 7s steps(1) infinite; }
.joy .eo, .word .eo { animation: open 7s steps(1) infinite; }
@keyframes wag {
  0%, 22%, 100% { transform: rotate(-8deg); }
  4% { transform: rotate(14deg); }
  8% { transform: rotate(-14deg); }
  12% { transform: rotate(16deg); }
  16% { transform: rotate(-6deg); }
}
@keyframes wink { 0%, 14% { opacity: 0; } 15%, 20% { opacity: 1; } 21%, 100% { opacity: 0; } }
@keyframes open { 0%, 14% { opacity: 1; } 15%, 20% { opacity: 0; } 21%, 100% { opacity: 1; } }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.08s;
}
.pill-btn:hover { background: rgba(255, 255, 255, 0.15); }
.pill-btn:active { transform: scale(0.95); }
.pill-btn .ic { width: 20px; height: 20px; color: var(--gold); }
.pill-btn.lang { width: 40px; padding: 0; justify-content: center; font-size: 13px; letter-spacing: 0.05em; }

/* ---------- Vitrine : les jeux jouables l'un après l'autre, comme des stories ---------- */
.hero {
  position: relative;
  margin: 6px 0 18px;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 5 / 4.4;
  background: var(--card);
  box-shadow: 0 0 0 1.5px var(--line), 0 26px 50px -22px color-mix(in srgb, var(--amb) 60%, transparent), 0 22px 44px -18px rgba(0, 0, 0, 0.7);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
/* un voile en haut, pour que les barres restent lisibles même sur la neige */
.hero::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: linear-gradient(rgba(21, 20, 42, 0.5), rgba(21, 20, 42, 0));
  pointer-events: none;
}
.hero-card {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  background: var(--c, var(--card));
  text-decoration: none;
  cursor: pointer;
  -webkit-user-drag: none;
  /* l'ancien jeu reste dessous, entier, le temps que le nouveau apparaisse par-dessus */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0s 0.7s, visibility 0s 0.7s;
}
.hero-card.on { z-index: 1; opacity: 1; visibility: visible; transition: opacity 0.7s ease; }
.hero-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  z-index: -2;
  -webkit-user-drag: none;
  transition: transform 0s 0.7s;
}
/* la vidéo du jeu (si elle est là) recouvre l'image en fondu dès qu'elle joue */
.hero-card > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  z-index: -2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0s 0.7s;
}
.hero-card > video.on { opacity: 1; }
/* l'image (ou la vidéo) avance doucement vers nous pendant qu'elle est affichée */
.hero-card.on > img { transform: scale(1.08); transition: transform 9s ease-out; }
.hero-card.on > video { transform: scale(1.05); transition: opacity 0.4s ease, transform 9s ease-out; }
.hero-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(21, 20, 42, 0) 22%, rgba(21, 20, 42, 0.5) 42%, rgba(21, 20, 42, 0.86) 62%, rgba(21, 20, 42, 0.97) 100%);
}
.hero-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 18px 20px;
}
/* le texte du nouveau jeu monte en place, ligne après ligne */
.hero-body > * { opacity: 0; transform: translateY(12px); }
.hero-card.on .hero-body > * { opacity: 1; transform: none; transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.3, 1); }
.hero-card.on .hero-body > :nth-child(1) { transition-delay: 0.15s; }
.hero-card.on .hero-body > :nth-child(2) { transition-delay: 0.22s; }
.hero-card.on .hero-body > :nth-child(3) { transition-delay: 0.29s; }
.hero-card.on .hero-body > :nth-child(4) { transition-delay: 0.36s; }

.hero-bars { position: absolute; z-index: 3; top: 6px; left: 12px; right: 12px; display: flex; gap: 6px; }
.hbar { flex: 1; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; border-radius: 4px; }
.hbar i {
  position: relative;
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.hbar i::after { content: ''; position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.hbar.done i::after { transform: none; }
.hbar.on i::after { animation: fill-bar 6s linear forwards; }
@media (hover: hover) { .hero:hover .hbar.on i::after { animation-play-state: paused; } }
.hero.calm .hbar.on i::after { animation: none; transform: none; }
@keyframes fill-bar { to { transform: none; } }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kicker .ic { width: 14px; height: 14px; }
.hero-title {
  margin: 10px 0 4px;
  font-size: clamp(32px, 9vw, 54px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}
.hero-tag { margin: 0 0 16px; font-size: 16px; line-height: 1.3; color: #E6E2FF; max-width: 34em; text-shadow: 0 1px 8px rgba(21, 20, 42, 0.6); }
.hero-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-meta { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--muted); }
.hero-meta b { color: var(--cream); font-weight: 600; font-size: 15px; }

/* ---------- Ce qu'on promet, juste sous la vitrine ---------- */
.perks {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.perks li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 14px;
  font-weight: 600;
  color: #E6E2FF;
  white-space: nowrap;
}
.perks .ic { width: 18px; height: 18px; color: var(--gold); }

/* Le gros bouton d'arcade */
.play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 26px 0 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--coral-hi), var(--coral));
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.18);
  box-shadow: 0 5px 0 var(--coral-lo), 0 12px 24px -6px rgba(255, 90, 61, 0.55);
  transition: transform 0.08s, box-shadow 0.08s;
  cursor: pointer;
  position: relative;
}
/* une onde part du bouton de temps en temps : c'est là qu'on touche */
.play::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.hero-card.on .play::after { animation: beckon 2.4s ease-out 1.4s infinite; }
@keyframes beckon {
  0% { box-shadow: 0 0 0 0 rgba(255, 122, 92, 0.6); }
  70%, 100% { box-shadow: 0 0 0 16px rgba(255, 122, 92, 0); }
}
.play .dot {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: var(--coral);
  display: grid;
  place-items: center;
}
.play .dot svg { width: 18px; height: 18px; fill: currentColor; margin-left: 3px; }
.hero-card:hover .play { box-shadow: 0 5px 0 var(--coral-lo), 0 14px 30px -4px rgba(255, 90, 61, 0.75); }
.hero-card:active .play, .play:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--coral-lo), 0 6px 14px -6px rgba(255, 90, 61, 0.5); }

/* ---------- Bibliothèque ---------- */
.lib-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.lib-head h2 { margin: 0; font-size: 24px; font-weight: 700; }
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 calc(-1 * var(--gutter));
  padding: 2px var(--gutter) 4px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.08s;
}
.chip .ic { width: 18px; height: 18px; }
.chip:hover { color: var(--cream); }
.chip:active { transform: scale(0.95); }
.chip[aria-pressed='true'] { background: var(--cream); color: var(--ink); box-shadow: none; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }

.card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  border-radius: 20px;
  animation: card-in 0.55s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 80ms + 120ms);
}
@keyframes card-in { from { opacity: 0; transform: translateY(18px); } }
.cover {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  background: var(--c, var(--card));
  box-shadow: 0 0 0 1.5px var(--line), 0 14px 24px -14px rgba(0, 0, 0, 0.8);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
/* la boucle vidéo du jeu, en fondu par-dessus l'image dès qu'elle joue */
.cover video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.cover video.on { opacity: 1; }
.card:hover .cover video { transform: scale(1.05); }
/* un reflet passe sur la vignette : au survol, ou de lui-même de temps en temps sur téléphone */
.cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 62%);
  transform: translateX(-110%);
  pointer-events: none;
}
@media (hover: hover) {
  .cover::after { transition: transform 0.75s ease; }
  .card:hover .cover::after { transform: translateX(110%); }
}
@media (hover: none) {
  .cover::after { animation: shine 8s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 0.9s + 2s); }
}
@keyframes shine { 0%, 82% { transform: translateX(-110%); } 96%, 100% { transform: translateX(110%); } }
.card:hover .cover {
  transform: translateY(-4px) rotate(-0.8deg);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22), 0 20px 30px -14px rgba(0, 0, 0, 0.9);
  box-shadow: 0 0 0 2px var(--g), 0 22px 38px -14px color-mix(in srgb, var(--g) 75%, transparent);
}
.card:hover .cover img { transform: scale(1.05); }
.card:active .cover { transform: scale(0.97); }
.badge {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--mint);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}
.badge.hot { background: var(--gold); }
.badge.soon { background: rgba(21, 20, 42, 0.8); color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.2); }
.progress {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(21, 20, 42, 0.78);
  color: var(--cream);
}
.mini-play {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--coral);
  color: #fff;
  box-shadow: 0 3px 0 var(--coral-lo), 0 6px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s;
}
.mini-play svg { width: 17px; height: 17px; fill: currentColor; margin-left: 3px; }
.card:hover .mini-play { transform: scale(1.1); }
.card h3 { margin: 10px 4px 1px; font-size: 17px; line-height: 1.2; font-weight: 600; }
.card .meta { margin: 0 4px; font-size: 13.5px; color: var(--muted); }
.card .tag { display: none; margin: 6px 4px 0; font-size: 14px; line-height: 1.35; color: #D9D5F5; }

/* ---------- Le prochain jeu ---------- */
.soon-banner {
  margin: 26px 0 0;
  padding: 12px 16px 12px 12px;
  border-radius: 22px;
  border: 2px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  gap: 14px;
}
.soon-banner img { flex: none; width: 64px; height: 80px; border-radius: 14px; object-fit: cover; }
.soon-banner .badge { position: static; display: inline-block; }
.soon-banner h3 { margin: 6px 0 2px; font-size: 18px; font-weight: 700; }
.soon-banner p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.35; }
.empty { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 30px 0; }

/* ---------- Installer ---------- */
.install {
  margin: 22px 0 10px;
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, #2F2B63, #26234D);
  box-shadow: inset 0 0 0 1.5px var(--line);
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px 14px;
  align-items: center;
}
.install-ic { width: 64px; height: 64px; border-radius: 18px; }
.install-txt h3 { margin: 0 0 3px; font-size: 18px; font-weight: 700; }
.install-txt p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.35; }
.install-act { grid-column: 1 / -1; display: flex; gap: 10px; }
.btn {
  height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.08s, background-color 0.15s;
}
.btn:active { transform: scale(0.96); }
.btn.cream { background: var(--cream); color: var(--ink); box-shadow: 0 4px 0 #CFC3B5; }
.install-act .btn.cream { flex: 1; }
.btn.cream:active { transform: translateY(3px); box-shadow: 0 1px 0 #CFC3B5; }
.btn.coral { background: var(--coral); color: #fff; box-shadow: 0 4px 0 var(--coral-lo); }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--cream); }

/* ---------- Pages d'information (mentions légales, confidentialité) ---------- */
/* les deux langues sont dans la page : on n'affiche que celle choisie */
html[lang='fr'] body [lang='en'], html[lang='en'] body [lang='fr'] { display: none !important; }
.brand .mori { width: 38px; height: 38px; margin-right: 4px; }
.doc { max-width: 760px; padding-top: 6px; }
.doc h1 { margin: 14px 0 6px; font-size: clamp(30px, 8vw, 44px); line-height: 1.05; font-weight: 700; }
.doc .updated { margin: 0 0 22px; color: var(--muted); font-size: 14px; }
.doc .lead { margin: 0 0 28px; font-size: 17.5px; line-height: 1.5; color: #E6E2FF; }
.doc .tldr {
  list-style: none;
  margin: 0 0 30px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1.5px var(--line);
  display: grid;
  gap: 10px;
}
.doc .tldr li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; color: var(--cream); }
.doc .tldr .ic { width: 22px; height: 22px; margin-top: 1px; color: var(--mint); }
.doc section { margin: 0 0 28px; scroll-margin-top: 80px; }
.doc h2 { margin: 0 0 8px; font-size: 21px; font-weight: 700; }
.doc p, .doc li, .doc dd, .doc dt { font-size: 16px; line-height: 1.55; color: #DCD8F6; }
.doc p { margin: 0 0 10px; }
.doc ul:not(.tldr) { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; }
.doc b { color: var(--cream); font-weight: 600; }
.doc a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.doc dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.doc dt { color: var(--muted); }
.doc dd { margin: 0; }
.doc .optout { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; }
.doc .optout span { color: var(--cream); font-size: 15px; }
.todo { padding: 1px 7px; border-radius: 6px; background: rgba(255, 201, 60, 0.16); color: var(--gold); font-weight: 600; }
@media (max-width: 520px) {
  .doc dl { grid-template-columns: 1fr; gap: 0; }
  .doc dd { margin-bottom: 10px; }
}

/* ---------- Pied de page ---------- */
.foot { margin-top: 44px; padding: 30px 0 calc(34px + var(--safe-b)); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-in { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.foot-tag { margin: 6px 0 0; color: var(--cream); font-size: 15px; max-width: 26em; }
.foot-social { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 2px; color: var(--cream); font-weight: 600; }
.soc {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1.5px var(--line);
  color: var(--cream);
  transition: background-color 0.15s, transform 0.08s;
}
.soc:hover { background: rgba(255, 255, 255, 0.16); }
.soc:active { transform: scale(0.94); }
.soc svg { width: 21px; height: 21px; }
.soc-handle { color: var(--muted); font-weight: 500; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--cream); text-decoration: underline; }
.foot-copy { margin: 4px 0 0; font-size: 13px; opacity: 0.7; }
.noscript { list-style: none; margin: 20px 0; padding: 0; display: grid; gap: 10px; font-size: 17px; line-height: 1.4; }
.noscript a { color: var(--gold); font-weight: 600; }

/* ---------- Page introuvable ---------- */
.lost { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 34px; min-height: 52vh; }
.lost img { width: 120px; height: 120px; }
.lost .play { margin-top: 6px; color: #fff; text-decoration: none; }

/* ---------- Feuille (installer sur l'écran d'accueil) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-back { position: absolute; inset: 0; background: rgba(10, 9, 22, 0.6); animation: fade 0.2s ease; }
.sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 10px 22px calc(24px + var(--safe-b));
  border-radius: 28px 28px 0 0;
  background: #26234D;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
  animation: rise 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.15);
  outline: none;
}
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); margin: 0 auto 16px; }
.sheet h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; }
.sheet p { margin: 0 0 14px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.sheet ol { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.sheet li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: center; font-size: 16px; line-height: 1.35; }
.sheet li::before {
  content: counter(s);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
}
.sheet li .ic { width: 1.2em; height: 1.2em; vertical-align: -0.22em; color: #6FB6FF; }
.sheet .sheet-actions { display: flex; flex-direction: column; gap: 8px; clear: both; }
.sheet .sheet-actions .btn { width: 100%; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(100%); } }

/* ---------- Lancement d'un jeu : même écran que le chargement des jeux ---------- */
.launch {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(circle at 50% 40%, #2D2A55, #15142A 72%);
  animation: fade 0.2s ease;
}
.launch .joy { width: 150px; height: 150px; overflow: visible; }
.launch .joy .stick { animation: wag-fast 1.3s ease-in-out infinite; }
.launch-name { font-size: 22px; font-weight: 600; color: var(--muted); }
@keyframes wag-fast {
  0%, 100% { transform: rotate(-16deg); }
  25% { transform: rotate(14deg); }
  50% { transform: rotate(-9deg); }
  75% { transform: rotate(18deg); }
}

/* ---------- Message bref ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-b));
  z-index: 60;
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Écrans plus larges ---------- */
@media (min-width: 640px) {
  .perks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .perks li { padding: 0 15px 0 12px; }
  .card .tag { display: block; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 20px; }
  .install { grid-template-columns: 64px 1fr auto; }
  .install-act { grid-column: auto; }
  .install-act .btn.cream { flex: none; }
}
@media (min-width: 820px) {
  :root { --gutter: 28px; }
  .brand .joy { width: 54px; height: 54px; }
  .brand .word { width: 122px; }
  .hero { margin-top: 12px; aspect-ratio: auto; height: min(480px, 56vw); }
  .hero-bars { top: 10px; left: 22px; right: 22px; }
  .hero-card > img, .hero-card > video { object-position: 50% 40%; }
  .hero-card::after { background: linear-gradient(90deg, rgba(21, 20, 42, 0.95) 0%, rgba(21, 20, 42, 0.8) 28%, rgba(21, 20, 42, 0.4) 50%, rgba(21, 20, 42, 0.1) 66%, rgba(21, 20, 42, 0) 78%); }
  .hero-body { top: 0; right: auto; width: 46%; padding: 40px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
  .hero-tag { font-size: 18px; }
  .lib-head { flex-direction: row; align-items: center; justify-content: space-between; }
  .chips { margin: 0; padding: 2px; }
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 28px; padding-bottom: 24px; }
  .sheet-grip { display: none; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .joy .ew, .word .ew { opacity: 1; }
  .joy .eo, .word .eo { opacity: 0; }
}
