/* Custom CSS for Pro Debarras Landing Page */


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

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

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

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

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

/* Animation classes */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slideInLeft {
    animation: slideInFromLeft 0.8s ease-out;
}

.animate-slideInRight {
    animation: slideInFromRight 0.8s ease-out;
}

.animate-pulse-slow {
    animation: pulse 2s infinite;
}

/* Header background effect on scroll (optimized) */
.header-scrolled {
    background: rgba(255, 255, 255, 0.98);
    /* backdrop-filter: blur(10px); Disabled for better performance */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease; /* Faster transition */
}

/* Button hover effects */
.btn-primary {
    background: linear-gradient(135deg, #EA580C, #DC2626);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #DC2626, #B91C1C);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(234, 88, 12, 0.4);
}

.btn-secondary {
    border: 2px solid #1E40AF;
    background: transparent;
    color: #1E40AF;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #1E40AF;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.3);
}

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

/* Service cards hover effect (optimized) */
.service-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    will-change: transform; /* Hint for GPU acceleration */
}

.service-card:hover {
    transform: translate3d(0, -8px, 0); /* Use translate3d for GPU acceleration */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-card img {
    transition: transform 0.3s ease;
}

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

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

/* FAQ accordion styling */
.faq-item {
    transition: all 0.3s ease;
}

.faq-question {
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(30, 64, 175, 0.05);
}

.faq-answer {
    transition: all 0.3s ease;
    text-align: center;
}

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

.faq-active .faq-icon {
    transform: rotate(45deg);
}

/* Chat widget styling */
#chat-widget {
    z-index: 1000;
}

#chat-button {
    animation: pulse 2s infinite;
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.4);
}

#chat-window {
    max-height: 400px;
    overflow-y: auto;
}

.chat-option {
    transition: all 0.2s ease;
}

.chat-option:hover {
    transform: translateX(4px);
    background-color: rgba(59, 130, 246, 0.15) !important;
}

/* Gradient text effects */
.gradient-text {
    background: linear-gradient(135deg, #1E40AF, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Success/Error states for forms */
.form-success {
    background-color: rgba(5, 150, 105, 0.1);
    border-color: #059669;
    color: #059669;
}

.form-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #EF4444;
    color: #EF4444;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.show {
    max-height: 500px;
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #1E40AF, #059669, #EA580C);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Section reveal animations (optimized) */
.reveal {
    opacity: 0;
    transform: translate3d(0, 50px, 0);
    transition: opacity 0.4s ease, transform 0.4s ease;
    will-change: opacity, transform;
}

.reveal.revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

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

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

::-webkit-scrollbar-thumb {
    background: #1E40AF;
    border-radius: 4px;
}

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

/* Hero section background pattern */
#hero {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(30, 64, 175, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(5, 150, 105, 0.1) 0%, transparent 50%);
}

/* Responsive utilities */
@media (max-width: 768px) {
    .service-card:hover {
        transform: none;
    }
    
    .testimonial-card:hover {
        transform: none;
    }
    
    #chat-window {
        width: 300px;
        right: -10px;
    }
}

/* Print styles */
@media print {
    #header,
    #chat-widget,
    .btn-primary,
    .btn-secondary {
        display: none !important;
    }
}

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

/* Focus indicators for better accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #1E40AF;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gray-50 {
        background-color: #000000;
        color: #ffffff;
    }
    
    .text-gris-moyen {
        color: #ffffff;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background-color: #059669;
}

.toast.error {
    background-color: #DC2626;
}

.toast.info {
    background-color: #1E40AF;
}

/* Floating action elements */
.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Parallax effect for hero section (optimized) */
.parallax {
    transform: translate3d(0, 0, 0);
    will-change: transform;
    backface-visibility: hidden; /* Avoid flickering */
}

/* ========== TWENTY TWENTY SIMPLE ========== */
.before-after-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    cursor: ew-resize;
    height: 300px;
}

.before-after-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
}

.image-after {
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.1s ease;
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: #3B82F6;
    transform: translateX(-50%);
    z-index: 40; /* Lower z-index */
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #3B82F6;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.slider-handle::after {
    content: '⟷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
    font-weight: bold;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    line-height: 1;
}

.instruction-text {
    position: absolute;
    top: 10px; /* Ajustez cette valeur pour changer la distance du haut */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    backdrop-filter: blur(10px);
    z-index: 50;
}

.before-after-container:hover .instruction-text {
    opacity: 1;
}

.before-after-container.dragging .instruction-text {
    opacity: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .before-after-container {
        height: 250px;
    }
    
    .slider-handle::before {
        width: 35px;
        height: 35px;
    }
}

/* ========== TWENTY TWENTY SIMPLE END ========== */
