:root {
    --primary-color: #243E8B;
    --primary-dark: #1a2d63;
    --secondary-color: #1b11dbf2;
    --accent-color: #D4AF37;
    --text-color: #333;
    --bg-light: #f9f9f9;
    --border-color: #ddd;
    --success-color: #10B981;
}

/* Widget flottant button */
.chatbot-widget-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2C5F8D 0%, #1a3a5c 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(36, 62, 139, 0.35);
    z-index: 9998;
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
}

.chatbot-widget-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(36, 62, 139, 0.4);
}

.chatbot-widget-btn.active {
    animation: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Container chatbot */
.chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 400px;
    height: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 40px rgba(0,0,0,0.16);
    background: white;
    display: none;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 9999;
    animation: slideUp 0.3s ease-out;
}

.chatbot-container.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #2C5F8D 0%, #1a3a5c 100%);
    color: white;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chatbot-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f9f9f9;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 3px;
}

.message {
    margin-bottom: 12px;
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    justify-content: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 12px;
    border-radius: 8px;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.message.bot .message-bubble {
    background: #e0e0e0;
    color: var(--text-color);
    border-bottom-left-radius: 2px;
}

.message.user .message-bubble {
    background: var(--secondary-color);
    color: white;
    border-bottom-right-radius: 2px;
}

.chatbot-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background: white;
    border-radius: 0 0 10px 10px;
}

#userInput {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    margin-right: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: border-color 0.2s ease;
}

#userInput:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 5px rgba(36, 62, 139, 0.3);
}

#sendBtn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #2C5F8D 0%, #1a3a5c 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

#sendBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(36, 62, 139, 0.3);
}

#sendBtn:active {
    transform: translateY(0);
}

.button-group {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.quick-btn {
    padding: 6px 10px;
    background: linear-gradient(135deg, #2C5F8D 0%, #1a3a5c 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.quick-btn:hover {
    background: linear-gradient(135deg, #1a3a5c 0%, #0f1f3a 100%);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(36, 62, 139, 0.3);
}

.quick-btn.primary-btn {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

.quick-btn.primary-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100% - 40px);
        height: 60vh;
        bottom: 80px;
        right: 20px;
    }
    
    .message-bubble {
        max-width: 85%;
    }
}
