/* ==========================================================================
   CONCIERGE IA CHATBOT — TAXI VTC PARIS
   Design : Luxury Glassmorphism • Gold Accent (#c8a951) • Responsive Mobile
   ========================================================================== */

:root {
    --chat-gold: #c8a951;
    --chat-gold-glow: rgba(200, 169, 81, 0.35);
    --chat-dark: #0a0f1d;
    --chat-panel-bg: rgba(15, 23, 42, 0.96);
    --chat-border: rgba(200, 169, 81, 0.25);
}

/* Floating Trigger Button */
.ai-chat-trigger {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1.5px solid var(--chat-gold);
    padding: 10px 18px 10px 14px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 0 20px var(--chat-gold-glow);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.ai-chat-trigger:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(200, 169, 81, 0.5);
    border-color: #dfbf68;
}

.ai-chat-trigger-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #c8a951 0%, #9e7f2b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0f1d;
    font-size: 1.15rem;
    position: relative;
    box-shadow: 0 4px 10px rgba(200, 169, 81, 0.4);
}

.ai-chat-online-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 11px;
    height: 11px;
    background-color: #10b981;
    border: 2px solid #0f172a;
    border-radius: 50%;
    animation: aiPulse 2s infinite;
}

@keyframes aiPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.ai-chat-trigger-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.ai-chat-trigger-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-chat-trigger-subtitle {
    font-size: 0.75rem;
    color: var(--chat-gold);
    font-weight: 500;
}

/* Chat Widget Panel */
.ai-chat-window {
    position: fixed;
    bottom: 85px;
    left: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 580px;
    max-height: calc(100vh - 110px);
    background: var(--chat-panel-bg);
    border: 1px solid var(--chat-border);
    border-radius: 16px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(200, 169, 81, 0.15);
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: aiChatSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.ai-chat-window.active {
    display: flex;
}

@keyframes aiChatSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.ai-chat-header {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.98) 100%);
    padding: 16px 18px;
    border-bottom: 1px solid rgba(200, 169, 81, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-chat-avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #c8a951 0%, #9e7f2b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0f1d;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(200, 169, 81, 0.3);
}

.ai-chat-header-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-chat-header-status {
    font-size: 0.75rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.ai-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-chat-header-btn {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-chat-header-btn:hover {
    background: rgba(200, 169, 81, 0.2);
    color: #ffffff;
}

/* Messages stream */
.ai-chat-messages {
    flex: 1;
    padding: 18px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 5px;
}
.ai-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(200, 169, 81, 0.2);
    border-radius: 10px;
}

.ai-msg {
    display: flex;
    flex-direction: column;
    max-width: 86%;
    animation: aiFadeMsg 0.25s ease-out;
}

@keyframes aiFadeMsg {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-msg.bot {
    align-self: flex-start;
}

.ai-msg.user {
    align-self: flex-end;
}

.ai-msg-bubble {
    padding: 12px 15px;
    border-radius: 14px;
    font-size: 0.92rem;
    line-height: 1.55;
    word-break: break-word;
}

.ai-msg.bot .ai-msg-bubble {
    background: rgba(30, 41, 59, 0.85);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-left-radius: 4px;
}

.ai-msg.user .ai-msg-bubble {
    background: linear-gradient(135deg, #c8a951 0%, #a88a38 100%);
    color: #0b1120;
    font-weight: 600;
    border-top-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(200, 169, 81, 0.25);
}

.ai-msg-time {
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 4px;
    padding: 0 4px;
}
.ai-msg.user .ai-msg-time {
    text-align: right;
}

/* Action buttons inside bot bubbles */
.ai-msg-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 10px;
}

.ai-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.ai-btn-gold {
    background: linear-gradient(135deg, #c8a951 0%, #b3923d 100%);
    color: #0a0f1d !important;
    border: none;
    box-shadow: 0 2px 8px rgba(200, 169, 81, 0.3);
}
.ai-btn-gold:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.ai-btn-wa {
    background: #25d366;
    color: #ffffff !important;
    border: none;
}
.ai-btn-wa:hover {
    background: #1eb857;
}

.ai-btn-call {
    background: rgba(200, 169, 81, 0.12);
    border: 1px solid rgba(200, 169, 81, 0.4);
    color: var(--chat-gold) !important;
}
.ai-btn-call:hover {
    background: rgba(200, 169, 81, 0.25);
}

/* Quick Question Chips */
.ai-chat-chips {
    padding: 8px 14px 10px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-chat-chips::-webkit-scrollbar {
    display: none;
}

.ai-chip {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(200, 169, 81, 0.3);
    color: #cbd5e1;
    font-size: 0.78rem;
    padding: 6px 12px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-chip:hover {
    background: var(--chat-gold);
    color: #0a0f1d;
    border-color: var(--chat-gold);
    font-weight: 600;
}

/* Typing Indicator */
.ai-typing-indicator {
    display: none;
    align-self: flex-start;
    padding: 10px 16px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    border-top-left-radius: 4px;
    gap: 4px;
}

.ai-typing-indicator.active {
    display: flex;
}

.ai-typing-dot {
    width: 6px;
    height: 6px;
    background: var(--chat-gold);
    border-radius: 50%;
    animation: aiTyping 1.4s infinite ease-in-out both;
}
.ai-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes aiTyping {
    0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Footer & Input */
.ai-chat-footer {
    padding: 12px 14px;
    background: rgba(10, 15, 29, 0.95);
    border-top: 1px solid rgba(200, 169, 81, 0.2);
}

.ai-chat-input-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 4px 6px 4px 14px;
    transition: border-color 0.2s;
}

.ai-chat-input-form:focus-within {
    border-color: var(--chat-gold);
}

.ai-chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
}

.ai-chat-input::placeholder {
    color: #64748b;
}

.ai-chat-send-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #c8a951 0%, #b3923d 100%);
    border: none;
    border-radius: 50%;
    color: #0a0f1d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-chat-send-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .ai-chat-trigger {
        bottom: 85px;
        left: 12px;
        padding: 8px 14px 8px 10px;
    }
    .ai-chat-trigger-subtitle {
        display: none;
    }
    .ai-chat-window {
        bottom: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
}
