/* === CSS Principal === */

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

/* === Header / Navbar === */
header {
  background-color: #1a1a1a;
  padding: 10px 20px;
  color: white;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: auto;
  position: relative;
}

.navbar .logo {
  font-size: 1.5em;
  color: #00AA00;
}

/* Conteneur nav : prend tout l'espace possible, centre les liens */
.navbar nav {
  flex: 1;
  display: flex;
  justify-content: center;  /* centre les liens */
  margin-left: 0;           /* on supprime le margin-left précédent */
}

.navbar ul.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  padding: 0;
  margin: 0;
  max-width: 600px;        /* limite largeur du menu */
  width: 100%;
  justify-content: center;
}

.navbar ul.nav-links li a {
  color: #AAAAAA;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.navbar ul.nav-links li a:hover {
  color: #CCCCCC;
}

.auth .btn {
  background-color: #00AA00;
  color: white;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  margin-left: 10px;
  white-space: nowrap;
}

.auth .btn:hover {
  background-color: #33CC33;
}

/* Burger menu */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 3px;
  background: #00AA00;
  border-radius: 2px;
}

/* Responsive */

@media screen and (max-width: 768px) {
  .navbar nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: #1a1a1a;
    display: none;
    flex-direction: column;
    padding: 20px 15px; /* padding horizontal pour espacer les liens du bord */
    z-index: 10;
  }

  .navbar nav.active {
    display: flex;
  }

  .navbar ul.nav-links {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  .auth {
    display: none;
  }

  .burger {
    display: flex;
  }
}

/* === Hero (image + titre) === */
.hero {
  position: relative;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent),
              url('../img/background.png') no-repeat center center;
  background-size: cover;
  padding: 120px 20px;
  text-align: center;
  color: #FFFFFF;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #f5f5f5);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: auto;
}

.hero-content h1 {
  font-size: 3em;
  margin-bottom: 15px;
}

.hero-content p {
  font-size: 1.2em;
  margin-bottom: 30px;
}

