/* =============================  
   VARIABLES & RESET
   ============================= */
:root {
  --black:    #000000;
  --white:    #ffffff;
  --red:      #e60000;
  --discord:  #7289DA;
  --twitch:   #6441A4;
  --youtube:  #FF0000;
  --blue:     #0077b6;
  --green:    #00ff00;
  --font:     'Poppins', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* =============================  
   LANGUES
   ============================= */
.lang-fr, .lang-en {
  display: none;
}
html[lang="fr"] .lang-fr { display: inline; }
html[lang="en"] .lang-en { display: inline; }

/* =============================  
   SMOOTH SCROLL
   ============================= */
html {
  scroll-behavior: smooth;
}

/* =============================  
   HEADER & NAVIGATION
   ============================= */
header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 64px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;       /* centre vertical */
  justify-content: space-between;
  padding: 0 1rem;
}

.nav-logo {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--white);
  display: flex;
  align-items: center;
  height: 100%;
}

nav {
  flex: 1;
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

nav ul li a {
  color: var(--white);
  font-weight: 600;
  display: flex;
  align-items: center;
  height: 100%;
  line-height: normal;
  padding: 0 0.5rem;
  transition: color 0.2s;
}

nav ul li a:hover {
  color: var(--red);
}

/* Drapeaux */
.lang-flag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 100%;
}
.lang-flag button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.lang-flag img {
  width: 24px;
  height: 16px;
  display: block;
}

/* Masquer le hamburger desktop */
.hamburger,
.hamburger span {
  display: none !important;
}

/* =============================  
   MOBILE MENU
   ============================= */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
  }
  .hamburger span {
    width: 24px;
    height: 3px;
    background: var(--white);
  }
  nav ul {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--black);
    transform: translateY(-200%);
    transition: transform 0.3s ease;
  }
  nav ul.open {
    transform: translateY(0);
  }
}

/* =============================  
   HERO PARALLAX
   ============================= */
#hero {
  position: relative;
  height: 100vh;
  margin-top: 64px;          /* compense le header fixe */
  overflow: hidden;
}

#hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#hero .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

#hero .content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1rem;
}

/* =============================  
   HERO TITLE
   ============================= */
#hero-title {
  display: flex;
  gap: 0.5rem;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hl-light {
  color: var(--white);
  /* glow effect */
  text-shadow:
    0 0 4px rgba(255,255,255,0.9),
    0 0 8px rgba(255,255,255,0.7),
    0 0 12px rgba(255,255,255,0.5);
}

.hl-amp {
  color: var(--red);
  font-size: inherit;
  margin: 0 0.2em;
}

.hl-shadow {
  color: var(--black);
  text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
}

/* =============================  
   TAGLINE
   ============================= */
#tagline {
  font-size: 1.2rem;
  max-width: 800px;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}

/* =============================  
   HERO BUTTONS
   ============================= */
.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-buttons a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  color: var(--white);
  transition: transform 0.2s, opacity 0.2s;
}

.hero-buttons img {
  width: 24px;
  height: 24px;
}

.btn-discord2 {
  background: var(--discord);
}
.btn-twitch {
  background: var(--twitch);
}
.btn-youtube {
  background: var(--youtube);
}

.hero-buttons a:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* =============================  
   SCROLL DOWN ARROW
   ============================= */
.scroll-down {
  display: block;
  margin: 2rem auto 0;    /* sous les boutons */
  color: var(--white);
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* =============================  
   SERVEURS SECTION
   ============================= */
#servers {
  padding: 4rem 1rem;
}

#servers h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
}

.grid-servers {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
  max-width: 1200px;
  margin: 0 auto;
}

/* =============================  
   CARD SERVEUR
   ============================= */
.card {
  background: rgba(255,255,255,0.05);
  border: 2px solid var(--red);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.card-header {
  background: var(--red);
  padding: 0.75rem;
  text-align: center;
}

.card-header h3 {
  color: var(--white);
  font-size: 1.25rem;
}

.card-body {
  padding: 1rem;
}

.card-body ul li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* =============================  
   CARD FOOTER (BOUTONS + COMPTEUR)
   ============================= */
.card-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
}

.player-count {
  min-height: 1.2em;
  text-align: center;
  font-size: 1rem;
  visibility: hidden;
}

.player-count:not(:empty) {
  visibility: visible;
}

.player-count strong {
  font-weight: bold;
}

