/* ============================================
   CHATBOT + TRACKING + CAMPAGNE EMAIL
   File: assets/css/chatbot-tracking.css
   ============================================ */

/* ============================================
   1. CHATBOT WIDGET STYLES
   ============================================ */

.chatbot-widget {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: none;
    flex-direction: column;
    z-index: 9999;
    border: 1px solid #e0e0e0;
}

.chatbot-widget.active {
    display: flex;
}

.chatbot-header {
    background: linear-gradient(135deg, #0066CC, #0052a3);
    color: white;
    padding: 15px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-family: Arial, sans-serif;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    transition: opacity 0.3s ease;
}

.chatbot-close:hover {
    opacity: 0.8;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: white;
}

.chatbot-message {
    display: flex;
    margin-bottom: 10px;
    font-family: Arial, sans-serif;
}

.chatbot-message.bot p {
    background: #f0f0f0;
    padding: 10px 15px;
    border-radius: 8px;
    max-width: 80%;
    font-size: 14px;
    margin: 0;
    color: #333;
    line-height: 1.4;
}

.chatbot-message.user p {
    background: #0066CC;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    max-width: 80%;
    font-size: 14px;
    margin: 0;
    margin-left: auto;
    line-height: 1.4;
}

.chatbot-input-area {
    display: flex;
    gap: 8px;
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    background: white;
    border-radius: 0 0 12px 12px;
}

#chatbot-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    transition: border-color 0.3s ease;
}

#chatbot-input:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

#chatbot-send {
    background: #0066CC;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    font-family: Arial, sans-serif;
    transition: background 0.3s ease;
}

#chatbot-send:hover {
    background: #0052a3;
}

#chatbot-send:active {
    opacity: 0.9;
}

/* ============================================
   2. CHATBOT TOGGLE BUTTON
   ============================================ */

.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0066CC, #FF9900);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 9998;
    font-family: Arial, sans-serif;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.5);
}

.chatbot-toggle:active {
    transform: scale(0.95);
}

.chatbot-toggle.hidden {
    display: none;
}

/* ============================================
   3. PROSPECTION POPUP STYLES
   ============================================ */

.prospection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.prospection-popup {
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideInPopup 0.4s ease;
}

@keyframes slideInPopup {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prospection-popup h2 {
    color: #0066CC;
    margin-bottom: 15px;
    font-size: 24px;
    font-family: Arial, sans-serif;
}

.prospection-popup p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

#prospection-form {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#prospection-form input,
#prospection-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    transition: border-color 0.3s ease;
}

#prospection-form input:focus,
#prospection-form textarea:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

#prospection-form textarea {
    resize: vertical;
    min-height: 80px;
}

#prospection-form button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #0066CC, #FF9900);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    font-family: Arial, sans-serif;
    transition: all 0.3s ease;
}

#prospection-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3);
}

#prospection-form button:active {
    transform: translateY(0);
}

.prospection-later {
    width: 100%;
    padding: 12px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: Arial, sans-serif;
    font-size: 14px;
    transition: all 0.3s ease;
}

.prospection-later:hover {
    background: #e0e0e0;
}

.prospection-later:active {
    opacity: 0.9;
}

/* ============================================
   4. RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 600px) {
    .chatbot-widget {
        width: 90vw;
        height: 400px;
        bottom: 80px;
        right: 5%;
        left: 5%;
    }

    .chatbot-toggle {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
        font-size: 24px;
    }

    .prospection-popup {
        padding: 30px 20px;
        border-radius: 12px;
    }

    .prospection-popup h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .prospection-popup p {
        font-size: 13px;
        margin-bottom: 15px;
    }

    #prospection-form {
        gap: 12px;
    }

    #prospection-form input,
    #prospection-form textarea {
        padding: 10px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .chatbot-widget {
        width: 95vw;
        height: 350px;
        bottom: 70px;
        right: 2.5%;
        left: 2.5%;
    }

    .chatbot-message.bot p,
    .chatbot-message.user p {
        max-width: 90%;
        font-size: 13px;
    }

    .chatbot-toggle {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .prospection-popup {
        width: 95%;
        padding: 20px;
    }
}

/* ============================================
   5. ANIMATIONS ET TRANSITIONS
   ============================================ */

/* Scroll smooth des messages */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Animation de fade-in */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.chatbot-widget {
    animation: fadeIn 0.3s ease;
}

/* Suppression de l'outline par défaut */
button:focus {
    outline: none;
}

input:focus {
    outline: none;
}

textarea:focus {
    outline: none;
}
