/* Global font */
body { font-family: 'Poppins', sans-serif; }

/* Fade + slide up */
.fade-slide-up {
  opacity: 0;
  transform: translateY(60px) scale(0.95);
  transition: opacity 1s cubic-bezier(0.25, 0.8, 0.25, 1), transform 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.fade-slide-up.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered animations */
.fade-slide-up:nth-child(1) { transition-delay: 0.1s; }
.fade-slide-up:nth-child(2) { transition-delay: 0.2s; }
.fade-slide-up:nth-child(3) { transition-delay: 0.3s; }

/* Navbar underline */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0%; height: 2px;
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
  transition: width 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-radius: 2px;
}
.nav-link:hover::after { width: 100%; }

/* Portfolio cards */
.portfolio-card {
  background: white; border-radius: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  overflow: hidden; transform: translateY(0) rotateX(0);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
}
.portfolio-card:hover {
  transform: translateY(-20px) rotateX(5deg) scale(1.05);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.3);
}
.portfolio-card img { 
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  filter: brightness(0.9);
}
.portfolio-card:hover img { 
  transform: scale(1.15) rotate(2deg); 
  filter: brightness(1.1);
}

/* Mobile menu */
#mobile-menu {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  position: absolute; /* MODIFICATION: absolute est mieux que fixed pour se positionner par rapport au header */
  top: 100%; /* Se positionne juste en dessous du header */
  left: 0; right: 0;
  z-index: 40; /* Inférieur au z-index du header */
  max-height: 0; 
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}
#mobile-menu.open { max-height: 400px; }

/* Fichier : css/style.css */

.gradient-text {
  background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899, #f59e0b);
  -webkit-background-clip: text;
  background-clip: text; /* LIGNE À AJOUTER */
  /* -webkit-text-fill-color: transparent; */
  background-size: 300% auto;
  animation: gradient-move 4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
}
@keyframes gradient-move {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* Animation typing text */
#animated-name span {
  opacity: 0;
  transform: translateY(30px) rotateX(90deg);
  display: inline-block;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
#animated-name span.visible {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
}

/* Language buttons */
.lang-btn {
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.2));
  border: 1px solid rgba(255,255,255,0.3);
  color: #374151;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  backdrop-filter: blur(10px);
}
.lang-btn:hover {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(168,85,247,0.1));
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px -8px rgba(99,102,241,0.4);
}
.lang-btn.active {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 25px -8px rgba(99,102,241,0.6);
}

/* Floating elements */
.floating {
  animation: float 6s ease-in-out infinite;
}
.floating:nth-child(2) { animation-delay: -2s; }
.floating:nth-child(3) { animation-delay: -4s; }

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* Contact button glow */
.contact-btn {
  position: relative;
  overflow: hidden;
}
.contact-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}
.contact-btn:hover::before {
  left: 100%;
}

/* Skills animation */
/* CORRECTION: Utilisation de .skill-card pour correspondre au HTML */
.skill-card {
  opacity: 0;
  transform: scale(0.8) rotate(-10deg);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}
.skill-card.visible {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Footer links */
.footer-link {
  position: relative;
  transition: all 0.3s ease;
}
.footer-link:hover {
  transform: translateY(-2px);
  color: #a855f7;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #4338ca, #7c3aed);
}

html { scroll-behavior: smooth; }

/* Cursor trail effect */
.cursor-dot {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.1s ease;
}

/* Cache la barre de défilement mais garde la fonctionnalité */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

/* AJOUT : Styles pour les boutons du slider de compétences */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 50px;
  height: 50px;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #4f46e5; /* Couleur indigo */
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.slider-btn:hover {
  background-color: #4f46e5; /* Fond indigo au survol */
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.slider-btn.left-0 {
  left: -25px; /* Positionne le bouton pour qu'il dépasse légèrement */
}

.slider-btn.right-0 {
  right: -25px; /* Positionne le bouton pour qu'il dépasse légèrement */
}

/* Style pour un bouton désactivé (quand on est au début ou à la fin) */
.slider-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: translateY(-50%) scale(1);
  background-color: rgba(230, 230, 230, 0.9);
  color: #6b7280; /* gris */
}

/* Pour les petits écrans, on cache les boutons car le swipe est naturel */
/* @media (max-width: 768px) {
  .slider-btn {
    display: none;
  }
} */

/* Ajout pour la barre de navigation qui se cache au scroll */
#main-header {
  transition: transform 0.3s ease-in-out;
}

#main-header.header-hidden {
  transform: translateY(-100%);
}
