/**
 * e-Dr TIM - Global Animations CSS
 * Animations dynamiques pour tout le site
 * Version: 1.0
 */

/* ===== Variables de couleur ===== */
:root {
  
  --edr-primary-rgb: 19, 106, 213;
  --edr-transition: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --edr-transition-fast: 0.3s;
  --edr-transition-normal: 0.4s;
}

/* ===== Image Hover Effects ===== */
.img-fluid,
.img-hover {
  transition: all var(--edr-transition-normal) var(--edr-transition);
}
.img-fluid:hover,
.img-hover:hover {
  transform: scale(1.05);
  filter: brightness(1.08);
  box-shadow: 0 15px 40px rgba(var(--edr-primary-rgb), 0.2);
}
.gallery-img,
.about-gallery .img-fluid,
.blog-img {
  cursor: pointer;
  overflow: hidden;
}

/* ===== Title Hover Effects ===== */
h1, h2, h3, .title-hover {
  transition: all var(--edr-transition-fast) var(--edr-transition);
}
h2:hover,
.title-hover:hover {
  transform: translateY(-3px);
  color: var(--edr-primary);
}
h3:hover {
  transform: translateY(-2px);
  color: var(--edr-primary);
}

/* ===== Card Hover Effects ===== */
.card,
.service-card,
.mission-card,
.feature-card,
.info-card,
.course-item,
.card-hover {
  transition: all var(--edr-transition-normal) var(--edr-transition);
  border: 2px solid transparent;
}
.card:hover,
.service-card:hover,
.mission-card:hover,
.feature-card:hover,
.info-card:hover,
.course-item:hover,
.card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(var(--edr-primary-rgb), 0.15);
  border-color: rgba(var(--edr-primary-rgb), 0.2);
}

/* ===== Icon Box Effects ===== */
.icon-box,
.feature-icon {
  transition: all var(--edr-transition-fast) ease;
}
.card:hover .icon-box,
.service-card:hover .icon-box,
.mission-card:hover .icon-box,
.feature-card:hover .icon-box,
.card-hover:hover .icon-box,
.card:hover .feature-icon,
.feature-card:hover .feature-icon {
  transform: scale(1.1);
}

/* ===== Floating Animation ===== */
@keyframes floating {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes floating-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.floating {
  animation: floating 3s ease-in-out infinite;
}
.floating-slow {
  animation: floating-slow 4s ease-in-out infinite;
}
.icon-box i,
.feature-icon i {
  animation: floating 3s ease-in-out infinite;
}
/* Délais décalés pour effet ondulant */
.col-lg-4:nth-child(2) .icon-box i,
.col-md-4:nth-child(2) .icon-box i {
  animation-delay: 0.5s;
}
.col-lg-4:nth-child(3) .icon-box i,
.col-md-4:nth-child(3) .icon-box i {
  animation-delay: 1s;
}

/* ===== Stats Counter Effects ===== */
.stats-row .count,
.purecounter,
.counter {
  display: inline-block;
  transition: all var(--edr-transition-fast) ease;
}
.stats-row .count-suffix,
.counter-suffix {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}
.stats-item:hover .count,
.stats-item:hover .purecounter,
.counter-box:hover .counter {
  transform: scale(1.1);
  color: var(--edr-primary);
}

/* ===== List Item Animation ===== */
.achievements-list li,
.feature-list li,
.check-list li,
ul.list-hover li {
  transition: all var(--edr-transition-fast) var(--edr-transition);
}
.achievements-list li:hover,
.feature-list li:hover,
.check-list li:hover,
ul.list-hover li:hover {
  transform: translateX(8px);
}
.achievements-list li i,
.feature-list li i,
.check-list li i {
  transition: all var(--edr-transition-fast) ease;
}
.achievements-list li:hover i,
.feature-list li:hover i,
.check-list li:hover i {
  transform: scale(1.2);
}

/* ===== Button Hover Enhancement ===== */
.btn,
.btn-getstarted,
.btn-explore,
.btn-primary,
.btn-secondary,
.btn-hover {
  transition: all var(--edr-transition-fast) var(--edr-transition);
  position: relative;
  overflow: hidden;
}
.btn:hover,
.btn-getstarted:hover,
.btn-explore:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-hover:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(var(--edr-primary-rgb), 0.3);
}
.btn i,
.btn-explore i,
.btn-getstarted i {
  transition: transform var(--edr-transition-fast) ease;
}
.btn:hover i,
.btn-explore:hover i,
.btn-getstarted:hover i {
  transform: translateX(5px);
}

