/* ==========  VARIABLES GLOBALES  ========== */
:root {
  --neon-blue: #00bfff;
  --neon-violet: #a000ff;
  --bg-dark: #050510;
  --text-light: #eaeaea;
  --nav-height: 70px;
}

/* ==========  BASE  ========== */
html,
body {
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-light);
  overflow-x: hidden;
}

section {
  position: relative;
  padding: 5rem 2rem;
  z-index: 2;
}

/* Gradient animé d’arrière-plan */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(120deg, var(--neon-blue), var(--neon-violet), #000);
  background-size: 300% 300%;
  animation: gradientShift 12s ease infinite;
  z-index: 0;
  opacity: 0.25;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Canvas de particules */
#particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* ==========  NAVIGATION  ========== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(10, 10, 20, 0.6);
  backdrop-filter: blur(10px);
  z-index: 10;
  transform: translateY(-100%);
  transition: transform 0.8s ease;
}

nav.visible {
  transform: translateY(0);
}

#logo-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80vh;
  perspective: 1500px;
}

.mainNav.logo-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  place-content: center;
  cursor: pointer;
  transform-style: preserve-3d;
}

.home.logo-container {
  position: relative;
  width: 50rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  place-content: center;
  cursor: pointer;
  transform-style: preserve-3d;
}

.logo-3d {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
}

/* Aura bleue animée */
.mainNav.logo-aura {
  position: absolute;
  width: 45px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,191,255,0.5), rgba(0,0,30,0) 70%);
  animation: pulseAura 5s ease-in-out infinite alternate,
             hueShift 8s linear infinite;
  filter: blur(40px);
  pointer-events: auto; /* pour capter le hover */
  z-index: 0;
  transition: all 0.6s ease-out;
}

.home.logo-aura {
  position: absolute;
  width: 300px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,191,255,0.5), rgba(0,0,30,0) 70%);
  animation: pulseAura 1.5s ease-in-out infinite alternate,
             hueShift 8s linear infinite;
  filter: blur(40px);
  pointer-events: auto; /* pour capter le hover */
  z-index: 0;
  transition: all 0.6s ease-out;
}

.logo-aura:hover {
  transform: scale(1.25);
  filter: blur(55px);
  opacity: 1;
}

/* Logo principal */
.mainNav.interactive-logo {
  width: 40px;
  z-index: 2;
  transform-style: preserve-3d;
  transition: transform 1s ease, filter 0.3s ease;
  filter: drop-shadow(0 0 20px rgba(0,191,255,0.8));
  transform: perspective(1200px) rotateX(0) rotateY(0);
}

.home.interactive-logo {
  width: 280px;
  z-index: 2;
  transform-style: preserve-3d;
  transition: transform 1.5s ease, filter 0.3s ease;
  filter: drop-shadow(0 0 20px rgba(0,191,255,0.8));
  transform: perspective(1200px) rotateX(0) rotateY(0);
}

/* Effet hover : surélévation et aura plus intense */
.logo-3d:hover .interactive-logo {
  transform: scale(1.2);
  filter: drop-shadow(0 0 60px rgba(0,191,255,1));
}

.logo-container.hovered .interactive-logo {
  transform: scale(1.2);
  filter: drop-shadow(0 0 40px rgba(0,191,255,1));
}

.logo-3d:hover .logo-aura {
  filter: blur(65px);
  opacity: 1;
}

@keyframes pulseAura {
  0% { transform: scale(1); opacity: 0.75; }
  100% { transform: scale(1.15); opacity: 0.95; }
}

@keyframes hueShift {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}

.nav-title {
  font-weight: 700;
  margin-left: 0.5rem;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-light);
  position: relative;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-violet));
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--neon-blue);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ==========  SECTION HERO  ========== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.main-title {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 1rem;
  letter-spacing: 2px;
  opacity: 0;
  transform: translateY(20px);
}

/* Bouton CTA */
/* Bouton CTA animé */
.cta {
  position: relative;
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  color: #fff;
  background: linear-gradient(270deg, var(--neon-blue), var(--neon-violet), var(--neon-blue));
  background-size: 300% 300%;
  animation: gradientMoveBtn 5s ease infinite;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 0 25px var(--neon-blue);
  opacity: 0;
  transform: translateY(40px);
  transition: box-shadow 0.3s, transform 0.3s;
}

@keyframes gradientMoveBtn {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.cta:hover {
  box-shadow: 0 0 50px var(--neon-blue), 0 0 30px var(--neon-violet);
  transform: scale(1.07);
}

.cta:active {
  transform: scale(0.95);
  box-shadow: 0 0 60px var(--neon-violet);
}

/* Animation clic satisfaisant : onde lumineuse */
.cta::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 191, 255, 0.5);
  transition: width 0.4s ease, height 0.4s ease, opacity 0.6s ease;
  opacity: 0;
}

.cta:focus::after,
.cta:active::after {
  width: 300%;
  height: 300%;
  opacity: 0;
}

/* ==========  SECTION VIDÉO  ========== */
.video-section {
  margin-top: 8vh;
  margin-bottom: 8vh;
  opacity: 0;
  transform: translateY(60px);
  will-change: opacity, transform;
}

.video-section h2 {
  margin-bottom: 2.5rem;
  font-size: 3rem;
  text-align: center;
}

.video-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.video-wrapper video {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 191, 255, 0.3);
}

/* ==========  SECTION PROJETS  ========== */

.projects-section h2 {
  margin-bottom: 2rem;
  font-size: 4rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.project-card {
  background: rgba(15, 15, 30, 0.7);
  border-radius: 25px;
  padding: 1.5rem;
  margin: 0;
  box-shadow: 0 0 15px rgba(0, 191, 255, 0.2);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  opacity: 0;
  transform: translateY(60px);
  will-change: opacity, transform;
}

.project-card:hover {
  transform: translateY(-10px), translateZ(50px);
  box-shadow: 0 0 70px rgba(0, 191, 255, 0.5);
  transition: all 0.5s ease;
}

.project-card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
}

/* ==========  FOOTER  ========== */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  background: rgba(10, 10, 20, 0.5);
}

/* ==========  UTILITAIRES  ========== */
.hidden {
  opacity: 0;
}

.visible {
  opacity: 1;
  transition: opacity 1s ease;
}