/* =========================
   Base mobile-first (~375px)
   Desktop = adaptation (plus large, plus aéré)
========================= */

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: #0f0f12;
  color: #f5f5f5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* Le bloc principal (container ou page) prend l'espace pour que le footer reste en bas */
body > .container,
body > .page {
  flex: 1;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 20px 24px;
  width: 100%;
  box-sizing: border-box;
}

/* Très petit écran (320px) : réduire le padding pour garder la lisibilité */
@media (max-width: 374px) {
  .container {
    padding: 12px 16px 20px;
  }
}

/* Zone tactile recommandée pour actions principales : min 44px (à appliquer en page si besoin) */
button,
input[type="submit"],
input[type="button"] {
  cursor: pointer;
}

/* Accessibilité : focus visible au clavier (ne pas supprimer) */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Mobile : zones tactiles min 44px (WCAG) pour boutons et liens d’action */
button:not(.icon-only),
.btn,
.btn-primary,
.btn-secondary,
a.btn,
.page-topbar .auth-buttons .btn,
.page-topbar .auth-buttons .btn-primary {
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .container {
    padding: 24px 32px 32px;
  }
}

/* Barre commune : logo + Mon compte / Déconnexion à droite */
.page-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: #151515;
  border-bottom: 1px solid #26262c;
  flex-shrink: 0;
}

.page-topbar .topbar-home {
  color: #ff4d8d;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
}

.page-topbar .topbar-home:hover {
  color: #ff6b88;
}

.page-topbar .topbar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-topbar .topbar-nav a {
  color: #c4c4c4;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 10px 14px;
  min-height: 44px;
  min-width: 44px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.page-topbar .topbar-nav a:hover {
  color: #ff4d8d;
  background: rgba(255, 77, 109, 0.1);
}

.page-topbar .auth-buttons {
  display: flex;
  gap: 10px;
}

.page-topbar .auth-buttons .btn {
  padding: 8px 14px;
  border: 1px solid #ff4d8d;
  border-radius: 8px;
  color: #ff4d8d;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.page-topbar .auth-buttons .btn:hover {
  background: #ff4d8d;
  color: #0f0f12;
}

.page-topbar .auth-buttons .btn-primary {
  background: #ff4d8d;
  color: #0f0f12;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.page-topbar .auth-buttons .btn-primary:hover {
  background: #ff6b88;
}

/* ----- Modal rappel avant lancement partie (18+, consentement, CGU) ----- */
.launch-confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.88);
  box-sizing: border-box;
}
.launch-confirm-overlay.launch-confirm-hidden {
  display: none;
}
.launch-confirm-content {
  background: #17171c;
  border: 1px solid #26262c;
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  min-width: 0;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

@media (max-width: 374px) {
  .launch-confirm-overlay {
    padding: 16px;
  }
  .launch-confirm-content {
    padding: 20px 16px;
  }
}
.launch-confirm-title {
  margin: 0 0 16px 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #ff4d8d;
}
.launch-confirm-text {
  margin: 0 0 24px 0;
  font-size: 0.95rem;
  color: #ccc;
  line-height: 1.5;
}
.launch-confirm-text a {
  color: #ff4d8d;
  text-decoration: underline;
}
.launch-confirm-text a:hover {
  color: #ff6b88;
}
.launch-confirm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 14px 20px;
  box-sizing: border-box;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  background: #ff4d8d;
  color: #fff;
  cursor: pointer;
}
.launch-confirm-btn:hover {
  background: #ff6b88;
}
