/* =========================================
   Toiture Direct - Styles Responsive
   ========================================= */

/* Tablette (max 1024px) */
@media screen and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .main-nav ul {
        gap: 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablette Portrait (max 768px) */
@media screen and (max-width: 768px) {
    /* Typography responsive */
    html {
        font-size: 15px;
    }

    /* Mobile menu submenu toggle arrow */
    .mobile-nav .has-submenu span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        margin-left: 8px;
        background: rgba(196, 30, 58, 0.1);
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-nav .has-submenu span:hover,
    .mobile-nav .has-submenu span:active {
        background: var(--primary);
        color: white;
    }

    .mobile-nav .has-submenu.active span {
        background: var(--primary);
        color: white;
        transform: rotate(180deg);
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    /* Header Mobile */
    .desktop-nav,
    .header-cta {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .header-content {
        padding: 0.75rem 0;
    }
    
    .logo-img {
        height: 40px;
    }

    .logo-rbq {
        display: none;
    }
    
    /* Main header sticky adjustment */
    .main-header {
        top: 30px;
    }
    
    /* Urgency bar mobile */
    .urgency-bar {
        font-size: 12px;
        padding: 6px 0;
    }
    
    .urgency-bar .container {
        flex-wrap: wrap;
    }
    
    .urgency-text {
        display: none;
    }
    
    /* Hero mobile */
    .hero {
        padding: 60px 0;
    }
    
    .hero-content {
        text-align: left;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    /* Sections */
    .section {
        padding: 40px 0;
    }
    
    /* Grid layouts mobile */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Cards mobile */
    .card {
        padding: 20px;
    }
    
    /* Footer mobile */
    .footer-cta {
        padding: 40px 0;
    }
    
    .footer-main {
        padding: 40px 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* Floating buttons - left side on mobile */
    .floating-buttons {
        right: auto;
        left: 15px;
        bottom: 80px;
    }
    
    .back-to-top {
        bottom: 80px;
        right: 15px;
        left: auto;
    }
    
    /* Hide non-essential elements */
    .hide-mobile {
        display: none !important;
    }
    
    /* Forms mobile */
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Table responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
}

/* Mobile (max 480px) */
@media screen and (max-width: 480px) {
    /* Container mobile */
    .container {
        padding: 0 15px;
    }
    
    /* Typography mobile small */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    p {
        font-size: 0.95rem;
    }
    
    /* Buttons mobile */
    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .btn-lg {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    /* Hero mobile small */
    .hero {
        padding: 40px 0;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    /* Footer adjustments */
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .footer-phone strong {
        font-size: 1rem;
    }
    
    /* Floating buttons smaller */
    .float-btn {
        width: 48px;
        height: 48px;
    }
    
    .float-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* Process steps mobile */
    .process-step {
        flex-direction: column;
        text-align: center;
    }
    
    .process-number {
        margin: 0 auto 12px;
    }
}

/* Very small devices (max 375px) */
@media screen and (max-width: 375px) {
    /* Ultra compact adjustments */
    html {
        font-size: 14px;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.35rem; }
    
    .btn {
        padding: 9px 16px;
        font-size: 0.9rem;
    }
    
    .urgency-phone {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
}

/* Landscape mobile */
@media screen and (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: 30px 0;
    }
    
    .section {
        padding: 30px 0;
    }
    
    .mobile-nav {
        padding-top: 60px;
    }
}

/* Print styles */
@media print {
    /* Hide non-essential elements */
    .urgency-bar,
    .main-nav,
    .mobile-menu-toggle,
    .mobile-nav,
    .footer-cta,
    .floating-buttons,
    .back-to-top,
    .header-cta {
        display: none !important;
    }
    
    /* Simplify header */
    .main-header {
        position: static;
        border-bottom: 2px solid #000;
        box-shadow: none;
    }
    
    /* Adjust colors for print */
    body {
        color: #000;
        background: #fff;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    /* Break inside avoid */
    .card,
    .service-item,
    .faq-item {
        page-break-inside: avoid;
    }
    
    /* Footer adjustments */
    .footer-main {
        background: #fff;
        color: #000;
        border-top: 2px solid #000;
    }
    
    .footer-bottom {
        background: #fff;
        border-top: 1px solid #000;
    }
}

/* High DPI screens */
@media screen and (-webkit-min-device-pixel-ratio: 2),
       screen and (min-resolution: 192dpi) {
    /* Use higher quality images */
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Hover effects only for non-touch devices */
@media (hover: hover) and (pointer: fine) {
    .card:hover {
        transform: translateY(-4px);
    }
    
    .btn:hover {
        transform: translateY(-2px);
    }
    
    .service-card:hover {
        box-shadow: var(--shadow-xl);
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .urgency-icon {
        animation: none;
    }
    
    .float-phone {
        animation: none;
    }
}

/* Dark mode support (if user prefers) */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles here if desired */
}

/* Specific component adjustments */

/* Service grid mobile */
@media screen and (max-width: 640px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .service-icon {
        width: 40px;
        height: 40px;
    }
}

/* Testimonials mobile */
@media screen and (max-width: 768px) {
    .testimonial-card {
        padding: 20px;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }
    
    .testimonial-avatar {
        margin: 0 auto 12px;
    }
}

/* FAQ mobile */
@media screen and (max-width: 640px) {
    .faq-item {
        padding: 16px;
    }
    
    .faq-question {
        font-size: 1rem;
        padding-right: 30px;
    }
    
    .faq-toggle {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

/* Cities grid mobile */
@media screen and (max-width: 480px) {
    .cities-grid {
        grid-template-columns: 1fr;
    }
    
    .city-card {
        padding: 12px;
    }
}

/* Gallery mobile */
@media screen and (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        height: 250px;
    }
}

/* Contact info mobile */
@media screen and (max-width: 768px) {
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .contact-card {
        text-align: center;
    }
    
    .contact-icon {
        margin: 0 auto 16px;
    }
}

/* Pricing table mobile */
@media screen and (max-width: 768px) {
    .pricing-table {
        overflow-x: auto;
    }
    
    .pricing-card {
        min-width: 280px;
    }
}

/* Stats counter mobile */
@media screen and (max-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-item {
        padding: 20px 10px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* Timeline mobile */
@media screen and (max-width: 768px) {
    .timeline {
        padding-left: 30px;
    }
    
    .timeline-item {
        padding-left: 20px;
    }
    
    .timeline-dot {
        left: -35px;
    }
}
