/* Conteneur principal du chat */
#chat-container {
    position: fixed;
    bottom: -600px;
    right: 20px;
    width: 400px;
    height: 600px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    z-index: 9999;
    font-family: Arial, sans-serif;
    transition: bottom 0.4s ease;
}

/* Conteneur du chat ouvert */
#chat-container.open {
    bottom: 100px;
}

/* En-tête du chat */
#chat-header {
    padding: 15px 20px;
    min-height: 60px;
    font-weight: bold;
    color: #fff;
    background-color: var(--chat-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
   # background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"%3E%3Ccircle cx="10" cy="20" r="5" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="1" /%3E%3Ccircle cx="30" cy="40" r="7" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="1" /%3E%3Ccircle cx="50" cy="30" r="4" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="1" /%3E%3Ccircle cx="70" cy="50" r="6" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="1" /%3E%3Ccircle cx="90" cy="20" r="5" fill="none" stroke="rgba(255,255,255,0.5)" stroke-width="1" /%3E%3C/svg%3E');
    background-size: 80px 80px;
    background-repeat: repeat;
    background-position: center;
    font-size: 20px;
}

/* Zone de journalisation des messages */
#chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
    background-image: none;
}

/* Style des messages du bot */
.bot-message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 18px;
    background-color: #fff;
    color: #333;
    max-width: 80%;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-self: flex-start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Logo du bot */
.bot-logo {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    margin-bottom: 5px;
}

/* Style des messages de l'utilisateur */
.user-message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 18px;
    background-color: #e0e0e0;
    color: #000;
    max-width: 80%;
    word-wrap: break-word;
    align-self: flex-end;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Zone de saisie des messages */
#chat-input-container {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #ccc;
    height: 80px;
    background-color: #fff;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
}

/* Champ de saisie des messages */
#chat-input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 10px;
    font-size: 14px;
    height: 100%;
    border-radius: 18px;
    background-color: #f1f1f1;
    autocomplete="off"; /* Désactive la suggestion automatique */
}

#chat-input::placeholder {
    color: #888;
    opacity: 0.8;
}

/* Bouton de fermeture du chat */
#chat-close {
    position: absolute;
    bottom: -22px;
    right: -20px;
    background-color: var(--chat-color);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Style pour masquer le conteneur du chat */
#chat-container.chat-hidden {
    display: none;
}

/* Adaptation pour les petits écrans */
@media screen and (max-width: 600px) {
    #chat-launcher {
        bottom: 15px;
        right: 15px;
    }
    #chat-container {
        width: 90%;
        height: 500px;
        right: 5%;
    }
}

/* Style pour le bouton de lancement du chat */
#chat-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9998;
    color: white;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.2);
    background-color: var(--chat-color);
}

/* Style pour l'image dans le bouton de lancement du chat */
#chat-launcher img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
}

/* Style pour les blocs de produits */
.product-block {
    margin: 5px 0;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    display: block;
    width: 100%;
}

.product-block strong {
    display: block;
    margin-bottom: 4px;
    color: #222;
}

.product-block span, .product-block a {
    display: block;
    color: #555;
}

.product-block a {
    color: var(--chat-color);
    text-decoration: underline;
}

