html, body {
  overflow-x: hidden;
  scroll-behavior: smooth;
}
.animate-on-scroll-up, .animate-on-scroll-left, .animate-on-scroll-right {
  --animate-duration: 0.5s;
}
section {
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Effet glassmorphism du header */
header {
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.scroll-progress-container {
  position: absolute;
  bottom: 10;
  left: 0;
  width: 100%;
  height: 5px;
  background: transparent;
  z-index: 1;
}

.scroll-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4338ca 0%, #6366f1 45%, #8b5cf6 100%);
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: width 0.15s ease-out;
}

/* Styles du logo - Design minimaliste moderne */
.logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  overflow: hidden;
}

.logo-initials {
  font-size: 18px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.6s ease;
  border-radius: 50%;
}

.group:hover .logo-badge {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.group:hover .logo-glow {
  transform: translate(-50%, -50%) scale(1.2);
}

.group:hover .logo-initials {
  transform: scale(1.1);
}

.logo-brand {
  display: flex;
  align-items: center;
}

.logo-main-text {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  transition: all 0.3s ease;
}

.group:hover .logo-main-text {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Ajustements mobile */
@media (max-width: 640px) {
  .logo-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
  }
  
  .logo-initials {
    font-size: 16px;
  }
}

/* Effet de frappe */
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: #facc15; }
}

/* Curseur clignotant pour l'effet de frappe */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.blink-cursor {
  animation: blink 1s infinite;
  font-weight: normal;
}

/* Couleur jaune doux pour le nom et le curseur */
.soft-yellow {
  color: #fde047;
}

.custom-yellow {
  color: #eed13f;
}

/* Animation au chargement de la page */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  animation: fadeIn 0.6s ease-out;
}

/* Styles de l'écran de démarrage */
.splash-screen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: splashWipeOut 1.2s ease-in-out 2.5s forwards;
    pointer-events: none;
    overflow: hidden;
}

body.splash-active {
    overflow: hidden;
}

.splash-content {
    opacity: 0;
    animation: splashFadeIn 0.6s ease-out 0.3s forwards;
}

.splash-name {
    color: #eed13f;
    text-shadow: 0 4px 20px rgba(238, 209, 63, 0.5), 0 0 40px rgba(238, 209, 63, 0.3);
    letter-spacing: 0.05em;
}

.name-part-1 {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) scale(0.8);
    animation: nameSlideIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s forwards;
}

.name-part-2 {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) scale(0.8);
    animation: nameSlideIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) 1s forwards;
    margin-left: 0.5rem;
}

@keyframes nameSlideIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes splashFadeIn {
    to {
        opacity: 1;
    }
}

@keyframes splashWipeOut {
    0% {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        visibility: visible;
    }
    100% {
        clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
        visibility: hidden;
    }
}

/* Effet de particules/cristaux tombants - uniquement dans la section gradient-bg */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.falling-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.falling-particles.visible {
    opacity: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    box-shadow: 
        0 0 4px rgba(255, 255, 255, 0.5),
        0 0 8px rgba(255, 255, 255, 0.4);
    animation: fallDown linear infinite;
    transform-origin: center;
    will-change: transform;
    z-index: 1;
    opacity: 0.6;
}

@keyframes fallDown {
    0% {
        transform: translateY(0) translateX(var(--drift, 0px)) rotate(0deg);
    }
    100% {
        transform: translateY(calc(100vh + 200px)) translateX(var(--drift, 0px)) rotate(360deg);
    }
}

/* Animation de la flèche de défilement vers le bas */
.scroll-arrow {
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.scroll-arrow.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

/* Espacement mobile - plus de distance depuis l'image */
@media (max-width: 768px) {
    .scroll-arrow {
        bottom: 0rem !important;
    }
}

.scroll-arrow.hide .arrow-draw {
    animation: none;
}

.arrow-draw {
    filter: drop-shadow(0 2px 4px rgba(238, 209, 63, 0.4));
    animation: bounceArrow 2s ease-in-out 1.5s infinite;
}

/* Animation de dessin de la flèche chevron (2D) */
#chevron-top {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: drawChevronTop 1s ease-out forwards;
}

#chevron-bottom {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: drawChevronBottom 1s ease-out 0.3s forwards;
}

