#chatbox {
  height: 500px; /* Ajustez la hauteur selon vos besoins */
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#chatbox-header {
  background-color: #340B8C;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px;
  font-size: 1.2rem;
}

#chatbox-body {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  background-color: #fff;
  border-top: 1px solid #ddd;
  position: relative;
  height: 390px;
  scroll-behavior: smooth;

}

.chat-messages {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-bottom: 15px;
}

.message {
  margin: 10px 0;
  padding: 10px;
  border-radius: 15px;
  position: relative; /* Ajouter cette ligne pour positionner les boutons de répétition */
  padding-bottom: 20px;
}

.message.user {
  align-self: flex-end;
  background-color: #340B8C;
  color: #fff;
  max-width: 90%; /* Limite maximale pour éviter qu'il soit trop large */
  width: auto; /* Largeur ajustée à son contenu */
  word-wrap: break-word; /* Texte long revient à la ligne */
}

.message.bot {
  align-self: flex-start;
  background-color: #e9ecef;
  color: #333;
}

.message.bot img {
  max-width: 70%;
}


.message.bot ol,ul {
  padding-left: 15%;
}

.message.bot table {
  max-width: 100%; /* Set maximum width for the table */
  overflow-x: auto; /* Enable horizontal scroll if table overflows its container */
  border-collapse: collapse;
  color: black;
  margin-top: 15px;
}



.message.bot td {
  border: 1px solid #333;
  padding: 8px;
  text-align: left;
}

.warning-alert {
  position: absolute;
  top: 3rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 500px;
  width: 100%;
  z-index: 9999;
  padding: 0 4%;
  opacity: 0.9;
}

#chatbot-warning-alertC{
  background-color: #F2884B;
}


.welcome-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: #cdccd3;
  border-radius: 10px;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);


}


.welcome-text {
  font-size: 1.2rem;
  color: #151414;
}

#chatbox-footer {
  border-top: 1px solid #ddd;
  padding: 15px; /* Augmenter légèrement le padding */
  background-color: #f8f9fa;
  display: flex;
  justify-content: center; /* Centre horizontalement les éléments */
  align-items: center;
}

.input-group {
  display: flex;
  justify-content: center; /* Centrer les éléments de l'input */
  align-items: center; /* Centrer les éléments verticalement */
  width: 100%; /* Ajuste la largeur de l'input group */
}

#user-input {
  border-radius: 20px;
  border: 1px solid #ddd;
  padding: 10px;
  font-size: 1rem;
  flex: 2; /* Ajuste la flexibilité pour occuper plus d'espace */
  margin-right: 5px; /* Espacement entre le champ input et le bouton vocal */
}


#voice-button {
  border-radius: 20px;
  height: 40px;
  width: 40px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  cursor: pointer;
}

#send-button,
#reset-button {
  border-radius: 20px;
  margin-left: 10px;
  height: 40px;
  width: 100px;
  border-color: #191673;
  transition: all 0.3s ease-in-out;
}

#send-button {
  background-color: #340B8C;
  color: #fff;
}

#send-button:hover {
  background-color: #191673;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#reset-button {
  background-color: #F2884B;
  color: #fff;
}

#reset-button:hover {
  background-color: #000000;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#voice-button.recording {
  /* background: #ff4b5c; */
  color: #fff;
}
.input-group-append {
  display: flex;
  align-items: center;
  margin-left: 5px;
}

/* Style pour le bouton de répétition */
.repeat-button {
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  margin-left: 10px;
}
.message {
  animation: fadeInUp 0.5s ease-in-out;
}

@keyframes fadeInUp {
  0% {
      transform: translateY(20px);
      opacity: 0;
  }
  100% {
      transform: translateY(0);
      opacity: 1;
  }
}
/* Boutons */
button {
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  transform: translateY(-2px);
}
/* Style pour le bouton de répétition */
.repeat-button {
  border: none;
  background: none;
  font-size: 16px;
  margin-left: 10px;
  cursor: pointer;
}
.satisfaction-buttons {
  display: flex;
  justify-content: center;
  text-align: center;
}

.satisfaction-buttons button {
  padding: 5px 10px;
  border: none;
  border-radius: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  margin: 2px; /* Espacement entre les boutons */


}

/* Bouton Oui */
.satisfaction-buttons .btn-oui {
  background-color: #340B8C; /* Couleur verte */
  color: white;
}

