/**
 * ═══════════════════════════════════════════════════════════════════════════
 * RELAY ULTRA PRO - SMART FEATURES CSS
 * ═══════════════════════════════════════════════════════════════════════════
 * 
 * Styles pour les 4 Smart Features
 * Couleurs Mondial Relay :
 * - Principal : #96154a
 * - Hover : #c41e5e
 * - Vert : #4caf50
 * - Gris : #f8f9fa
 * 
 * @version 1.0.0
 * @date 29/11/2025
 * 
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════════════════
   1. SMART FLOW - BULLES D'AIDE
   ═══════════════════════════════════════════════════════════════════════════ */

.smart-help-bubble {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
}

.smart-help-bubble.show {
    opacity: 1;
    transform: translateY(0);
}

.smart-help-content {
    background: white;
    border: 2px solid #96154a;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(150, 21, 74, 0.2);
    max-width: 320px;
    position: relative;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.smart-help-content::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 30px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

.smart-help-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.smart-help-close:hover {
    color: #96154a;
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. FAKE SUPPORT CHAT
   ═══════════════════════════════════════════════════════════════════════════ */

.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

/* Bouton du chat */
.chat-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #96154a 0%, #c41e5e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(150, 21, 74, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(150, 21, 74, 0.4);
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Fenêtre du chat */
.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
}

.chat-window.open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

/* Header du chat */
.chat-header {
    background: linear-gradient(135deg, #96154a 0%, #c41e5e 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chat-agent-name {
    font-weight: 600;
    font-size: 15px;
}

.chat-agent-status {
    font-size: 12px;
    opacity: 0.9;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.chat-close:hover {
    opacity: 0.8;
}

/* Messages du chat */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.bot {
    flex-direction: row;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.chat-message-bubble {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 70%;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.chat-message.user .chat-message-bubble {
    background: #96154a;
    color: white;
}

/* Input du chat */
.chat-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    border-radius: 0 0 16px 16px;
}

.chat-input {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input:focus {
    border-color: #96154a;
}

.chat-send {
    width: 40px;
    height: 40px;
    background: #96154a;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.chat-send:hover {
    background: #c41e5e;
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. EXIT INTENT POPUP
   ═══════════════════════════════════════════════════════════════════════════ */

.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.exit-popup-overlay.show {
    opacity: 1;
}

.exit-popup {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.exit-popup-overlay.show .exit-popup {
    transform: scale(1);
}

.exit-popup-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.exit-popup-title {
    color: #96154a;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.exit-popup-text {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.exit-popup-timer {
    background: #fff3cd;
    border: 2px dashed #ffc107;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 30px;
    font-size: 16px;
    color: #856404;
}

.exit-popup-btn-continue {
    background: #96154a;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-bottom: 12px;
    transition: background 0.3s;
}

.exit-popup-btn-continue:hover {
    background: #c41e5e;
}

.exit-popup-btn-close {
    background: none;
    color: #999;
    border: none;
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s;
}

.exit-popup-btn-close:hover {
    color: #666;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .smart-help-bubble {
        right: 20px;
        bottom: 90px;
    }
    
    .smart-help-content {
        max-width: calc(100vw - 40px);
    }
    
    .chat-window {
        width: calc(100vw - 40px);
        height: 80vh;
        max-height: 600px;
    }
    
    .exit-popup {
        padding: 30px 20px;
    }
    
    .exit-popup-title {
        font-size: 24px;
    }
    
    .exit-popup-text {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .chat-button {
        width: 56px;
        height: 56px;
    }
    
    .chat-window {
        bottom: 76px;
        width: calc(100vw - 20px);
        right: -10px;
    }
}

