/* Page "Palma → Vichy" — même identité que le site (crème/teal/terracotta/or,
   Cormorant Garamond) avec une touche arcade assumée pour le tableau des
   scores, façon panneau d'affichage d'aéroport. Les :root vars viennent de
   ../style.css, chargé avant ce fichier. */

.arcade-stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 36px 20px 56px;
  text-align: center;
}

.arcade-header h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 500;
  color: var(--teal);
}

/* --- Zone de jeu ------------------------------------------------------ */

.game-frame {
  position: relative;
  width: 100%;
  max-width: 360px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#game {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 5;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(43, 36, 32, 0.2);
  background: #cfe6e2;
}

.hud {
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}

.hud-score {
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--bg);
  text-shadow: 0 2px 6px rgba(43, 36, 32, 0.45);
}

.hud-journey {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg);
  text-shadow: 0 1px 4px rgba(43, 36, 32, 0.45);
  transition: opacity 0.4s ease;
}

/* --- Écrans (prêt / game over) ----------------------------------------- */

/* [hidden] seul ne suffit pas : nos règles d'auteur ci-dessous posent
   display:flex sur ces mêmes éléments, ce qui l'emporte sur la règle par
   défaut du navigateur (même piège déjà rencontré sur le puzzle). */
.overlay[hidden],
.initials-form[hidden] {
  display: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(43, 36, 32, 0.55);
  backdrop-filter: blur(2px);
}

.overlay-title {
  margin: 0;
  font-size: 1.4rem;
  color: var(--bg);
  line-height: 1.3;
}

.overlay-title span {
  color: var(--gold);
}

.overlay-sub {
  margin: 0;
  color: var(--bg);
  opacity: 0.85;
  font-size: 0.95rem;
}

.overlay-score {
  margin: 0;
  color: var(--bg);
  font-size: 1.1rem;
}

.btn {
  margin-top: 6px;
  padding: 10px 26px;
  border: none;
  border-radius: 999px;
  background: var(--terracotta);
  color: var(--bg);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--gold);
  color: var(--gold);
}

.initials-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

#initialsInput {
  width: 90px;
  padding: 8px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-family: inherit;
  font-size: 1.2rem;
  border: none;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}

/* --- Tableau des départs ------------------------------------------------ */

.departures {
  width: 100%;
  max-width: 360px;
}

.departures h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.departures-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--text);
  color: #d9e8c8;
  border-radius: 10px;
  overflow: hidden;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 0.82rem;
  box-shadow: 0 12px 26px rgba(43, 36, 32, 0.22);
}

.departures-table th,
.departures-table td {
  padding: 8px 6px;
  text-align: center;
}

.departures-table thead th {
  background: rgba(255, 255, 255, 0.06);
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.departures-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.04);
}

.departures-table td:nth-child(2) {
  letter-spacing: 0.15em;
  color: #f2e6b8;
}

.departures-empty td {
  font-family: "Cormorant Garamond", serif;
  color: var(--muted);
  padding: 16px;
}

.back-link {
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--teal);
}
