/* Congo Love AI Assistant - Premium Glassmorphism Design */
.ai-assistant-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* Teaser à gauche du bouton rond, groupe collé au bord droit */
.ai-assistant-launcher {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 14px;
}

/* Teaser — petit message pour attirer l’attention (Hardi) */
.ai-assistant-teaser {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
    -webkit-tap-highlight-color: transparent;
    animation: ai-teaser-nudge 4s ease-in-out infinite;
}

.ai-assistant-teaser-inner {
    display: block;
    position: relative;
    max-width: 220px;
    padding: 12px 16px 12px 14px;
    background: rgba(18, 20, 28, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 18px 18px 6px 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Petit “bec” vers le bouton rond */
.ai-assistant-teaser-inner::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: -7px;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 8px solid rgba(212, 175, 55, 0.35);
    filter: drop-shadow(1px 0 0 rgba(18, 20, 28, 0.92));
}

.ai-assistant-teaser-name {
    display: block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #D4AF37;
    margin-bottom: 4px;
}

.ai-assistant-teaser-msg {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
}

.ai-assistant-teaser:hover .ai-assistant-teaser-inner,
.ai-assistant-teaser:focus-visible .ai-assistant-teaser-inner {
    transform: scale(1.02);
    border-color: rgba(212, 175, 55, 0.55);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 175, 55, 0.2) inset;
    outline: none;
}

.ai-assistant-teaser:focus-visible .ai-assistant-teaser-inner {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
}

@keyframes ai-teaser-nudge {
    0%, 100% { transform: translateX(0); }
    4% { transform: translateX(-3px); }
    8% { transform: translateX(3px); }
    12% { transform: translateX(-2px); }
    16% { transform: translateX(0); }
}

.ai-assistant-wrapper.ai-chat-open .ai-assistant-teaser {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    animation: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.ai-assistant-toggle {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.ai-assistant-toggle:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.6);
}

.ai-assistant-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    height: 550px;
    background: rgba(10, 11, 16, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(30px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ai-assistant-window.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.ai-assistant-header {
    padding: 25px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(0, 0, 0, 0) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.ai-assistant-header-title {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-assistant-header-title i {
    color: #D4AF37;
    font-size: 1.2rem;
}

.ai-assistant-close {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.ai-assistant-close:hover {
    opacity: 1;
}

.ai-assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.2) transparent;
}

.ai-assistant-messages::-webkit-scrollbar {
    width: 4px;
}

.ai-assistant-messages::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.2);
    border-radius: 10px;
}

.ai-message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.ai-message.assistant {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-message.user {
    background: #D4AF37;
    color: #000;
    font-weight: 600;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.ai-assistant-input-area {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-assistant-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: white;
    padding: 12px 18px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.ai-assistant-input-area input:focus {
    border-color: #D4AF37;
    background: rgba(255, 255, 255, 0.08);
}

.ai-assistant-send {
    width: 45px;
    height: 45px;
    background: #D4AF37;
    border: none;
    border-radius: 12px;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s;
}

.ai-assistant-send:hover {
    transform: scale(1.05);
    background: #ecc246;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    width: fit-content;
    align-self: flex-start;
}

.typing-indicator span {
    width: 7px;
    height: 7px;
    background: #D4AF37;
    border-radius: 50%;
    opacity: 0.6;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); opacity: 1; }
}

@media (max-width: 480px) {
    .ai-assistant-window {
        width: calc(100vw - 30px);
        height: 70vh;
        bottom: 80px;
        right: -15px;
    }
    
    .ai-assistant-wrapper {
        bottom: 20px;
        right: 20px;
    }

    .ai-assistant-launcher {
        flex-direction: row;
        align-items: flex-end;
        justify-content: flex-end;
        gap: 10px;
        max-width: calc(100vw - 24px);
    }

    .ai-assistant-teaser-inner {
        max-width: min(200px, calc(100vw - 100px));
        border-radius: 18px 18px 6px 18px;
    }

    .ai-assistant-teaser-inner::after {
        bottom: 10px;
        right: -7px;
        border-top: 7px solid transparent;
        border-bottom: 7px solid transparent;
        border-left: 8px solid rgba(212, 175, 55, 0.35);
        border-right: none;
    }

    .ai-assistant-teaser-msg {
        font-size: 12px;
    }
}

.ai-signup-btn {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #FFD700 0%, #D4AF37 100%);
    color: #000 !important;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
    background: linear-gradient(135deg, #FFF 0%, #FFD700 100%);
}
