/* ------------------- RESET ------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Fira Code", monospace;
  background: linear-gradient(120deg, #0a192f, #112240);
  color: #ccd6f6;
  line-height: 1.6;
  transition: background 0.5s ease, color 0.5s ease;
  overflow-x: hidden;
}

/* ------------------- GLOBAL ------------------- */
section {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}
section.reveal {
  opacity: 1;
  transform: translateY(0);
}

h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 40px;
  color: #64ffda;
  text-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

/* ------------------- HEADER ------------------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 10%;
  background: rgba(10, 25, 47, 0.9);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #112240;
  backdrop-filter: blur(10px);
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: #64ffda;
  text-shadow: 0 0 10px rgba(100, 255, 218, 0.7);
}

.navbar {
  display: flex;
  gap: 25px;
}

.navbar a {
  color: #ccd6f6;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: color 0.3s;
}

.navbar a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -5px;
  left: 0;
  background: #64ffda;
  transition: width 0.3s;
}

.navbar a:hover {
  color: #64ffda;
}

.navbar a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: #64ffda;
}

/* ------------------- HERO ------------------- */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10%;
  gap: 40px;
  overflow: hidden; /* cache ce qui dépasse */
}

/* Particles limité au Hero */
#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* derrière */
}

.hero-text,
.hero-img {
  position: relative;
  z-index: 1; /* devant */
}

.hero-text {
  flex: 1;
}

.hero h2 {
  color: #64ffda;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-shadow: 0 0 15px rgba(100,255,218,0.3);
}

.hero p {
  max-width: 600px;
  margin-bottom: 30px;
  color: #8892b0;
}

.hero-img {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-img img {
  width: 320px;
  height: 320px;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid #64ffda;
  box-shadow: 0 0 40px rgba(100,255,218,0.4);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* ------------------- BUTTONS ------------------- */
.btn {
  display: inline-block;
  padding: 14px 24px;
  border: 2px solid #64ffda;
  border-radius: 8px;
  color: #64ffda;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(100,255,218,0.3);
}

.btn:hover {
  background: #64ffda;
  color: #0a192f;
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(100,255,218,0.7);
}

/* ------------------- ABOUT ------------------- */
#about {
  padding: 100px 10%;
}

.about-container {
  display: flex;
  gap: 40px;
  align-items: center;
}

.about-container img {
  border-radius: 15px;
  width: 320px;
  box-shadow: 0 0 25px rgba(100,255,218,0.4);
  transition: transform 0.3s;
}

.about-container img:hover {
  transform: scale(1.05);
}

.about-container p {
  color: #8892b0;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ------------------- SKILLS ------------------- */
#skills {
  padding: 100px 10%;
  background: #112240;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.skill {
  padding: 20px;
  background: rgba(10,25,47,0.7);
  border: 2px solid #64ffda;
  border-radius: 10px;
  text-align: center;
  font-weight: bold;
  transition: transform 0.3s, background 0.3s, color 0.3s;
}

.skill:hover {
  transform: translateY(-8px) scale(1.05);
  background: #64ffda;
  color: #0a192f;
}

/* ------------------- SERVICES ------------------- */
#services {
  padding: 100px 10%;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.card {
  padding: 30px;
  background: rgba(17,34,64,0.8);
  border-radius: 15px;
  text-align: center;
  color: #ccd6f6;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 15px 35px rgba(100,255,218,0.25);
}

/* ------------------- PROJECTS ------------------- */
#projects {
  padding: 100px 10%;
  background: #112240;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.project {
  background: #0a192f;
  padding: 20px;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.project:hover {
  transform: translateY(-8px);
  border: 1px solid #64ffda;
  box-shadow: 0 12px 30px rgba(100,255,218,0.3);
}

.project h3 {
  margin-bottom: 10px;
  color: #64ffda;
}

/* ------------------- TESTIMONIALS ------------------- */
#testimonials {
  padding: 100px 10%;
}

.testimonials {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

blockquote {
  padding: 25px;
  background: rgba(17,34,64,0.8);
  border-left: 4px solid #64ffda;
  border-radius: 10px;
  color: #ccd6f6;
  font-style: italic;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

/* ------------------- CONTACT ------------------- */
#contact {
  padding: 100px 10%;
  background: #112240;
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
  margin: auto;
}

form input, form textarea {
  padding: 14px;
  border-radius: 8px;
  border: none;
  outline: none;
  font-family: "Fira Code", monospace;
  font-size: 1rem;
  box-shadow: 0 0 10px rgba(100,255,218,0.2);
}

form button {
  cursor: pointer;
}

/* ------------------- FOOTER ------------------- */
footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid #233554;
  color: #8892b0;
  background: #0a192f;
}

/* ------------------- LIGHTBOX ------------------- */
#lightbox {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
}

#lightbox img {
  max-width: 90%;
  max-height: 80%;
  border: 3px solid #64ffda;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(100,255,218,0.5);
}

#close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 3rem;
  color: #64ffda;
  cursor: pointer;
}

/* ------------------- SCROLL TO TOP ------------------- */
#scrollTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #64ffda;
  color: #0a192f;
  border: none;
  padding: 12px 15px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  box-shadow: 0 0 15px rgba(100,255,218,0.5);
  transition: all 0.3s;
}
#scrollTop:hover {
  transform: scale(1.1);
}

/* ------------------- RESPONSIVE ------------------- */
@media (max-width: 768px) {
  .navbar {
    display: none;
    flex-direction: column;
    background: #0a192f;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    padding: 20px;
    border: 1px solid #112240;
    border-radius: 10px;
  }

  .navbar.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 100px 5% 60px;
  }

  .hero-img img {
    width: 220px;
    height: 220px;
  }
}
