/* RESET */

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

body {
  font-family: "Inter", sans-serif;
  background: #050505;
  color: #fff;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: -2;
}

.projects-hero {
  position: relative; 
  display: flex;               /* active le flexbox */
  flex-direction: column;      /* contenu vertical */
  align-items: center;         /* centre horizontalement */
  justify-content: center;     /* centre verticalement */
  text-align: center;          /* centre le texte */
  padding: 160px 20px 100px 20px; /* descendre sous la navbar */
  overflow: visible;
  min-height: 100vh;           /* fait que le hero prend tout l'écran */
}

.projects-hero .glow {
  position: absolute;
  top: -200px; /* Ajusté pour ne pas trop masquer la navbar */
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(255, 170, 0, 0.35) 0%,
    rgba(255, 170, 0, 0) 70%
  );
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1; 
  max-width: 850px;
}

.navbar nav a:hover {
  color: #fff;
}

.navbar nav a.active::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #ffaa00;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  position: relative;
}

section h2 {
  font-size: 38px;
  margin-top: 15px;
}

.projects-hero h1 {
  font-family: "Playfair Display", serif;
  font-size: 60px;
  line-height: 1.2;
}

.accent {
  color: #ffaa00;
}

.projects-hero p {
  margin-top: 25px;
  color: #aaa;
  font-size: 18px;
  line-height: 1.6;
}

.badge {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  font-size: 13px;
  margin-bottom: 25px;
  color: #aaa;
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: 60px;
  line-height: 1.2;
  font-weight: 600;
}

.hero h1 .accent {
  color: #ffaa00;
}

.hero p {
  margin-top: 25px;
  color: #aaa;
  font-size: 18px;
  line-height: 1.6;
}

.projects {
  text-align: center;
  padding: 80px 20px;
}

.section-tag {
  color: #ffaa00;
  font-size: 12px;
  letter-spacing: 2px;
}

.projects-slider {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 60px;
  justify-items: center; 
}

.project-card {
  background: #0c0c0c; /* Fond noir/gris très foncé */
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden; /* Coupe l'image pour qu'elle suive l'arrondi en haut */
  display: flex;
  flex-direction: column;
  transition: 0.4s ease;
  width: 100%;
}

.project-card:hover {
transform: translateY(-10px);
  border-color: rgba(255, 170, 0, 0.4);
  box-shadow: 0 20px 40px rgba(255, 170, 0, 0.15);
}

.project-image {
  height: 220px;
  width: 100%;
  overflow: hidden;
  background: #111;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  object-position: top; /* 🔥 L'image s'affiche en partant du haut */
  transition: transform 0.6s ease;
  display: block;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-content {
  padding: 25px;
  text-align: left;
}

.projects-section {
  padding: 140px 80px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  justify-items: center;
}

.project-content h3 {
  margin-bottom: 10px;
}

.project-content p {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 15px;
}

.project-content h3 {
  margin-bottom: 10px;
}

.project-category {
  color: #ffaa00;
  font-size: 13px;
  margin: 10px 0;
}

.project-desc {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 15px;
  line-height: 1.6;
}

.project-tags span {
  display: inline-block;
  background: #111;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  margin-right: 8px;
  margin-top: 10px;
}

.project-btn {
  margin-top: 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 18px;
  border-radius: 20px;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

.project-btn:hover {
  border-color: #ffaa00;
  color: #ffaa00;
}

.projects-cta {
  text-align: center;
  padding: 140px 20px;
}

.projects-cta h2 {
  font-size: 42px;
  margin-bottom: 40px;
  line-height: 1.3;
}

.projects-cta .btn-primary {
  display: inline-block;
  background: #ffaa00;
  padding: 14px 28px;
  border-radius: 30px;
  color: black;
  text-decoration: none;
  transition: 0.3s;
}

footer {
  text-align: center;
  padding: 40px;
  font-size: 14px;
  color: #aaa;
  background: #0c0c0c;
}

/* Responsive */
@media (max-width: 1024px) {
  .projects-slider {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .project-card {
    min-width: 80%;
  }
    .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about {
    flex-direction: column;
  }

  .skills-wrapper {
    flex-direction: column;
  }

  .contact-wrapper {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .projects-slider {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .projects {
    padding: 60px 20px;
  }

  .project-card {
    min-width: 90%;
  }
    .services-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 40px;
  }

  section {
    padding: 100px 30px;
  }
  .navbar nav {
    position: absolute;
    top: 80px;
    right: 0;
    background: rgba(0,0,0,0.95);
    width: 100%;
    flex-direction: column;
    align-items: center;
    display: none;
    padding: 30px 0;
  }

  .navbar nav a {
    margin: 15px 0;
    font-size: 18px;
  }

  .navbar nav.active {
    display: flex;
  }

    .services-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 40px;
  }

  section {
    padding: 100px 30px;
  }

}

@media (max-width: 480px) {
  .projects {
    padding: 40px 15px;
  }
    .project-card {
    min-width: 95%;
  }
}