/**
 * WATERRE - Animations CSS
 * Effets visuels premium
 * Version: 1.0
 */

/* ============================================
   AOS OVERRIDES
   ============================================ */
[data-aos] {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-aos="fade-up"] {
    transform: translateY(40px);
}

[data-aos="fade-down"] {
    transform: translateY(-40px);
}

[data-aos="fade-right"] {
    transform: translateX(-40px);
}

[data-aos="fade-left"] {
    transform: translateX(40px);
}

/* ============================================
   REVEAL ON SCROLL
   ============================================ */
.reveal-section {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-section:nth-child(2) { transition-delay: 0.1s; }
.reveal-section:nth-child(3) { transition-delay: 0.2s; }
.reveal-section:nth-child(4) { transition-delay: 0.3s; }
.reveal-section:nth-child(5) { transition-delay: 0.4s; }
.reveal-section:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   COUNTER ANIMATION
   ============================================ */
.counter-animated {
    display: inline-block;
    position: relative;
}

.counter-animated::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--turquoise);
    border-radius: var(--radius-full);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s ease 0.8s;
}

.counter-animated.counted::after {
    transform: scaleX(1);
}

/* ============================================
   FLOATING ANIMATION
   ============================================ */
.floating {
    animation: floatAnimation 6s ease-in-out infinite;
}

.floating-slow {
    animation: floatAnimation 8s ease-in-out infinite;
}

.floating-delay-1 {
    animation-delay: 1s;
}

.floating-delay-2 {
    animation-delay: 2s;
}

.floating-delay-3 {
    animation-delay: 3s;
}

@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* ============================================
   GLOW PULSE
   ============================================ */
.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 184, 196, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 184, 196, 0.4);
    }
}

/* ============================================
   GRADIENT TEXT
   ============================================ */
.gradient-text {
    background: linear-gradient(135deg, var(--turquoise), var(--yellow-solar));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-blue {
    background: linear-gradient(135deg, var(--blue-deep), var(--turquoise));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   PARALLAX
   ============================================ */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    will-change: transform;
}

/* ============================================
   HOVER EFFECTS
   ============================================ */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow-turquoise);
}

/* ============================================
   SMOOTH REVEAL
   ============================================ */
.smooth-reveal {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.smooth-reveal.revealed {
    clip-path: inset(0 0 0 0);
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--gray-light) 25%,
        #E0E6ED 50%,
        var(--gray-light) 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text:last-child {
    width: 70%;
}

.skeleton-image {
    width: 100%;
    height: 200px;
}

.skeleton-card {
    width: 100%;
    height: 300px;
}

/* ============================================
   WATER DROP EFFECT
   ============================================ */
.water-drop-effect {
    position: relative;
    overflow: hidden;
}

.water-drop-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(0, 184, 196, 0.1) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity var(--transition-slow);
    pointer-events: none;
}

.water-drop-effect:hover::before {
    opacity: 1;
    animation: waterRipple 2s ease-out infinite;
}

@keyframes waterRipple {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ============================================
   LIGHT BEAM
   ============================================ */
.light-beam {
    position: relative;
    overflow: hidden;
}

.light-beam::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: rotate(25deg);
    animation: lightBeamSweep 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes lightBeamSweep {
    0% {
        left: -50%;
    }
    100% {
        left: 150%;
    }
}

/* ============================================
   BREATHING CIRCLE
   ============================================ */
.breathing-circle {
    animation: breathingCircle 4s ease-in-out infinite;
}

@keyframes breathingCircle {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 184, 196, 0.4);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(0, 184, 196, 0);
    }
}

/* ============================================
   TEXT APPEAR
   ============================================ */
.text-appear {
    opacity: 0;
    transform: translateY(20px);
    animation: textAppear 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes textAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-appear-delay-1 { animation-delay: 0.2s; }
.text-appear-delay-2 { animation-delay: 0.4s; }
.text-appear-delay-3 { animation-delay: 0.6s; }
.text-appear-delay-4 { animation-delay: 0.8s; }
.text-appear-delay-5 { animation-delay: 1s; }

/* ============================================
   LINE DRAWING
   ============================================ */
.line-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: lineDrawAnimation 2s ease forwards;
}

@keyframes lineDrawAnimation {
    to {
        stroke-dashoffset: 0;
    }
}

/* ============================================
   ROTATING BORDER
   ============================================ */
.rotating-border {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.rotating-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(
        from 0deg,
        var(--turquoise),
        var(--yellow-solar),
        var(--turquoise)
    );
    border-radius: inherit;
    animation: rotateBorder 4s linear infinite;
    z-index: -1;
}

.rotating-border::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: var(--white);
    border-radius: inherit;
    z-index: -1;
}

@keyframes rotateBorder {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   PULSE DOT
   ============================================ */
.pulse-dot {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--turquoise);
}

.pulse-dot::before,
.pulse-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--turquoise);
    animation: pulseDot 2s ease-out infinite;
}

.pulse-dot::after {
    animation-delay: 1s;
}

@keyframes pulseDot {
    0% {
        width: 12px;
        height: 12px;
        opacity: 0.6;
    }
    100% {
        width: 40px;
        height: 40px;
        opacity: 0;
    }
}

/* ============================================
   MAGNETIC BUTTON
   ============================================ */
.magnetic-btn {
    transition: transform var(--transition-spring);
}

.magnetic-btn:hover {
    transform: scale(1.05);
}

/* ============================================
   PERSPECTIVE CARD
   ============================================ */
.perspective-card {
    transform-style: preserve-3d;
    transition: transform var(--transition-base);
}

.perspective-card:hover {
    transform: rotateY(5deg) rotateX(-5deg);
}

/* ============================================
   PARTICLES BACKGROUND
   ============================================ */
.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--turquoise);
    opacity: 0;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px) scale(0);
        opacity: 0;
    }
}

/* ============================================
   SECTION TRANSITIONS
   ============================================ */
.section-fade-in {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   CURSOR FOLLOWER
   ============================================ */
.cursor-follower {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 2px solid var(--turquoise);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: width 0.3s ease, height 0.3s ease, 
                background 0.3s ease, border-color 0.3s ease;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.cursor-follower.hover {
    width: 60px;
    height: 60px;
    background: rgba(0, 184, 196, 0.1);
    border-color: var(--yellow-solar);
}

/* ============================================
   NOISE OVERLAY (Optional texture)
   ============================================ */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.03;
    z-index: 9998;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
}

/* ============================================
   HERO TITLE REVEAL
   ============================================ */
.title-reveal {
    overflow: hidden;
}

.title-reveal span {
    display: block;
    transform: translateY(100%);
    animation: titleReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes titleReveal {
    to {
        transform: translateY(0);
    }
}

.title-reveal span:nth-child(1) { animation-delay: 0.1s; }
.title-reveal span:nth-child(2) { animation-delay: 0.2s; }
.title-reveal span:nth-child(3) { animation-delay: 0.3s; }

/* ============================================
   DASHED BORDER ANIMATION
   ============================================ */
.dashed-border {
    border: 2px dashed var(--turquoise);
    border-radius: var(--radius-lg);
    animation: dashedRotate 20s linear infinite;
}

@keyframes dashedRotate {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   SLIDE IN NOTIFICATION
   ============================================ */
.slide-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-xl);
    transform: translateX(120%);
    transition: transform var(--transition-spring);
    z-index: 999;
    border-left: 4px solid var(--turquoise);
}

.slide-notification.show {
    transform: translateX(0);
}

.slide-notification.success {
    border-left-color: #4CAF50;
}

.slide-notification.error {
    border-left-color: #f44336;
}