/* ============================================
WHATSAPP FLOATING BUTTON - MORAIS CLEANING
============================================ */

/* Conteneur du flotteur */
.whatsapp-floater-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 15px;
}

/* Masquer le bouton WhatsApp sur les écrans étroits (responsive/mobile) */
@media (max-width: 992px) {
  .whatsapp-floater-container {
    display: none !important;
  }
}

/* Menu des services */
.whatsapp-services-menu {
  position: absolute;
  bottom: 80px;
  right: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  width: 280px;
}

.whatsapp-services-menu.open {
  max-height: 520px;
  opacity: 1;
  pointer-events: all;
  animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.1);
}

@keyframes slideUp {
  from {
    transform: translateY(15px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Titre du menu */
.whatsapp-menu-title {
  padding: 18px 20px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
  font-weight: 800;
  font-size: 1.05rem;
  text-align: center;
  border-bottom: none;
  letter-spacing: 0.3px;
}

/* Container des services */
.whatsapp-services-list {
  overflow-y: auto;
  max-height: 400px;
  padding: 8px 0;
}

/* Catégorie */
.whatsapp-service-category {
  padding: 12px 16px 8px;
  font-size: 0.75rem;
  font-weight: 800;
  color: #128C7E;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: var(--gray-100);
  margin-top: 4px;
}

.whatsapp-service-category:first-child {
  margin-top: 0;
}

/* Liens des services */
.whatsapp-service-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  color: #333;
  text-decoration: none;
  font-size: 0.92rem;
  transition: all 0.25s ease;
  font-weight: 500;
  border-left: 3px solid transparent;
  background: white;
}

.whatsapp-service-link:hover {
  background: var(--gray-100);
  color: #25D366;
  border-left-color: #25D366;
  padding-left: 22px;
  font-weight: 600;
}

.whatsapp-service-link::before {
  content: '→';
  color: #25D366;
  font-weight: 700;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.whatsapp-service-link:hover::before {
  opacity: 1;
}

/* Bouton flottant WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: none;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5),
    0 4px 8px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #2EE76E 0%, #15A085 100%);
}

.whatsapp-float:active {
  transform: scale(1.05) translateY(-1px);
}

.whatsapp-float i {
  color: white;
}

/* Animation pulse subtile */
@keyframes whatsapp-pulse {

  0%,
  100% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4),
      0 2px 4px rgba(0, 0, 0, 0.1);
  }

  50% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.6),
      0 2px 4px rgba(0, 0, 0, 0.15),
      0 0 0 8px rgba(37, 211, 102, 0.1);
  }
}

.whatsapp-float.pulse {
  animation: whatsapp-pulse 2s ease-in-out infinite;
}

/* Tooltip au hover */
.whatsapp-float::before {
  content: 'Cliquez pour voir nos services';
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  color: #128C7E;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.whatsapp-float::after {
  content: '';
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid white;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.whatsapp-float:hover::before,
.whatsapp-float:hover::after {
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 55px;
    height: 55px;
    font-size: 28px;
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-float::before {
    display: none;
    /* Masquer le tooltip sur mobile */
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}

/* Badge notification (optionnel) */
.whatsapp-float .notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--mc-red-light);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid white;
}

/* Accessibilité */
.whatsapp-float:focus {
  outline: 3px solid #25D366;
  outline-offset: 2px;
}

.whatsapp-float:focus:not(:focus-visible) {
  outline: none;
}

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

  .whatsapp-services-menu {
    width: 220px;
    max-height: 0;
  }

  .whatsapp-services-menu.open {
    max-height: 450px;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 26px;
    bottom: 20px;
    right: 20px;
  }

  .whatsapp-float::before {
    font-size: 12px;
    padding: 8px 12px;
  }
}