/* === Boutons de la bannière === */
.hero-buttons {
  margin-top: 25px;
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-hero {
  background: #00AA00;
  color: #FFFFFF;
  padding: 12px 25px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 0 10px #33CC33;
  transition: background 0.3s, box-shadow 0.3s;
}

.btn-hero:hover {
  background: #33CC33;
  box-shadow: 0 0 15px #33CC33;
}

.btn-hero.secondary {
  background: #FFFFFF;
  color: #00AA00;
  box-shadow: 0 0 10px #33CC33;
  border: 2px solid #00AA00;
}

.btn-hero.secondary:hover {
  background: #f0f0f0;
  box-shadow: 0 0 15px #33CC33;
}

/* === Statut du serveur === */
.server-status {
  font-size: 1.2em;
  margin: 40px auto 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot.green {
  background-color: #00AA00;
}

.status-dot.red {
  background-color: #FF0000;
}

.server-status.online {
  color: #00AA00;
}

.server-status.offline {
  color: #FF0000;
}

/* === Actualités === */
.news-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

.news-title {
  font-size: 2em;
  margin-bottom: 20px;
  text-align: center;
  color: #1a1a1a;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.news-main, .news-left, .news-right {
  position: relative;
  color: white;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  padding: 20px;
  height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 70px; /* laisse un espace en haut */
}

.news-badge {
  display: inline-block;
  padding: 4px 10px; /* réduit le padding horizontal */
  border-radius: 999px; /* pour un rond plus serré */
  font-size: 0.8rem;
  font-weight: bold;
  background-color: #ff5555; /* ou spécifique à chaque badge */
  color: white;
  width: auto !important; /* désactive toute largeur forcée */
  max-width: max-content;
}

.badge-annonce {
  background: #cc0000;
}

.badge-skyblock {
  background: #3399ff;
}

.badge-autre {
  background: #777;
}

.news-subgrid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.news-main h3,
.news-left h3,
.news-right h3 {
  background-color: rgba(0, 0, 0, 0.75);
  display: inline-block;
  padding: 5px 10px;
  border-radius: 5px;
}
/* === Responsive pour section actualités + sidebar === */
@media screen and (max-width: 768px) {
  /* Conteneur principal en colonne */
  div[style*="display: flex; max-width: 1200px;"] {
    flex-direction: column !important;
    padding: 20px 10px !important;
  }

  /* Partie gauche (actualités) prend toute la largeur */
  div[style*="flex: 2;"] {
    width: 100% !important;
    margin-bottom: 30px;
  }

  /* Partie droite (sidebar) prend toute la largeur */
  div[style*="flex: 1;"] {
    width: 100% !important;
  }

  /* News grid en colonne */
  .news-grid {
    display: flex;
    flex-direction: column;
  }

  .news-subgrid {
    display: flex;
    flex-direction: column;
  }

  .right-sidebar {
    max-width: 100%;
  }
}

/* === Stats Section === */
.stats-wrapper {
  width: 100%;
  background: linear-gradient(to bottom, #f5f5f5 0%, #1a1a1a 100%);
  padding: 40px 0;
  transition: background 0.5s ease;
  margin-bottom: 0;
  padding-bottom: 0;
}

.stats-section {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 50px;
  text-align: center;
  color: white;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  flex: 1;
}

.stat i {
  font-size: 4.5rem;
  color: #00AA00;
  transition: color 0.3s ease;
}

.stat-title {
  font-weight: bold;
  font-size: 1.8rem;
  color: white;
  margin-top: -10px;
}

.stat > div:nth-child(3) {
  font-size: 2.5rem;
  font-weight: 900;
  color: #33CC33;
}

@media screen and (max-width: 768px) {
  .stats-section {
    flex-direction: column;
    gap: 30px;
    padding: 0 20px;
  }

  .stat {
    width: 100%;
  }
}

/* === Partie de droite ===*/
.right-sidebar {
  background: #111; /* Couleur fond */
  color: white;
  padding: 20px;
  border-radius: 10px;
  max-width: 300px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Top Voteurs */
.top-voters h3 {
  margin-bottom: 15px;
  font-size: 1.3em;
  color: #00AA00;
}

.top-voters ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.top-voters li {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  background-color: #1a1a1a;
  padding: 8px;
  border-radius: 5px;
}

.top-voters img {
  margin-right: 10px;
  border-radius: 5px;
}

.voter-name {
  flex-grow: 1;
  font-weight: bold;
  color: #AAAAAA;
}

.voter-name:hover {
  color: #CCCCCC;
}

.voter-score {
  color: #33CC33;
}

/* Vidéo YouTube */
.youtube-video h3 {
  font-size: 1.3em;
  color: #00AA00;
  margin-bottom: 10px;
}

/* Bouton Devlog */
.devlog-button-container {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.btn-devlog {
  background-color: #00AA00;
  color: white;
  padding: 12px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  box-shadow: 0 0 10px #33CC33;
  transition: background 0.3s, transform 0.2s;
}

.btn-devlog:hover {
  background-color: #33CC33;
  transform: scale(1.05);
}

/* Réseaux sociaux */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.social-icons a {
  font-size: 32px; /* Agrandit les icônes */
  color: #00AA00;  /* Vert normal */
  transition: transform 0.2s, color 0.3s;
}

.social-icons a:hover {
  transform: scale(1.2);
  color: #33CC33; /* Vert clair au survol */
}

.social-icons img {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
  transition: transform 0.2s;
}

.social-icons img:hover {
  transform: scale(1.1);
}

/* === Footer === */
footer {
  background-color: #1a1a1a;
  color: #AAAAAA;
  text-align: center;
  padding: 20px;
  margin-top: 0px;
}

footer a {
  color: #AAAAAA;
  text-decoration: none;
  transition: color 0.3s;
}

footer a:hover {
  color: #CCCCCC;
}
