/* Animations CSS pour MonIP */

/* Animation de fade-in pour les éléments */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation de zoom pour les éléments */
@keyframes zoom {
  from {
    transform: scale(0.95);
  }
  to {
    transform: scale(1);
  }
}

/* Animation de pulse pour attirer l'attention */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Animation pour le changement de thème */
.theme-transition {
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease !important;
}

/* Classes d'animations prêtes à l'emploi */
.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.zoom-in {
  animation: zoom 0.5s ease forwards;
}

.pulse {
  animation: pulse 1.5s ease infinite;
}

/* Animations différées */
.delay-100 {
  animation-delay: 100ms;
}

.delay-200 {
  animation-delay: 200ms;
}

.delay-300 {
  animation-delay: 300ms;
}

.delay-500 {
  animation-delay: 500ms;
}

/* Animations des éléments spécifiques */
.ip-block {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 300ms;
}

.content-block {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 600ms;
}

.site-title {
  position: relative;
  overflow: hidden;
}

.site-title:after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.site-title:hover:after {
  width: 100%;
}

/* Animation pour les liens du menu */
.main-menu > li > a {
  position: relative;
}

.main-menu > li > a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--primary-color);
  transition: width 0.3s ease, left 0.3s ease;
}

.main-menu > li > a:hover::after {
  width: 100%;
  left: 0;
}

/* Animation hover pour les boutons */
.button {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Animation pour le scroll */
@media (prefers-reduced-motion: no-preference) {
  .scroll-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  
  .scroll-animation.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animation pour le thème toggle */
#theme-switch {
  transition: transform 0.3s ease, background-color 0.3s ease;
}

#theme-switch:hover {
  transform: rotate(15deg);
}

/* Animation pour l'affichage de l'IP */
.ip-block h1 {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  position: relative;
}

/* Animation pour les infos IP */
.ip-block p span {
  display: inline-block;
  transition: transform 0.3s ease;
}

.ip-block p:hover span {
  transform: scale(1.05);
} 