/*=================================
    Micro-Interactions CSS WeAreBrand
==================================*/

/* ===== WAVE EFFECT ===== */
.wave-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    pointer-events: none;
}

/* ===== CUSTOM TOOLTIP ===== */
.custom-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
}

.custom-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0,0,0,0.9);
}

/* ===== SNAP INDICATOR ===== */
.snap-indicator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.snap-dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.snap-dot:hover {
    background: rgba(255,255,255,0.6);
    transform: scale(1.3);
}

/* ===== VELOCITY INDICATOR ===== */
.velocity-indicator {
    position: fixed;
    top: 0;
    right: 0;
    width: 5px;
    height: 0;
    background: linear-gradient(180deg, 
        rgba(255,255,255,1), 
        rgba(255,255,255,0.3)
    );
    z-index: 9999;
    pointer-events: none;
}

/* ===== SCROLL PARTICLES ===== */
.scroll-particle {
    position: fixed;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
}

/* ===== SELECTION INDICATOR ===== */
.selection-indicator {
    position: fixed;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 5px;
    pointer-events: none;
    z-index: 9999;
}

/* ===== FORM ENHANCEMENTS ===== */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 10px 30px rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

input,
textarea,
select {
    transition: all 0.3s ease;
}

/* ===== BUTTON STATES ===== */
.th-btn:active {
    transform: scale(0.95);
}

.th-btn:focus {
    box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}

/* ===== LINK STATES ===== */
a {
    transition: all 0.3s ease;
}

a:active {
    transform: scale(0.98);
}

/* ===== CARD FLIP ===== */
[data-flip-card] {
    transform-style: preserve-3d;
    perspective: 1000px;
    cursor: pointer;
}

[data-flip-card].flipped {
    transform: rotateY(180deg);
}

/* ===== PROGRESS CIRCLES ===== */
[data-progress-circle] {
    position: relative;
    display: inline-block;
}

/* ===== PARALLAX LAYERS ===== */
[data-parallax-layer] {
    will-change: transform;
}

/* ===== IMAGE TILT ===== */
.course-card_img,
.img-box1 img {
    transform-style: preserve-3d;
    will-change: transform;
}

/* ===== ICON EFFECTS ===== */
.info-box_icon,
.service-box_icon,
.social-links a {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ===== BADGE ENHANCED ===== */
.badge {
    transition: all 0.3s ease;
    will-change: transform, box-shadow;
}

/* ===== SUCCESS/ERROR STATES ===== */
.success-state {
    border-color: #4caf50 !important;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
}

.error-state {
    border-color: #f44336 !important;
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.3);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* ===== LOADING STATE ===== */
.loading-state {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== DISABLED STATE ===== */
.disabled,
[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== HOVER FEEDBACK ===== */
.hover-feedback {
    transition: all 0.2s ease;
}

.hover-feedback:hover {
    filter: brightness(1.1);
}

/* ===== CLICK FEEDBACK ===== */
.click-feedback:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 991px) {
    .snap-indicator,
    .velocity-indicator,
    .scroll-particle {
        display: none;
    }
    
    /* Simplifier les effets de hover sur mobile */
    .course-card_img,
    .img-box1 img {
        transform-style: flat;
    }
}

@media (max-width: 767px) {
    .custom-tooltip {
        display: none;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .wave-effect,
    .scroll-particle,
    .velocity-indicator,
    .badge {
        animation: none !important;
    }
    
    input:focus,
    textarea:focus {
        transition: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .snap-indicator,
    .velocity-indicator,
    .scroll-particle,
    .custom-tooltip,
    .selection-indicator {
        display: none !important;
    }
}
