/**
 * 🚀 Styles pour les Innovations EPROGCONSULTING
 * Chatbot IA, ROI Calculator, Diagnostic Visuel, Dashboard Client
 */

/* ===== CHATBOT IA ===== */
#eprog-chatbot {
    z-index: 9999;
}

#eprog-chatbot #chat-toggle {
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(10px);
}

#eprog-chatbot #chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
}

#eprog-chatbot #chat-window {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

#eprog-chatbot .quick-answer:hover {
    transform: translateY(-2px);
    background: rgba(59, 130, 246, 0.2);
}

#eprog-chatbot #chat-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.5) transparent;
}

#eprog-chatbot #chat-messages::-webkit-scrollbar {
    width: 6px;
}

#eprog-chatbot #chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#eprog-chatbot #chat-messages::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 3px;
}

/* Animation d'apparition pour les bulles de chat */
#eprog-chatbot #chat-messages > div {
    animation: chatMessageSlide 0.3s ease-out;
}

@keyframes chatMessageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ROI CALCULATOR ===== */
.calculator-step {
    transition: all 0.5s ease-in-out;
}

.calculator-step.hidden {
    opacity: 0;
    transform: translateY(20px);
}

.profile-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.2);
}

.profile-btn.selected {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(6, 182, 212, 0.3));
    border-color: #3B82F6;
    transform: translateY(-3px);
}

/* Sliders personnalisés */
input[type="range"] {
    appearance: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right, #3B82F6, #06B6D4);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    background: linear-gradient(135deg, #3B82F6, #06B6D4);
    height: 20px;
    width: 20px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

input[type="range"]::-moz-range-thumb {
    background: linear-gradient(135deg, #3B82F6, #06B6D4);
    height: 20px;
    width: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* ===== DIAGNOSTIC VISUEL ===== */
.diagnostic-type-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.diagnostic-type-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.diagnostic-type-btn:hover::before {
    left: 100%;
}

.diagnostic-type-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Animation de la barre de progression */
#progress-bar {
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== DASHBOARD CLIENT ===== */
.stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.stat-card:hover::before {
    transform: translateX(100%);
}

.stat-card:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.health-item {
    transition: all 0.2s ease;
}

.health-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(5px);
}

/* Animations pour les indicateurs de statut */
.status-indicator {
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ===== ANIMATIONS GLOBALES ===== */
.gradient-text {
    background: linear-gradient(135deg, #3B82F6, #06B6D4, #8B5CF6);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Effet de brillance sur les boutons principaux */
.innovation-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #3B82F6, #06B6D4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.innovation-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.innovation-btn:hover::before {
    left: 100%;
}

.innovation-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #eprog-chatbot #chat-window {
        width: calc(100vw - 2rem);
        right: 1rem;
        left: 1rem;
        bottom: 5rem;
    }
    
    .calculator-step .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

/* ===== DARK MODE IMPROVEMENTS ===== */
[data-theme="dark"] .innovation-component {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(59, 130, 246, 0.2);
}

[data-theme="light"] .innovation-component {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(59, 130, 246, 0.3);
    color: #1e293b;
}

/* ===== MICRO-INTERACTIONS ===== */
.micro-innovation-hover {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.micro-innovation-hover:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.micro-innovation-click:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* ===== LOADING STATES ===== */
.loading-shimmer {
    background: linear-gradient(90deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(59, 130, 246, 0.3) 50%, 
        rgba(59, 130, 246, 0.1) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===== ACCESSIBILITÉ ===== */
.innovation-component:focus-within {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .innovation-component {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    #eprog-chatbot {
        display: none !important;
    }
}
