/* 🌟 Styles généraux */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
}

/* 💬 Conteneur du chatbot */
.chat-container {
  width: 100%;
  max-width: 800px;
  height: 90vh;
  background: white;
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

/* 🏷️ En-tête du chatbot */
.chat-header {
  background: #007bff;
  color: white;
  text-align: center;
  padding: 15px;
  font-size: 20px;
  font-weight: bold;
}

/* 📩 Zone des messages */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
}

/* 📩 Animation des messages */
.message {
  margin: 8px 0;
  padding: 12px;
  border-radius: 12px;
  max-width: 80%;
  font-size: 16px;
  word-wrap: break-word;
  opacity: 0;
  transform: translateY(10px);
  animation: messageAppear 0.3s ease-out forwards;
}

@keyframes messageAppear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 🔹 Style des messages */
.user {
  background: #007bff;
  color: white;
  align-self: flex-end;
  text-align: right;
}

.bot {
  background: #28a745;
  color: white;
  align-self: flex-start;
  text-align: left;
}

/* 📝 Indicateur de saisie du bot */
.typing-indicator {
  display: none;
  font-size: 14px;
  color: gray;
  padding-left: 15px;
  margin-bottom: 10px;
}

/* ⌨️ Barre d'entrée du chat */
.input-container {
  display: flex;
  padding: 10px;
  background: #fff;
  border-top: 1px solid #ddd;
}

input {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  border: 1px solid #ddd;
  transition: border-color 0.3s ease;
}

input:focus {
  border-color: #007bff;
  outline: none;
}

/* 🔘 Bouton d'envoi stylisé */
button {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 18px;
  margin-left: 10px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: transform 0.2s ease, background 0.2s;
}

button:hover {
  background: #0056b3;
}

button:active {
  transform: scale(0.9);
}

/* 📱 Adaptation mobile */
@media (max-width: 600px) {
  .chat-container {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
  }

  .chat-header {
    font-size: 16px;
  }

  .message {
    font-size: 14px;
  }

  input {
    font-size: 14px;
  }

  button {
    font-size: 16px;
    padding: 10px 12px;
  }
}
