* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #070b23;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
}

/* Animated background stars */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s infinite;
}

.star:nth-child(1) {
  top: 20%;
  left: 20%;
  width: 2px;
  height: 2px;
  animation-delay: 0s;
}
.star:nth-child(2) {
  top: 30%;
  left: 80%;
  width: 3px;
  height: 3px;
  animation-delay: 1s;
}
.star:nth-child(3) {
  top: 50%;
  left: 10%;
  width: 1px;
  height: 1px;
  animation-delay: 2s;
}
.star:nth-child(4) {
  top: 70%;
  left: 70%;
  width: 2px;
  height: 2px;
  animation-delay: 0.5s;
}
.star:nth-child(5) {
  top: 10%;
  left: 50%;
  width: 3px;
  height: 3px;
  animation-delay: 1.5s;
}
.star:nth-child(6) {
  top: 80%;
  left: 30%;
  width: 2px;
  height: 2px;
  animation-delay: 2.5s;
}
.star:nth-child(7) {
  top: 40%;
  left: 90%;
  width: 1px;
  height: 1px;
  animation-delay: 0.8s;
}
.star:nth-child(8) {
  top: 60%;
  left: 5%;
  width: 3px;
  height: 3px;
  animation-delay: 1.8s;
}
.star:nth-child(9) {
  top: 90%;
  left: 60%;
  width: 2px;
  height: 2px;
  animation-delay: 0.3s;
}
.star:nth-child(10) {
  top: 15%;
  left: 85%;
  width: 1px;
  height: 1px;
  animation-delay: 1.2s;
}
.star:nth-child(11) {
  top: 25%;
  left: 95%;
  width: 2px;
  height: 2px;
  animation-delay: 0.4s;
}
.star:nth-child(12) {
  top: 35%;
  left: 75%;
  width: 3px;
  height: 3px;
  animation-delay: 1.1s;
}
.star:nth-child(13) {
  top: 45%;
  left: 85%;
  width: 2px;
  height: 2px;
  animation-delay: 0.6s;
}
.star:nth-child(14) {
  top: 55%;
  left: 95%;
  width: 1px;
  height: 1px;
  animation-delay: 1.3s;
}
.star:nth-child(15) {
  top: 65%;
  left: 15%;
  width: 3px;
  height: 3px;
  animation-delay: 0.9s;
}
.star:nth-child(16) {
  top: 75%;
  left: 25%;
  width: 2px;
  height: 2px;
  animation-delay: 1.4s;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

/* Header */
.header {
  position: fixed;
  top: 0px;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  padding-top: calc(1rem + 4px) !important;
  padding-bottom: calc(1rem + 4px) !important;
  background: rgba(7, 11, 35, 0.8);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 100;
  transition: all 0.3s ease;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  color: #c084fc;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #c084fc;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #4a4feb, #9d48e6);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Main content */
.container {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  padding-top: 100px;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 3rem 2rem;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: #c084fc;
  text-shadow: 0 0 5px #7f5af0, 0 0 5px #1e293b;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 20px rgba(102, 126, 234, 0.3));
  }
  to {
    filter: drop-shadow(0 0 30px rgba(102, 126, 234, 0.6));
  }
}

.hero p {
  font-size: 1.3rem;
  color: #ccc;
  max-width: 800px;
  margin: 0 auto;
}

/* 3D Carousel Container */
.carousel-section {
  padding: 2rem;
  perspective: 1000px;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-container {
  position: relative;
  width: 280px;
  height: 400px;
  transform-style: preserve-3d;
  margin: 0 auto;
}

.carousel {
  position: relative;
  transform-style: preserve-3d;
}

@keyframes rotate {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

.project-card {
  position: absolute;
  width: 250px;
  min-height: 400px; /* Pour ajuster la hauteur de la carte */
  height: max-content;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
  cursor: pointer;
  transform-style: preserve-3d;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateZ(50px) scale(1.05);
  box-shadow: 0 30px 60px rgba(124, 58, 237, 0.3);
}

/* Positioning each card in 3D space */
.project-card:nth-child(1) {
  transform: rotateY(0deg) translateZ(320px);
}
.project-card:nth-child(2) {
  transform: rotateY(60deg) translateZ(320px);
}
.project-card:nth-child(3) {
  transform: rotateY(120deg) translateZ(320px);
}
.project-card:nth-child(4) {
  transform: rotateY(180deg) translateZ(320px);
}
.project-card:nth-child(5) {
  transform: rotateY(240deg) translateZ(320px);
}
.project-card:nth-child(6) {
  transform: rotateY(300deg) translateZ(320px);
}

.project-image {
  background: linear-gradient(135deg, #4a4feb, #9d48e6);
  border-radius: 15px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.project-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.project-card:hover .project-image::before {
  left: 100%;
}

.project-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #38bdf8;
  font-weight: bold;
}

.project-category {
  font-size: 0.9rem;
  color: #c084fc;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.project-description {
  flex-grow: 1;
  color: #ccc;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tech-tag {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.project-link {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  text-align: center;
  transition: all 0.3s ease;
  font-weight: 600;
}

.project-link:hover {
  background: linear-gradient(45deg, #764ba2, #f093fb);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.4);
}

/* Carousel controls */

.carousel-controls {
  text-align: center;
  margin-top: 3rem;
}

.control-btn {
  background: linear-gradient(90deg, #4a4feb, #9d48e6);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin: 0 1rem;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

#playPauseBtn {
  align-items: center;
  justify-content: center;
}

.control-btn svg {
  transform: translateY(2px);
}

/* Stats section */
.stats-section {
  padding: 4rem 2rem;
  background: rgba(0, 0, 0, 0.2);
  margin-top: 4rem;
}

.stats-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.stat-item {
  text-align: center;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-number {
  font-size: 3rem;
  font-weight: bold;
  background: linear-gradient(45deg, #4a4feb, #9d48e6, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.stat-label {
  color: #ccc;
  margin-top: 0.5rem;
}


.cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
  background: linear-gradient(45deg, #764ba2, #f093fb);
}

/* CTA Section */
.cta-section {
  padding-left: 4rem;
  padding-right: 4rem;
  padding-top: 4rem;
  text-align: center;
}

.cta-content {
  max-width: 800px;
  margin: 0 auto;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #c084fc;
  text-shadow: 0 0 5px #7f5af0, 0 0 5px #1e293b;
}

.cta-section p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #ccc;
}


/* Burger menu */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
  z-index: 110; /* au-dessus du menu */
}

.burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #c084fc;
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Animation croix */
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {
  .hero {
    margin: 0;
    padding-bottom: 1rem;
  }
  .hero h1 {
    font-size: 2.5rem;
  }

  .carousel-section {
    min-height: 50vh;
    padding-top: 0;
  }

  /* Réduction significative du carousel */
  .carousel-container {
    width: 180px; /* Réduit de 240px à 180px */
    height: 240px; /* Réduit de 340px à 240px */
  }

  /* Réduction de l'espacement entre carousel et boutons */
  .carousel-controls {
    margin-top: 3rem; /* Réduit de 7rem à 3rem */
  }

  /* Cartes plus petites */
  .project-card {
    width: 160px; /* Réduit de 210px à 160px */
    min-height: 300px; /* Réduit la hauteur minimale */
    height: 270px; /* Réduit la hauteur */
    padding: 0.8rem; /* Réduit le padding */
    font-size: 0.85rem; /* Légèrement plus petit */
  }

  /* Ajustement des positions en 3D avec un rayon plus petit */
  .project-card:nth-child(1) {
    transform: rotateY(0deg) translateZ(180px); /* Réduit de 250px à 180px */
  }
  .project-card:nth-child(2) {
    transform: rotateY(60deg) translateZ(180px);
  }
  .project-card:nth-child(3) {
    transform: rotateY(120deg) translateZ(180px);
  }
  .project-card:nth-child(4) {
    transform: rotateY(180deg) translateZ(180px);
  }
  .project-card:nth-child(5) {
    transform: rotateY(240deg) translateZ(180px);
  }
  .project-card:nth-child(6) {
    transform: rotateY(300deg) translateZ(180px);
  }

  /* Ajustement des éléments dans les cartes */
  .project-title {
    font-size: 1.2rem; /* Légèrement plus petit */
    margin-bottom: 0.3rem;
  }

  .project-category {
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
  }

  .project-description {
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
  }

  .project-image {
    margin-bottom: 0.8rem;
    font-size: 2rem; /* Icône légèrement plus petite */
  }

  .project-tech {
    gap: 0.3rem;
    margin-bottom: 0.8rem;
  }

  .tech-tag {
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
  }

  .project-link {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
  }

  /* Boutons de contrôle plus petits */
  .control-btn {
    width: 40px; /* Réduit de 50px à 40px */
    height: 40px;
    font-size: 1rem; /* Réduit de 1.2rem à 1rem */
    margin: 0 0.5rem; /* Réduit l'espacement */
  }

  .burger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0px;
    right: -100%;
    height: 100vh;
    width: 250px;
    background: rgba(7, 11, 35, 0.95);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
    transition: right 0.4s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 80px;
  }

  .nav-links.active {
    right: 0;
  }

  .stats-section {
    margin-top: 25px;
  }

  .stats-container {
    max-width: 1000px;
    gap: 1rem;
  }

  .stat-item {
    padding: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    margin-top: 0.1rem;
    font-size: 0.9rem;
  }
}

/* Pour les très petits écrans */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .hero {
    padding-top: 0;
  }

  .project-title {
    font-size: 1rem;
  }

  .project-description {
    font-size: 0.75rem;
  }

  .control-btn {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .stats-section {
    margin-bottom: 0px;
  }

  .cta-section h2 {
    font-size: 1.8rem;
  }

  .cta-section p {
    font-size: 0.9rem;
    margin-bottom: 2rem;
  }

  .cta-button {
    padding: 15px 40px;
    font-size: 0.8rem;
  }
}
