#swai-chat-root {
  --swai-color: #1f6f5c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ── Mode bulle flottante ─────────────────────────────────────────── */
.swai-bubble-container {
  position: fixed;
  bottom: 24px;
  z-index: 99999;
}
.swai-bubble-container.pos-right { right: 24px; }
.swai-bubble-container.pos-left  { left: 24px; }

.swai-bubble-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--swai-color);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease;
}
.swai-bubble-btn:hover { transform: scale(1.06); }

/* ── Fenêtre de chat ──────────────────────────────────────────────── */
.swai-window {
  width: 360px;
  max-width: 92vw;
  height: 520px;
  max-height: 75vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: absolute;
  bottom: 76px;
}
.pos-right .swai-window { right: 0; }
.pos-left  .swai-window { left: 0; }

#swai-chat-root[data-mode="inline"] .swai-window {
  position: static;
  width: 100%;
  max-width: 480px;
  height: 560px;
  margin: 0 auto;
}

.swai-header {
  background: var(--swai-color);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 15px;
}
.swai-header button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.swai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f7f8fa;
}

.swai-msg {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.swai-msg.user {
  align-self: flex-end;
  background: var(--swai-color);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.swai-msg.bot {
  align-self: flex-start;
  background: #fff;
  color: #222;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
}
.swai-msg.typing {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #999;
  font-style: italic;
}

.swai-input-area {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #eee;
  background: #fff;
}
.swai-input-area textarea {
  flex: 1;
  resize: none;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  max-height: 90px;
}
.swai-input-area button.send {
  background: var(--swai-color);
  border: none;
  color: #fff;
  width: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
}
.swai-input-area button.send:disabled {
  opacity: .5;
  cursor: default;
}

.swai-hp {
  position: absolute !important;
  left: -9999px !important;
  display: none !important;
}
