@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&display=swap');

/* ========= Global & Desktop ========= */

/* Réinitialisation générale */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

/* Pour Desktop, hauteur fixe et défilement masqué */
html, body {
  height: 100vh;
  overflow: hidden;
}
body {
  background: url('images/site-background.png') no-repeat center center fixed;
  background-size: cover;
  color: white;
}

/* Barre de navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.navbar ul {
  list-style: none;
  display: flex;
  gap: 20px;
}
.navbar ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 15px;
  transition: 0.3s;
}
.navbar ul li a:hover {
  color: cyan;
}

/* Boîte de bienvenue – centrée */
.welcome-box {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(128, 128, 128, 0.3);
  padding: 40px;
  border-radius: 10px;
  text-align: center;
  width: 400px;
}
.welcome-box h1 {
  font-size: 24px;
  font-weight: bold;
}
.welcome-box h2 {
  font-size: 28px;
  font-weight: 700;
  margin-top: 10px;
}

/* Rectangle 1 – Informations sur le serveur */
.server-info {
  position: absolute;
  top: 70px;
  left: 20px;
  background: black;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  border-bottom: 3px solid blue;
  width: 280px;
  margin: 20px;
  font-size: 14px;
}

/* Rectangle 2 – Info-section (Statistiques et bouton "Nous Rejoindre") */
.info-section {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: black;
  text-align: center;
  padding: 20px;
  border-radius: 8px;
  font-size: 14px;
  width: 280px;
}
.member-stats {
  display: flex;
  justify-content: center;
  gap: 50px;
  font-size: 24px;
  margin-bottom: 30px;
}
.total {
  color: gray;
  font-weight: bold;
}
.online {
  color: green;
  font-weight: bold;
}

/* Rectangle "Nous Rejoindre" – beau style, intégré dans l'info-section */
.join-box {
  background: black;
  padding: 15px;
  border-radius: 8px;
  display: inline-block;
  border-bottom: 3px solid blue;
  margin-top: 10px;
}
.join-box p {
  font-size: 16px;
  font-weight: bold;
}
.join-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background: blue;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: 0.3s;
}
.join-btn:hover {
  background: cyan;
  transform: scale(1.1);
}

/* Rectangle 3 – Section des actualités */
.news-section {
  position: absolute;
  top: 50px;
  right: 20px;
  background: black;
  color: white;
  padding: 15px;
  border-radius: 10px;
  border-bottom: 3px solid blue;
  width: 280px;
  font-size: 14px;
}
.news-item {
  padding: 10px 0;
  border-bottom: 1px solid gray;
}
.news-item h3 {
  margin: 0;
  font-size: 18px;
}
.news-item p {
  font-size: 14px;
  margin: 5px 0;
}
.news-item span {
  font-size: 12px;
  color: gray;
}

/* ========= Mobile (max-width: 600px) ========= */
@media (max-width: 600px) {
  /* Autoriser le défilement vertical sur mobile */
  html, body {
    height: auto;
    overflow-y: auto;
  }
  
  /* Masquer la boîte de bienvenue */
  .welcome-box {
    display: none;
  }
  
  /* Ajustement de la barre de navigation */
  .navbar ul li a {
    padding: 5px 7px;
    font-size: 12px;
  }
  
  /* Les blocs s'empilent verticalement et sont centrés */
  .server-info,
  .info-section,
  .news-section {
    position: static;
    width: calc(100% - 40px);
    margin: 70px auto;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
  }
  
  /* Centrer le rectangle "Nous Rejoindre" */
  .join-box {
    display: block;
    width: fit-content;
    margin: 10px auto;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
  }
  .join-box p {
    font-size: 14px;
    margin-bottom: 5px;
  }
  .join-btn {
    display: inline-block;
    padding: 8px 15px;
    font-size: 12px;
  }
  
  /* Adapter la section des statistiques */
  .member-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    font-size: 20px;
  }
  
  .news-item h3 {
    font-size: 10px;
  }
  .news-item p {
    font-size: 9px;
  }
  .news-item span {
    font-size: 8px;
  }
}
