.chat-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.messages {
  height: 400px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 4px;
}

.message {
  margin: 10px 0;
  padding: 8px 12px;
  border-radius: 4px;
}

.message.user {
  background: #e3f2fd;
  text-align: right;
}

.message.bot {
  background: #f1f1f1;
  text-align: left;
}

/* input, button {
  padding: 10px;
  width: 80%;
  margin-right: 5px;
}

button {
  width: 18%;
  background: #007bff;
  color: white;
  border: none;
  cursor: pointer;
}

button:disabled {
  background: #cccccc;
} */

/* body {
  height: 99vh;
  margin: 0;
} */
/* Styles pour le chat */
.chat-container-wrapper {
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Boule de discussion flottante */
.chat-bubble {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #4f46e5;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  z-index: 1000;
  transition: all 0.3s ease;
}

.chat-bubble:hover {
  transform: scale(1.05);
}

.chat-bubble.active {
  background-color: #4338ca;
  transform: scale(1.1);
}

.chat-bubble-icon {
  width: 24px;
  height: 24px;
}

/* Conteneur de chat */
.chat-container {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 350px;
  height: 500px;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 999;
  transform: translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.chat-container.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* En-tête du chat */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background-color: #f3f4f6;
  border-bottom: 1px solid #e5e7eb;
}

.chat-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.close-button {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.close-button:hover {
  background-color: #e5e7eb;
}

.close-icon {
  width: 20px;
  height: 20px;
}

/* Conteneur des messages */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  background-color: #f9fafb;
}

/* Style des messages */
.message-item {
  position: relative;
  margin-bottom: 15px;
  padding: 12px 15px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
}

.message-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.message-content {
  flex: 1;
}

.message-text {
  margin: 0 0 8px 0;
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
  word-break: break-word;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.message-time {
  display: flex;
  align-items: center;
}

.edited-tag {
  font-style: italic;
  color: #9ca3af;
}

/* Actions sur les messages */
.message-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.edit-button,
.delete-button,
.cancel-button,
.update-button {
  padding: 8px 20px;
  min-width: 100px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s;
  text-align: center;
}

.edit-button {
  background-color: #f3f4f6;
  color: #4b5563;
  border: none;
}

.edit-button:hover {
  background-color: #e5e7eb;
}

.update-button {
  background-color: #4f46e5;
  color: white;
  border: none;
}

.update-button:hover {
  background-color: #4338ca;
}

/* Modification du bouton Delete pour qu'il soit circulaire */
.delete-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f87171;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.delete-button:hover {
  background-color: #ef4444;
  transform: scale(1.05);
}

/* Édition de message */
.edit-container {
  width: 100%;
}

.edit-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 8px;
  outline: none;
}

.edit-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.edit-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Zone de saisie */
.input-container {
  display: flex;
  padding: 15px;
  background-color: white;
  border-top: 1px solid #e5e7eb;
}

.message-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.message-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

/* Style du bouton d'envoi */
.send-button {
  margin-left: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4f46e5;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

/* Effet sur le bouton lorsqu'il est survolé */
.send-button:hover:not(:disabled) {
  background-color: #4338ca;
  transform: scale(1.05);
}

/* Désactivation du bouton avec un fond plus clair */
.send-button.disabled {
  background-color: #c7d2fe;
  cursor: not-allowed;
}


.send-icon {
  width: 20px;
  height: 20px;
  fill: white; 
}


.send-button:disabled .send-icon {
  opacity: 0.5;
}



.messages-container::-webkit-scrollbar {
  width: 6px;
}

.messages-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.messages-container::-webkit-scrollbar-thumb {
  background: #c7d2fe;
  border-radius: 10px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: #a5b4fc;
}

/* Responsive */
@media (max-width: 768px) {
  .chat-container {
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
}
.edited-tag {
  color: #888;
  font-size: 12px;
  margin-bottom: 2px;
  display: block;
  font-style: italic;
}


.App {
  font-family: Arial, sans-serif;
  background-color: #f0f8ff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

button {
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #0056b3;
}

/* Style pour la citation popup horizontale */
.popup-citation {
  position: fixed;
  bottom: 20px;
  left: 20px; /* ✅ À gauche */
  background-color: #ffffff;
  color: #333;
  padding: 10px 15px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  animation: fadeInOut 10s ease-in-out;
  font-family: sans-serif;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  max-width: 50vw; /* ✅ Jusqu’à la moitié de la page */
  white-space: normal;
}

/* Titre de la citation */
.citation-title {
  font-size: 1.1rem;
  font-weight: normal; /* ✅ Moins gras */
  color: red;
  margin: 0;
  padding: 0;
  margin-right: 10px;
}

/* Contenu de la citation */
.citation-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* Texte de la citation */
.citation-text {
  font-size: 1rem;
  font-weight: normal;
  color: black;
  margin: 0;
  padding: 0;
}

/* Auteur */
.author-text {
  font-size: 1rem;
  font-weight: normal;
  color: black;
  margin: 0;
  padding: 0;
}

/* Animation */
@keyframes fadeInOut {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  10% {
    opacity: 1;
    transform: translateY(0);
  }
  90% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(10px);
  }
}