/**
 * Effets visuels pour le thème Cyber-Soft
 */

/* ===== ANIMATIONS GÉNÉRALES ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInLeft {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

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

@keyframes rotateIn {
  from {
    transform: rotate(-10deg) scale(0.8);
    opacity: 0;
  }
  to {
    transform: rotate(0) scale(1);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 100% 0;
  }
}

/* ===== CLASSES D'ANIMATION ===== */
.animate {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate.fade-in {
  animation: fadeIn 1s ease forwards;
}

.animate.slide-up {
  animation: slideInUp 1s ease forwards;
}

.animate.slide-left {
  animation: slideInLeft 1s ease forwards;
}

.animate.slide-right {
  animation: slideInRight 1s ease forwards;
}

.animate.scale-in {
  animation: scaleIn 1s ease forwards;
}

.animate.rotate-in {
  animation: rotateIn 1s ease forwards;
}

.animate.delay-100 {
  animation-delay: 0.1s;
}

.animate.delay-200 {
  animation-delay: 0.2s;
}

.animate.delay-300 {
  animation-delay: 0.3s;
}

.animate.delay-400 {
  animation-delay: 0.4s;
}

.animate.delay-500 {
  animation-delay: 0.5s;
}

/* ===== EFFETS AU SURVOL ===== */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(var(--accent-color-rgb), 0.5);
}

.hover-rotate {
  transition: transform 0.3s ease;
}

.hover-rotate:hover {
  transform: rotate(3deg);
}

.hover-bright {
  transition: filter 0.3s ease;
}

.hover-bright:hover {
  filter: brightness(1.1);
}

/* ===== EFFETS DE SECTION ===== */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.gradient-overlay {
  position: relative;
}

.gradient-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.8) 0%, rgba(var(--accent-color-rgb), 0.8) 100%);
  z-index: 1;
}

.gradient-overlay > * {
  position: relative;
  z-index: 2;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.shadow-effect {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.3s ease;
}

.shadow-effect:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ===== EFFETS DE TEXTE ===== */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.text-glow {
  text-shadow: 0 0 10px rgba(var(--accent-color-rgb), 0.5);
}

.text-underline {
  position: relative;
  display: inline-block;
}

.text-underline::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.text-underline:hover::after {
  width: 100%;
}

/* ===== EFFETS DE CARTE ===== */
.card-3d {
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card-3d:hover {
  transform: rotateY(5deg) rotateX(5deg);
}

.card-border-glow {
  position: relative;
  border: 2px solid transparent;
  background-clip: padding-box;
  transition: border-color 0.3s ease;
}

.card-border-glow::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  margin: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-border-glow:hover::before {
  opacity: 1;
}

/* ===== EFFETS D'IMAGE ===== */
.img-zoom-container {
  overflow: hidden;
}

.img-zoom {
  transition: transform 0.5s ease;
}

.img-zoom:hover {
  transform: scale(1.1);
}

.img-grayscale {
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}

.img-grayscale:hover {
  filter: grayscale(0%);
}

.img-blur {
  filter: blur(2px);
  transition: filter 0.5s ease;
}

.img-blur:hover {
  filter: blur(0);
}

.img-overlay {
  position: relative;
  overflow: hidden;
}

.img-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(var(--dark-color-rgb), 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.img-overlay:hover::before {
  opacity: 1;
}

.img-overlay-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  width: 100%;
  text-align: center;
  padding: 20px;
}

.img-overlay:hover .img-overlay-content {
  opacity: 1;
}

/* ===== EFFETS DE BOUTON ===== */
.btn-pulse {
  animation: pulse 2s infinite;
}

.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 3s infinite;
}

.btn-float {
  animation: float 3s ease-in-out infinite;
}

.btn-ripple {
  position: relative;
  overflow: hidden;
}

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

.btn-ripple:active::after {
  width: 300%;
  height: 300%;
  opacity: 1;
}

/* ===== EFFETS SPÉCIFIQUES AUX SECTIONS ===== */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  animation: slideInUp 1s ease;
}

.hero-description {
  animation: slideInUp 1s ease 0.2s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero-buttons {
  animation: slideInUp 1s ease 0.4s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Services Grid Animation */
.services-grid .service-card:nth-child(1) {
  animation: fadeIn 1s ease 0.1s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.services-grid .service-card:nth-child(2) {
  animation: fadeIn 1s ease 0.2s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.services-grid .service-card:nth-child(3) {
  animation: fadeIn 1s ease 0.3s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.services-grid .service-card:nth-child(4) {
  animation: fadeIn 1s ease 0.4s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Timeline Animation */
.timeline-item {
  opacity: 0;
  animation-fill-mode: forwards;
}

.timeline-item:nth-child(odd) {
  animation: slideInLeft 1s ease forwards;
}

.timeline-item:nth-child(even) {
  animation: slideInRight 1s ease forwards;
}

/* Team Members Animation */
.team-member {
  animation: scaleIn 1s ease forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.team-member:nth-child(1) { animation-delay: 0.1s; }
.team-member:nth-child(2) { animation-delay: 0.2s; }
.team-member:nth-child(3) { animation-delay: 0.3s; }
.team-member:nth-child(4) { animation-delay: 0.4s; }
.team-member:nth-child(5) { animation-delay: 0.5s; }
.team-member:nth-child(6) { animation-delay: 0.6s; }

/* FAQ Animation */
.faq-item {
  animation: slideInUp 1s ease forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }

/* Testimonials Animation */
.testimonial-item {
  animation: scaleIn 1s ease forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* CTA Animation */
.cta-content {
  animation: fadeIn 1s ease forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 992px) {
  .animate {
    animation-duration: 0.8s;
  }
}

@media (max-width: 768px) {
  .animate {
    animation-duration: 0.6s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate,
  .hero-title,
  .hero-description,
  .hero-buttons,
  .services-grid .service-card,
  .timeline-item,
  .team-member,
  .faq-item,
  .testimonial-item,
  .cta-content {
    animation: none !important;
    opacity: 1 !important;
  }
  
  .btn-pulse,
  .btn-float {
    animation: none !important;
  }
}
