/* ── FAB Button ── */
#wa-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9990;
}
#wa-fab-btn {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45), 0 2px 8px rgba(0,0,0,0.18);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s;
  position: relative;
}
#wa-fab-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.55), 0 3px 12px rgba(0,0,0,0.22);
}
#wa-fab-btn svg { display: block; }

/* Dot indicateur sur le FAB */
#wa-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2px solid white;
  transition: background .4s;
}

/* Badge tooltip */
#wa-badge {
  display: none;
  position: absolute;
  bottom: 68px; right: 0;
  background: var(--ink);
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.22);
  align-items: center; gap: 6px;
  animation: wa-badge-in .35s cubic-bezier(.34,1.56,.64,1) both;
}
#wa-badge::after {
  content: '';
  position: absolute;
  bottom: -5px; right: 20px;
  width: 10px; height: 10px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
@keyframes wa-badge-in {
  from { opacity:0; transform: translateY(8px) scale(.92); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

/* ── Popup Card ── */
#wa-popup {
  display: none;
  position: fixed;
  bottom: 100px;
  right: 28px;
  z-index: 9989;
  width: 310px;
  background: var(--cream);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
  overflow: hidden;
  transform: translateY(16px) scale(.96);
  opacity: 0;
  transition: transform .28s cubic-bezier(.34,1.2,.64,1), opacity .28s ease;
}
#wa-popup.wa-open {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Header vert */
.wa-header {
  background: #075E54;
  padding: 16px 16px 14px;
  display: flex; align-items: center; gap: 12px;
  position: relative;
}
.wa-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #128C7E;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.4rem;
  position: relative;
}
#wa-popup-dot {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #075E54;
  transition: background .4s;
}
.wa-header-info { flex: 1; }
.wa-header-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem; font-weight: 700;
  color: white; margin-bottom: 2px;
}
.wa-header-role {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem; font-weight: 500;
  color: rgba(255,255,255,0.72);
}
.wa-close-btn {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.6); font-size: 1.1rem;
  line-height: 1; padding: 4px;
  transition: color .15s;
}
.wa-close-btn:hover { color: white; }

/* Bubble message */
.wa-body { padding: 16px 14px 14px; background: #ECE5DD; }
.wa-bubble {
  background: white;
  border-radius: 0 12px 12px 12px;
  padding: 10px 14px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #111;
  box-shadow: 0 1px 3px rgba(0,0,0,0.10);
  position: relative;
  max-width: 90%;
}
.wa-bubble::before {
  content: '';
  position: absolute;
  top: 0; left: -8px;
  border-width: 0 8px 8px 0;
  border-style: solid;
  border-color: transparent white transparent transparent;
}
.wa-time {
  font-size: 0.65rem; color: #8696A0;
  text-align: right; margin-top: 4px;
}

/* Indicateur de statut */
.wa-status-row {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px 4px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem; color: var(--muted); font-weight: 500;
}
.wa-status-dot-sm {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}

/* CTA */
.wa-footer { padding: 12px 14px 16px; background: #ECE5DD; }
#wa-cta-link {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #25D366;
  color: white;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem; font-weight: 700;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 12px;
  transition: background .18s, transform .18s;
  box-shadow: 0 2px 10px rgba(37,211,102,0.35);
}
#wa-cta-link:hover {
  background: #1ebe58;
  transform: translateY(-1px);
}

/* Horaires */
.wa-schedule {
  padding: 0 14px 14px;
  background: #ECE5DD;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  color: #8696A0;
  text-align: center;
}

/* Mobile adjustments */
@media (max-width: 480px) {
  #wa-fab { bottom: 20px; right: 16px; }
  #wa-popup { right: 16px; width: calc(100vw - 32px); bottom: 90px; }
}