.satisfaction-buttons .btn-oui:hover {
  background-color: #191673;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

/* Bouton Non */
.satisfaction-buttons .btn-non {
  background-color: #F2884B; /* Couleur rouge */
  color: white;
}

.satisfaction-buttons .btn-non:hover {
  background-color: #F2884B;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

/* Bouton de répétition audio */
.repeat-button {
  border: none;
  background: transparent;
  cursor: pointer;
  margin-left: 10px;
  font-size: 18px;
  color: #191673;
}

.repeat-button:hover {
  color: #191673;
}
.satisfaction-buttons .btn-success {
  background-color: #340B8C !important;
  color: #fff !important;
  border: none;
}

.satisfaction-buttons .btn-danger {
  background-color: #F2884B !important;
  color: #fff !important;
  border: none;
}

/* Style personnalisé pour le lien de contact */
.contact-link {
  color: #191673; /* Bleu doux */
  font-weight: 500;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding: 2px 5px;
  transition: all 0.3s ease-in-out;
  border-radius: 4px;
}

.contact-link:hover {
  background-color: #e8f0fe; /* Légère couleur de fond au survol */
  color: #191673; /* Bleu plus foncé */
  border-bottom: 2px solid #191673; /* Soulignement stylisé */
}
/* Style de l'avatar de bienvenue */
.welcome-avatar {
  width: 150px; /* Ajustez la taille de l'avatar */
  height: 150px;
  margin-bottom: 10px;
  margin-right: 50px;
  border-radius: 20%; /* Forme arrondie pour un effet plus convivial */
  animation: wave-animation 2s infinite; /* Animation de salutation */
}

/* Animation de salutation */
@keyframes wave-animation {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(15deg); }
  40% { transform: rotate(-10deg); }
  60% { transform: rotate(15deg); }
  80% { transform: rotate(-10deg); }
  100% { transform: rotate(0deg); }
}

/* .welcome-message {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
} */


#chat-avatar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  cursor: pointer;
  z-index: 997;
  width: 100px; /* Adjust size of the avatar */
  height: 100px;
  border-radius: 20%; /* Rounded shape */
  animation: wave-animation 2s infinite; /* Animation effect */
  transition: transform 0.3s ease-in-out; /* Smooth hover effect */
}
/* Conteneur principal du chatbot */
#chatbox {
  height: 500px;
  width: 350px;
  display: flex;
  flex-direction: column;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: none; /* Masqué par défaut */
}

/* En-tête du chatbot */
#chatbox-header {
  background-color: #340B8C;
  color: #fff;
  display: flex;
  justify-content: space-between;  /* Alignement entre le titre et le bouton de fermeture */
  align-items: center;
  padding: 10px;
}

.close-button {
  background: none;
  border: none;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
}

/* Ajout d'animations */
.show-chat {
  display: block;
  animation: slideIn 0.5s forwards;
}

.hide-chat {
  display: none;
  animation: slideOut 0.5s forwards;
}

@keyframes slideIn {
  from {
      transform: translateY(100%);
  }
  to {
      transform: translateY(0);
  }
}

@keyframes slideOut {
  from {
      transform: translateY(0);
  }
  to {
      transform: translateY(100%);
  }
}
/* Conteneur du sélecteur de voix */
.voice-selection {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* margin-top: 10px; */
  /* padding: 10px; */
  background-color:  #cccccc;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 50%;
  margin-left: auto;
  margin-right: auto;
}

.voice-selection label {
  /* font-size: 14px; */
  color: #340B8C;
  font-weight: bold;
  margin-bottom: 5px;
  /* background-color:  #cccccc; */

}

#voice-select {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  /* border: 1px solid #ffffff; */
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  appearance: none;
  outline: none;
  background-color:  #cdccd3;
  border-radius: 10px;
  text-align: center;
  color: #340B8C;
  font-weight: bold;
  /* transform: translate(-50%, -50%); */

}

#voice-select:focus {
  border-color: #340B8C;
  box-shadow: 0 0 5px rgba(52, 11, 140, 0.3);
}
.voice-select-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
  margin-left: 5px;
}

.voice-select-button:hover {
  color: #007bff; /* Change couleur sur hover */
}


.suggestion-select {
  margin-top: 10px;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #f9f9f9;
  color: #333;
  width: 100%;
  max-width: 300px;
  cursor: pointer;
}

.suggestion-select:hover {
  background-color: #ececec;
}

.suggestion-select:focus {
  outline: none;
  border-color: #007bff;
}
/* Conteneur pour les boutons de son et de voix */
.button-container {
  display: flex;
  align-items: center;
  gap: 10px; /* Espace entre les boutons */
  margin-top: 10px;
}

/* Style pour le sélecteur des suggestions */
/* Style pour le sélecteur des suggestions */

/* Boutons */
/* .voice-select-button,
.repeat-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
} */
.voice-select-dropdown {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  /* border: 1px solid #ffffff; */
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  appearance: none;
  outline: none;
  background-color: #cdccd3; /* Couleur harmonisée */
  border-radius: 10px;
  text-align: center;
  color: #340B8C;
  font-weight: bold;
  /* transform: translate(-50%, -50%); */
  margin-top: 10px; /* Espacement avec le sélecteur précédent */

}

.suggestion-dropdown {
  padding: 8px;
  border-radius: 5px;
  background-color: #cdccd3; /* Même couleur que le sélecteur de voix */
  color: #340B8C;
  font-size: 14px;
  font-weight: bold;
  margin-top: 10px; /* Espacement avec les autres éléments */
}
/* Boutons */
.voice-select-button,
.repeat-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2em;
}

.voice-select-button:hover {
  color: #007bff; /* Couleur au survol */
}
/* Conteneur pour les suggestions */
.suggestion-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%; /* Prend toute la largeur du conteneur */
  max-width: 100%; /* Évite de dépasser le conteneur */
}

/* Titre des suggestions */
.suggestion-container div {
  font-size: 14px;
  color: #340B8C;
  font-weight: bold;
  margin-bottom: 5px;
}

/* Sélecteur des suggestions */
.suggestion-dropdown {
  width: 100%; /* Prend toute la largeur du conteneur */
  padding: 8px;
  font-size: 14px;
  border-radius: 5px;
  background-color: #cdccd3; /* Même couleur que le sélecteur de voix */
  color: #340B8C;
  font-weight: bold;
  box-sizing: border-box; /* Inclut le padding et la bordure dans la largeur */
  overflow: hidden;
}

/* Empêche les débordements */
#chatbox-body {
  overflow: auto; /* Active le scroll si nécessaire */
}
