#ai-chatbot-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

#ai-chatbot-bubble > button {
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    cursor: pointer;
    padding-top: 10px;
}

#ai-chatbot-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 450px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: Arial, sans-serif;
    z-index: 10000;
}

#ai-chatbot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    padding: 10px;
}

#ai-chatbot-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

#ai-chatbot-title {
    display: flex;
    align-items: center;
    font-weight: bold;
}

#ai-chatbot-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: #f4f4f8;
}

.chatbot-msg > .msg-content {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
    gap: 10px;
}

.chatbot-msg > .msg-content > p {
    margin: 0 !important;
}

.chatbot-msg > .msg-content > p > a {
    color: #0a4b78 !important;
    font-weight: bold !important;
}

.chatbot-msg > .msg-content > ul {
    padding-left: 15px !important;
}


.chatbot-msg {
    display: flex;
    margin-bottom: 10px;
    align-items: flex-end;
}

.chatbot-msg.bot {
    justify-content: flex-start;
}

.chatbot-msg.user {
    justify-content: flex-end;
}

.chatbot-msg .msg-content {
    overflow-x: auto;
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
}

.chatbot-msg .msg-content p:not(:last-child) {
    margin-bottom: 10px;
}

.chatbot-msg.bot .msg-content {
    background-color: #e0e0e0;
    color: #000;
}

.chatbot-msg.user .msg-content {
    color: #fff;
}

#ai-chatbot-input-wrapper {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
    background: #fff;
    box-shadow: 0 -5px 30px -10px #bbbbbb;
}

#ai-chatbot-input-wrapper input {
    flex: 1;
    padding: 8px;
    border-radius: 20px;
    border: 1px solid #ccc;
    outline: none;
    font-size: 14px;
}

#ai-chatbot-input-wrapper button {
    margin-left: 5px;
    padding: 8px 12px;
    background-color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Chat animation */
#ai-chatbot-window {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transform-origin: bottom right;
    transition: opacity 180ms ease, transform 220ms ease;
    will-change: opacity, transform;
    pointer-events: none; /* évite les clics quand c'est caché */
}

#ai-chatbot-window.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Bubble animation */
#ai-chatbot-bubble {
    transition: transform 180ms ease, opacity 180ms ease;
    will-change: transform, opacity;
}

#ai-chatbot-bubble.is-hidden {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    #ai-chatbot-window,
    #ai-chatbot-bubble {
        transition: none !important;
    }
}