@keyframes jDot { 0%,80%,100%{transform:translateY(0);opacity:.5} 40%{transform:translateY(-6px);opacity:1} }

#jassiel-widget {
  position: fixed !important;
  bottom: 32px !important;
  right: 32px !important;
  left: auto !important;
  top: auto !important;
  z-index: 99999 !important;
  transform: none !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
#jassiel-btn { width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; font-size: 22px; font-weight: 700; box-shadow: 0 4px 24px rgba(99,102,241,0.5); display: flex; align-items: center; justify-content: center; transition: transform 0.2s, box-shadow 0.2s; outline: none; }
#jassiel-btn:hover { transform: scale(1.1); box-shadow: 0 6px 32px rgba(99,102,241,0.65); }
#jassiel-window { display: none; position: absolute !important; bottom: 70px; right: 0 !important; width: 340px; background: #fff; border-radius: 18px; box-shadow: 0 8px 48px rgba(0,0,0,0.18); flex-direction: column; overflow: hidden; animation: chatSlideUp 0.25s ease; max-height: calc(100vh - 120px); }
@keyframes chatSlideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
#jassiel-header { background: linear-gradient(135deg, #6366f1, #8b5cf6); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; color: white; }
#jassiel-header-left { display: flex; align-items: center; gap: 10px; }
#jassiel-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.22); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }
#jassiel-title { font-weight: 700; font-size: 14px; }
#jassiel-subtitle { font-size: 11px; opacity: 0.85; display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.jassiel-dot { width: 7px; height: 7px; background: #4ade80; border-radius: 50%; display: inline-block; }
#jassiel-close { background: none; border: none; color: white; font-size: 20px; cursor: pointer; opacity: 0.8; line-height: 1; padding: 0 4px; }
#jassiel-close:hover { opacity: 1; }
#jassiel-messages { background: #f8f9fc; padding: 14px 12px; min-height: 200px; max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
#jassiel-messages::-webkit-scrollbar { width: 4px; } #jassiel-messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
.jmsg { display: flex; } .jmsg.bot { justify-content: flex-start; } .jmsg.user { justify-content: flex-end; }
.jbubble { max-width: 84%; padding: 9px 13px; font-size: 13.5px; line-height: 1.55; border-radius: 14px; }
.jmsg.bot .jbubble { background: #fff; color: #1f2937; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.jmsg.user .jbubble { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; border-bottom-right-radius: 4px; }
.jsugg { background: #ede9fe; color: #6366f1; border: none; border-radius: 20px; padding: 5px 12px; font-size: 12px; cursor: pointer; transition: background 0.15s; white-space: nowrap; }
.jsugg:hover { background: #ddd6fe; }
#jassiel-suggestions { padding: 8px 12px 6px; display: flex; flex-wrap: wrap; gap: 6px; background: #f8f9fc; border-top: 1px solid #f0f0f5; }
#jassiel-input-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid #e9eaf0; background: #fff; }
#jassiel-input { flex: 1; border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 8px 12px; font-size: 13.5px; outline: none; color: #1f2937; background: #f8f9fc; transition: border-color 0.15s; }
#jassiel-input:focus { border-color: #8b5cf6; background: #fff; }
#jassiel-send { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; border: none; border-radius: 10px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: transform 0.15s; }
#jassiel-send:hover { transform: scale(1.07); } #jassiel-send:disabled { opacity: 0.45; cursor: not-allowed; }
/* Smartphones */
@media (max-width: 600px) {
  #jassiel-widget { bottom: 20px; right: 16px; }
  #jassiel-window { width: calc(100vw - 32px); right: 0; max-height: calc(100vh - 100px); }
  #jassiel-btn { width: 54px; height: 54px; font-size: 20px; }
}

/* Très petits écrans (iPhone SE) */
@media (max-width: 380px) {
  #jassiel-widget { bottom: 16px; right: 12px; }
  #jassiel-window { width: calc(100vw - 24px); max-height: calc(100vh - 90px); }
  .jbubble { font-size: 13px; }
}

/* Clavier virtuel ouvert sur mobile */
@media (max-height: 500px) {
  #jassiel-messages { min-height: 80px; max-height: 120px; }
  #jassiel-suggestions { display: none; }
}
