/* --- VARIABLES & RESET --- */
:root {
  --bg-dark: #050a05;
  --bg-footer: #020302;
  --text-main: #f0fdf4;
  --text-muted: #86efac;
  --primary: #22c55e;
  --accent: #10b981;
  --glass: rgba(20, 30, 20, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --nav-height: 80px;
}

* {
  scrollbar-width: none;
  box-sizing: border-box;
}
::-webkit-scrollbar {
  display: none;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TYPOGRAPHIE */
.pixel-font {
  font-family: "VT323", monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.nature-text {
  background: linear-gradient(135deg, #86efac 0%, #22c55e 50%, #059669 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 15px rgba(34, 197, 94, 0.4));
}

/* --- NAVIGATION GLASS --- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  transition: all 0.4s ease;
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  background: rgba(5, 10, 5, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  height: 70px;
}

.nav-container {
  width: 90%;
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

/* Liens du milieu (Capsule) */
.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  list-style: none;
  padding: 5px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50px;
  border: 1px solid var(--glass-border);
  margin: 0;
}

.nav-links a {
  text-decoration: none;
  color: #a1a1aa;
  font-weight: 500;
  padding: 8px 24px;
  position: relative;
  z-index: 2;
  transition: color 0.3s;
}

.nav-links a.active,
.nav-links a:hover {
  color: white;
}

/* La pilule verte qui bouge */
.nav-marker {
  position: absolute;
  top: 5px;
  left: 5px;
  height: calc(100% - 10px);
  background: rgba(34, 197, 94, 0.2);
  border-radius: 30px;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.1);
  width: 0; /* JS le changera */
  opacity: 0;
}

/* Logo & Moddé */
.logo {
  text-decoration: none;
  font-size: 2rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}
.version-badge {
  font-size: 0.75rem;
  padding: 3px 8px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 4px;
  color: var(--text-muted);
}

.modded-link {
  text-decoration: none;
  color: #fbbf24;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.05);
  transition: all 0.3s;
}
.modded-link:hover {
  background: rgba(251, 191, 36, 0.2);
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.3);
  color: white;
  transform: translateY(-2px);
}

/* --- HERO & SECTIONS --- */
#hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("background.png") center/cover no-repeat fixed;
  overflow: hidden;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(5, 10, 5, 0.4), var(--bg-dark));
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  padding: 20px;
}
.title-large {
  font-size: 6.5rem;
  margin: 0;
  line-height: 0.9;
  text-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  animation: slideUp 1s ease-out forwards 0.2s;
}
.subtitle {
  font-size: 1.4rem;
  color: #d1d5db;
  margin: 1.5rem 0 3rem;
  opacity: 0;
  animation: slideUp 1s ease-out forwards 0.4s;
}
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-primary {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  padding: 18px 40px;
  font-size: 1.4rem;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s;
  opacity: 0;
  animation: slideUp 1s ease-out forwards 0.6s;
}
.btn-primary:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.25);
  transform: translateY(-5px);
}
.copy-feedback {
  margin-top: 15px;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.3s;
  font-weight: 600;
}
.copy-feedback.visible {
  opacity: 1;
}

/* --- OBJECTIFS & CARTES (3D) --- */
section {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  font-size: 3.5rem;
  margin-bottom: 1rem;
}
.section-desc {
  text-align: center;
  color: #9ca3af;
  max-width: 600px;
  margin: 0 auto 60px;
  font-size: 1.1rem;
}

.objectives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
}

.objective-card {
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.01)
  );
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px 30px;
  transition: transform 0.1s ease; /* Rapide pour le Tilt JS */
  position: relative;
}
.objective-card::before {
  /* Glow au survol */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.objective-card:hover::before {
  opacity: 1;
}

.obj-icon {
  font-size: 2.5rem;
  color: var(--primary);
  background: rgba(34, 197, 94, 0.1);
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  margin-bottom: 25px;
}

.progress-track {
  background: #222;
  height: 8px;
  border-radius: 4px;
  margin-top: auto;
  overflow: hidden;
}
.progress-fill {
  background: var(--primary);
  height: 100%;
  border-radius: 4px;
  position: relative;
}

/* ANIMATION D'APPARITION (Scroll Reveal) */
.hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}
.show {
  opacity: 1;
  transform: translateY(0);
}

