/* main.css — reset, layout 1080x1920 + transform:scale(), variables couleur néon, typographie. */

:root {
  --bg-black: #090b12;
  --bg-black2: #0a0c10;
  --neon-yellow: #ffe566;
  --neon-orange: #ffaa00;
  --neon-red-orange: #ff5500;
  --neon-red: #cc1800;
  --neon-blue: #0066cc;
  --neon-cyan: #00e5ff;
  --neon-yellow2: #ffcc00;
  --text-light: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }

html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg-black); color: var(--text-light); font-family: 'Oswald', Arial, sans-serif; }

/* ── Cible d'affichage : résolution logique 1080x1920, mise à l'échelle via scale() ── */
#viewport {
  position: fixed; inset: 0; overflow: hidden; background: var(--bg-black);
  display: flex; align-items: center; justify-content: center;
}
#app {
  position: absolute; top: 50%; left: 50%;
  width: 1080px; height: 1920px;
  transform-origin: center center;
  background: var(--bg-black2);
  overflow: hidden;
}

.screen {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
}
.screen.active { display: flex; }

h1, h2 { font-family: 'Bebas Neue', Impact, 'Arial Black', sans-serif; letter-spacing: 0.05em; }

.game-title {
  font-family: 'Bebas Neue', Impact, 'Arial Black', sans-serif;
  font-size: 150px; line-height: 0.92; text-align: center; letter-spacing: 0.05em;
  background: linear-gradient(175deg, var(--neon-yellow) 0%, var(--neon-orange) 38%, var(--neon-red-orange) 72%, var(--neon-red) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  animation: titlePulse 4s ease-in-out infinite;
}
.game-subtitle {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 32px; letter-spacing: 0.4em; text-align: center;
  color: rgba(255, 220, 150, 0.65); margin-top: 10px;
}

.screen-title {
  font-size: 64px; text-align: center; margin: 60px 0 40px;
  color: var(--neon-orange);
  text-shadow: 0 0 24px rgba(255, 140, 0, 0.5);
}

/* ── Boutons néon ── */
.btn-neon {
  width: 100%; max-width: 820px; padding: 34px 40px; margin: 14px auto;
  display: block; border: none; cursor: pointer; touch-action: manipulation;
  border-radius: 16px; color: #fff;
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-size: 44px; letter-spacing: 0.12em; text-transform: uppercase;
  transform: skew(-10deg);
  position: relative;
}
.btn-neon span, .btn-neon { transform-origin: center; }
.btn-neon:active { filter: brightness(0.82); transform: skew(-10deg) scale(0.98); }

.btn-orange {
  background: linear-gradient(135deg, var(--neon-red-orange), var(--neon-red));
  box-shadow: 0 6px 30px rgba(255, 85, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-blue {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  box-shadow: 0 6px 30px rgba(0, 150, 220, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-yellow {
  background: linear-gradient(135deg, var(--neon-yellow), var(--neon-orange));
  color: #201400;
  box-shadow: 0 6px 30px rgba(255, 200, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.06); border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}
.btn-small { max-width: 260px; padding: 16px 20px; font-size: 24px; margin: 0 6px; }

.saved-room-code { color: var(--neon-cyan); }

/* ── Formulaires ── */
.form-stack, .menu-stack { width: 100%; max-width: 900px; padding: 0 60px; margin-top: 40px; }
.field-label {
  display: block; font-family: 'Bebas Neue', Impact, sans-serif; font-size: 28px;
  letter-spacing: 0.15em; color: rgba(255, 255, 255, 0.6); margin: 24px 0 10px;
}
.field-input {
  width: 100%; padding: 26px 24px; font-size: 36px; font-family: 'Oswald', Arial, sans-serif;
  background: rgba(255, 255, 255, 0.06); border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px; color: #fff; outline: none;
}
.field-input:focus { border-color: var(--neon-red-orange); background: rgba(255, 85, 0, 0.08); }
.field-code { letter-spacing: 0.3em; text-align: center; text-transform: uppercase; }

.brand { margin-top: 160px; }

/* ── Toasts ── */
#toast-host {
  position: fixed; top: 40px; left: 50%; transform: translateX(-50%);
  z-index: 900; display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none; width: 90%; max-width: 600px;
}
.toast {
  background: rgba(10, 12, 18, 0.92); border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px; padding: 16px 24px; font-size: 22px;
  font-family: 'Oswald', Arial, sans-serif; text-align: center;
  opacity: 0; transform: translateY(-14px); transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-error { border-color: var(--neon-red); color: #ffb3a0; }
.toast-warning { border-color: var(--neon-yellow2); color: #fff2b0; }
.toast-event { border-color: var(--neon-cyan); color: #d6f8ff; }

/* ── PWA install banner ── */
.pwa-banner {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(140%);
  z-index: 950; display: flex; align-items: center; gap: 12px;
  background: rgba(10, 12, 18, 0.95); border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px; padding: 14px 18px; font-size: 20px;
  transition: transform 0.3s ease;
}
.pwa-banner.show { transform: translateX(-50%) translateY(0); }
