/* ========== RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(135deg, #1e1e2f, #3c3b5a);
  color: white;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 40px;
  background: rgba(30, 30, 47, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  flex-wrap: wrap;
}
.menu {
  display: flex;
  gap: 25px;
  list-style: none;
  transition: max-height 0.3s ease;
  overflow: hidden;
  flex-wrap: wrap;
}
.menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 10px 0;
}
.menu a:hover {
  color: #00c9ff;
}
.menu-toggle {
  display: none;
}

/* ========== LOADER ========== */
#loader {
  position: fixed;
  inset: 0;
  background: #1e1e2f;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.pixel-loader {
  display: flex;
}
.pixel {
  width: 20px;
  height: 20px;
  margin: 5px;
  background-color: #00c9ff;
  animation: pixel-blink 0.6s infinite alternate;
}
.pixel:nth-child(2) { animation-delay: 0.2s; }
.pixel:nth-child(3) { animation-delay: 0.4s; }
@keyframes pixel-blink {
  0% { opacity: 0.2; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.2); }
}

/* ========== HEADER ========== */
header {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 0;
  text-align: center;
  flex-direction: column;
}
.intro h1 {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
}
.intro p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}
.btn {
  background: linear-gradient(135deg, #00c9ff, #92fe9d);
  color: #1f1f1f;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: bold;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #00c9ff;
}

/* ========== CONTAINER ========== */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
}

/* ========== À PROPOS ========== */
#about p {
  margin-bottom: 1rem;
}

/* ========== PROJETS ========== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}
.project-card {
  background: rgba(255,255,255,0.05);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}
.project-card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(0, 201, 255, 0.4);
}
.project-card h3 {
  font-size: 1.4rem;
  margin-top: 1rem;
}
.project-card p {
  font-size: 1rem;
  margin: 10px 0;
}
.project-card span {
  font-size: 0.9rem;
  color: #88f1ff;
  font-style: italic;
}

/* Swiper */
.swiper {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
}
.swiper-slide img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 400px; /* limite la taille verticale */
  object-fit: contain;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
}


/* ========== FORMULAIRE DE CONTACT ========== */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
  margin: auto;
}
input, textarea {
  padding: 10px;
  border: none;
  border-radius: 8px;
  background: #2e2e40;
  color: white;
}
button[type="submit"] {
  background: #00c9ff;
  color: #1f1f1f;
  padding: 12px;
  font-weight: bold;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}
button[type="submit"]:hover {
  background: #00a7d7;
}

/* ========== FOOTER ========== */
footer {
  background: #181828;
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
footer p {
  margin-bottom: 0.5rem;
}
footer a {
  color: #00c9ff;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* ========== CURSEUR PERSONNALISÉ ========== */
#cursor {
  position: fixed;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #00c9ff;
  opacity: 0.3;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}
#cursor.active {
  transform: scale(1.5);
}

/* ========== SCROLL BUTTON ========== */
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #00c9ff;
  color: #1e1e2f;
  padding: 10px 15px;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  z-index: 100;
}
#scrollTopBtn:hover {
  background: #00a7d7;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .intro h1 {
    font-size: 2.2rem;
  }
  .project-card h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 20px;
    position: relative;
  }
  .menu-toggle {
    display: block;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 101;
  }
  .menu {
    flex-direction: column;
    width: 100%;
    max-height: 0;
    display: flex;
    background-color: rgba(0, 0, 0, 0.8);
    margin-top: 50px;
    border-radius: 10px;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }
  .menu.active {
    max-height: 300px;
  }
  header {
    margin-top: 80px;
  }
  .container {
    padding: 30px 15px;
  }
  .projects-list {
    flex-direction: column;
  }
  .intro h1 {
    font-size: 1.8rem;
  }
  .intro p {
    font-size: 1rem;
  }
 .swiper-slide img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  background: #1a1a2e;
}

  form {
    font-size: 0.9rem;
  }
  input, textarea {
    font-size: 1rem;
  }
  footer {
    padding: 15px;
  }
  footer p, footer a {
    font-size: 0.9rem;
  }
}
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 20px;
    position: relative;
  }

  .menu-toggle {
    display: block;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 101;
  }

  .menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    margin-top: 60px;
    padding: 10px;
    border-radius: 10px;
  }

  .menu.active {
    display: flex;
  }
}
