/* Amélioration visibilité bouton menu sur header bleu */
@media (max-width: 992px) {
    .navbar.scrolled .menu-btn, .navbar.scrolled .hamburger, .navbar.scrolled .menu-icon {
        color: #fff !important;
        fill: #fff !important;
        background: rgba(255,255,255,0.18) !important;
        border: 2px solid rgba(255,255,255,0.7) !important;
        border-radius: 8px !important;
        box-shadow: none !important;
        filter: none !important;
        z-index: 9999;
    }
    .navbar.scrolled .hamburger span {
        background: #fff !important;
    }
}
@media (max-width: 480px) {
    .hero-content h1, .page-header h1 {
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
        word-break: break-word;
    }
}
/* ===== BLOG RESPONSIVE ===== */

@media (max-width: 992px) {
    /* Article à la une : 2 colonnes → 1 colonne */
    .featured-post {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .featured-image {
        min-height: 280px;
        height: 280px;
    }
    .featured-content {
        padding: 30px;
    }
    .featured-content h2 {
        font-size: 1.6rem;
    }

    /* Newsletter */
    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px 30px;
    }
    .newsletter-text h2 { font-size: 1.6rem; }
}

@media (max-width: 768px) {
    /* Filtres : wrap sur plusieurs lignes */
    .filter-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    /* Blog grid : 1 colonne */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }

    /* Featured */
    .featured-content {
        padding: 20px;
    }
    .featured-content h2 {
        font-size: 1.4rem;
    }
    .featured-image {
        min-height: 220px;
        height: 220px;
    }
    .post-meta {
        gap: 10px;
        font-size: 0.8rem;
    }

    /* Newsletter */
    .newsletter-content {
        padding: 30px 20px;
        gap: 20px;
    }
    .newsletter-text h2 { font-size: 1.4rem; }
    .form-group-inline {
        flex-direction: column;
    }
    .form-group-inline .btn {
        width: 100%;
        text-align: center;
    }

    /* Pagination */
    .page-btn {
        width: 38px;
        height: 38px;
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .featured-image {
        min-height: 180px;
        height: 180px;
    }
    .featured-content {
        padding: 15px;
    }
    .featured-content h2 {
        font-size: 1.2rem;
    }
    .blog-image {
        height: 180px;
    }
    .newsletter-content {
        padding: 25px 15px;
    }
    .newsletter-text h2 { font-size: 1.2rem; }
}

/* ===== RESPONSIVE DESIGN AMÉLIORÉ ===== */

/* Extra Large screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Large tablets and small laptops */
@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .services-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-timeline {
        flex-direction: column;
    }

    .process-step {
        width: 100%;
    }
}

/* Tablets */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .container {
        padding: 0 15px;
    }

    /* Navigation mobile */
    .navbar {
        height: 108px;
    }

    .nav-menu {
        top: 108px;
        padding: 30px 15px;
    }

    .navbar .container {
        padding: 0 15px;
    }

    .logo img {
        max-height: 100px;
    }

    .logo span {
        font-size: 1.3rem;
    }

    /* Hero section mobile */
    .hero {
        min-height: 60vh;
        padding: 122px 0 50px;
    }

    .hero-content {
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 1.8rem !important;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 25px;
    }

    /* Grids en une colonne */
    .services-grid,
    .features-grid,
    .team-grid,
    .blog-grid,
    .gallery-grid,
    .projects-grid,
    .realisations-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Cards */
    .card,
    .service-card,
    .project-card,
    .blog-card {
        margin-bottom: 20px;
    }

    /* Contact form */
    .contact-info {
        order: 2;
    }

    .contact-form {
        order: 1;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .social-links {
        justify-content: center;
    }

    /* Tables responsive */
    table {
        display: block;
        overflow-x: auto;
    }

    /* Iframe responsive */
    iframe {
        width: 100% !important;
        max-width: 100%;
    }

    /* Images responsive */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Page header */
    .page-header {
        padding: 120px 0 60px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 1rem;
    }

    /* Sections */
    .section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 30px;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    /* Buttons */
    .btn {
        width: 100%;
        text-align: center;
        padding: 15px 25px;
    }

    .btn-group {
        flex-direction: column;
        gap: 10px;
    }

    /* CTA section */
    .cta-section {
        padding: 40px 20px;
    }

    .cta-content h2 {
        font-size: 1.6rem;
    }

    /* FAQ */
    .faq-item {
        padding: 15px;
    }

    /* Testimonials */
    .testimonial-card {
        padding: 20px;
    }

    /* Stats */
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 20px 15px;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* Mobile phones */
@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    /* Navbar */
    .navbar {
        height: 96px;
    }

    .nav-menu {
        top: 96px;
    }

    .logo img {
        max-height: 88px;
    }

    .logo span {
        font-size: 1.1rem;
    }

    /* Hero */
    .hero {
        min-height: 50vh;
        padding: 80px 0 40px;
    }

    .hero-content h1 {
        font-size: 1.3rem !important;
        line-height: 1.35 !important;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    /* Sections */
    .section {
        padding: 40px 0;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .section-header p {
        font-size: 0.9rem;
    }

    /* Page header */
    .page-header {
        padding: 100px 0 40px;
    }

    .page-header h1 {
        font-size: 1.6rem;
    }

    /* Cards */
    .card,
    .service-card {
        padding: 20px 15px;
    }

    /* Contact */
    .contact-card {
        padding: 15px;
    }

    .contact-card i {
        font-size: 1.5rem;
    }

    /* Form inputs */
    input,
    textarea,
    select {
        padding: 12px;
        font-size: 14px;
    }

    /* Stats */
    .stats-container {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    /* Footer */
    .footer-grid {
        gap: 30px;
    }

    .footer-col h4 {
        font-size: 1.1rem;
    }

    /* WhatsApp button */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 20px;
        right: 15px;
    }

    /* Scroll to top — à gauche du bouton WhatsApp */
    .scroll-top, #scrollTop {
        width: 40px;
        height: 40px;
        bottom: 22px;
        right: 75px;
    }

    /* Hide decorative elements on mobile */
    .hero::before,
    .hero::after {
        display: none;
    }
}

/* Very small phones */
@media (max-width: 375px) {
    .hero-content h1 {
        font-size: 1.3rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }
}

/* Landscape mode fixes */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 80px 0;
    }

    .nav-menu {
        max-height: 80vh;
        overflow-y: auto;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .btn:hover,
    .card:hover,
    .service-card:hover {
        transform: none;
    }

    .nav-link:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .whatsapp-float,
    .scroll-top,
    .hamburger {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 20px 0;
    }

    body {
        font-size: 12pt;
    }
}
