/* ============================================================
   MOBILIS TOURS & LOISIRS — Widget WhatsApp
   ============================================================ */

.whatsapp-widget-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* ── BOUTON FLOTTANT ── */
.whatsapp-float {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(37,211,102,0.4);
  cursor: pointer;
  border: none;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  position: relative;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37,211,102,0.6);
}
.whatsapp-float__icon {
  width: 35px;
  height: 35px;
}

/* ── TOOLTIP ── */
.whatsapp-float__tooltip {
  position: absolute;
  right: calc(100% + 15px);
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  background: white;
  color: #333;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--font-base, sans-serif);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}
.whatsapp-float__tooltip::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid white;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.whatsapp-float:hover .whatsapp-float__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}

/* ── FENÊTRE DE CHAT ── */
.whatsapp-chat {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 320px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform-origin: bottom right;
  transform: scale(0.8);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  font-family: var(--font-base, sans-serif);
}
.whatsapp-chat.active {
  transform: scale(1);
  opacity: 1;
  visibility: visible;
}

/* Header */
.whatsapp-chat__header {
  background: #095E54;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
}
.whatsapp-chat__header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.whatsapp-chat__avatar {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.whatsapp-chat__avatar svg {
  width: 24px;
  height: 24px;
}
.whatsapp-chat__header h4 {
  font-size: 1rem;
  margin: 0 0 2px 0;
  font-weight: 600;
}
.whatsapp-chat__header p {
  font-size: 0.75rem;
  margin: 0;
  opacity: 0.9;
}
.whatsapp-chat__close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.whatsapp-chat__close:hover {
  opacity: 1;
}
.whatsapp-chat__close svg {
  width: 20px;
  height: 20px;
}

/* Body */
.whatsapp-chat__body {
  background: #ECE5DD;
  padding: 20px 15px;
  height: 200px;
  overflow-y: auto;
  background-image: url('data:image/svg+xml;utf8,<svg opacity="0.05" xmlns="http://www.w3.org/2000/svg" width="100" height="100"><circle cx="50" cy="50" r="1"/></svg>');
}
.whatsapp-chat__message {
  background: white;
  padding: 10px 12px;
  border-radius: 0 8px 8px 8px;
  font-size: 0.85rem;
  color: #333;
  line-height: 1.4;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin-bottom: 8px;
}
.whatsapp-chat__message::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-top: 8px solid white;
  border-left: 8px solid transparent;
}
.whatsapp-chat__message p {
  margin: 0 0 4px 0;
}
.whatsapp-chat__message p:last-of-type {
  margin: 0;
}
.whatsapp-chat__time {
  display: block;
  text-align: right;
  font-size: 0.65rem;
  color: #999;
  margin-top: 4px;
}

/* Footer / Input */
.whatsapp-chat__footer {
  padding: 10px;
  background: #F0F0F0;
}
#whatsapp-chat-form {
  display: flex;
  gap: 8px;
}
#whatsapp-message-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 20px;
  border: none;
  font-size: 0.85rem;
  outline: none;
}
#whatsapp-message-input:focus {
  box-shadow: inset 0 0 0 1px #25D366;
}
.whatsapp-chat__send {
  background: #25D366;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.whatsapp-chat__send:hover {
  transform: scale(1.05);
}
.whatsapp-chat__send svg {
  width: 18px;
  height: 18px;
  margin-left: -2px; /* Center optical alignment for paper plane */
}

/* Responsive */
@media (max-width: 480px) {
  .whatsapp-chat {
    width: 280px;
  }
}
