/* =========================================
   CHAT VM CONNECT
========================================= */

.vm-chat {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


/* =========================================
   BOUTON FLOTTANT
========================================= */

.vm-chat-launcher {
    border: none;
    outline: none;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 13px 18px;

    border-radius: 50px;

    background: #0b5ed7;
    color: #ffffff;

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.18);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}


.vm-chat-launcher:hover {
    transform: translateY(-2px);

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.24);
}


.vm-chat-launcher-icon {
    font-size: 20px;
    line-height: 1;
}


/* =========================================
   FENÊTRE CHAT
========================================= */

.vm-chat-window {
    position: absolute;

    right: 0;
    bottom: 72px;

    width: 370px;
    height: 540px;

    display: none;
    flex-direction: column;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;

    box-shadow:
        0 20px 60px rgba(15, 23, 42, 0.22);

    transform-origin: bottom right;
}


.vm-chat-window.is-open {
    display: flex;

    animation: vmChatOpen 0.25s ease;
}


@keyframes vmChatOpen {

    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================
   HEADER
========================================= */

.vm-chat-header {
    min-height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 16px;

    background:
        linear-gradient(
            135deg,
            #062f63,
            #0b5ed7
        );

    color: #ffffff;
}


.vm-chat-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}


.vm-chat-brand strong {
    display: block;

    margin-bottom: 3px;

    font-size: 16px;
    font-weight: 700;
}


.vm-chat-logo {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    overflow: hidden;

    border-radius: 50%;

    background: #ffffff;
}


.vm-chat-logo img {
    width: 34px;
    height: 34px;

    object-fit: contain;
}


.vm-chat-status {
    display: flex;
    align-items: center;
    gap: 6px;

    font-size: 12px;

    color: rgba(255, 255, 255, 0.88);
}


.vm-chat-status-dot {
    width: 7px;
    height: 7px;

    display: inline-block;

    border-radius: 50%;

    background: #3ddc84;
}


.vm-chat-close {
    width: 38px;
    height: 38px;

    border: none;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    color: #ffffff;

    font-size: 30px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    border-radius: 50%;
}


.vm-chat-close:hover {
    background: rgba(255, 255, 255, 0.12);
}


/* =========================================
   MESSAGES
========================================= */

.vm-chat-messages {
    flex: 1;

    padding: 18px;

    overflow-y: auto;

    background: #f6f8fb;

    scroll-behavior: smooth;
}


.vm-chat-message {
    display: flex;

    margin-bottom: 12px;
}


.vm-chat-message-bot {
    justify-content: flex-start;
}


.vm-chat-message-user {
    justify-content: flex-end;
}


.vm-chat-bubble {
    max-width: 82%;

    padding: 11px 14px;

    border-radius: 15px;

    font-size: 14px;
    line-height: 1.5;

    word-break: break-word;
}


.vm-chat-message-bot .vm-chat-bubble {
    background: #ffffff;
    color: #334155;

    border-bottom-left-radius: 5px;

    box-shadow:
        0 3px 12px rgba(15, 23, 42, 0.07);
}


.vm-chat-message-user .vm-chat-bubble {
    background: #0b5ed7;
    color: #ffffff;

    border-bottom-right-radius: 5px;
}


/* =========================================
   OPTIONS RAPIDES
========================================= */

.vm-chat-options {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 14px;
    margin-bottom: 10px;
}


.vm-chat-options button {
    border: 1px solid #d7e3f4;

    padding: 8px 11px;

    background: #ffffff;
    color: #0b5ed7;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition: all 0.2s ease;
}


.vm-chat-options button:hover {
    background: #eef5ff;
    border-color: #0b5ed7;
}


.vm-chat-options .vm-chat-option-primary {
    background: #0b5ed7;
    border-color: #0b5ed7;

    color: #ffffff;
}


.vm-chat-options .vm-chat-option-primary:hover {
    background: #084298;
}


/* =========================================
   FORMULAIRE
========================================= */

.vm-chat-form {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 12px;

    background: #ffffff;

    border-top: 1px solid #e9eef5;
}


.vm-chat-form input {
    flex: 1;

    min-width: 0;

    padding: 11px 14px;

    border: 1px solid #d9e1ea;
    outline: none;

    border-radius: 24px;

    background: #f8fafc;

    color: #1e293b;

    font-size: 14px;
}


.vm-chat-form input:focus {
    border-color: #0b5ed7;

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(11, 94, 215, 0.08);
}


.vm-chat-form input::placeholder {
    color: #94a3b8;
}


.vm-chat-send {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    border: none;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #0b5ed7;
    color: #ffffff;

    font-size: 18px;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}


.vm-chat-send:hover {
    background: #084298;

    transform: scale(1.04);
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 576px) {

    .vm-chat {
        right: 14px;
        bottom: 14px;
    }


    .vm-chat-window {
        position: fixed;

        left: 12px;
        right: 12px;

        bottom: 82px;

        width: auto;

        height: min(570px, calc(100vh - 110px));

        border-radius: 18px;
    }


    .vm-chat-launcher {
        margin-left: auto;

        padding: 13px 16px;
    }


    .vm-chat-launcher-text {
        display: none;
    }


    .vm-chat-launcher-icon {
        font-size: 23px;
    }

}