/* ============================================================
   ChatBot.css — Bouton flottant + fenêtre de chat
   ============================================================ */

#chatbot-btn {
    /* Masqué temporairement à la demande de l'utilisateur (2026-07-29) — la finition de l'assistant est
       remise à plus tard, le composant/JS restent en place pour une réactivation ultérieure. */
    display: none;
    position: fixed;
    bottom: 24px; right: 24px;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: #fff;
    font-size: 20px;
    align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(46,134,193,.45);
    z-index: 300;
    transition: transform var(--transition), box-shadow var(--transition);
}
#chatbot-btn:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(46,134,193,.55); }

.chatbot-pulse {
    position: absolute;
    top: 0; right: 0;
    width: 14px; height: 14px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    animation: chatbot-pulse-anim 2s infinite;
}
@keyframes chatbot-pulse-anim {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.3); }
}

#chatbot-window {
    position: fixed;
    bottom: 88px; right: 24px;
    width: 340px; max-height: 480px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    z-index: 299;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(16px) scale(.96);
    pointer-events: none;
    transition: opacity .22s cubic-bezier(.4,0,.2,1), transform .22s cubic-bezier(.4,0,.2,1);
}
#chatbot-window.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }

.chat-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--blue-dark), var(--blue));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    flex-shrink: 0;
}
.chat-bot-icon {
    width: 32px; height: 32px;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
}
.chat-header-info h4   { font-size: 13px; font-weight: 700; }
.chat-header-info span { font-size: 11px; opacity: .75; }
.chat-close-btn       { margin-left: auto; cursor: pointer; font-size: 14px; opacity: .75; transition: opacity var(--transition-fast); }
.chat-close-btn:hover { opacity: 1; }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-msg      { max-width: 82%; }
.chat-msg.bot  { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }
.chat-msg.bot .bubble  { background: var(--bg); border-radius: 4px var(--radius) var(--radius) var(--radius); }
.chat-msg.user .bubble { background: var(--blue); color: #fff; border-radius: var(--radius) 4px var(--radius) var(--radius); }
.bubble { padding: 8px 12px; font-size: 12.5px; line-height: 1.6; }
.chat-label { font-size: 10px; color: var(--text-muted); margin-bottom: 3px; font-weight: 500; }

.bubble.typing { display: flex; align-items: center; gap: 4px; padding: 12px 14px; }
.bubble.typing span {
    width: 6px; height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing-bounce 1.2s infinite;
}
.bubble.typing span:nth-child(2) { animation-delay: .2s; }
.bubble.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30%           { transform: translateY(-7px); }
}

.chat-input-area {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}
.chat-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 12.5px;
    font-family: inherit;
    outline: none;
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition-fast);
}
.chat-input:focus { border-color: var(--blue); background: #fff; }
.chat-send {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;
    transition: background var(--transition-fast);
}
.chat-send:hover { background: var(--blue-light); }

@media (max-width: 768px) {
    #chatbot-btn    { bottom: 16px; right: 16px; }
    #chatbot-window { right: 8px; left: 8px; width: auto; bottom: 80px; }
}
