/* Bouton de réouverture */
#mirvanie-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #3f51b5;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none; /* Masqué par défaut */
}

#mirvanie-toggle:hover {
    background-color: #303f9f;
}

/* Widget de chat */
#mirvanie-chat {
    width: 360px; /* Augmente légèrement la largeur */
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    z-index: 999;
    border: 1px solid #e0e0e0;
}

/* En-tête du widget */
.mirvanie-header {
    background-color: #2c3e50;
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
}

.mirvanie-header button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
}

/* Zone des messages */
#mirvanie-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background-color: #f9f9f9;
    max-height: 350px;
}

/* Messages */
.mirvanie-message {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    line-height: 1.4;
    max-width: 80%;
    word-wrap: break-word;
}

.mirvanie-message.user {
    background-color: #e3f2fd;
    margin-left: auto;
    border-bottom-right-radius: 2px;
}

.mirvanie-message.bot {
    background-color: white;
    margin-right: auto;
    border-bottom-left-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.mirvanie-message.assistant {
    background-color: white;
    margin-right: auto;
    border-bottom-left-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Zone de saisie */
.mirvanie-input {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 8px 2px; /* Réduit le padding vertical et horizontal */
    background-color: white;
    border-top: 1px solid #e0e0e0;
    gap: 2px; /* Réduit l'espacement entre les éléments */
}

.mirvanie-input input {
    flex: 1;
    padding: 2px 2px; /* Réduit le padding */
    border: 1px solid #ddd;
    border-radius: 16px; /* Légèrement réduit */
    outline: none;
    font-size: 13px; /* Réduit la taille de la police */
}

.mirvanie-input button {
    margin-left: 4px; /* Réduit la marge */
    padding: 8px 12px; /* Réduit le padding */
    background-color: #3f51b5;
    color: white;
    border: none;
    border-radius: 16px; /* Légèrement réduit */
    cursor: pointer;
    font-weight: 500;
    font-size: 13px; /* Réduit la taille de la police */
    min-width: 60px; /* Largeur minimale réduite */
}

.mirvanie-input button:hover {
    background-color: #303f9f;
}

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

#mirvanie-messages::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

/* Bannière de consentement */
#mirvanie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    z-index: 1001;
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
}

.mirvanie-consent-content {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.mirvanie-consent-content p {
    margin: 0 0 12px 0;
}

.mirvanie-consent-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.mirvanie-button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}

.mirvanie-button:first-child {
    background-color: #3f51b5;
    color: white;
}

.mirvanie-button:hover:first-child {
    background-color: #303f9f;
}

.mirvanie-button-secondary {
    background-color: #f5f5f5;
    color: #333;
}

.mirvanie-button-secondary:hover {
    background-color: #e0e0e0;
}

/* Conteneur du formulaire */
.mirvanie-form-container {
    margin: 10px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

/* Question du formulaire */
.mirvanie-form-question {
    margin-bottom: 10px;
}

/* Libellé de la question */
.mirvanie-form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

/* Champ de réponse */
.mirvanie-form-container input,
.mirvanie-form-container select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Boutons du formulaire */
.mirvanie-form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.mirvanie-form-button {
    padding: 8px 16px;
    background-color: #3f51b5;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.mirvanie-form-button:hover {
    background-color: #303f9f;
}

#mirvanie-reset {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #ff4444;
}

#mirvanie-speech {
    background: none;
    border: none;
    cursor: pointer;
    color: #007bff;
    font-size: 16px;
    padding: 6px; /* Réduit le padding */
    margin-right: 2px; /* Réduit la marge */
    width: 24px; /* Largeur fixe pour le bouton microphone */
    height: 24px; /* Hauteur fixe */
    display: flex;
    align-items: center;
    justify-content: center;
}

#mirvanie-speech:disabled {
    color: #ccc;
}

.mirvanie-speak-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #007bff;
    font-size: 14px;
    margin-left: 8px;
    padding: 4px;
    float: right;
}

.mirvanie-speak-button:hover {
    color: #0056b3;
    opacity: 0.8;
}

.mirvanie-speak-button i.fa-stop {
    color: #dc3545;
}

.tool {
  color: orange;
}

.MB {
    display: inline-block;
    padding: 5px 5px;  /* Augmenté pour un meilleur aspect */
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    text-align: center;
    min-width: 200px;  /* Largeur minimale pour uniformité */
}

.MB:hover {
    background-color: #0056b3;
}

.MB:active {
    transform: translateY(1px);
}


/* Modal d'approbation */
.mirvanie-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.mirvanie-modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: mirvanie-modal-slide-in 0.3s ease;
}

@keyframes mirvanie-modal-slide-in {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.mirvanie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.mirvanie-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.mirvanie-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.mirvanie-modal-close:hover {
    color: #333;
}

.mirvanie-modal-body {
    padding: 20px;
}

.mirvanie-tool-info {
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.mirvanie-tool-args {
    margin: 15px 0;
}

.mirvanie-tool-args pre {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 12px;
    margin: 5px 0 0 0;
}

.mirvanie-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.mirvanie-button-approve {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.mirvanie-button-approve:hover {
    background-color: #218838;
}

.mirvanie-button-reject {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.mirvanie-button-reject:hover {
    background-color: #c82333;
}

/* Messages système */
.mirvanie-message.system {
    background-color: #fff3cd;
    border-left: 3px solid #ffc107;
    color: #856404;
    font-size: 12px;
    text-align: center;
    padding: 8px 12px;
}

.mirvanie-message-temporary {
    opacity: 0.7;
    font-style: italic;
}