/*=================================
    Page Transitions CSS WeAreBrand Style
==================================*/

/* ===== PAGE TRANSITION OVERLAY ===== */
.page-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    pointer-events: none;
}

/* ===== LOADING SPINNER ===== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#page-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(128, 0, 128, 0.98), 
        rgba(75, 0, 130, 0.98)
    );
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 30px;
}

.spinner-circle {
    animation: spin 1s linear infinite;
}

/* ===== SCROLL INDICATOR ===== */
.infinite-scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 60px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    z-index: 100;
    pointer-events: none;
}

/* ===== VIEWPORT BORDER ===== */
.viewport-border {
    position: fixed;
    inset: 15px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    pointer-events: none;
    z-index: 9998;
    transition: border-color 0.5s ease;
}

/* ===== LAZY LOAD STATES ===== */
[data-lazy-animate="fade"] {
    opacity: 0;
}

[data-lazy-animate="slide"] {
    opacity: 0;
    transform: translateX(-50px);
}

[data-lazy-animate="scale"] {
    opacity: 0;
    transform: scale(0.8);
}

/* ===== SCROLL DIRECTION STATES ===== */
body[data-scroll-direction="down"] .header-layout1 {
    transform: translateY(-100%);
}

body[data-scroll-direction="up"] .header-layout1 {
    transform: translateY(0);
}

.header-layout1 {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ===== SECTION STATES ===== */
body[data-active-section] {
    transition: background-color 1s ease;
}

/* ===== REVEAL SEQUENCE ===== */
[data-reveal-sequence] [data-reveal-item] {
    opacity: 0;
    transform: translateY(60px);
}

/* ===== SCROLL SNAP ===== */
[data-scroll-snap] {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

html.scroll-snap-enabled {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

/* ===== BLUR STATES ===== */
.content-blurred {
    filter: blur(5px);
    transition: filter 0.4s ease;
    pointer-events: none;
}

/* ===== ELEMENT TRACKING ===== */
[data-track] {
    will-change: transform;
}

/* ===== PAGE ENTRANCE ===== */
body {
    opacity: 1;
    transition: opacity 0.3s ease;
}

body.page-loading {
    opacity: 0;
}

/* ===== MENU DROPDOWN ===== */
.menu-item-has-children .sub-menu li {
    opacity: 1;
    transform: translateX(0);
}

/* ===== FOOTER FIXED BOTTOM ===== */
.footer-wrapper {
    position: relative;
}

/* ===== BREADCRUMB ===== */
.breadcrumb li,
.breadcrumb-item {
    opacity: 1;
    transform: translateX(0);
}

/* ===== MOBILE ADJUSTMENTS ===== */
@media (max-width: 991px) {
    .viewport-border {
        inset: 10px;
        border-radius: 15px;
    }
    
    .infinite-scroll-indicator {
        display: none;
    }
}

@media (max-width: 767px) {
    .viewport-border {
        display: none;
    }
    
    body[data-scroll-direction="down"] .header-layout1 {
        transform: translateY(0);
    }
}

/* ===== PERFORMANCE ===== */
@media (prefers-reduced-motion: reduce) {
    .page-transition-overlay,
    #page-loader,
    .infinite-scroll-indicator,
    .viewport-border {
        animation: none !important;
        transition: none !important;
    }
    
    .header-layout1 {
        transition: none !important;
    }
    
    [data-scroll-snap] {
        scroll-snap-align: none;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .scroll-progress-bar,
    .scroll-hint,
    .infinite-scroll-indicator,
    .viewport-border,
    .cursor,
    .cursor2 {
        display: none !important;
    }
}

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .hero-gradient-overlay,
    .noise-overlay,
    .light-ray {
        display: none;
    }
    
    .hero-title,
    .sec-title {
        -webkit-text-fill-color: white;
        text-shadow: none;
    }
}

/* ===== DARK MODE SUPPORT (si nécessaire) ===== */
@media (prefers-color-scheme: dark) {
    /* Le site est déjà sombre, pas de changements nécessaires */
}

/* ===== ACCESSIBILITY ===== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== ANIMATION STATES ===== */
.animating {
    pointer-events: none;
}

.animation-complete {
    pointer-events: auto;
}

/* ===== LOADING STATES ===== */
.is-loading {
    cursor: wait;
}

.is-loading * {
    pointer-events: none;
}
