/*
 * Fusion Immo - Custom Styles
 * Agence Immobilière à Montpellier
 */

/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

/* Initial state for animated elements */
.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.animated {
    opacity: 1;
}

/* Staggered animation delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1e40af;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e3a8a;
}

/* Header scroll effect */
.header-scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-transparent {
    background-color: transparent;
}

/* Property Card hover effects */
.property-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Button hover effects */
.btn-primary {
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4);
}

/* Service card hover */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Accordion styles */
.accordion-item {
    transition: all 0.3s ease;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content.active {
    max-height: 500px;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-icon.active {
    transform: rotate(180deg);
}

/* Testimonial carousel */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-slider {
    display: flex;
    transition: transform 0.5s ease;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Image lazy loading placeholder */
.img-lazy {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

/* Dropdown menu animation */
.dropdown-menu {
    transition: all 0.2s ease;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
}

.dropdown-menu.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Hero section overlay */
.hero-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

/* Card overlay for property status */
.property-status {
    backdrop-filter: blur(4px);
}

/* Counter animation */
.counter {
    display: inline-block;
}

/* Search bar styling */
.search-bar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

/* Section spacing */
section {
    scroll-margin-top: 80px;
}

/* Link styling */
a {
    transition: color 0.2s ease;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    header, footer, .no-print {
        display: none !important;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
