/* -----------------------------
   WIDGET CONTAINER
--------------------------------*/
#toclic-ai-chat-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99999;
    font-family: 'Inter', sans-serif;
}

/* -----------------------------
   CHAT LAUNCHER (Bulle)
--------------------------------*/
#toclic-ai-chat-widget .toclic-ai-launcher {
    background: #1e293b; /* Bleu foncé moderne */
    color: #fff;
    padding: 14px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

#toclic-ai-chat-widget .toclic-ai-launcher:hover {
    background: #334155;
    transform: translateY(-2px);
}

/* -----------------------------
   CHAT WINDOW
--------------------------------*/
#toclic-ai-chat-widget .toclic-ai-window {
    width: 360px;
    height: 480px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    position: absolute;
    bottom: 70px;
    right: 0;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

/* Show window */
#toclic-ai-chat-widget .toclic-ai-window.open {
    display: flex;
}

/* -----------------------------
   MESSAGES AREA
--------------------------------*/
.toclic-ai-window .toclic-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8fafc;
}

/* Scroll bar minimaliste */
.toclic-ai-window .toclic-ai-messages::-webkit-scrollbar {
    width: 6px;
}
.toclic-ai-window .toclic-ai-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

/* -----------------------------
   MESSAGE BUBBLES
--------------------------------*/
.toclic-ai-msg-user,
.toclic-ai-msg-bot {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
    line-height: 1.4;
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* User message (bleu TOCLIC) */
.toclic-ai-msg-user {
    background: #2563eb;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

/* Bot message */
.toclic-ai-msg-bot {
    background: #e2e8f0;
    color: #1e293b;
    align-self: flex-start;
    margin-right: auto;
}

/* -----------------------------
   INPUT AREA
--------------------------------*/
.toclic-ai-window .toclic-ai-input {
    display: flex;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 10px;
    align-items: center;
    gap: 8px;
}

.toclic-ai-window textarea {
    flex: 1;
    border: none;
    resize: none;
    height: 45px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #f1f5f9;
    font-size: 14px;
    outline: none;
    color: #0f172a;
}

.toclic-ai-window button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s ease;
}

.toclic-ai-window button:hover {
    background: #1d4ed8;
}

/* -----------------------------
   ANIMATIONS
--------------------------------*/
.toclic-ai-msg-user,
.toclic-ai-msg-bot {
    opacity: 0;
    transform: translateY(6px);
    animation: fadeInUp 0.18s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}