/* Styles pour le chatbot popup */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'Montserrat', Arial, sans-serif;
}

.chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38b6ff, #5ce1e6);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(56, 182, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(56, 182, 255, 0.6);
}

.chatbot-button i {
    color: white;
    font-size: 24px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(56, 182, 255, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(56, 182, 255, 0.8);
    }
    100% {
        box-shadow: 0 4px 20px rgba(56, 182, 255, 0.4);
    }
}

.chatbot-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.3s ease;
}

.chatbot-popup.active {
    display: flex;
}

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

.chatbot-header {
    background: linear-gradient(135deg, #38b6ff, #5ce1e6);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.chatbot-avatar i {
    font-size: 20px;
}

.chatbot-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.chatbot-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
    max-height: 350px;
}

.chatbot-messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message.bot .message-avatar {
    background: linear-gradient(135deg, #38b6ff, #5ce1e6);
    color: white;
}

.message.user .message-avatar {
    background: #6c757d;
    color: white;
}

.message-avatar i {
    font-size: 14px;
}

.message-content {
    background: white;
    padding: 12px 15px;
    border-radius: 18px;
    max-width: 85%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeInMessage 0.3s ease;
    word-wrap: break-word;
    line-height: 1.5;
}

.message.user .message-content {
    background: #38b6ff;
    color: white;
}

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

.message-text {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

.chatbot-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.chatbot-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.chatbot-option {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatbot-option:hover {
    background: #38b6ff;
    color: white;
    border-color: #38b6ff;
}

.chatbot-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chatbot-input:focus {
    border-color: #38b6ff;
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #38b6ff;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-send:hover {
    background: #2a9ad9;
    transform: scale(1.1);
}

.chatbot-send:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 15px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6c757d;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.progress-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #38b6ff, #5ce1e6);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.chatbot-notification {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 25px;
    height: 25px;
    background: #ff5757;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .chatbot-popup {
        width: 350px;
        height: 500px;
    }
    
    .chatbot-body {
        max-height: 320px;
        padding: 12px;
    }
    
    .message-content {
        max-width: 90%;
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .chatbot-container {
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .chatbot-popup {
        width: calc(100vw - 30px);
        height: 450px;
        right: -5px;
    }
    
    .chatbot-body {
        max-height: 280px;
        padding: 10px;
    }
    
    .message-content {
        max-width: 92%;
        font-size: 13px;
        padding: 8px 10px;
        line-height: 1.4;
    }
    
    .chatbot-container {
        bottom: 10px;
        right: 10px;
    }
}

/* Styles pour les cases à cocher */
.chatbot-checkbox-form {
    width: 100%;
    padding: 10px 0;
}

.chatbot-checkbox-wrapper {
    display: flex;
    align-items: center;
    margin: 10px 0;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.chatbot-checkbox-wrapper:hover {
    background-color: #f8f9fa;
}

.chatbot-checkbox {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #38b6ff;
    cursor: pointer;
}

.chatbot-checkbox-label {
    cursor: pointer;
    color: #495057;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4;
    flex: 1;
}

.chatbot-submit-btn {
    background: #38b6ff;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    margin-top: 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
}

.chatbot-submit-btn:hover {
    background: #2ea3e8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(56, 182, 255, 0.3);
}