/* Chatbot120 - Styles Front-End */

/* Icône du chatbot */
.chatbot120-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 9998;
}

@keyframes chatbot120-pulse {
    0% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0 4px 25px rgba(102, 126, 234, 0.6); transform: scale(1.08); }
    100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
}

.chatbot120-icon {
    animation: chatbot120-pulse 2s ease-in-out infinite;
}

.chatbot120-icon:hover {
    animation: none;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.chatbot120-icon svg {
    color: white;
}

.chatbot120-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Fenêtre du chatbot */
.chatbot120-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
}

/* En-tête */
.chatbot120-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot120-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chatbot120-close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

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

/* Corps */
.chatbot120-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Onglets */
.chatbot120-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    background: #f5f5f5;
}

.chatbot120-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
}

.chatbot120-tab:hover {
    background: #ebebeb;
}

.chatbot120-tab.active {
    background: white;
    color: #667eea;
    border-bottom: 2px solid #667eea;
}

/* Contenu des onglets */
.chatbot120-tab-content {
    display: none !important;
    flex: 1;
    overflow: hidden;
}

.chatbot120-tab-content.active {
    display: flex !important;
    flex-direction: column;
}

/* FAQ */
.chatbot120-faq-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    min-height: 0;
}

.chatbot120-faq-item {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.chatbot120-faq-question {
    width: 100%;
    background: #f9f9f9;
    border: none;
    padding: 15px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.chatbot120-faq-question:hover {
    background: #f0f0f0;
}

.chatbot120-faq-item.active .chatbot120-faq-question {
    background: #667eea;
    color: white;
}

.chatbot120-faq-icon {
    font-size: 20px;
    font-weight: bold;
    margin-left: 10px;
}

.chatbot120-faq-answer {
    display: none;
    padding: 15px;
    background: white;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.chatbot120-no-faq {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

/* Chat */
.chatbot120-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f5f5f5;
    min-height: 0;
}

.chatbot120-welcome-message {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chatbot120-welcome-message p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
}

.chatbot120-email-prompt {
    font-size: 13px;
    color: #666;
}

/* Messages */
.chatbot120-message {
    margin-bottom: 15px;
    animation: slideIn 0.3s ease;
}

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

.chatbot120-message-content {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.chatbot120-message-visitor .chatbot120-message-content {
    background: #667eea;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chatbot120-message-admin .chatbot120-message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chatbot120-message-content p {
    margin: 0;
}

.chatbot120-message-time {
    display: block;
    font-size: 11px;
    margin-top: 5px;
    opacity: 0.7;
}

/* Formulaire email */
.chatbot120-email-form {
    padding: 15px;
    background: #fffbea;
    border-top: 1px solid #f0e68c;
    border-bottom: 1px solid #f0e68c;
    flex-shrink: 0;
    position: relative;
}

.chatbot120-email-form-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.chatbot120-email-form-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.chatbot120-email-prompt {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.chatbot120-email-form input {
    width: 100%;
    padding: 9px 12px;
    margin-bottom: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background: white;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.chatbot120-email-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.chatbot120-btn-primary {
    width: 100%;
    padding: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.chatbot120-btn-primary:hover {
    background: #5568d3;
}

.chatbot120-btn-primary svg {
    flex-shrink: 0;
}

/* Footer FAQ */
.chatbot120-faq-footer {
    padding: 20px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    flex-shrink: 0;
}

.chatbot120-faq-footer p {
    margin: 0 0 12px 0;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.chatbot120-switch-to-chat {
    width: 100%;
}

/* Zone de saisie */
.chatbot120-input-area {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.chatbot120-input-area textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    resize: none;
    font-size: 14px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    box-sizing: border-box;
}

.chatbot120-input-area textarea:focus {
    outline: none;
    border-color: #667eea;
}

.chatbot120-send-btn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: #667eea;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chatbot120-send-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.chatbot120-send-btn svg {
    color: white;
}

/* Notifications */
.chatbot120-notification {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.chatbot120-notification-success {
    background: #4caf50;
}

.chatbot120-notification-error {
    background: #f44336;
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot120-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .chatbot120-icon {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
    }
}

/* Scrollbar personnalisée */
.chatbot120-messages::-webkit-scrollbar,
.chatbot120-faq-list::-webkit-scrollbar {
    width: 6px;
}

.chatbot120-messages::-webkit-scrollbar-track,
.chatbot120-faq-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chatbot120-messages::-webkit-scrollbar-thumb,
.chatbot120-faq-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.chatbot120-messages::-webkit-scrollbar-thumb:hover,
.chatbot120-faq-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}
