/* ------------------------------ */
/* GLOBAL */
/* ------------------------------ */

body {
  background-color: #0d0d0d;
  color: #ffffff;
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
}

a {
  color: #ffffff;
  text-decoration: none;
}

/* ------------------------------ */
/* BARRE VIOLETTE FUTURISTE ANIMÉE */
/* ------------------------------ */

/* Barre violette futuriste animée — version améliorée */
.top-bar {
  width: 100%;
  height: 6px; /* légèrement plus grande */
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  overflow: hidden;
  background: #2a0f4a;
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.4); /* glow plus visible */
}

/* Flux lumineux */
.top-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(139, 92, 246, 0) 0%,
    rgba(139, 92, 246, 0.8) 50%,
    /* flux plus intense */ rgba(139, 92, 246, 0) 100%
  );
  filter: blur(8px); /* plus lumineux */
  animation: energyFlow 1.8s linear infinite; /* plus rapide */
  opacity: 1;
}

@keyframes energyFlow {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}

/* ------------------------------ */
/* HEADER */
/* ------------------------------ */

header {
  padding: 20px 40px;
}

nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.logo-icon {
  width: 45px;
  height: 45px;
  border: 2px solid #ffffff;
  border-radius: 8px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 18px;
  letter-spacing: 1px;
  cursor: pointer;

  opacity: 0;
  animation: fadeLeft 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.logo-icon:hover {
  transform: scale(1.06);
  border-color: #8b5cf6;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

/* ------------------------------ */
/* HERO SECTION */
/* ------------------------------ */

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 60px 40px;
  min-height: 70vh;
}

.hero-center {
  flex: 1;
  text-align: left;
  margin-left: 8%;
  transform: translateY(-5%);
}

.hero-center h1 {
  font-size: 42px;
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 1.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-center h2 {
  font-size: 20px;
  color: #cccccc;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 1.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-center p {
  font-size: 17px;
  line-height: 1.5;
  max-width: 500px;
  opacity: 0;
  animation: fadeUp 2.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#typewriter {
  opacity: 0;
}

/* ------------------------------ */
/* BOUTONS À DROITE AVEC MOTION */
/* ------------------------------ */

.hero-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
}

.hero-right a {
  font-size: 20px;
  color: #ffffff;
  position: relative;
  padding-right: 10px;
  transition:
    transform 0.3s ease,
    letter-spacing 0.3s ease;
  opacity: 0;
  animation: fadeRight 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-right a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background: #ffffff;
  transition:
    width 0.3s ease,
    opacity 0.3s ease;
  opacity: 0.5;
}

.hero-right a:hover {
  transform: translateX(-5px) scale(1.08);
  letter-spacing: 1px;
}

.hero-right a:hover::after {
  width: 100%;
  opacity: 1;
}

.hero-right a:nth-child(1) {
  animation-delay: 1s;
}

.hero-right a:nth-child(2) {
  animation-delay: 1.2s;
}

.hero-right a:nth-child(3) {
  animation-delay: 1.4s;
}

/* ------------------------------ */
/* ANIMATIONS */
/* ------------------------------ */

@keyframes fadeLeft {
  0% {
    opacity: 0;
    transform: translateX(-120px);
  }
  60% {
    opacity: 1;
    transform: translateX(10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(80px);
  }
  60% {
    opacity: 1;
    transform: translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeRight {
  0% {
    opacity: 0;
    transform: translateX(40px);
  }
  60% {
    opacity: 1;
    transform: translateX(-5px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ------------------------------ */
/* RESPONSIVE */
/* ------------------------------ */

@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 40px 20px;
  }

  .hero-center {
    margin-left: 0;
    transform: translateY(0);
    text-align: center;
  }

  .hero-right {
    align-items: center;
    margin-top: 40px;
  }

  .hero-right a {
    padding-right: 0;
  }

  .hero-right a::after {
    right: 50%;
    transform: translateX(50%);
  }
}

/* ------------------------------ */
/* HALO LUMINEUX */
/* ------------------------------ */

.cursor-halo {
  position: fixed;
  top: 0;
  left: 0;
  width: 780px;
  height: 780px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.015) 35%,
    rgba(255, 255, 255, 0.008) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translate(-50%, -50%);
  mix-blend-mode: screen;
  transition: opacity 0.35s ease-out;
  opacity: 0;
  filter: blur(40px);
}

/* ------------------------------ */
/* PAGE SERVICES */
/* ------------------------------ */

.services-hero {
  text-align: center;
  margin-top: 120px;
  margin-bottom: 60px;
  opacity: 0;
  animation: fadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.services-hero h1 {
  font-size: 42px;
  margin-bottom: 10px;
}

.services-hero p {
  font-size: 18px;
  color: #cccccc;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* LISTE DES SERVICES */
.services-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto 120px auto;
  padding: 0 20px;
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.service-card:nth-child(1) {
  animation-delay: 0.4s;
}

.service-card:nth-child(2) {
  animation-delay: 0.7s;
}

.service-card:nth-child(3) {
  animation-delay: 1s;
}

.service-card h2 {
  font-size: 26px;
  margin-bottom: 10px;
}

.service-card p {
  font-size: 17px;
  color: #cccccc;
  line-height: 1.6;
}

/* HOVER PREMIUM */
.service-card:hover {
  transform: translateY(-5px) scale(1.02);
  transition: transform 0.3s ease;
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.2);
}

/* ------------------------------ */
/* PAGE PORTFOLIO */
/* ------------------------------ */

.portfolio-hero {
  text-align: center;
  margin-top: 120px;
  margin-bottom: 60px;
  opacity: 0;
  animation: fadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.portfolio-hero h1 {
  font-size: 42px;
  margin-bottom: 10px;
}

.portfolio-hero p {
  font-size: 18px;
  color: #cccccc;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* GRID DES PROJETS */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto 120px auto;
  padding: 0 20px;
}

.project-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 30px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.project-card:nth-child(1) {
  animation-delay: 0.4s;
}
.project-card:nth-child(2) {
  animation-delay: 0.6s;
}
.project-card:nth-child(3) {
  animation-delay: 0.8s;
}
.project-card:nth-child(4) {
  animation-delay: 1s;
}

.project-card h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.project-card p {
  font-size: 16px;
  color: #cccccc;
  line-height: 1.6;
}

/* HOVER PREMIUM */
.project-card:hover {
  transform: translateY(-5px) scale(1.02);
  transition: transform 0.3s ease;
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.2);
}

/* ------------------------------ */
/* PAGE CONTACT */
/* ------------------------------ */

.contact-hero {
  text-align: center;
  margin-top: 120px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.contact-hero h1 {
  font-size: 42px;
  margin-bottom: 10px;
}

.contact-hero p {
  font-size: 18px;
  color: #cccccc;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

/* CONTAINER */
.contact-container {
  max-width: 700px;
  margin: 0 auto 120px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* INFO EMAIL */
.contact-info {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 25px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
  opacity: 0;
  animation: fadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.contact-info h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.contact-info p {
  font-size: 17px;
  color: #cccccc;
}

/* FORMULAIRE */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  animation: fadeUp 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.4s;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 16px;
  resize: none;
  outline: none;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.contact-form textarea {
  height: 140px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

/* BOUTON AVEC EFFET NÉON */
.contact-form button {
  padding: 14px;
  font-size: 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #8b5cf6;
  color: #ffffff;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
}

.contact-form button:hover {
  transform: scale(1.06);
  background: #a78bfa;
  box-shadow: 0 0 22px rgba(139, 92, 246, 0.6);
}

/* MESSAGE DE CONFIRMATION ANIMÉ */
.form-success {
  margin-top: 20px;
  padding: 14px;
  text-align: center;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #e9d5ff;
  font-size: 17px;
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.25);
}

.form-success.visible {
  opacity: 1;
  transform: translateY(0);
}
