/* Widget chat visiteur */
.watys-chat-launcher {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: #0f1c24; color: #fff; font-size: 1.4rem;
  box-shadow: 0 12px 30px rgba(15,28,36,.25);
  display: grid; place-items: center;
}
.watys-chat-launcher:hover { background: #0d9488; }
.watys-chat-launcher.has-unread {
  animation: watys-chat-pulse 1.6s ease-in-out infinite;
  background: #0d9488;
}
.watys-chat-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: #dc2626; color: #fff;
  font-size: .7rem; font-weight: 700; line-height: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.watys-chat-toast {
  position: fixed; right: 1.1rem; bottom: 5.2rem; z-index: 91;
  max-width: min(280px, calc(100vw - 2rem));
  background: #102a33; color: #fff; border-radius: 12px;
  padding: .7rem .9rem; font-size: .88rem; line-height: 1.35;
  box-shadow: 0 12px 28px rgba(15,28,36,.28);
  cursor: pointer;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.watys-chat-toast.is-visible {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}
@keyframes watys-chat-pulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(15,28,36,.25); }
  50% { box-shadow: 0 0 0 8px rgba(13,148,136,.35), 0 12px 30px rgba(15,28,36,.25); }
}

.watys-chat-panel {
  position: fixed; right: 1.1rem; bottom: 5rem; z-index: 90;
  width: min(360px, calc(100vw - 1.5rem));
  height: min(480px, calc(100vh - 7rem));
  background: #fff; border: 1px solid #d7e2dc; border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15,28,36,.15);
  display: none; flex-direction: column; overflow: hidden;
}
.watys-chat-panel.is-open { display: flex; }
.watys-chat-header {
  background: #102a33; color: #fff; padding: .85rem 1rem; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center;
}
.watys-chat-header button {
  border: 0; background: transparent; color: #fff; font-size: 1.2rem; cursor: pointer;
}
.watys-chat-log {
  flex: 1; overflow: auto; padding: .85rem; background: #f4f7f5;
}
.watys-chat-bubble {
  max-width: 85%; margin-bottom: .55rem; padding: .55rem .7rem; border-radius: 12px;
  font-size: .92rem; line-height: 1.4; white-space: pre-wrap;
}
.watys-chat-bubble.visitor { background: #0d9488; color: #fff; margin-left: auto; }
.watys-chat-bubble.admin, .watys-chat-bubble.system { background: #fff; border: 1px solid #d7e2dc; }
.watys-chat-form { display: grid; gap: .4rem; padding: .7rem; border-top: 1px solid #d7e2dc; }
.watys-chat-form input, .watys-chat-form textarea {
  width: 100%; border: 1px solid #d7e2dc; border-radius: 10px; padding: .5rem .65rem; font: inherit;
}
.watys-chat-form button {
  border: 0; border-radius: 10px; background: #0f1c24; color: #fff; font-weight: 700;
  padding: .55rem; cursor: pointer;
}
@media (max-width: 600px) {
  .watys-chat-panel { right: .5rem; left: .5rem; width: auto; bottom: 4.5rem; }
}
