/* =================================================================
   PREMIUM ENHANCEMENTS - Le meilleur portfolio jamais vu
   Fonctionnalités avancées et micro-interactions
   ================================================================= */



/* ============================================= */
/* SMOOTH SCROLL PREMIUM */
/* ============================================= */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }

    * {
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* ============================================= */
/* PARALLAX EFFECT - Effet de profondeur        */
/* ============================================= */
.parallax-wrapper {
    perspective: 1000px;
    position: relative;
}

.parallax-layer {
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
}

/* ============================================= */
/* GLOW EFFECTS - Effets lumineux               */
/* ============================================= */
.glow-on-hover {
    position: relative;
    z-index: 0;
    overflow: hidden;
}

.glow-on-hover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(106, 17, 203, 0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.glow-on-hover:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================= */
/* MAGNETIC BUTTONS - Boutons magnétiques       */
/* ============================================= */
.btn-magnetic {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
}

.btn-magnetic:hover {
    transform: scale(1.05);
}

/* ============================================= */
/* TEXT REVEAL ANIMATION */
/* ============================================= */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.text-reveal {
    animation: textReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.text-reveal-delay-1 {
    animation-delay: 0.1s;
}

.text-reveal-delay-2 {
    animation-delay: 0.2s;
}

.text-reveal-delay-3 {
    animation-delay: 0.3s;
}

.text-reveal-delay-4 {
    animation-delay: 0.4s;
}

/* ============================================= */
/* PROJECT CARD HOVER 3D */
/* ============================================= */
.project-card-3d {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
}

.project-card-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
    box-shadow:
        0 30px 60px -15px rgba(106, 17, 203, 0.3),
        0 0 40px -10px rgba(37, 117, 252, 0.2);
}

/* ============================================= */
/* GRADIENT TEXT ANIMATION */
/* ============================================= */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-text-animated {
    background: linear-gradient(-45deg,
            #6a11cb,
            #2575fc,
            #8a3ffc,
            #3391ff);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

/* ============================================= */
/* SKILL BAR PREMIUM ANIMATION */
/* ============================================= */
.skill-progress {
    position: relative;
    overflow: hidden;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* ============================================= */
/* TESTIMONIAL CARD PREMIUM */
/* ============================================= */
.testimonial-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.testimonial-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.05) 0%, rgba(37, 117, 252, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: -1;
}

.testimonial-card:hover::after {
    opacity: 1;
}

/* ============================================= */
/* COUNT-UP ANIMATION FOR STATS */
/* ============================================= */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-number,
.stat-number-large {
    animation: countUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ============================================= */
/* SCROLL PROGRESS INDICATOR */
/* ============================================= */
.reading-progress {
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(106, 17, 203, 0.5);
}

/* ============================================= */
/* CTA BANNER PREMIUM */
/* ============================================= */
.contact-cta-banner {
    background: linear-gradient(135deg, rgba(106, 17, 203, 0.1) 0%, rgba(37, 117, 252, 0.1) 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    padding: 3rem;
    margin-bottom: 2rem;
}

.contact-cta-banner::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border-radius: var(--border-radius-md);
    z-index: -1;
    opacity: 0.5;
}

.cta-banner-content {
    text-align: center;
}

.cta-banner-content h3 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-banner-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ============================================= */
/* LOADING ANIMATION PREMIUM */
/* ============================================= */
.loading-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 1rem;
}

.loading-bar::after {
    content: '';
    display: block;
    width: 30%;
    height: 100%;
    background: var(--gradient-text);
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(400%);
    }
}

/* ============================================= */
/* FLOATING ANIMATION PREMIUM */
/* ============================================= */
@keyframes floatPremium {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-20px) rotate(5deg);
    }

    50% {
        transform: translateY(-10px) rotate(0deg);
    }

    75% {
        transform: translateY(-20px) rotate(-5deg);
    }
}

.float-premium {
    animation: floatPremium 6s ease-in-out infinite;
}

/* ============================================= */
/* GLASS MORPHISM ENHANCED */
/* ============================================= */
.glass-premium {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 8px 32px 0 rgba(106, 17, 203, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .glass-premium {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================= */
/* RESPONSIVE UTILITIES */
/* ============================================= */
@media (max-width: 768px) {
    .contact-cta-banner {
        padding: 2rem 1rem;
    }

    .cta-banner-actions {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }
}

/* ============================================= */
/* FOCUS VISIBLE - Accessibilité Premium */
/* ============================================= */
*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ============================================= */
/* REDUCED MOTION - Respecter les préférences */
/* ============================================= */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================= */
/* PRINT STYLES - Portfolio imprimable */
/* ============================================= */
@media print {

    .header,
    .footer,
    .scroll-indicator,
    .floating-buttons,
    .theme-toggle,
    .language-selector {
        display: none !important;
    }

    * {
        background: white !important;
        color: black !important;
    }

    .section {
        page-break-inside: avoid;
    }
}

/* ============================================= */
/* HIGH CONTRAST MODE - Accessibilité */
/* ============================================= */
@media (prefers-contrast: high) {
    * {
        border-color: currentColor !important;
    }

    .section-badge,
    .btn {
        border-width: 2px !important;
    }
}