/* =====================================================================
   Luso Home — Chatbot v2 CSS
   Charte : Océan #1B3A52, Terracotta #C4714A, Sable #F2EDE4,
            Or #B8955A, Sauge #6B7F5E · Typo : Jost
   ===================================================================== */

/* ── LAUNCHER (floating button) ── */
#lh2-launcher {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 58px; height: 58px;
  background: #1B3A52;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(27,58,82,0.4);
  transition: transform 0.2s, opacity 0.25s, background 0.2s;
  z-index: 1100;
}
#lh2-launcher:hover { background: #2E5F82; transform: scale(1.07); }
#lh2-launcher:active { transform: scale(0.95); }
#lh2-launcher svg  { width: 24px; height: 24px; flex-shrink: 0; }
#lh2-launcher.lh2-hidden { opacity: 0; pointer-events: none; transform: scale(0.8); }

/* ── WINDOW ── */
#lh2-window {
  position: fixed;
  bottom: 98px; right: 28px;
  width: 370px;
  max-height: 560px;
  background: #FAF7F2;
  border-radius: 20px;
  box-shadow: 0 12px 48px rgba(27,58,82,0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1099;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
  font-family: 'Jost', sans-serif;
}
#lh2-window.lh2-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* ── HEADER ── */
.lh2-header {
  background: #1B3A52;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.lh2-avatar {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lh2-avatar svg { width: 20px; height: 20px; }
.lh2-header-info { flex: 1; }
.lh2-name {
  font-family: 'Jost', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  line-height: 1.2;
}
.lh2-status {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  color: #A8C4D8;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  opacity: 0.85;
}
.lh2-dot {
  width: 6px; height: 6px;
  background: #6fcf97;
  border-radius: 50%;
  animation: lh2Pulse 2s infinite;
}
@keyframes lh2Pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.lh2-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}
.lh2-close:hover { color: #fff; }

/* ── MESSAGES ── */
.lh2-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.lh2-messages::-webkit-scrollbar { width: 3px; }
.lh2-messages::-webkit-scrollbar-thumb { background: #E8DFD0; border-radius: 3px; }

.lh2-msg { max-width: 85%; animation: lh2FadeUp 0.2s ease; }
.lh2-msg.lh2-bot { align-self: flex-start; }
.lh2-msg.lh2-user { align-self: flex-end; }

@keyframes lh2FadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lh2-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  word-wrap: break-word;
}
.lh2-bot .lh2-bubble {
  background: #fff;
  color: #1A1614;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 6px rgba(27,58,82,0.07);
}
.lh2-bot .lh2-bubble em { font-style: italic; color: #C4714A; }
.lh2-bot .lh2-bubble strong { font-weight: 600; color: #1B3A52; }
.lh2-bot .lh2-bubble a { color: #C4714A; text-decoration: underline; }
.lh2-bot .lh2-bubble a:hover { color: #9E5135; }

.lh2-user .lh2-bubble {
  background: #1B3A52;
  color: #fff;
  border-bottom-right-radius: 4px;
  font-weight: 400;
}
.lh2-time {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  color: #3D3530;
  opacity: 0.38;
  margin-top: 3px;
  padding: 0 4px;
}
.lh2-user .lh2-time { text-align: right; }

/* ── QUICK REPLIES ── */
.lh2-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
  flex-shrink: 0;
}
.lh2-qr {
  background: transparent;
  border: 1.5px solid #C4714A;
  color: #C4714A;
  padding: 6px 14px;
  border-radius: 20px;
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  white-space: nowrap;
}
.lh2-qr:hover {
  background: #C4714A;
  color: #fff;
  transform: scale(1.03);
}
.lh2-qr:active {
  transform: scale(0.97);
}

/* ── INPUT ── */
.lh2-input-area {
  padding: 10px 14px 12px;
  border-top: 1px solid #E8DFD0;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  background: #FAF7F2;
}
#lh2-input {
  flex: 1;
  border: 1.5px solid #E8DFD0;
  background: #fff;
  border-radius: 12px;
  padding: 9px 13px;
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #1A1614;
  outline: none;
  min-height: 40px;
  line-height: 1.5;
  transition: border-color 0.15s;
}
#lh2-input:focus { border-color: #2E5F82; }
#lh2-input::placeholder { color: #3D3530; opacity: 0.35; }

#lh2-send {
  width: 38px; height: 38px;
  background: #C4714A;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.1s;
}
#lh2-send:hover  { background: #9E5135; }
#lh2-send:active { transform: scale(0.94); }
#lh2-send svg { width: 16px; height: 16px; }

/* ── FOOTER ── */
.lh2-footer {
  text-align: center;
  padding: 6px 14px 10px;
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  color: #3D3530;
  opacity: 0.35;
  line-height: 1.4;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.lh2-sep { opacity: 0.5; }
.lh2-email { letter-spacing: 0.3px; }

/* ── MOBILE ── */
@media (max-width: 480px) {
  #lh2-window {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 86px;
    max-height: 70vh;
    border-radius: 16px;
  }
  #lh2-launcher { bottom: 18px; right: 14px; width: 54px; height: 54px; }
  .lh2-msg { max-width: 90%; }
  .lh2-bubble { font-size: 13px; }
  .lh2-qr { font-size: 11px; padding: 5px 12px; }
}

@media (min-width: 481px) and (max-width: 768px) {
  #lh2-window {
    width: 360px;
    right: 20px;
    bottom: 90px;
  }
}
