#chat-interface {
  font-family: 'Arial', sans-serif;
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid rgba(72,17,22,0.62);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: 80vh;
  margin-top: 20px;
  margin-left: 5px;
  margin-right: 5px;
  width: 97%;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background-color: rgba(84,84,84,0.6);
  height: 100%;
  position: relative;
  z-index: 999;
  position: relative;
}

.chat-message {
  margin-bottom: 15px;
  padding: 10px 15px;
  border-radius: 18px;
  line-height: 1.4;
  max-width: 80%;
}

.chat-user-message {
  background-color: rgba(72,17,22);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 5px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-family: 'Amiko';
  font-size: 14px;
}

.chat-ai-message {
  background-color: rgba(100,100,100,0.2);
  color: white;
  text-shadow: 0 0 10px #505050;
  margin-right: auto;
  border-bottom-left-radius: 5px;
  border: 1px solid rgba(180,180,180,0.1);
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-family: 'Amiko';
  font-size: 14px;
}

/* Modifications pour la barre de suggestions */

.chat-suggestions {
  display: flex;
  overflow-x: scroll;
  gap: 8px;
  padding: 10px;
  background-color: rgba(133,133,133,0.81);
  border-top: 1px solid rgba(98,98,98,0.83);
  height: auto;
  min-height: 40px;
  align-items: flex-start;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(72,17,22,0.62) transparent;
  max-height: 60px;
  position: relative;
}

/* Style de la scrollbar pour Chrome/Edge/Safari */

.chat-suggestions::-webkit-scrollbar {
  height: 6px;
}

.chat-suggestions::-webkit-scrollbar-track {
  background: transparent;
}

.chat-suggestions::-webkit-scrollbar-thumb {
  background-color: rgba(72,17,22,0.62);
  border-radius: 3px;
}

.chat-suggestion-btn {
  padding: 8px 12px;
  background-color: rgb(90,90,90);
  color: white;
  border: 1px solid rgba(72,17,22,0.62);
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
  font-family: 'Amiko';
  flex: 0 0 auto;
  margin-right: 5px;
  max-width: 300px;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: center;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  transition: transform 0.3s ease, z-index 0.3s ease;
  will-change: transform;
}

.chat-suggestions:hover {
  overflow: visible;
  height: 100px;
}

.chat-suggestion-btn:hover {
  transform: translateY(-25px);
  z-index: 1000;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background-color: rgba(88,21,28,0.6);
}

/* Pour cacher la scrollbar quand elle n'est pas utilisée */

.chat-suggestions {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.chat-suggestions::-webkit-scrollbar {
  display: none;
}

.chat-suggestions:hover {
  -ms-overflow-style: auto;
  scrollbar-width: thin;
}

.chat-suggestions:hover::-webkit-scrollbar {
  display: block;
}

.chat-input-container {
  display: flex;
  padding: 10px;
  background-color: rgba(133,133,133,0.81);
  border-top: 1px solid rgba(66,66,66,0.62);
  align-items: center;
  z-index: 1010;
}

.chat-user-input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid rgba(221,221,221,0.44);
  border-radius: 20px;
  outline: none;
  background-color: rgba(28,28,28,0.56);
  color: #ffffff;
}

.chat-send-btn {
  margin-left: 10px;
  padding: 10px 20px;
  background-color: var(--bs-danger-text-emphasis);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 40px;
  display: flex;
  align-content: center;
  justify-content: center;
  font-size: 15px;
  height: 40px;
}

.chat-send-btn:hover {
  background-color: #481116;
}

.chat-message-container {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.chat-user-container {
  justify-content: flex-end;
}

.chat-ai-container {
  justify-content: flex-start;
}

.chat-copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  margin: 0 8px;
  font-size: 14px;
  opacity: 0.6;
  transition: opacity 0.2s;
  color: white;
}

.chat-copy-btn:hover {
  opacity: 1;
}

/* Conservez le reste de votre CSS existant */

.chat-typing-indicator {
  display: flex;
  padding: 10px 15px;
  background-color: rgb(233, 236, 239, 0.5);
  border-radius: 18px;
  margin-bottom: 15px;
  margin-right: auto;
  border-bottom-left-radius: 5px;
  align-items: center;
  width: fit-content;
}

.chat-typing-dot {
  width: 8px;
  height: 8px;
  background-color: #666;
  border-radius: 50%;
  margin: 0 2px;
  animation: chat-typing-animation 1.4s infinite ease-in-out;
}

.chat-typing-dot:nth-child(1) {
  animation-delay: 0s;
}

.chat-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes chat-typing-animation {
  0%, 60%, 100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-5px);
  }
}

/* Modal Background */

.chat-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  font-family: 'Amiko';
}

/* Modal Content */

.chat-modal-content {
  background-color: #333;
  margin: auto;
  padding: 20px;
  border: 1px solid #666;
  width: 80%;
  max-width: 500px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  color: white;
  max-height: 80%;
  overflow-y: auto;
}

/* Close Button */

.chat-close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.chat-close-button:hover, .chat-close-button:focus {
  color: white;
  text-decoration: none;
  cursor: pointer;
}

/* Chat History List Styling */

.chat-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #808080;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 8px;
  padding: 8px;
  margin-left: -20px;
}

.chat-history-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  font-family: 'Amiko';
}

.chat-history-title {
  font-weight: 500;
  margin-bottom: 3px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
  text-transform: lowercase;
}

.chat-history-title::first-letter {
  text-transform: uppercase;
}

.chat-history-date {
  font-size: 0.8em;
  color: #ffffff;
}

.chat-active-conversation {
  background-color: #808080;
  border-left: 3px solid #4a90e2;
  color: white;
}

.chat-delete-chat-btn {
  background: none;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  padding: 5px;
  margin-left: 10px;
  font-size: 0.9em;
}

.chat-delete-chat-btn:hover {
  color: #ff5252;
}

.chat-message-buttons {
  display: flex;
  gap: 5px;
  margin-top: 5px;
  justify-content: flex-end;
}

.chat-export-btn {
  background: none;
  border: none;
  color: rgb(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 0.9em;
  padding: 3px;
}

.chat-export-btn:hover {
  color: white;
}

.chat-copy-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 0.9em;
  padding: 3px;
}

