/* ==========================================================
   BOUTON WHATSAPP FLOTTANT
   ========================================================== */

.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== BULLE MESSAGE ===== */
.whatsapp-bubble {
  background: var(--white);
  padding: 12px 18px;
  border-radius: 25px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  font-family: Arial, sans-serif;
  font-size: 13px;
  color: var(--gray-dark);
  font-weight: 600;
  position: relative;
  animation: bounceIn 0.6s ease;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.whatsapp-bubble::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid var(--white);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.whatsapp-bubble .close-bubble {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: var(--danger);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  border: 2px solid var(--white);
  transition: all 0.3s ease;
}

.whatsapp-bubble .close-bubble:hover {
  transform: scale(1.15);
}

/* ===== BOUTON WHATSAPP ===== */
.whatsapp-btn {
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 32px;
  text-decoration: none;
  box-shadow: 0 5px 25px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  animation: pulseWhatsApp 2s infinite;
  position: relative;
}

.whatsapp-btn:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
  animation: none;
}

.whatsapp-btn i {
  animation: shake 3s ease infinite;
}

/* ===== BADGE NOTIFICATION ===== */
.whatsapp-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 22px;
  height: 22px;
  background: var(--danger);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 3px solid var(--white);
  animation: bounce 1s ease infinite;
}

/* ===== ANIMATIONS ===== */
@keyframes pulseWhatsApp {
  0% {
    box-shadow:
      0 5px 25px rgba(37, 211, 102, 0.4),
      0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow:
      0 5px 25px rgba(37, 211, 102, 0.4),
      0 0 0 20px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow:
      0 5px 25px rgba(37, 211, 102, 0.4),
      0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@keyframes shake {
  0%,
  90%,
  100% {
    transform: rotate(0deg);
  }
  92% {
    transform: rotate(-15deg);
  }
  94% {
    transform: rotate(15deg);
  }
  96% {
    transform: rotate(-10deg);
  }
  98% {
    transform: rotate(10deg);
  }
}

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

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* ===== BULLE MASQUÉE ===== */
.whatsapp-bubble.hidden {
  display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-btn {
    width: 55px;
    height: 55px;
    font-size: 28px;
  }

  .whatsapp-bubble {
    display: none;
  }
}
