/* Widget chat « Sarah » - Formation MonBolide */
#chat-widget-root {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: inherit;
}

#chat-widget-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    /* Bleu principal du site + léger dégradé */
    background: linear-gradient(135deg, #003366 0%, #00509e 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

#chat-widget-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.5);
}

#chat-widget-btn svg {
    width: 28px;
    height: 28px;
}

#chat-widget-panel {
    display: none;
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 480px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(0, 51, 102, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    flex-direction: column;
    overflow: hidden;
}

#chat-widget-panel.open {
    display: flex;
}

#chat-widget-header {
    /* Bandeau aux couleurs principales du site */
    background: linear-gradient(135deg, #003366 0%, #00509e 60%, #0F172A 100%);
    color: #fff;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#chat-widget-header-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    opacity: 0.9;
}

#chat-widget-header-close:hover {
    opacity: 1;
}

#chat-widget-ai-notice {
    font-size: 0.72rem;
    font-weight: 400;
    padding: 6px 16px;
    background: #f1f5f9;
    color: #4b5563;
    border-bottom: 1px solid #e2e8f0;
}

#chat-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

#chat-widget-messages .msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
}

#chat-widget-messages .msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #003366 0%, #00509e 100%);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 48, 94, 0.35);
}

#chat-widget-messages .msg.bot {
    align-self: flex-start;
    background: #ffffff;
    color: #1f2933;
    border: 1px solid #dde4f1;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.07);
}

#chat-widget-messages .msg.bot .msg-label {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 4px;
}

#chat-widget-input-area {
    padding: 12px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

#chat-widget-input-area form {
    display: flex;
    gap: 8px;
}

#chat-widget-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #cbd5f0;
    border-radius: 24px;
    font-size: 0.9rem;
    outline: none;
}

#chat-widget-input:focus {
    border-color: #003366;
}

#chat-widget-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #003366 0%, #00509e 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-widget-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#chat-widget-send svg {
    width: 20px;
    height: 20px;
}

.chat-widget-typing {
    color: #6b7280;
    font-size: 0.85rem;
    font-style: italic;
}
