/* SAY ELEC - Premium Animations & Interactions */

/* ============================================
   TRUST BADGES
   ============================================ */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.trust-badge:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.trust-badge-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.trust-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.trust-badge-text strong {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.trust-badge-text span {
    color: var(--gray-400);
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .trust-badges {
        justify-content: center;
    }

    .trust-badge {
        flex: 1 1 calc(50% - var(--space-md));
    }
}

/* ============================================
   SERVICE CARD IMAGES
   ============================================ */
.service-card.has-image {
    position: relative;
    overflow: hidden;
}

.service-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    overflow: hidden;
    opacity: 0.15;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(50%);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-image {
    opacity: 0.25;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.service-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--gray-900) 0%, transparent 100%);
    z-index: 1;
}

/* ============================================
   DROPDOWN MENU
   ============================================ */
.nav-item {
    position: relative;
}

.nav-item.has-dropdown>.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dropdown-arrow {
    transition: transform var(--transition-base);
}

.nav-item.has-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 280px;
    padding: var(--space-md);
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid var(--gray-700);
    border-radius: var(--radius-xl);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
}

.nav-item.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(4px);
}

.dropdown-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.dropdown-item div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-item strong {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.dropdown-item span {
    color: var(--gray-400);
    font-size: 0.8rem;
}


/* ============================================
   3D CARD HOVER EFFECT
   ============================================ */
.service-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-style: preserve-3d;
}

.service-card:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(59, 130, 246, 0.15);
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg,
            rgba(59, 130, 246, 0.1) 0%,
            transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

.service-card:hover::before {
    opacity: 1;
}

/* ============================================
   BUTTON EFFECTS
   ============================================ */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ============================================
   SCROLL REVEAL - TOUJOURS VISIBLE
   (animations désactivées pour stabilité)
   ============================================ */

/* Tous les éléments sont TOUJOURS VISIBLES */
[data-animate],
[data-animate="fade-up"],
[data-animate="fade-left"],
[data-animate="fade-right"],
[data-animate="zoom-in"],
[data-animate].animated {
    opacity: 1 !important;
    transform: none !important;
}

/* Délais stagger (inactifs mais conservés pour le futur) */
[data-delay="100"] {
    transition-delay: 0.1s;
}

[data-delay="200"] {
    transition-delay: 0.2s;
}

[data-delay="300"] {
    transition-delay: 0.3s;
}

[data-delay="400"] {
    transition-delay: 0.4s;
}

[data-delay="500"] {
    transition-delay: 0.5s;
}

/* Reveal fallback */
.reveal {
    opacity: 1 !important;
    transform: none !important;
}

/* Reveal fallback - TOUJOURS VISIBLE */
.reveal {
    opacity: 1 !important;
    transform: none !important;
}

/* ============================================
   LIGHTNING REVEAL EFFECT
   Inspiré de l'éclair du logo SAY ELEC
   ============================================ */
.lightning-reveal {
    position: relative;
    overflow: hidden;
}

.lightning-reveal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg,
            transparent 40%,
            rgba(59, 130, 246, 0.3) 45%,
            rgba(255, 255, 255, 0.8) 50%,
            rgba(59, 130, 246, 0.3) 55%,
            transparent 60%);
    transform: translateX(-100%) rotate(35deg);
    transition: none;
    pointer-events: none;
    z-index: 10;
}

.lightning-reveal:hover::before {
    animation: lightningFlash 0.6s ease-out forwards;
}

@keyframes lightningFlash {
    0% {
        transform: translateX(-100%) rotate(35deg);
    }

    100% {
        transform: translateX(100%) rotate(35deg);
    }
}

/* Stagger children transition delays */
.stagger-children>*:nth-child(1) {
    transition-delay: 0s;
}

.stagger-children>*:nth-child(2) {
    transition-delay: 0.1s;
}

.stagger-children>*:nth-child(3) {
    transition-delay: 0.15s;
}

.stagger-children>*:nth-child(4) {
    transition-delay: 0.2s;
}

/* ============================================
   SNAP SCROLL
   ============================================ */
html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

.hero,
.section {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
}

/* ============================================
   DOT NAVIGATION
   ============================================ */
.dot-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dot-nav-item {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.dot-nav-item:hover {
    background: rgba(59, 130, 246, 0.5);
    transform: scale(1.3);
}

.dot-nav-item.active {
    background: var(--primary-500);
    border-color: white;
    transform: scale(1.2);
}

.dot-nav-item::before {
    content: attr(data-label);
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    padding: 4px 12px;
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    color: white;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.dot-nav-item:hover::before {
    opacity: 1;
    visibility: visible;
    right: 28px;
}

@media (max-width: 768px) {
    .dot-nav {
        display: none;
    }
}

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
    z-index: 1001;
    transition: width 0.1s ease-out;
}

/* ============================================
   CURSOR GLOW
   ============================================ */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

body:hover .cursor-glow {
    opacity: 1;
}

/* ============================================
   TESTIMONIAL & CARD ANIMATIONS
   ============================================ */
.testimonial-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--primary-600);
}

.card-icon {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card:hover .card-icon {
    transform: scale(1.2) rotate(10deg);
}

/* ============================================
   HERO ANIMATIONS
   ============================================ */
.hero-content {
    animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-stats .stat {
    opacity: 0;
    animation: statsFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-stats .stat:nth-child(1) {
    animation-delay: 0.5s;
}

.hero-stats .stat:nth-child(2) {
    animation-delay: 0.65s;
}

.hero-stats .stat:nth-child(3) {
    animation-delay: 0.8s;
}

@keyframes statsFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}