@keyframes drawChevronTop {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes drawChevronBottom {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes bounceArrow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

/* Réduire le rebond sur mobile pour éviter la collision avec l'image */
@media (max-width: 768px) {
    @keyframes bounceArrow {
        0%, 100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(6px);
        }
    }
}

  .card-hover:hover {
      transform: translateY(-10px) scale(1.02);
      box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3), 0 10px 20px rgba(0, 0, 0, 0.1);
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .skill-bar {
      height: 10px;
      border-radius: 10px;
      background: #e2e8f0;
      overflow: hidden;
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
  }

  .skill-progress {
      height: 100%;
      border-radius: 10px;
      background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
      transition: width 1s ease-in-out;
      box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
      position: relative;
      overflow: hidden;
  }

  .skill-progress::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(
          90deg,
          transparent,
          rgba(255, 255, 255, 0.3),
          transparent
      );
      animation: shimmer 2s infinite;
  }

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

  .nav-link {
      position: relative;
      transition: all 0.3s ease;
  }

  .nav-link:hover {
      color: #667eea;
      transform: translateY(-2px);
  }

  .nav-link:after {
      content: '';
      position: absolute;
      width: 0;
      height: 3px;
      bottom: -5px;
      left: 0;
      background: linear-gradient(90deg, #667eea, #764ba2);
      transition: width 0.3s ease;
      border-radius: 2px;
  }

  .nav-link:hover:after {
      width: 100%;
  }

  .lien {
      position: relative;
      transition: all 0.3s ease;
  }

  .lien:hover {
      color: #667eea;
      transform: translateX(5px);
  }

  .lien:after {
      content: '';
      position: absolute;
      width: 0;
      height: 2px;
      bottom: 0;
      left: 0;
      background-color: #667eea;
      transition: width 0.3s ease;
  }

  .lien:hover:after {
      width: 17%;
  }
.animate-on-scroll-up {
    opacity: 0;
    transition: opacity 0.6s ease-out;
  }

.animate-on-scroll-left.visible {
    opacity: 1;
  }
.animate-on-scroll-left {
    opacity: 0;
    transition: opacity 0.6s ease-out;
  }

.animate-on-scroll-up.visible {
    opacity: 1;
  }
.animate-on-scroll-right {
    opacity: 0;
    transition: opacity 0.6s ease-out;
  }

.animate-on-scroll-right.visible {
    opacity: 1;
  }

/* Animation de flottement pour l'image de profil */
@keyframes float-profile {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.animate-float {
    animation: float-profile 6s ease-in-out infinite;
}

/* Effet glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Carte glassmorphism pour la navigation mobile */
.glass-card-nav {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95), rgba(118, 75, 162, 0.95));
    backdrop-filter: blur(20px);
    position: relative;
}

.glass-card-nav::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: pulse-gradient 8s ease-in-out infinite;
}

.glass-card-nav > a {
    position: relative;
    z-index: 1;
}

/* Styles personnalisés pour les éléments du menu mobile */
.glass-card-nav .lien {
    transition: all 0.3s ease !important;
}

.glass-card-nav .lien:hover {
    transform: translateX(5px);
}

.glass-card-nav .lien:after {
    background-color: #fde047 !important;
    height: 3px;
}

.glass-card-nav .lien:hover:after {
    width: 100% !important;
}

/* Effet de survol moderne pour les boutons */
.btn-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 0;
}

.btn-modern:hover::before {
    width: 300px;
    height: 300px;
}

/* Effet de vague spécial pour les boutons blancs */
.btn-modern.bg-white::before {
    background: rgba(102, 126, 234, 0.2);
}

/* Effets des titres de section */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Effets d'ombre améliorés */
.shadow-glow {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3), 0 0 40px rgba(118, 75, 162, 0.1);
}

.shadow-glow-sm {
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.2);
}

.whatsapp-btn {
  position: fixed;
  bottom: 23px;
  left: 20px;
  z-index: 99;
  animation: pulse-slow 2s infinite;
}

@keyframes pulse-slow {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
}

@keyframes left-right {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(6px); } 
  100% { transform: translateX(0); }
}

.left-right-infinite {
  animation: left-right 2s infinite ease-in-out;
}

/* Effet de texte en dégradé */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* Effets de survol améliorés pour les cartes de fonctionnalités */
.feature-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
}

/* Effet de superposition pour les cartes de projet */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-card:hover::after {
    opacity: 0.05;
}

/* Effets de survol pour les cartes d'informations de contact */
#contact .flex.items-start {
    transition: all 0.3s ease;
}

#contact .flex.items-start:hover {
    transform: translateX(10px);
}

#contact .p-3 {
    transition: all 0.3s ease;
}

#contact .flex.items-start:hover .p-3 {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* Barre de défilement personnalisée pour la section expérience */
.overflow-y-auto::-webkit-scrollbar {
    width: 8px;
}

.overflow-y-auto::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

.overflow-y-auto::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 10px;
}

.overflow-y-auto::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2, #667eea);
}

/* Animations du menu mobile */
.menu-item {
    opacity: 0;
    transform: translateY(20px);
}

.menu-item.show {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

#menuIcon.rotate {
    transform: rotate(180deg);
}

#mobileMenuButton {
    z-index: 9999 !important;
}

#menuIcon.fa-times {
    color: #fde047 !important;
    text-shadow: 0 0 10px rgba(253, 224, 71, 0.5);
}

#mobileMenuCloseButton {
    cursor: pointer;
    transition: transform 0.3s ease;
}

#mobileMenuCloseButton:hover {
    transform: scale(1.2);
}

#mobileMenuCloseButton:active {
    transform: scale(0.9);
}

.rotate-close {
    animation: rotateCloseIcon 0.4s ease-in-out;
}

@keyframes rotateCloseIcon {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(180deg);
    }
}

.menu-item:nth-child(1) { transition-delay: 0.1s; }
.menu-item:nth-child(2) { transition-delay: 0.2s; }
.menu-item:nth-child(3) { transition-delay: 0.3s; }
.menu-item:nth-child(4) { transition-delay: 0.4s; }
.menu-item:nth-child(5) { transition-delay: 0.5s; }

/* Transition du menu mobile */
#mobileMenu {
    transition: opacity 0.3s ease-in-out;
}

#mobileMenu.animate-in {
    animation: menuSlideIn 0.3s ease-out;
}

#mobileMenuOverlay {
    transition: opacity 0.3s ease-in-out;
}

@keyframes menuSlideIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Styles pour le modal CV */
#cvModal {
    transition: opacity 0.3s ease-in-out;
}

#cvModal:not(.hidden) {
    animation: modalFadeIn 0.3s ease-out;
}

#cvModal .bg-white {
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