/* ===== Link Hover Effects ===== */
a:not(.btn):not(.btn-getstarted):not(.nav-link) {
  transition: color var(--edr-transition-fast) ease;
}

/* ===== Form Input Focus Effects ===== */
.form-control,
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  transition: all var(--edr-transition-fast) ease;
}
.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(var(--edr-primary-rgb), 0.15);
}

/* ===== Social Links Animation ===== */
.social-links a {
  transition: all var(--edr-transition-fast) var(--edr-transition);
}
.social-links a:hover {
  transform: translateY(-5px) scale(1.1);
  color: var(--edr-primary);
}

/* ===== Footer Links Animation ===== */
.footer-links a {
  transition: all var(--edr-transition-fast) ease;
  position: relative;
}
.footer-links a:hover {
  padding-left: 8px;
  color: var(--edr-primary);
}

/* ===== Blog Card Effects ===== */
.blog-card,
.post-card,
.news-item {
  transition: all var(--edr-transition-normal) var(--edr-transition);
}
.blog-card:hover,
.post-card:hover,
.news-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(var(--edr-primary-rgb), 0.15);
}
.blog-card img,
.post-card img,
.news-item img {
  transition: all 0.5s var(--edr-transition);
}
.blog-card:hover img,
.post-card:hover img,
.news-item:hover img {
  transform: scale(1.08);
}

/* ===== Testimonial Card Effects ===== */
.testimonial-card,
.testimonial-item {
  transition: all var(--edr-transition-normal) var(--edr-transition);
}
.testimonial-card:hover,
.testimonial-item:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(var(--edr-primary-rgb), 0.12);
}

/* ===== FAQ Accordion Animation ===== */
.accordion-button {
  transition: all var(--edr-transition-fast) ease;
}
.accordion-button:not(.collapsed) {
  color: var(--edr-primary);
}
.accordion-item {
  transition: all var(--edr-transition-fast) ease;
}
.accordion-item:hover {
  box-shadow: 0 5px 20px rgba(var(--edr-primary-rgb), 0.1);
}

/* ===== Partner/Client Logo Animation ===== */
.partner-logo,
.client-logo {
  transition: all var(--edr-transition-fast) ease;
  filter: grayscale(100%);
  opacity: 0.7;
}
.partner-logo:hover,
.client-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

/* ===== Pricing Card Effects ===== */
.pricing-card,
.pricing-item {
  transition: all var(--edr-transition-normal) var(--edr-transition);
}
.pricing-card:hover,
.pricing-item:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 30px 60px rgba(var(--edr-primary-rgb), 0.2);
}

/* ===== Contact Info Card ===== */
.contact-card,
.info-box {
  transition: all var(--edr-transition-normal) var(--edr-transition);
}
.contact-card:hover,
.info-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(var(--edr-primary-rgb), 0.15);
}

/* ===== Pulse Animation for CTA ===== */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--edr-primary-rgb), 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(var(--edr-primary-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--edr-primary-rgb), 0); }
}
.pulse {
  animation: pulse 2s infinite;
}
.btn-cta {
  animation: pulse 2s infinite;
}

/* ===== Shake Animation for Attention ===== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}
.shake {
  animation: shake 0.5s ease-in-out;
}

/* ===== Fade In Up Animation ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-in-up {
  animation: fadeInUp 0.6s var(--edr-transition) forwards;
}

/* ===== Scale In Animation ===== */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.scale-in {
  animation: scaleIn 0.4s var(--edr-transition) forwards;
}

/* ===== Smooth AOS Override ===== */
[data-aos] {
  transition-timing-function: var(--edr-transition) !important;
}

/* ===== Scroll Top Button Animation ===== */
#scroll-top,
.scroll-top {
  transition: all var(--edr-transition-fast) ease;
}
#scroll-top:hover,
.scroll-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(var(--edr-primary-rgb), 0.3);
}

/* ===== Preloader Fade Out ===== */
#preloader.loaded {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* ===== Hero Section Animations ===== */
.hero-title {
  animation: fadeInUp 0.8s var(--edr-transition) 0.2s forwards;
  opacity: 0;
}
.hero-subtitle {
  animation: fadeInUp 0.8s var(--edr-transition) 0.4s forwards;
  opacity: 0;
}
.hero-btn {
  animation: fadeInUp 0.8s var(--edr-transition) 0.6s forwards;
  opacity: 0;
}
.hero-image {
  animation: fadeInUp 0.8s var(--edr-transition) 0.8s forwards;
  opacity: 0;
}

