/* ============================================================
   IMMOBLEU CHAT BUBBLE — Bulle chat élégante bas-droite
   ============================================================ */

.immobleu-chat-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999998;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* ── BULLE FLOTTANTE ────────────────────────────────────────── */
.immobleu-chat-bubble {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C4907C 0%, #A67060 100%);
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(196, 144, 124, 0.4), 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s;
  opacity: 0;
  transform: scale(0.5) translateY(20px);
  pointer-events: none;
  padding: 0;
}
.immobleu-chat-root.is-visible .immobleu-chat-bubble {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  animation: immobleu-chat-bubble-in 0.5s cubic-bezier(.2,.8,.2,1);
}
.immobleu-chat-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 32px rgba(196, 144, 124, 0.5), 0 4px 10px rgba(0,0,0,0.15);
}
.immobleu-chat-bubble:active {
  transform: scale(1.02);
}
.immobleu-chat-bubble-icon {
  font-size: 28px;
  line-height: 1;
  filter: grayscale(0.1);
}
.immobleu-chat-bubble-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  background: #10b981;
  border: 2.5px solid #fff;
  border-radius: 50%;
  animation: immobleu-chat-pulse 2s infinite;
}

@keyframes immobleu-chat-bubble-in {
  0%   { opacity: 0; transform: scale(0.3) translateY(40px); }
  60%  { transform: scale(1.1) translateY(-5px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes immobleu-chat-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  50%      { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}

/* ── TOOLTIP D'ACCROCHE ─────────────────────────────────────── */
.immobleu-chat-tooltip {
  position: absolute;
  bottom: 8px;
  right: 80px;
  background: #1C2A3A;
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(28,42,58,0.25);
  opacity: 0;
  transform: translateX(20px) scale(0.92);
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.immobleu-chat-root.is-tooltip-visible .immobleu-chat-tooltip {
  opacity: 1;
  transform: translateX(0) scale(1);
}
.immobleu-chat-tooltip-arrow {
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 7px solid #1C2A3A;
}

/* ── FENÊTRE CHAT ───────────────────────────────────────────── */
.immobleu-chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(28,42,58,0.25), 0 8px 20px rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s cubic-bezier(.2,.8,.2,1);
}
.immobleu-chat-root.is-open .immobleu-chat-window {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header */
.immobleu-chat-header {
  background: linear-gradient(135deg, #1C2A3A 0%, #2C3E50 100%);
  color: #fff;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.immobleu-chat-header-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(196,144,124,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.immobleu-chat-header-online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2px solid #1C2A3A;
  border-radius: 50%;
}
.immobleu-chat-header-info {
  flex: 1;
  min-width: 0;
}
.immobleu-chat-header-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.immobleu-chat-header-status {
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 6px;
}
.immobleu-chat-status-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  animation: immobleu-chat-pulse 2s infinite;
}
.immobleu-chat-close {
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  padding: 0;
}
.immobleu-chat-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Body */
.immobleu-chat-body {
  padding: 18px 16px;
  background: #f9fafb;
  max-height: 60vh;
  overflow-y: auto;
}

/* Message expert */
.immobleu-chat-message {
  margin-bottom: 16px;
}
.immobleu-chat-message-bubble {
  background: #fff;
  padding: 12px 14px;
  border-radius: 14px 14px 14px 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  font-size: 14px;
  line-height: 1.5;
  color: #1C2A3A;
  max-width: 90%;
}
.immobleu-chat-message-time {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 4px;
  margin-left: 4px;
}

/* Form */
.immobleu-chat-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.immobleu-chat-field label {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  display: block;
  margin-bottom: 5px;
  letter-spacing: 0.02em;
}
.immobleu-chat-field .req {
  color: #C4907C;
}
.immobleu-chat-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.immobleu-chat-field input:focus {
  outline: none;
  border-color: #C4907C;
  box-shadow: 0 0 0 3px rgba(196,144,124,0.12);
}
.immobleu-chat-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #C4907C 0%, #A67060 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(196,144,124,0.3);
  margin-top: 4px;
  font-family: inherit;
}
.immobleu-chat-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(196,144,124,0.4);
}
.immobleu-chat-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.immobleu-chat-reassure {
  font-size: 10.5px;
  color: #9ca3af;
  text-align: center;
  margin-top: 4px;
}

/* Success */
.immobleu-chat-success {
  text-align: center;
  padding: 20px 12px;
}
.immobleu-chat-success-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 32px;
  font-weight: bold;
  margin: 0 auto 14px;
  box-shadow: 0 8px 24px rgba(16,185,129,0.3);
  animation: immobleu-chat-pop 0.4s cubic-bezier(.2,.8,.2,1);
}
.immobleu-chat-success-title {
  font-size: 18px;
  font-weight: 700;
  color: #1C2A3A;
  margin-bottom: 6px;
}
.immobleu-chat-success-text {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}
@keyframes immobleu-chat-pop {
  0%   { transform: scale(0); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Footer */
.immobleu-chat-footer {
  padding: 10px 14px;
  background: #f4f6f9;
  font-size: 10px;
  color: #9ca3af;
  text-align: center;
  border-top: 1px solid #e5e7eb;
}

/* ── MOBILE ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .immobleu-chat-root {
    bottom: 16px;
    right: 16px;
  }
  .immobleu-chat-bubble {
    width: 56px;
    height: 56px;
  }
  .immobleu-chat-bubble-icon {
    font-size: 24px;
  }
  .immobleu-chat-window {
    width: calc(100vw - 24px);
    right: -4px;
    bottom: 70px;
  }
  .immobleu-chat-tooltip {
    bottom: 4px;
    right: 70px;
    font-size: 12.5px;
    padding: 10px 14px;
  }
}
