/* ══════════════════════════════════════════════════════════════════
   LinCom — Widget chatbot (Gemini). Autonome, sans dépendance.
   Palette : orange #F97316 / navy #1B2A4A. Positionné en bas à droite
   (le widget d'accessibilité ♿ occupe le bas gauche).
══════════════════════════════════════════════════════════════════ */

#lc-chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #F97316, #C2440A);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483000;
  transition: transform .18s ease, box-shadow .18s ease;
}
#lc-chat-launcher:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 8px 26px rgba(0, 0, 0, .28); }
#lc-chat-launcher svg { width: 26px; height: 26px; }
#lc-chat-launcher .lc-chat-badge {
  position: absolute; top: -3px; right: -3px;
  background: #27AE60; color: #fff; font-size: 9px; font-weight: 700;
  border-radius: 999px; padding: 2px 5px; line-height: 1;
}

#lc-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 2147483000;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
#lc-chat-panel.lc-open { display: flex; }

.lc-chat-head {
  background: linear-gradient(135deg, #1B2A4A, #2F4070);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.lc-chat-head .lc-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: #F97316; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lc-chat-head .lc-avatar svg { width: 18px; height: 18px; color: #fff; }
.lc-chat-head .lc-title { flex: 1; min-width: 0; }
.lc-chat-head .lc-title strong { display: block; font-size: 14px; font-weight: 700; }
.lc-chat-head .lc-title span { font-size: 11px; color: rgba(255, 255, 255, .7); }
.lc-chat-head .lc-close {
  background: transparent; border: none; color: rgba(255, 255, 255, .85);
  cursor: pointer; font-size: 22px; line-height: 1; padding: 4px;
}
.lc-chat-head .lc-close:hover { color: #fff; }

.lc-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #F5F0EB;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lc-msg {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.lc-msg-bot {
  align-self: flex-start;
  background: #fff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-radius: 14px 14px 14px 4px;
}
.lc-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #F97316, #C2440A);
  color: #fff;
  border-radius: 14px 14px 4px 14px;
}
.lc-msg-typing { display: inline-flex; gap: 4px; align-items: center; }
.lc-msg-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #9ca3af;
  animation: lc-blink 1.2s infinite ease-in-out both;
}
.lc-msg-typing span:nth-child(2) { animation-delay: .2s; }
.lc-msg-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes lc-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.lc-chat-foot {
  border-top: 1px solid #e5e7eb;
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: #fff;
  flex-shrink: 0;
}
.lc-chat-foot textarea {
  flex: 1;
  resize: none;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13px;
  font-family: inherit;
  max-height: 90px;
  min-height: 40px;
  outline: none;
}
.lc-chat-foot textarea:focus { border-color: #F97316; }
.lc-chat-foot button {
  background: #F97316;
  border: none;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s;
}
.lc-chat-foot button:hover { background: #C2440A; }
.lc-chat-foot button:disabled { background: #d1d5db; cursor: not-allowed; }
.lc-chat-foot button svg { width: 18px; height: 18px; color: #fff; }

.lc-chat-disclaimer {
  font-size: 10px; color: #9ca3af; text-align: center; padding: 4px 10px 8px;
  background: #fff;
}

@media (max-width: 420px) {
  #lc-chat-panel { right: 8px; bottom: 80px; width: calc(100vw - 16px); height: calc(100vh - 100px); }
}
