/**
 * 🎮 EMOCARD Video Likes - Système de likes adapté pour vidéo
 * @version 1.0.0
 * @date 2025-10-02
 */

/* 💖 Container du système de likes vidéo */
.video-likes-container {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* 🎯 DISPOSITION MOBILE: Alignement horizontal bas avec bouton son 
   Desktop: Vertical haut-droite (4 ❤️) 
   Mobile: Horizontal bas-droite (❤️ 4) (🔊)
*/

/* 🎯 Bouton Like - STYLE PORTFOLIO ROND STANDARD */
.video-like-button {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: visible;
}

.video-like-button:hover {
  transform: scale(1.1);
  box-shadow: 
    0 6px 16px rgba(170, 123, 76, 0.3),
    0 3px 8px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 1);
}

.video-like-button:active {
  transform: scale(0.95);
}

/* � CŒUR ANIMÉ - Style portfolio identique */
.video-like-button::before {
  content: '♡';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  color: #e74c3c;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 1;
  z-index: 10;
  display: block;
  line-height: 1;
}

/* État liké - Cœur plein */
.video-like-button.liked::before {
  content: '♥';
  color: #e74c3c;
  animation: heartFill 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.video-like-button.liked {
  animation: heartBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(231, 76, 60, 0.05) 100%);
}

/* Glow effect sur cœur liké */
.video-like-button.liked::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.5);
  opacity: 0;
  animation: glowPulse 1s ease-out;
}

/* MASQUER l'icône SVG - on utilise ::before */
.video-like-icon {
  display: none;
}

/* 🔢 Compteur de likes */
.video-like-counter {
  padding: 8px 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(170, 123, 76, 0.1);
  color: #aa7b4c;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  transition: all 0.3s ease;
}

/* 💫 Animation pop du bouton */
@keyframes videoPop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.25);
  }
  100% {
    transform: scale(1);
  }
}

.video-like-button.animate-pop {
  animation: videoPop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ✨ Animation count-up du compteur */
@keyframes videoCountUp {
  0% {
    transform: scale(1) translateY(0);
  }
  30% {
    transform: scale(1.15) translateY(-2px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

.video-like-counter.animate-count {
  animation: videoCountUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(170, 123, 76, 0.15);
}

/* 🌟 Particules burst */
.video-burst-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #aa7b4c, #d4a574);
  pointer-events: none;
  z-index: 9999;
  animation: videoBurst 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes videoBurst {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--tx), var(--ty)) scale(0);
  }
}

/* 📱 Responsive - ALIGNEMENT HORIZONTAL AVEC BOUTON SON */
@media (max-width: 768px) {
  .video-likes-container {
    /* 🎯 NOUVEAU: Alignement horizontal en bas à côté du bouton son */
    bottom: 20px;
    right: 80px; /* 48px bouton + 12px gap + 20px position = 80px */
    gap: 6px;
    flex-direction: row; /* 🆕 Horizontal au lieu de vertical */
    align-items: center;
    transform: translateX(0); /* 🔧 Reset any potential transforms */
  }
  
  .video-like-button {
    width: 44px;
    height: 44px;
    flex-shrink: 0; /* 🆕 Évite réduction */
  }
  
  .video-like-icon {
    width: 22px;
    height: 22px;
  }
  
  .video-like-counter {
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap; /* 🆕 Évite retour à la ligne */
    min-width: 32px; /* 🆕 Largeur minimale pour stabilité */
    text-align: center;
  }
  
  /* 🎯 Ajustement dynamique pour grands nombres */
  .video-likes-container:has(.video-like-counter[data-count*="99"]) {
    right: 90px; /* Plus d'espace pour 3+ chiffres */
  }
}

@media (max-width: 480px) {
  .video-likes-container {
    /* 🎯 PETIT ÉCRAN: Alignement horizontal maintenu */
    bottom: 20px;
    right: 72px; /* 40px bouton + 12px gap + 20px position = 72px */
    gap: 4px;
    flex-direction: row; /* 🆕 Maintient horizontal */
    align-items: center;
    transform: translateX(0); /* 🔧 Reset any potential transforms */
  }
  
  .video-like-button {
    width: 40px;
    height: 40px;
    flex-shrink: 0; /* 🆕 Évite réduction */
  }
  
  .video-like-counter {
    padding: 5px 10px;
    font-size: 12px;
    white-space: nowrap; /* 🆕 Évite retour à la ligne */
    min-width: 28px; /* 🆕 Largeur minimale adaptée petit écran */
    text-align: center;
  }
  
  /* 🎯 Ajustement dynamique petit écran */
  .video-likes-container:has(.video-like-counter[data-count*="99"]) {
    right: 80px; /* Plus d'espace pour 3+ chiffres sur petit écran */
  }
}

/* 🎬 ANIMATIONS - Identiques au portfolio */
@keyframes heartFill {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

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

@keyframes glowPulse {
  0% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

/* 🎯 ICÔNE COMPTEUR DE LIKES - Position et style */
.video-like-counter {
  padding: 6px 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.08);
  font-size: 13px;
  font-weight: 600;
  color: #aa7b4c;
  min-width: 32px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
