/* Reset, typographie globale et mise en page des trois vues : accueil, stands, jeu. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--creme);
  color: var(--encre);
  font: 600 16px/1.45 var(--texte);
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, select, input, label { touch-action: manipulation; }
img, svg { display: block; }
a { color: var(--encre); }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- Accueil : la récompense de celui qui a trouvé l'objet ---------- */
.accueil {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--soleil);
  padding: calc(var(--haut-sur) + 56px) var(--gouttiere) calc(var(--bas-sur) + 32px);
}
.rayons {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220vmax;
  height: 220vmax;
  margin: -110vmax 0 0 -110vmax;
  background: repeating-conic-gradient(var(--creme) 0 9deg, var(--soleil) 9deg 18deg);
  animation: tourne 90s linear infinite;
}
.accueil-contenu {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--e5);
  text-align: center;
}
.ruban {
  margin: 0;
  padding: 6px 16px;
  background: var(--rose);
  border: var(--trait) solid var(--encre);
  border-radius: 999px;
  box-shadow: var(--ombre);
  font-weight: 800;
  font-size: 15px;
  transform: rotate(-3deg);
}
.titre-geant {
  margin: 0;
  font: 400 clamp(76px, 25vw, 168px)/.84 var(--titre);
  letter-spacing: -.01em;
  transform: rotate(-4deg);
}
.titre-geant span {
  display: block;
  -webkit-text-stroke: 7px var(--encre);
  paint-order: stroke fill;
  text-shadow: 6px 7px 0 var(--encre);
}
.titre-geant span:first-child { color: var(--rose); }
.titre-geant span:last-child { color: var(--piscine); margin-left: .4em; }
.accroche {
  margin: 0;
  padding: 8px 16px;
  background: var(--papier);
  border: var(--trait) solid var(--encre);
  border-radius: var(--rayon-petit);
  box-shadow: var(--ombre);
  font-weight: 800;
  font-size: 19px;
  transform: rotate(2deg);
}
.bouton-entrer { min-width: 220px; font-size: 32px; min-height: 68px; }
.lien-site {
  position: absolute;
  top: calc(var(--haut-sur) + 6px);
  left: var(--gouttiere);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 700;
  text-underline-offset: 3px;
}
.accueil-contenu > * { animation: arrive .7s var(--rebond) both; }
.accueil-contenu > :nth-child(2) { animation-delay: .08s; }
.accueil-contenu > :nth-child(3) { animation-delay: .22s; }
.accueil-contenu > :nth-child(4) { animation-delay: .34s; }
.accueil.sort { animation: sortie .32s ease-in forwards; }

/* ---------- Barre du haut ---------- */
.app { min-height: 100svh; display: flex; flex-direction: column; }
.barre {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--e2);
  padding: calc(var(--haut-sur) + 8px) var(--gouttiere) 8px;
  background: var(--creme);
  border-bottom: var(--trait) solid var(--encre);
}
.barre .lien-site { position: static; min-width: 44px; justify-content: center; }
.marque { flex: 1; min-width: 0; margin: 0; font: 400 22px/1 var(--titre); white-space: nowrap; }
.marque span { color: var(--pomme); }
#soundBtn { margin-left: auto; }
@media (max-width: 439px) { .marque { display: none; } }

/* ---------- Vue des stands ---------- */
.hub { width: 100%; max-width: 1100px; margin: 0 auto; padding: var(--e5) var(--gouttiere) calc(var(--bas-sur) + var(--e6)); }
.hub-titre { margin: 0 0 var(--e2); font: 400 clamp(44px, 13vw, 76px)/.95 var(--titre); }
.hub-intro { margin: 0 0 var(--e4); max-width: 52ch; color: var(--encre-douce); font-weight: 600; }
.reglage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--e3);
  margin: 0 0 var(--e5);
  padding: var(--e3) var(--e4);
  background: var(--papier);
  border: var(--trait) solid var(--encre);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}
.reglage p { margin: 0; font-weight: 800; }
.reglage small { display: block; font-weight: 600; color: var(--encre-douce); }
.reglage label { font-weight: 800; }
.reglage select {
  min-height: var(--tactile);
  padding: 0 14px;
  font-size: 17px;
  font-weight: 800;
  background: var(--soleil);
  border: var(--trait) solid var(--encre);
  border-radius: var(--rayon-petit);
}
.choix-mode { display: flex; align-items: center; gap: var(--e2); flex-wrap: wrap; }
.stands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.hub-pied { margin: var(--e6) auto 0; max-width: 46ch; text-align: center; font-size: 14px; color: var(--encre-douce); }
.hub-pied b { color: var(--encre); }

@media (min-width: 640px) {
  .stands { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .stands { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
}

@keyframes tourne { to { transform: rotate(360deg); } }
@keyframes arrive { from { opacity: 0; transform: translateY(24px) scale(.8); } }
@keyframes sortie { to { opacity: 0; transform: scale(1.08); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
