/* ============================================
   🧭 STYLES DU GUIDE INTERACTIF TRADEGURU
   ============================================ */

/* Container principal */
#guide-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* Overlay avec trou (clip-path) */
.guide-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9990;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.guide-overlay.active {
    opacity: 1;
    pointer-events: none; /* ✅ CRITIQUE : L'overlay ne bloque RIEN, le trou est visuel */
}

.guide-highlight {
    position: fixed;
    border: 4px solid #00ff88;
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.8);
    pointer-events: none !important; /* ✅ CRITIQUE : Ne doit JAMAIS bloquer */
    z-index: 9995;
    opacity: 0;
    transition: all 0.6s ease;
    animation: pulse 2s ease-in-out infinite;
}

.guide-highlight.active {
    opacity: 1;
    pointer-events: none !important; /* ✅ AJOUTE aussi ici */
}
/* ✅ SUPPRIMÉ : Déclaration en double */

/* TradeGuru Avatar - utilise la classe existante */
.guide-guru {
    position: fixed;
    width: 150px;
    height: 150px;
    z-index: 10003;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.guide-guru.active {
    opacity: 1;
    transform: scale(1);
    animation: levitation 3s ease-in-out infinite;
}

@keyframes levitation {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1); }
}

@keyframes levitation-small {
    0%, 100% { transform: translateY(15px); }
    50% { transform: translateY(7px); }
}

/* Utilise ta classe .guru-avatar existante qui contient déjà le logo */
.guide-guru .guru-avatar {
    width: 100%;
    height: 100%;
    /* Tes styles existants s'appliquent automatiquement */
}

/* Bulle de dialogue */
.guide-bubble {
    position: fixed;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 20px;
    max-width: 320px;
    min-width: 280px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    z-index: 10002;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
}

.guide-bubble.active {
    opacity: 1;
    transform: scale(1);
}

.guide-bubble-content {
    margin-bottom: 15px;
}

.guide-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #ffffff !important;
}

.guide-text {
    font-size: 14px;
    line-height: 1.5;
    color: #ffffff !important;
    margin: 0;
}

.guide-bubble-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: nowrap;
}

/* Boutons */
.guide-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    min-width: 40px;
}

.guide-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

.guide-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.guide-btn-next {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.guide-btn-skip {
    background: rgba(255, 80, 80, 0.3);
    border-color: rgba(255, 80, 80, 0.6);
}

.guide-btn-skip:hover {
    background: rgba(255, 80, 80, 0.5);
}

/* Progression */
.guide-progress {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 11px;
    color: white;
    flex-shrink: 0;
}

/* Highlight */
.guide-highlight {
    position: fixed;
    border: 4px solid #00ff88;
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(0, 255, 136, 0.8);
    pointer-events: none;
    z-index: 9995;
    opacity: 0;
    transition: all 0.6s ease;
    animation: pulse 2s ease-in-out infinite;
}

.guide-highlight.active {
    opacity: 1;
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 0 40px rgba(0, 255, 136, 0.8);
    }
    50% { 
        box-shadow: 0 0 60px rgba(0, 255, 136, 1);
    }
}

/* 
Curseur animé 
.guide-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 10001;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translate(-50%, -50%);
}

.guide-cursor.active {
    opacity: 1;
}

.guide-cursor-icon {
    width: 100%;
    height: 100%;
    background: white;
    clip-path: polygon(0 0, 0 100%, 25% 75%, 40% 100%, 50% 90%, 35% 65%, 100% 50%);
    filter: drop-shadow(0 5px 15px rgba(255, 255, 255, 0.8));
    animation: clickAnimation 1.5s ease-in-out infinite;
}
*/
@keyframes clickAnimation {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.85); }
}

/* Bouton 🧭 dans les headers */
.guide-trigger {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    z-index: 10;
}

.guide-trigger:hover {
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
    animation: rotate 0.6s ease;
}

@keyframes rotate {
    0%, 100% { transform: translateY(-50%) scale(1.15) rotate(0deg); }
    50% { transform: translateY(-50%) scale(1.15) rotate(180deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .guide-bubble {
        max-width: 90vw;
        min-width: auto;
        padding: 20px;
    }
    
    .guide-title {
        font-size: 18px;
    }
    
    .guide-text {
        font-size: 14px;
    }
    
    .guide-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .guide-guru {
        width: 100px;
        height: 100px;
    }
    
    .guide-guru-avatar {
        font-size: 50px;
    }
    
    .guide-trigger {
        right: 40px;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }
    
    .guide-bubble-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .guide-btn {
        width: 100%;
    }
}

/* Animation d'entrée pour le container */
@keyframes fadeInGuide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#guide-container.active {
    animation: fadeInGuide 0.5s ease;
}