/* --- PAGES SPÉCIFIQUES --- */
.page-header {
  padding-top: 150px;
  padding-bottom: 50px;
  text-align: center;
}
.glass-container {
  background: rgba(10, 15, 10, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  padding: 50px;
  border-radius: 20px;
  max-width: 600px;
  margin: 0 auto 50px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Formulaire */
.form-group {
  margin-bottom: 25px;
  text-align: left;
}
.form-group label {
  display: block;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}
input,
textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #333;
  padding: 15px;
  color: white;
  border-radius: 8px;
  font-family: inherit;
  transition: 0.3s;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.1);
}

/* --- FOOTER --- */
footer {
  background: #010201;
  border-top: 1px solid #111;
  padding: 80px 0 30px;
  margin-top: auto;
}
.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 50px;
  width: 90%;
  max-width: 1400px;
  margin: 0 auto 50px;
}
.footer-links ul {
  list-style: none;
  padding: 0;
}
.footer-links li {
  margin-bottom: 12px;
}
.footer-links a {
  color: #888;
  text-decoration: none;
  transition: 0.3s;
}
.footer-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.status-box {
  background: #111;
  padding: 15px 25px;
  border-radius: 10px;
  border: 1px solid #222;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.status-dot {
  width: 10px;
  height: 10px;
  background: #ef4444; /* Rouge par défaut */
  border-radius: 50%;
  box-shadow: 0 0 10px #ef4444;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #111;
  padding-top: 30px;
  color: #444;
}

/* --- PORTAL FX --- */
#portal-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle, #2d004d, #000);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 2s ease;
}
.portal-anim {
  animation: warp 9s ease-in forwards;
}
@keyframes warp {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.05);
    filter: brightness(1.5) contrast(1.2);
  }
  100% {
    transform: scale(8);
    filter: brightness(0);
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    bottom: 20px;
    top: auto;
    width: 90%;
    justify-content: center;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
  }
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .title-large {
    font-size: 4rem;
  }
}

/* --- HAMBURGER MENU (MOBILE) --- */
.hamburger {
  display: none; /* Caché sur PC */
  cursor: pointer;
  z-index: 2000;
}
.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
  background-color: white;
  border-radius: 2px;
}

/* Animation du Burger en Croix */
.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}
.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
  /* 1. HEADER & TEXTES */
  .title-large {
    font-size: 3.5rem;
  } /* Texte moins gros */
  .subtitle {
    font-size: 1.1rem;
    padding: 0 10px;
  }
  .section-title {
    font-size: 2.5rem;
  }

  /* 2. NAVIGATION MOBILE */
  .hamburger {
    display: block;
  } /* On affiche le burger */

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Caché hors écran à droite */
    width: 80%; /* Prend 80% de la largeur */
    height: 100vh;
    background: rgba(5, 10, 5, 0.95); /* Fond très sombre */
    backdrop-filter: blur(20px); /* Flou intense */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    transition: 0.4s ease-in-out;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1500;
    display: flex; /* Active le flexbox pour aligner */
  }

  .nav-menu.active {
    right: 0; /* On le fait glisser visible */
  }

  /* Reset des styles PC pour le mobile */
  .nav-links {
    flex-direction: column;
    position: static;
    transform: none;
    background: transparent;
    border: none;
    gap: 30px;
  }

  .nav-links a {
    font-size: 1.5rem; /* Gros liens tactiles */
    color: white;
  }

  .nav-marker {
    display: none;
  } /* On cache la pilule verte sur mobile */

  /* Bouton Moddé dans le menu */
  .modded-link {
    width: 80%;
    text-align: center;
    padding: 15px;
    font-size: 1.2rem;
  }

  /* 3. LAYOUT GÉNÉRAL */
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .container,
  .glass-container {
    padding: 20px;
    width: 95%;
  }
}
