/* Conteneur général (fixe en bas à droite) */
#obd-chat-widget {
    position: fixed;
    right: 16px;
    bottom: 78px;
    z-index: 9999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#obd-chat-window[hidden] {
    display: none !important;
}
/* Bulle flottante */
#obd-chat-bubble {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2563eb; /* bleu légerement vif */
    color: #fff;
}

/* Fenêtre de chat */
#obd-chat-window {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 320px;
    max-height: 480px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.obd-chat-header {
    padding: 10px 12px;
    background: #1e293b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
}

.obd-chat-subtitle {
    font-size: 12px;
    opacity: 0.8;
}

.obd-chat-close {
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
}

/* Zone des messages */
.obd-chat-log {
    padding: 10px;
    font-size: 13px;
    line-height: 1.4;
    overflow-y: auto;
    flex: 1;
    background: #f8fafc;
}

.obd-message {
    margin-bottom: 8px;
}

.obd-message.bot {
    text-align: left;
}

.obd-message.user {
    text-align: right;
    font-weight: 600;
}

/* Zone des options (boutons) */
.obd-chat-options {
    padding: 8px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.obd-chat-options button {
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #cbd5f5;
    cursor: pointer;
    font-size: 12px;
    background: #e0ecff;
    white-space: nowrap;
}

/* Mobile : fenêtre plus large et un peu plus haute */
/* Version mobile : bulle en bas à droite, fenêtre centrée */
@media (max-width: 768px) {
    #obd-chat-widget {
        right: 12px;
        bottom: 10px;
    }

    #obd-chat-bubble {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 50%;
        padding: 0;
        font-size: 14px;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;

        /* ta couleur #4d70fb avec opacité en % */
        background-color: rgb(77 112 251 /80%);
        color: #fff;
    }

    #obd-chat-window {
        position: fixed;
        bottom: 90px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100vw - 24px);
        max-height: 70vh;
        right: auto;
    }
}