/* =====================================================
   LA GRANDE EVASION ANNECY - MXCHAT (proposition V2)
   Fichier complet : remplace lge-mxchat.css.
   Pastille blanche « Assistant virtuel » en bas a droite.
   Sur telephone, elle se place au-dessus de la barre panier grace a
   --lge-barre-bas, ecrit par lge-mxchat-v2.js (a charger a la place
   de lge-mxchat-panier.js).
   Noir / ivoire / dore
   ===================================================== */

/* 1. Bouton : pastille blanche avec libelle et disque dore */

.floating-chatbot-button {
    position: fixed !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    cursor: pointer;
    top: auto !important;
    left: auto !important;
    right: 20px !important;
    bottom: calc(var(--lge-barre-bas, 0px) + 20px) !important;
    transform: none !important;
    visibility: visible !important;
    flex-direction: row !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 16px 0 5px !important;
    background: #FFFFFF !important;
    border: 1px solid #D9C49C !important;
    border-radius: 999px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .14) !important;
    z-index: 100 !important;
}

.floating-chatbot-button:hover {
    background: #FBF8F2 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .20) !important;
}

/* Icone de bulle blanche sur disque dore */
.floating-chatbot-button::before {
    content: "" !important;
    display: block !important;
    flex: 0 0 auto !important;
    width: 34px !important;
    height: 34px !important;
    background: #B18A43 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 20A9 9 0 1 0 4 16.1L2 22Z'/%3E%3C/svg%3E") center / 18px 18px no-repeat !important;
    border-radius: 50% !important;
    filter: none !important;
}

/* Masquer le pictogramme du plugin : c'est l'icone ci-dessus qui compte */
.floating-chatbot-button > svg,
.floating-chatbot-button > img,
.floating-chatbot-button > i {
    display: none !important;
}

/* Libelle explicite : c'est un assistant virtuel */
.floating-chatbot-button::after {
    content: "Assistant virtuel" !important;
    color: #202020 !important;
    font: 600 14px/1 Arial, Helvetica, sans-serif !important;
    white-space: nowrap !important;
    text-align: left !important;
}

/* 2. Fenetre ouverte : au-dessus de la pastille */
.floating-chatbot,
#floating-chatbot,
#floating-chatbot-default {
    top: auto !important;
    left: auto !important;
    right: 20px !important;
    bottom: 80px !important;
    width: 420px !important;
    max-width: calc(100vw - 30px) !important;
    height: 690px !important;
    max-height: calc(100dvh - 110px) !important;
    background: #FFFFFF !important;
    border: 1px solid #B18A43 !important;
    border-radius: 18px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .40) !important;
    overflow: hidden !important;
}

.floating-chatbot:not(.hidden) {
    z-index: 1000001 !important;
}

.mxchat-chatbot-wrapper,
.mxchat-chatbot {
    background: #FFFFFF !important;
    color: #202020 !important;
}

.mxchat-chatbot {
    font: 14px/1.5 Arial, Helvetica, sans-serif !important;
}

/* 3. Entete */
.mxchat-chatbot .chatbot-top-bar {
    background: #202020 !important;
    color: #FFFFFF !important;
    border-bottom: 3px solid #B18A43 !important;
}

.mxchat-chatbot .chatbot-top-bar,
.mxchat-chatbot .chatbot-top-bar span,
.mxchat-chatbot .chatbot-top-bar strong,
.mxchat-chatbot .chatbot-top-bar p,
.mxchat-chatbot .chatbot-top-bar button {
    color: #FFFFFF !important;
}

/* 4. Messages */
.mxchat-chatbot .chat-container,
.mxchat-chatbot .chat-box {
    background: #FAF8F5 !important;
    color: #202020 !important;
}

.mxchat-chatbot .chat-box {
    padding: 14px !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

.mxchat-chatbot .bot-message,
.mxchat-chatbot .user-message {
    padding: 12px 14px !important;
    font: 14px/1.55 Arial, Helvetica, sans-serif !important;
    color: #202020 !important;
}

.mxchat-chatbot .bot-message {
    background: #F0E8D9 !important;
    border: 1px solid #E1D3BB !important;
    border-radius: 15px 15px 15px 5px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .06) !important;
}

.mxchat-chatbot .user-message {
    background: #FFFFFF !important;
    border: 1px solid #D9C49C !important;
    border-radius: 15px 15px 5px 15px !important;
}

/* Important : inclut le message de bienvenue. */
.mxchat-chatbot .bot-message *,
.mxchat-chatbot .user-message * {
    color: #202020 !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

.mxchat-chatbot .bot-message a,
.mxchat-chatbot .bot-message a *,
.mxchat-chatbot .user-message a,
.mxchat-chatbot .user-message a * {
    color: #805914 !important;
    text-decoration: underline !important;
}

/* 5. Saisie et accessibilite */
.mxchat-chatbot .chatbot-footer,
.mxchat-chatbot .input-container {
    background: #FFFFFF !important;
}

.mxchat-chatbot .chatbot-footer {
    border-top: 1px solid #E7DED0 !important;
}

.mxchat-chatbot .chat-input {
    background: #FFFFFF !important;
    color: #202020 !important;
    border: 1px solid #D9C49C !important;
    border-radius: 12px !important;
    font: 14px Arial, Helvetica, sans-serif !important;
}

.mxchat-chatbot .chat-input::placeholder {
    color: #777777 !important;
    opacity: 1 !important;
}

.mxchat-chatbot .chat-input:focus {
    outline: 1px solid #B18A43 !important;
    border-color: #B18A43 !important;
}

.mxchat-chatbot .send-button,
.mxchat-chatbot .send-button svg {
    color: #B18A43 !important;
    fill: #B18A43 !important;
}

.mxchat-chatbot button:focus-visible,
.floating-chatbot-button:focus-visible {
    outline: 3px solid #D4AD62 !important;
    outline-offset: 2px !important;
}

/* 6. Telephone : pastille plus petite au-dessus de la barre panier, fenetre plein ecran */
@media (max-width: 768px) {
    .floating-chatbot-button {
        right: 12px !important;
        bottom: calc(var(--lge-barre-bas, 0px) + 12px) !important;
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;
        padding: 0 14px 0 4px !important;
    }

    .floating-chatbot-button::before {
        width: 32px !important;
        height: 32px !important;
        background-size: 17px 17px !important;
    }

    .floating-chatbot-button::after {
        font-size: 13px !important;
    }

    .floating-chatbot,
    #floating-chatbot,
    #floating-chatbot-default {
        left: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        height: calc(100dvh - 16px) !important;
        max-height: calc(100dvh - 16px) !important;
        border-radius: 16px !important;
    }

    .mxchat-chatbot .chat-box {
        padding: 12px !important;
    }
}