.btn-download,
.btn-join,
.btn-live {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

.btn-download {
  background: rgba(255,255,255,0.2);
}

.btn-download.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.btn-join {
  background: var(--red);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 0 rgba(230,0,0,0); }
  50%     { transform: scale(1.03); box-shadow: 0 0 12px rgba(230,0,0,0.8); }
}

.btn-live {
  background: var(--blue);
}

.btn-download:not(.disabled):hover,
.btn-join:hover,
.btn-live:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

/* STATUT SERVEUR */
.status {
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  animation: blink 1s infinite ease-in-out;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* =============================  
   CONTACT SECTION
   ============================= */
#contact {
  padding: 3rem 1rem;
  background: rgba(255,255,255,0.05);
}

#contact h2 {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-buttons a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  transition: transform 0.2s, opacity 0.2s;
}

.contact-buttons img {
  width: 24px;
  height: 24px;
}

.contact-buttons .btn-discord2 { background: var(--discord); }
.contact-buttons .btn-twitch  { background: var(--twitch);  }
.contact-buttons .btn-youtube { background: var(--youtube); }

.contact-buttons a:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* =============================  
   FOOTER
   ============================= */
footer {
  background: rgba(255,255,255,0.05);
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* Centre le contenu (texte/icônes) des boutons des serveurs */
.btn-download,
.btn-join,
.btn-live {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
/* Curseur clignotant */
.cursor {
  display: inline-block;
  width: 1ch;
  animation: blinkCursor 0.7s steps(1) infinite;
}
@keyframes blinkCursor {
  50% { opacity: 0; }
}

/* Facultatif : vitesse de disparition du texte si vous rechargez plusieurs fois */
#typed {
  white-space: pre-wrap; /* préserve retours à la ligne si besoin */
}
/* Curseur clignotant plus marqué */
.cursor {
  display: inline-block;
  width: 1ch;
  /* clignote toutes les 0.5s */
  animation: blinkCursor 0.5s step-end infinite;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ----------------------------------------
   PROFESSIONAL MOD GRID
   ---------------------------------------- */
/* Conteneur des colonnes */
/* layout principal : 2 colonnes desktop, 1 colonne mobile */
.download-grid {
  display: grid;
  gap: 2rem;
  grid-template-areas:
    "center"
    "vehicles"
    "tracks";
  max-width: 1200px;
  margin: 0 auto;
}
@media (min-width: 768px) {
  .download-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "center center"
      "vehicles tracks";
  }
}
/* attribution des zones */
.center-card  { grid-area: center;  }
.vehicles-col { grid-area: vehicles; }
.tracks-col   { grid-area: tracks;   }

/* si on masque tracks-col, vehicles-col doit prendre toute la largeur */
.vehicles-col.full-width {
  /* étend la colonne véhicule sur les deux colonnes du grid */
  grid-column: 1 / -1;
}
/* Titre de section intérieur */
/* centre le titre dans chaque colonne */
.column-title {
  text-align: center;       /* centré horizontalement */
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  border-bottom: 2px solid var(--red);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}
/* Grille interne : 1 col mobile, 2 cols desktop */
.mod-items {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .mod-items {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Carte individuelle */
.card-download {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 4px solid var(--red);
  border-radius: 6px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .2s, box-shadow .2s;
}
.card-download:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}

/* Titre de la carte */
.card-download h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--white);
}

/* Bouton de la carte */
.card-download .btn-download {
  background: none;
  border: 2px solid var(--red);
  color: var(--red);
  padding: 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  transition: background .2s, color .2s;
}
.card-download .btn-download:hover {
  background: var(--red);
  color: var(--white);
}

/* Centrage bouton "Tous les mods" */
.center-card {
  text-align: center;
}
.center-card .card-download {
  max-width: 400px;
  margin: 0 auto;
}
/* =============================  
   HERO BANNIÈRE (Download page uniquement)
   ============================= */
body.download-page #hero {
  position: relative;
  height: 200px;       /* hauteur fixe de la bannière */
  margin-top: 64px;     /* pour compenser le header fixe */
  overflow: hidden;
}

body.download-page #hero video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;    /* couvre toute la zone */
}

body.download-page #hero .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

body.download-page #hero .content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;    /* centre vertical */
  justify-content: center;/* centre horizontal */
  text-align: center;
  padding: 0 1rem;
}

body.download-page #hero-title {
  font-size: clamp(2rem,5vw,3rem);
  margin: 0;
}
