/* lobby.css */
@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&display=swap');

:root {
  --nav-height: 72px;
}

.hidden {
  display: none;
}

html.lobby-html {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

body {
  background: radial-gradient(circle at 15% 20%, rgba(224, 176, 75, 0.1), transparent 35%),
    radial-gradient(circle at 80% 0%, rgba(102, 153, 255, 0.12), transparent 30%),
    linear-gradient(160deg, #000 0%, #211a0b 55%, #05070f 100%);
  color: #eee;
  font-family: sans-serif;
  margin: 0;
  min-height: 100vh;
  /* plus de flex, plus de justify-content */
}

body.lobby-body {
  position: relative;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: visible;
  overscroll-behavior-y: auto;
}

.lobby-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  /* plus de max-width ici, c'est le wrapper plein écran */
  margin: 0;
  /* auto ne sert plus à rien */
  padding-top: 0;
}

.lobby-header {
  position: relative;
  display: block;
  min-height: var(--nav-height);
  padding-top: 12px;
}

/* Le conteneur est positionné de manière absolue dans le header */
.lobby-header .nav-menu-container {
  position: absolute;
  top: 0;
  left: 39%;
  transform: translateX(calc(-50% - 220px));
}

/* L'image est simplement affichée dans le conteneur */
.lobby-header .nav-menu-image {
  display: block;
}

/* L'overlay est centré horizontalement dans le conteneur (donc sur l'image) */
.lobby-header .nav-menu-overlay {
  top: 3px;
}

.nav-right {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lobby-header .nav-right {
  position: absolute;
  right: clamp(16px, 4vw, 56px);
  top: 0;
  z-index: 4;
}

.nav-right-frame {
  padding: 0.35rem 0.6rem;
  border: 2px solid #d5c49b;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
}

.lang-select {
  background: #1f1f1f;
  color: #fff;
  border: 1px solid #d5c49b;
  padding: 0.2rem 0.4rem;
  border-radius: 0.2rem;
}

.nav-right span {
  font-weight: bold;
  color: #f4d3a4;
}

.welcome-link {
  cursor: pointer;
  text-decoration: underline;
}

.welcome-link:hover {
  color: #fff;
}

.nav-right button {
  background: linear-gradient(180deg, #e26a2c 0%, #b3411b 100%);
  color: #fff;
  border: 1px solid #d5c49b;
  padding: 0.3rem 0.6rem;
  border-radius: 0.3rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nav-right button:hover {
  background: linear-gradient(180deg, #f07a38 0%, #c34f24 100%);
}

/* Bandeau entre le menu et le contenu */
.lobby-banner {
  width: 100%;
  min-height: 380px;
  margin: -1.75rem auto 2.25rem;
  background-image: url("../img/bandeau_lobby.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1.5rem 2rem;
  box-sizing: border-box;
}

.banner-logo {
  width: 490px;
  max-width: 100%;
  height: auto;
}

.lobby-body .bande-login--below-tab {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  display: block;
  /*margin: 1rem auto 0;
  width: min(1200px, 100%);*/
}

/* Main */
.lobby-page {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  max-width: 1140px;
  min-height: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
  background-image: url("../img/tableau_bois.webp");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
  /* conserve la couverture même avec peu de contenu */
}

.columns {
  display: flex;
  justify-content: center;
  width: 100%;
}

.game-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 720px;
  padding-top: 9px;
  margin: 0 auto;
}

.my-game,
.news-block {
  min-height: 300px;
  /* à ajuster selon votre maquette */
  width: 100%;
  margin: 0;
  /* supprime l’auto-centering de .news-block */
}

.my-game {
  border: 2px solid #d5c49b;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 6px;
  background-color: rgba(0, 0, 0, 0.5);
  min-height: 200px;
}

.my-game h2,
.news-block>h2 {
  background-image: url("../img/bandeau lobby.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% auto;
  height: 50px;
  line-height: 45px;
  color: #000;
  padding: 0.3rem 0.5rem;
  margin-top: 0;
  margin-bottom: -2rem;
  font-family: 'MedievalSharp', serif;
  font-size: clamp(1rem, 4vw, 1.5rem);
}

.news-block {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 1rem;
  color: #fff;
  border: 2px solid #d5c49b;
  border-radius: 6px;
  margin: 1rem auto 0;
  min-height: 200px;
}

.news-list {
  list-style: none;
  padding-left: 1rem;
  margin-top: 63px;
}

/* Conteneur des mondes */
#world-buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  border-bottom: 2px solid #d5c49b;
  padding: 0 1rem 0;
  margin: 0 -1rem 1.5rem;
  padding-bottom: 1rem;
  padding-top: 4rem;
}

/* Wrapper pour chaque monde */
.world-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.world-entry .world-icon {
  width: 128px;
  height: 128px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.world-entry .world-score {
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

/* Bouton des mondes existants */
.world-entry .world-btn {
  background-color: #c33;
  color: #fff;
  border: none;
  border-radius: 0.3rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1rem;
  width: 120px;
  text-align: center;
}

.world-entry .world-btn:hover {
  background-color: #e55;
}

/* Bouton "Nouveau monde" (identique mais sans icône wrapper) */
.new-world-btn,
.back-btn {
  background-color: #c33;
  color: #fff;
  border: none;
  border-radius: 0.3rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1rem;
  text-align: center;
  align-self: center;
  margin-top: auto;
}

.new-world-btn:hover,
.back-btn:hover {
  background-color: #e55;
}

/* ————————————————————————
   Séparation + centrage du bouton “Nouveau monde”
   ———————————————————————— */
.my-game {
  /* assure qu’il y a toujours un peu d’espace sous les boutons de monde */
  padding-bottom: 2rem;
}

.new-world-btn,
.back-btn {
  /* on remplace margin-top: auto par un margin fixe */
  margin-top: 4.5rem;
  align-self: center;
  /* centre horizontalement dans le flex */
  position: relative;
  /* pour le ::before */
}

/* Corriger le gros espace sur mobile :
   le menu n'est plus "fixed", il redevient normal */
@media (max-width: 768px) {

  /* remove the fixed-header offset on mobile so the banner sits flush */
  .lobby-wrapper {
    padding-top: 0;
  }

  /* on s'assure aussi qu'il n'y a pas de marge en plus */
  .banner {
    margin-top: 0 !important;
    position: static;
    top: auto;
  }
}

/* Fenêtre modale pour les messages serveur (maintenance, erreurs, etc.) */
.status-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 1rem;
}

.status-modal__dialog {
  background: linear-gradient(135deg, #0d3a66, #0a5db3);
  border: 3px solid #f0c13f;
  color: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.status-modal__dialog h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}

.status-modal__dialog p {
  margin: 0 0 1rem;
  line-height: 1.5;
}

.status-modal__close {
  background: #f0c13f;
  border: 0;
  color: #0d3a66;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.status-modal__close:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}