/* Mini Arcade : portail des jeux. Mobile d'abord, thème sombre unique (celui des jeux). */

:root {
  color-scheme: dark;
  --bg: #0e0f1c;
  --surface: #171a30;
  --surface-2: #1f2340;
  --text: #f3f4ff;
  --muted: #a9add3;
  --line: rgba(255, 255, 255, 0.1);
  --violet: #8b6cff;
  --coral: #ff7a59;
  --teal: #2ec4b6;
  --sun: #ffd166;
  --on-sun: #1a1630;
  --gutter: clamp(16px, 4.5vw, 40px);
  --maxw: 1120px;
  --radius: 22px;
  --font: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 12px;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.55 var(--font);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Halos de couleur derrière la page (une couche fixe, sans image à charger). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 88% -8%, rgba(139, 108, 255, 0.22), transparent 62%),
    radial-gradient(46rem 34rem at -8% 26%, rgba(255, 122, 89, 0.13), transparent 62%),
    radial-gradient(52rem 40rem at 62% 112%, rgba(46, 196, 182, 0.13), transparent 62%);
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; }
a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--sun);
  color: var(--on-sun);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: 12px; }

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
  border-radius: 10px;
}

.wrap {
  width: min(var(--maxw), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

/* ---------- En-tête ---------- */

.top {
  padding-block: max(14px, env(safe-area-inset-top)) 6px;
}
.top__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand__logo { flex: none; }
.nav { display: flex; gap: 2px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
@media (max-width: 519px) { .nav .nav__about { display: none; } }

/* ---------- Accueil ---------- */

.hero {
  display: grid;
  gap: 36px;
  padding-block: clamp(28px, 7vw, 80px) clamp(24px, 5vw, 56px);
}
.hero h1 {
  font-size: clamp(2.1rem, 1.2rem + 5.2vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 800;
  text-wrap: balance;
}
.grad {
  color: var(--coral);
  background: linear-gradient(95deg, var(--violet), var(--coral) 58%, var(--sun));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lead {
  max-width: 36rem;
  margin-top: 18px;
  color: var(--muted);
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.2rem);
}
.perks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 22px 26px;
}
.perks li {
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  font-weight: 700;
}
.perks li::before {
  content: "✓";
  margin-right: 7px;
  color: var(--teal);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding-inline: 1.6em;
  border: 0;
  border-radius: 999px;
  background: var(--sun);
  color: var(--on-sun);
  font: 800 1rem var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 8px 24px -8px rgba(255, 209, 102, 0.7); }
.btn:active { transform: scale(0.97); }

/* Éventail d'icônes : décor, réservé aux écrans assez larges. */
.hero__art { display: none; }
@media (min-width: 820px) {
  .hero { grid-template-columns: 1.25fr 0.75fr; align-items: center; }
  .hero__art {
    display: block;
    position: relative;
    justify-self: center;
    width: min(100%, 320px);
    aspect-ratio: 1;
  }
  .hero__art img {
    position: absolute;
    width: 46%;
    height: auto;
    aspect-ratio: 1;
    border-radius: 22%;
    box-shadow: 0 22px 40px -14px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.12);
  }
  .hero__art img:nth-child(1) { left: 2%;  top: 8%;  transform: rotate(-10deg); }
  .hero__art img:nth-child(2) { right: 0;  top: 0;   transform: rotate(7deg);  z-index: 1; }
  .hero__art img:nth-child(3) { left: 27%; bottom: 0; transform: rotate(-2deg); z-index: 2; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(28px, 6vw, 64px) 0; }
.section h2 {
  font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 20px;
}
.section__intro,
.about p { max-width: 44rem; color: var(--muted); }
.about p + p { margin-top: 12px; }

/* ---------- Cartes des jeux ---------- */

.grid {
  list-style: none;
  display: grid;
  gap: clamp(16px, 3vw, 28px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.grid > li { display: flex; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), #12142a);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 20px 44px -20px color-mix(in srgb, var(--accent) 80%, transparent);
}

/* Vitrine : un téléphone dont on ne voit que le haut, sur un dégradé aux couleurs du jeu. */
.card__stage {
  position: relative;
  height: 236px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 24px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 105%, var(--accent), transparent 68%),
    linear-gradient(180deg, var(--accent-2), #14162b);
}
.card__shot {
  width: 148px;
  height: auto;
  border: 5px solid #0a0b16;
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: #0a0b16;
  box-shadow: 0 18px 36px -10px rgba(0, 0, 0, 0.6);
  transition: transform 0.3s ease;
}
.card:hover .card__shot { transform: translateY(-6px); }
.card__shot--icon {
  width: 120px;
  margin-top: 18px;
  border: 0;
  border-radius: 26px;
}

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 22px;
}
.card__head { display: flex; align-items: center; gap: 12px; }
.card__icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 24%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.card__title { font-size: 1.4rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.card__tagline { font-weight: 700; }
.card__desc { color: var(--muted); font-size: 0.95rem; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.card__play { align-self: flex-start; margin-top: auto; }
/* Toute la carte est cliquable. */
.card__play::after { content: ""; position: absolute; inset: 0; }
.card__body { padding-bottom: 22px; }
.card__desc + .tags { margin-bottom: 6px; }

/* ---------- Installation ---------- */

.howto {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  align-items: start;
}
.howto details {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.howto summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after {
  content: "";
  width: 9px; height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.howto details[open] summary::after { transform: rotate(-135deg); }
.howto ol { padding: 0 18px 18px 40px; color: var(--muted); }
.howto li + li { margin-top: 6px; }
.howto strong { color: var(--text); }

/* ---------- Pied de page ---------- */

.foot {
  margin-top: clamp(40px, 8vw, 88px);
  padding-block: 22px max(22px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
.foot__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
main { flex: 1 0 auto; }

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