/* Custom CSS for Orléans Nuisibles */

/* Fonts */
body {
    font-family: 'Lato', sans-serif;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
}

/* Hero backgrounds */
.hero-bg {
    background-image: linear-gradient(rgba(30, 58, 138, 0.85), rgba(30, 58, 138, 0.85)),
                      url('https://images.unsplash.com/photo-1581578731548-c64695cc6952?ixlib=rb-4.0.3');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.service-hero-bg {
    background-size: cover;
    background-position: center;
}

.zones-hero-bg {
    background-size: cover;
    background-position: center;
}

.city-hero-bg {
    background-size: cover;
    background-position: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-pulse-slow {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Service cards hover effects */
.service-card {
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* FAQ Accordion */
.faq-question {
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: #f8fafc;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.show {
    max-height: 500px;
}

/* Buttons */
.btn-primary {
    @apply bg-orange-action text-white font-bold py-3 px-6 rounded-lg hover:bg-orange-600 transition duration-300;
}

.btn-secondary {
    @apply border-2 border-blue-primary text-blue-primary py-2 px-4 rounded-lg hover:bg-blue-primary hover:text-white transition duration-300;
}

.btn-urgence {
    @apply bg-red-urgence text-white font-bold py-3 px-6 rounded-lg hover:bg-red-600 transition duration-300;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #F97316;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
}

/* Loading spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #F97316;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form styles */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #F97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* Blog article content */
.article-content h2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1E3A8A;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1E3A8A;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.article-content ul, .article-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content a {
    color: #F97316;
    text-decoration: underline;
}

.article-content a:hover {
    color: #ea580c;
}

.article-content blockquote {
    border-left: 4px solid #F97316;
    background-color: #fef3c7;
    padding: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
}

.article-content img {
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive video */
.video-responsive {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Map placeholder */
.map-placeholder {
    background: linear-gradient(45deg, #e5e7eb, #f3f4f6);
    background-size: 20px 20px;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(0,0,0,.1) 5px, rgba(0,0,0,.1) 10px);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid #F97316;
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #F97316;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card {
        border: 2px solid #000;
    }

    .btn-primary, .btn-secondary, .btn-urgence {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode support (if implemented later) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .service-card {
        margin-bottom: 1rem;
    }

    .hero-bg {
        background-attachment: scroll;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Tablet optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
    .service-card {
        margin-bottom: 1.5rem;
    }
}

/* Desktop optimizations */
@media (min-width: 1025px) {
    .service-card:hover {
        transform: translateY(-8px);
    }
}

/* Custom utilities */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.gradient-text {
    background: linear-gradient(45deg, #1E3A8A, #F97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Performance optimizations */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* Image lazy loading placeholder */
.lazy-image {
    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;
    }
}

/* Cookie banner (if needed) */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1E3A8A;
    color: white;
    padding: 1rem;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #F97316;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #ea580c;
    transform: translateY(-3px);
}