/* =========================================================
   Team Guérande — shoot.css
   Mini-jeu "Shoot le sel"
   ========================================================= */

.shoot-page {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  text-align: center;
}

.shoot-page h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.shoot-page .lede {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* HUD : barre du haut avec temps / score / ratés */
.shoot-hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.shoot-hud-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  min-width: 110px;
  justify-content: center;
}

.shoot-hud-cell .hud-icon { font-size: 1.05rem; }

.shoot-hud-cell.is-score   { color: var(--accent); }
.shoot-hud-cell.is-miss    { color: #ef4444; }
.shoot-hud-cell.is-time    { color: var(--text); }

/* Zone de jeu */
.shoot-arena {
  position: relative;
  width: 100%;
  height: clamp(380px, 60vh, 560px);
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-lg);
}

.shoot-arena.is-idle,
.shoot-arena.is-over {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}

.shoot-start,
.shoot-end {
  text-align: center;
  padding: 1.5rem;
}

.shoot-start h2,
.shoot-end h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.shoot-start p,
.shoot-end p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.shoot-end .score-big {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin: 0.5rem 0;
}

.shoot-end .vanne {
  color: var(--text);
  font-style: italic;
  font-size: 0.95rem;
  max-width: 380px;
  margin: 0.75rem auto 1.25rem;
  line-height: 1.5;
}

/* Bouton start / replay */
.shoot-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #1d1d1f;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(246, 173, 26, 0.25);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.shoot-button:hover,
.shoot-button:focus-visible {
  background: #ffbb33;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(246, 173, 26, 0.35);
  outline: none;
}

/* Grain de sel qui tombe */
.shoot-grain {
  position: absolute;
  top: -28px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-soft), inset 0 0 4px rgba(255, 255, 255, 0.4);
  transform: translateX(-50%);
  cursor: pointer;
  pointer-events: auto;
  animation-name: salt-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.shoot-grain.hit {
  animation: salt-pop 0.18s ease-out forwards;
  pointer-events: none;
}

@keyframes salt-fall {
  0%   { top: -28px; }
  100% { top: calc(100% + 28px); }
}

@keyframes salt-pop {
  0%   { transform: translateX(-50%) scale(1);   opacity: 1; }
  60%  { transform: translateX(-50%) scale(1.6); opacity: 0.6; }
  100% { transform: translateX(-50%) scale(0);   opacity: 0; }
}

/* Reduced motion : pas d'animation de chute aleatoire, vitesse fixe */
@media (prefers-reduced-motion: reduce) {
  .shoot-grain { animation-duration: 3.5s !important; }
  .shoot-grain.hit { animation: none; opacity: 0; }
}

/* Responsive : zone plus courte, grains plus gros en tactile */
@media (max-width: 480px) {
  .shoot-arena { height: 70vh; }
  .shoot-grain { width: 28px; height: 28px; }
  .shoot-hud-cell { font-size: 0.85rem; padding: 0.5rem 0.85rem; min-width: 0; }
}
