/* Custom Styles & Effects */

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Navbar Scroll State */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

#navbar.scrolled .nav-link {
    color: #1f2937; /* text-gray-800 */
}

#navbar.scrolled .nav-link:hover {
    color: #2563eb; /* text-brand-600 */
}

html {
    scroll-behavior: auto; /* Lenis gère le smooth scroll */
}

html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

/* GPU acceleration pour les animations GSAP */
.about-img-wrapper,
.about-text,
.service-card-click,
.hero-el {
    will-change: transform, opacity;
    transform: translateZ(0);
}

#navbar.scrolled .logo-text {
    color: #1f2937;
}

#navbar.scrolled .logo-subtext {
    color: #4b5563;
}

#navbar.scrolled .phone-btn {
    background-color: #f3f4f6; /* bg-gray-100 */
    color: #2563eb;
    border-color: transparent;
}

/* Hero Background Slider */
.hero-bg-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 6s linear;
    transform: scale(1);
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1.05);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    background-color: #2563eb;
    color: white;
    font-weight: 500;
    transition: all 0.3s;
}
.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Before/After Slider */
.before-after-container {
    touch-action: pan-y;
}

/* Hide scrollbar for horizontal scroll containers */
.hide-scroll {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.hide-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

/* Mouse Scroll Animation */
.mouse-scroll {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    position: relative;
    display: flex;
    justify-content: center;
}

.mouse-wheel {
    width: 4px;
    height: 8px;
    background-color: white;
    border-radius: 2px;
    margin-top: 6px;
    animation: scroll-wheel 2s infinite ease-in-out;
}

@keyframes scroll-wheel {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(12px); opacity: 0; }
    51% { transform: translateY(-8px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Spin Slow Animation */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin-slow {
    animation: spin-slow 15s linear infinite;
}

/* Service Card Enhancements */
.service-card-click {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card-click:hover {
    box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.2);
}

.service-card-click h3 {
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Success Message Animation */
.success-check {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #2563eb;
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px #2563eb;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 40px #2563eb; }
}

@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

/* Custom Scroll Padding for smooth anchor logic in JS */
:root {
    --navbar-height: 90px;
}

/* Adjustments for the new cards */
@media (max-width: 768px) {
    .service-card-click {
        height: 420px;
    }
}
