/*
 * KawaiDrop — animations.css
 * Toutes les animations CSS isolées
 */

/* =============================================
   FLOAT — mascotte hero et bulles
   ============================================= */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-12px) rotate(1deg); }
  66%       { transform: translateY(-6px) rotate(-1deg); }
}

/* =============================================
   TWINKLE — sparkles autour de la mascotte
   ============================================= */
@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
  25%       { opacity: 0.6; transform: scale(1.2) rotate(10deg); }
  50%       { opacity: 0.2; transform: scale(0.7) rotate(20deg); }
  75%       { opacity: 0.8; transform: scale(1.1) rotate(-5deg); }
}

/* =============================================
   MARQUEE — bandeau défilant topbar
   ============================================= */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =============================================
   SCROLL BOUNCE — flèche hero bas de page
   ============================================= */
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0px); opacity: 0.6; }
  50%       { transform: translateX(-50%) translateY(10px); opacity: 1; }
}

/* =============================================
   BADGE BOUNCE — compteur panier
   ============================================= */
@keyframes badgeBounce {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.6); }
  60%  { transform: scale(0.85); }
  80%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* =============================================
   PULSE — bouton "Ajouter au panier"
   ============================================= */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 110, 180, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(255, 110, 180, 0); }
}

.kd-add-to-cart:hover {
  animation: pulse 1.2s ease-in-out infinite;
}

/* =============================================
   REVIEWS SCROLL — slider avis clients
   ============================================= */
@keyframes reviewsScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =============================================
   SLIDE-IN — menu mobile
   ============================================= */
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideOutRight {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

/* =============================================
   FADE-IN avec stagger — réassurance, cartes
   ============================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* =============================================
   SPIN — loader
   ============================================= */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* =============================================
   COUNT UP — animation de comptage
   Gérée en JS mais keyframe pour le nombre
   ============================================= */
@keyframes countGlow {
  0%, 100% { text-shadow: none; }
  50%       { text-shadow: 0 0 20px currentColor; }
}

.kd-why-counter.counting {
  animation: countGlow 0.5s ease;
}

/* =============================================
   HERO — texte apparition à la charge
   ============================================= */
.kd-hero-content .kd-hero-badge {
  animation: fadeInUp 0.6s ease 0.1s both;
}

.kd-hero-content h1 {
  animation: fadeInUp 0.6s ease 0.25s both;
}

.kd-hero-content .kd-hero-subtitle {
  animation: fadeInUp 0.6s ease 0.4s both;
}

.kd-hero-content .kd-hero-cta {
  animation: fadeInUp 0.6s ease 0.55s both;
}

.kd-hero-content .kd-hero-stats {
  animation: fadeInUp 0.6s ease 0.7s both;
}

.kd-hero-visual {
  animation: fadeInRight 0.8s ease 0.3s both;
}

/* =============================================
   HOVER GLOW sur les boutons primaires
   ============================================= */
.btn-primary:hover {
  box-shadow:
    0 4px 16px rgba(255, 110, 180, 0.4),
    0 0 32px rgba(255, 110, 180, 0.2);
}

/* =============================================
   CARD HOVER — produits et univers
   ============================================= */
.kd-product-card,
.kd-univers-card,
.kd-why-card,
.kd-reassurance-item {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

/* =============================================
   SKELETON LOADER — pendant chargement produits
   ============================================= */
@keyframes skeletonShimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.kd-skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease infinite;
  border-radius: 8px;
}

/* =============================================
   NOTIFICATION TOAST (ajout panier)
   ============================================= */
@keyframes toastSlideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes toastSlideOut {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

.kd-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--dark, #2D1B4E);
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  font-family: var(--font-title, 'Nunito', sans-serif);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  animation: toastSlideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.kd-toast.hiding {
  animation: toastSlideOut 0.3s ease forwards;
}

/* =============================================
   HEADER SCROLL COMPACTÉ
   ============================================= */
.kd-header {
  transition: box-shadow 0.3s ease;
}

.kd-header.scrolled .kd-navbar {
  transition: padding 0.3s ease;
}

/* =============================================
   RECHERCHE BARRE — ouverture/fermeture
   ============================================= */
@keyframes searchBarOpen {
  from { opacity: 0; max-height: 0; }
  to   { opacity: 1; max-height: 80px; }
}

.kd-search-bar.open {
  animation: searchBarOpen 0.25s ease forwards;
  display: block !important;
}

/* =============================================
   RESPONSIVE — réductions animations mobiles
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 768px) {
  .kd-hero-mascot {
    font-size: 100px !important;
  }

  .kd-reviews-track {
    animation-duration: 20s;
  }
}
