#chat-toggle {
  position: fixed;
  bottom: 40px;
  left: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  z-index: 9999;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
  border: none;
}

#chat-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

#chat-box {
  position: fixed;
  bottom: 120px;
  left: 20px;
  width: 450px;
  height: 500px;
  background: white;
  border: none;
  border-radius: 20px;
  display: none;
  flex-direction: column;
  z-index: 9999;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  animation: slideIn 0.3s ease;
}

#chat-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  text-align: center;
}

#chat-header h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: white;
}

#chat-header .warning-text {
  margin: 0;
  font-size: 12px;
  opacity: 0.9;
  line-height: 1.4;
  color: white;
}

#chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  font-size: 14px;
  background: #f8f9fa;
}

#chat-messages .user-message {
  background: #e3f2fd;
  padding: 12px 16px;
  border-radius: 18px;
  margin-bottom: 12px;
  border-bottom-left-radius: 4px;
  max-width: 90%;
  margin-left: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  line-height: 1.4;
  min-height: 44px;
  display: flex;
  align-items: center;
}

#chat-messages .ai-message {
  background: white;
  padding: 12px 16px;
  border-radius: 18px;
  margin-bottom: 12px;
  border-bottom-right-radius: 4px;
  max-width: 90%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 3px solid #4caf50;
  line-height: 1.4;
  min-height: 44px;
  display: flex;
  align-items: center;
}

#chat-messages .ai-message.error {
  border-left-color: #f44336;
  background: #ffebee;
}

#chat-messages .user-message strong {
  margin-right: 8px;
}

#chat-messages .ai-message strong {
  margin-right: 8px;
}

#chat-input {
  border-top: 1px solid #e0e0e0;
  display: flex;
  padding: 15px;
  background: white;
  gap: 8px;
}

#chat-input textarea {
  flex: 1;
  border: 2px solid #e0e0e0;
  border-radius: 15px;
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
  resize: none;
  font-family: inherit;
  line-height: 1.4;
  min-height: 60px;
  max-height: 120px;
}

#chat-input textarea:focus {
  border-color: #667eea;
}

#chat-input textarea::placeholder {
  color: #999;
  font-style: italic;
}

#chat-input button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  min-width: 80px;
}

#chat-input button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#chat-input button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

#chat-input button.loading {
  cursor: wait;
  opacity: 0.8;
}

#chat-undo {
  background: #f44336 !important;
  min-width: 60px;
}

#chat-undo:hover {
  background: #d32f2f !important;
}

/* Scrollbar personnalisée */
#chat-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Animation d'apparition */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  #chat-box {
    width: calc(100vw - 40px);
    left: 20px;
    right: 20px;
  }
  
  #chat-toggle {
    left: 20px;
    right: 20px;
    text-align: center;
  }
} 