body {
  font-family: Arial, sans-serif;
  background-color: #2a2a2a;
  color: #fff;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.navbar {
  display: flex;
  flex-direction: column; /* Affiche les éléments en colonne */
  align-items: center;
  padding: 10px 20px;
  background-color: #222;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.navbar .logo {
  font-size: 2em;
  color: #a4c639;
  font-weight: bold;
  margin-left: 15px;
}

.nav-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}


.navbar .nav-buttons a {
  color: #fff;
  text-decoration: none;
  padding: 10px 30px;
  background-color: #a4c639;
  border-radius: 5px;
  font-weight: bold;
}

.navbar .nav-buttons a:hover {
  background-color: #86a028;
}

/* Icône de profil et popup */
.profile-icon {
  font-size: 2em;
  color: #a4c639;
  cursor: pointer;
  transition: color 0.3s ease;
  position: absolute;
  top: 15px;
  right: 200px;
}


.profile-icon:hover {
  color: #86a028;
}

.profile-popup {
  position: absolute;
  top: 3px;
  right: 15px;
  background-color: #333;
  color: #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 15px;
  width: 220px;
  z-index: 1000;
}
.profile-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

#username-display {
  font-weight: bold;
  color: #34c6eb;
  font-size: 1.1em;
}

#rank-display {
  color: #a4c639;
  font-size: 1em;
  text-align: center;
  font-weight: bold;
}

.profile-popup a {
  display: block;
  color: #ff4d4d;
  text-decoration: none;
  font-weight: bold;
  margin-top: 10px;
  transition: color 0.3s ease;
}

.profile-popup a:hover {
  color: #ff0000;
}

.nav-buttons a.disabled {
  background-color: #555;
  color: #ccc;
  pointer-events: none;
  cursor: default;
}


@media (max-width: 768px) {
  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
  }

  .navbar .logo,
  .navbar img {
    display: none; /* Supprime le logo et le texte */
  }

  .mobile-nav {
    width: 100%;
    padding: 8px;
    font-size: 16px;
    background-color: #a4c639;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
  }

  .mobile-nav:focus {
    outline: none;
  }

  .profile-icon {
    font-size: 1.8em;
    top: 10px;
    right: 10px;
  }

  .profile-popup {
    top: 50px;
    right: 50px;
    width: 180px;
    padding: 10px;
  }

  .profile-info {
    flex-direction: column;
    text-align: center;
  }

  #username-display {
    font-size: 1em;
  }

  #rank-display {
    font-size: 0.9em;
  }

  .profile-popup a {
    font-size: 14px;
    text-align: center;
  }
}


/* Version Desktop */
.desktop-navbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 20px;
  background-color: #222;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

/* Version Mobile (cachée par défaut) */
.mobile-navbar {
  display: none;
  justify-content: space-between;
  align-items: center;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

/* Selecteur mobile */
#mobileNav {
  width: 80%;
  padding: 8px;
  font-size: 16px;
  background-color: #a4c639;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

#mobileNav:focus {
  outline: none;
}

/* Affichage mobile */
@media (max-width: 768px) {
  .desktop-navbar {
      display: none;
  }
  .mobile-navbar {
      display: flex;
  }
}


.profile-popup {
  position: absolute;
  right: 15px;
  background-color: #333;
  color: #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  padding: 15px;
  width: 220px;
  z-index: 1000;
  display: none; /* Cachée par défaut */
}

/* Ajout de la classe pour afficher la popup */
.profile-popup.show {
  display: block;
}
