/* ================= 1. RESET & CORE ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #F8FAFC;
    color: #0F172A;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    cursor: none;
    overscroll-behavior-y: none; /* FIX: Prevents pull-to-refresh jumps */
}

::selection {
    background-color: #0EA5E9;
    color: #FFFFFF;
}

html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }

@media (max-width: 768px) {
    html, body {
        scroll-behavior: auto !important;
        overscroll-behavior-y: auto !important;
        /* This is critical - prevents iOS Safari bounce reset */
        position: relative;
        height: auto;
    }
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ================= 2. PRELOADER & CURSOR ================= */
/*#preloader { position: fixed; inset: 0; background: #0F172A; z-index: 999999; display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; }*/
/*.loader-bar-wrap { width: 200px; height: 2px; background: rgba(255,255,255,0.1); margin-top: 20px; overflow: hidden; position: relative; }*/
/*.loader-bar { width: 0%; height: 100%; background: #0EA5E9; position: absolute; left: 0; top: 0; }*/
/*.loader-text { font-family: 'JetBrains Mono', monospace; font-size: 12px; margin-top: 10px; color: #0EA5E9; }*/

.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    background: #0EA5E9;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(14, 165, 233, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
}

body:hover .cursor-outline {
    background: rgba(14, 165, 233, 0.05);
}

.hover-active .cursor-dot {
    width: 0;
    height: 0;
}

.hover-active .cursor-outline {
    width: 60px;
    height: 60px;
    background: rgba(14, 165, 233, 0.1);
    border-color: #0EA5E9;
    backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
    body {
        cursor: auto;
    }

    .cursor-dot, .cursor-outline {
        display: none;
    }
}

/* ================= 3. GLASS, EFFECTS & LAYOUT ================= */
.glass {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.03);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: white;
}

.text-gradient {
    background: linear-gradient(135deg, #0EA5E9 0%, #14B8A6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.noise {
    position: fixed;
    inset: 0;
    z-index: 9997;
    pointer-events: none;
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)" opacity="0.04"/%3E%3C/svg%3E');
}

#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #0EA5E9, #14B8A6);
    z-index: 9999;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
}

.section-padding {
    padding: 6rem 1.25rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 100dvh; /* Changed to dvh (dynamic viewport height) */
}

@media (min-width: 768px) {
    .section-padding {
        padding: 8rem 2rem;
    }
}

.flex-stack {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    width: 100%;
    max-width: 85rem;
    margin: 0 auto;
    z-index: 10;
    position: relative;
}

@media (min-width: 1024px) {
    .flex-stack {
        flex-direction: row;
        align-items: center;
        gap: 5rem;
    }
}

.flex-stack-rev {
    display: flex;
    flex-direction: column-reverse;
    gap: 3rem;
    width: 100%;
    max-width: 85rem;
    margin: 0 auto;
    z-index: 10;
    position: relative;
}

@media (min-width: 1024px) {
    .flex-stack-rev {
        flex-direction: row;
        align-items: center;
        gap: 5rem;
    }
}

.long-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
    .long-text {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        text-align: justify;
    }
}

.parallax-wrap {
    overflow: hidden;
    position: relative;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
    .parallax-wrap {
        border-radius: 2.5rem;
    }
}

.parallax-img {
    width: 100%;
    height: 130%;
    object-fit: cover;
    transform: translateY(-15%);
}

/* ================= 4. UI MOCKUPS ANIMÉS (Odoo / Dev / PDA) ================= */
.odoo-browser {
    background: #F8FAFC;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    box-shadow: var(--tw-shadow-odoo-mockup);
    display: flex;
    flex-direction: column;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.odoo-header {
    background: #F1F5F9;
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #E2E8F0;
    align-items: center;
}

.odoo-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.odoo-topbar {
    background: #0F172A;
    color: white;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.odoo-app-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.odoo-control-panel {
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.odoo-btn-primary {
    background: #0EA5E9;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2);
    transition: all 0.2s;
}

.odoo-content {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    background: #F8FAFC;
}

.odoo-kanban {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.odoo-kanban-card {
    background: white;
    border: 1px solid #E2E8F0;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #0EA5E9;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.odoo-kanban-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.odoo-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
}

.mockup-pda {
    border: 10px solid #0F172A;
    border-radius: 2.5rem;
    background: #fff;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.mockup-pda::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 20px;
    background: #0F172A;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    z-index: 20;
}

.code-window {
    background: #0F172A;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.code-header {
    background: #1E293B;
    padding: 1rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    align-items: center;
}

@keyframes scan-laser {
    0%, 100% {
        top: 10%;
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    50% {
        top: 90%;
    }
}

.laser-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #E11D48;
    box-shadow: 0 0 10px #E11D48;
    animation: scan-laser 2s ease-in-out infinite;
    z-index: 10;
}

@keyframes float-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.animate-float {
    animation: float-slow 6s ease-in-out infinite;
}

@keyframes type-code {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid #0EA5E9;
    animation: type-code 3s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes blink-caret {
    from, to {
        border-color: transparent
    }
    50% {
        border-color: #0EA5E9;
    }
}

/* ================= 5. WHATSAPP & FLOATING BTNS ================= */
.wa-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 5000;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (min-width: 768px) {
    .wa-float {
        bottom: 2rem;
        right: 2rem;
        width: 70px;
        height: 70px;
    }
}

.wa-float:hover {
    transform: scale(1.1) rotate(10deg);
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: pulse-ring 2s infinite;
    z-index: -1;
}

/* ================= 6. ANIMATIONS REFS & WOW ================= */
@keyframes scroll-infinite {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-200px * 7));
    }
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: scroll 30s linear infinite; /* Adjust time to change speed */
}
.marquee-track:hover {
    animation-play-state: paused;
}



/* Add space between your logos here, inside the marquee track */
.logo-slide {
    flex-shrink: 0;
    padding: 0 1.5rem; /* Space between the logos */
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Since the track contains exactly 48 logos (2 sets of 24),
           it must scroll -50% to loop infinitely. */
        transform: translateX(-50%);
    }
}
.logo-slide:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}


.fade-edges {
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

/* TREE MENU STYLES SPECIFIQUES */
.tree-line {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2px;
    background: linear-gradient(to bottom, #0EA5E9, #14B8A6);
    transform-origin: center;
    opacity: 0;
    z-index: 5;
}

/* ================= CREATIVE TREE MENU STYLES ================= */
.tree-node-l1 {
    position: absolute;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 60;
}

.tree-node-l1 .icon-wrapper {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tree-node-l1:hover .icon-wrapper {
    transform: scale(1.15) rotate(5deg);
}

.tree-node-l1 .text-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.25rem;
    border-radius: 2rem;
    font-weight: 700;
    color: #0F172A;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: color 0.3s;
}

.tree-node-l2 {
    position: absolute;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: auto;
    z-index: 50;
}

.tree-node-l2 a {
    display: block;
    background: white;
    padding: 0.6rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #E2E8F0;
    transition: all 0.2s;
    white-space: nowrap;
}

.tree-node-l2 a:hover {
    color: #0EA5E9;
    border-color: #0EA5E9;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 25px rgba(14, 165, 233, 0.15);
}

@media (max-width: 768px) {
    .tree-node-l1 {
        flex-direction: column;
        gap: 0.3rem;
    }

    .tree-node-l1 .text-wrapper {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    .tree-node-l1 .icon-wrapper {
        width: 2.5rem;
        height: 2.5rem;
    }

    .tree-node-l2 a {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}