/* ===== Device/Module Cards ===== */
.device-card,
.module-card {
  transition: all var(--edr-transition-normal) var(--edr-transition);
}
.device-card:hover,
.module-card:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 25px 50px rgba(var(--edr-primary-rgb), 0.2);
}

/* ===== Table Row Hover ===== */
table tbody tr {
  transition: all var(--edr-transition-fast) ease;
}
table tbody tr:hover {
  background-color: rgba(var(--edr-primary-rgb), 0.05);
  transform: scale(1.01);
}

/* ===== Badge Animation ===== */
.badge {
  transition: all var(--edr-transition-fast) ease;
}
.badge:hover {
  transform: scale(1.1);
}

/* ===== Progress Bar Animation ===== */
.progress-bar {
  transition: width 1s var(--edr-transition);
}

/* ===== Navbar Link Underline Animation ===== */
#navmenu a {
  position: relative;
}
#navmenu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--edr-primary);
  transition: all var(--edr-transition-fast) ease;
  transform: translateX(-50%);
}
#navmenu a:hover::after,
#navmenu a.active::after {
  width: 80%;
}

/* ===== Mobile Menu Animation ===== */
.mobile-nav-active #navmenu ul {
  animation: slideInRight 0.3s ease forwards;
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== Loading Spinner ===== */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.spinner {
  animation: spin 1s linear infinite;
}

/* ===== INTERACTIVE ANIMATIONS - Index Page Ultra-Reactive ===== */

/* ===== 1. Click/Active State - Press Effect ===== */
.icon-box:active,
.why-box:active,
.category-card:active,
.critic-review:active,
.faq-item:active,
.nav-tabs .nav-link:active,
.card:active,
.service-card:active,
.feature-card:active,
.accreditation-item:active,
.stats-item:active {
  transform: scale(0.96) !important;
  transition: transform 0.1s ease !important;
  box-shadow: 0 2px 10px rgba(var(--edr-primary-rgb), 0.2) !important;
}

/* ===== 2. Enhanced Hover - Elevation + Deep Shadow ===== */
.icon-box,
.why-box,
.category-card,
.critic-review,
.faq-item,
.accreditation-item,
.stats-item {
  transition: all 0.4s var(--edr-transition);
  position: relative;
  cursor: pointer;
}

.icon-box:hover,
.why-box:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 60px rgba(var(--edr-primary-rgb), 0.25);
}

.category-card:hover {
  transform: translateY(-12px) scale(1.03);
  box-shadow: 0 30px 70px rgba(var(--edr-primary-rgb), 0.3);
  border-color: var(--edr-primary);
}

.critic-review:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(var(--edr-primary-rgb), 0.2);
}

.faq-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(var(--edr-primary-rgb), 0.15);
  border-left: 4px solid var(--edr-primary);
}

.accreditation-item:hover {
  transform: translateY(-8px) scale(1.05);
  filter: brightness(1.1);
}

.stats-item:hover {
  transform: translateY(-8px);
}

/* ===== 3. Icon Scale on Hover (No Rotation) ===== */
.icon-box i,
.why-box i,
.category-icon,
.category-icon img,
.stats-item i {
  transition: all 0.4s var(--edr-transition);
}

.icon-box:hover i,
.why-box:hover i {
  transform: scale(1.2);
  color: var(--edr-primary);
}

.category-card:hover .category-icon,
.category-card:hover .category-icon img {
  transform: scale(1.15);
}

.stats-item:hover i {
  transform: scale(1.3);
  color: var(--edr-primary);
}

/* ===== 4. Glow Border Effect on Interaction ===== */
.category-card,
.icon-box,
.why-box,
.critic-review {
  border: 2px solid transparent;
  transition: all 0.4s var(--edr-transition), border-color 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover,
.icon-box:hover,
.why-box:hover,
.critic-review:hover {
  border-color: rgba(var(--edr-primary-rgb), 0.4);
  box-shadow:
    0 25px 60px rgba(var(--edr-primary-rgb), 0.2),
    0 0 20px rgba(var(--edr-primary-rgb), 0.15),
    inset 0 0 0 1px rgba(var(--edr-primary-rgb), 0.1);
}

/* ===== 6. Pulsating Glow for CTA/Important Elements ===== */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 5px rgba(var(--edr-primary-rgb), 0.4);
  }
  50% {
    box-shadow: 0 0 25px rgba(var(--edr-primary-rgb), 0.6), 0 0 40px rgba(var(--edr-primary-rgb), 0.3);
  }
}

.glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

.btn-getstarted:hover {
  animation: glowPulse 1.5s ease-in-out infinite;
}

/* ===== 7. Text Shimmer Effect ===== */
@keyframes textShimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.shimmer-text:hover {
  background: linear-gradient(90deg,
    var(--edr-primary) 0%,
    #64b5f6 25%,
    var(--edr-primary) 50%,
    #64b5f6 75%,
    var(--edr-primary) 100%);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 2s linear infinite;
}

/* ===== 8. Staggered Appearance Animation ===== */
@keyframes staggeredFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ===== 9. Enhanced Nav Tab Hover ===== */
.nav-tabs .nav-link {
  transition: all 0.3s var(--edr-transition);
  border-left: 3px solid transparent;
}

.nav-tabs .nav-link:hover {
  transform: translateX(8px);
  border-left-color: var(--edr-primary);
  background-color: rgba(var(--edr-primary-rgb), 0.08);
  color: var(--edr-primary);
}

.nav-tabs .nav-link.active {
  border-left-color: var(--edr-primary);
  transform: translateX(5px);
}

/* ===== 10. Enhanced Star Rating Animation ===== */
.stars i {
  transition: all 0.3s ease;
  display: inline-block;
}

.critic-review:hover .stars i {
  animation: starBounce 0.5s ease forwards;
}

.critic-review:hover .stars i:nth-child(1) { animation-delay: 0s; }
.critic-review:hover .stars i:nth-child(2) { animation-delay: 0.1s; }
.critic-review:hover .stars i:nth-child(3) { animation-delay: 0.2s; }
.critic-review:hover .stars i:nth-child(4) { animation-delay: 0.3s; }
.critic-review:hover .stars i:nth-child(5) { animation-delay: 0.4s; }

@keyframes starBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* ===== 11. WhatsApp Float Button Enhanced ===== */
.whatsapp-float {
  transition: all 0.4s var(--edr-transition);
}

.whatsapp-float:hover {
  transform: scale(1.15) rotate(10deg);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
}

.whatsapp-float:active {
  transform: scale(0.95);
}

/* ===== 12. Partner Logo Enhanced Effects ===== */
.accreditation-item img {
  transition: all 0.4s var(--edr-transition);
  filter: grayscale(30%) opacity(0.85);
}

.accreditation-item:hover img {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.1);
}

/* ===== 13. CLICK FEEDBACK - Pop/Vibration Animation ===== */
@keyframes clickPop {
  0% { transform: scale(1); }
  50% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

@keyframes clickVibrate {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

@keyframes clickRipple {
  0% {
    transform: scale(0);
    opacity: 0.6;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

/* Service blocks - Pop animation on click */
.category-card.clicked,
.icon-box.clicked,
.why-box.clicked,
.service-card.clicked,
.feature-card.clicked,
.mission-card.clicked,
.module-card.clicked,
.device-card.clicked {
  animation: clickPop 0.3s ease-out;
}

/* Stats & reviews - Vibration on click */
.stats-item.clicked,
.critic-review.clicked,
.testimonial-card.clicked,
.faq-item.clicked {
  animation: clickVibrate 0.4s ease-out;
}

/* Buttons - Pop effect */
.btn.clicked,
.btn-getstarted.clicked,
.btn-explore.clicked {
  animation: clickPop 0.25s ease-out;
}

/* Ripple effect container */
.ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(var(--edr-primary-rgb), 0.3);
  pointer-events: none;
  animation: clickRipple 0.6s ease-out forwards;
}

/* Visual feedback colors on click */
.category-card.clicked {
  background: linear-gradient(135deg, rgba(var(--edr-primary-rgb), 0.1), transparent) !important;
}

.icon-box.clicked,
.why-box.clicked {
  box-shadow: 0 0 0 3px rgba(var(--edr-primary-rgb), 0.3), 0 15px 40px rgba(var(--edr-primary-rgb), 0.2) !important;
}

/* ===== Reduced Motion for Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
