@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    .about-preview-grid,
    .about-grid,
    .service-detail {
        gap: 2rem;
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    /* ===== MENU MOBILE AVEC CROIX DE FERMETURE ===== */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: #D3D3D3;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        z-index: 999;
        padding: 2rem;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    }
    .nav-menu.active {
        right: 0;
    }
    
    /* ===== BOUTON CROIX POUR FERMER LE MENU ===== */
    .menu-close {
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        background: rgba(0, 0, 0, 0.05);
        border-radius: 50%;
        transition: all 0.3s ease;
        z-index: 1000;
    }
    .menu-close:hover {
        background: rgba(0, 0, 0, 0.1);
        transform: rotate(90deg);
    }
    .menu-close span {
        position: relative;
        width: 24px;
        height: 2px;
        background: #1a1a2e;
        display: block;
        transform: rotate(45deg);
    }
    .menu-close span::before {
        content: '';
        position: absolute;
        width: 24px;
        height: 2px;
        background: #1a1a2e;
        transform: rotate(90deg);
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* Texte des liens en sombre sur fond gris clair */
    .nav-links a {
        color: #1a1a2e;
        font-size: 1.1rem;
        font-weight: 500;
        display: block;
        padding: 0.5rem 0;
        transition: color 0.3s ease;
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        color: var(--secondary);
    }
    
    /* Dropdown menu sur mobile - même fond gris */
    .dropdown-menu {
        position: static;
        background: transparent;
        padding: 1rem 0 0 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        width: 100%;
        text-align: center;
    }
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    /* Style des flèches du dropdown sur mobile */
    .dropdown > a i {
        transition: transform 0.3s ease;
    }
    .dropdown.active > a i {
        transform: rotate(180deg);
    }
    
    /* Liens du dropdown en sombre */
    .dropdown-menu li a {
        text-align: center;
        padding: 0.5rem 0;
        color: #1a1a2e;
        font-size: 0.95rem;
    }
    .dropdown-menu li a:hover {
        background: transparent;
        padding-left: 0;
        color: var(--secondary);
    }
    .dropdown-menu li a::before {
        display: none;
    }
    
    /* Bouton devis express - caché sur mobile (optionnel) */
    .btn-quote {
        display: none;
    }
    
    /* Header scrolled (après scroll) sur mobile - même couleur */
    .header-scrolled {
        background: #D3D3D3 !important;
    }
    
    /* Assurer que le header reste gris sur toutes les pages */
    .header-solid {
        background: #D3D3D3 !important;
    }
    
    /* Logo sombre visible, logo blanc caché */
    .header-solid .logo-dark {
        display: block !important;
    }
    .header-solid .logo-white {
        display: none !important;
    }
    
    /* Icône du menu hamburger en sombre */
    .menu-toggle span {
        background: #1a1a2e !important;
    }
    
    .hero-slider {
        height: 80vh;
        min-height: 500px;
    }
    .slider-controls {
        bottom: 1rem;
        right: 1rem;
    }
    .slider-dots {
        bottom: 1rem;
    }
    .section-padding {
        padding: 3rem 0;
    }
    .section-header {
        margin-bottom: 2rem;
    }
    .services-grid,
    .about-preview-grid,
    .about-grid,
    .service-detail,
    .mission-vision-grid,
    .values-grid,
    .team-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .about-preview-image,
    .service-detail .image-container,
    .about-grid .image-container {
        order: -1;
    }
    .service-detail {
        padding: 1rem 0;
        margin-bottom: 3rem;
    }
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    .cta-buttons .btn-large {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        justify-content: center;
    }
    .stats-grid {
        justify-content: center;
    }
    .stat-item:not(:last-child)::after {
        display: none;
    }
    .page-header {
        padding: 6rem 0 3rem;
    }
    .page-header h1 {
        font-size: 2rem;
    }
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .contact-form-container {
        padding: 1.5rem;
    }
    .tracking-card {
        padding: 1.5rem;
    }
    .input-group {
        flex-wrap: wrap;
        background: transparent;
        padding: 0;
        gap: 0.5rem;
        border-bottom: none;
    }
    .input-group input {
        border-bottom: 1px solid #e2e8f0;
        padding: 0.8rem 1rem;
        width: 100%;
    }
    .input-group button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .service-card,
    .value-card,
    .mission-card,
    .vision-card {
        padding: 1.5rem;
    }
    .slide-content h1 {
        font-size: 1.8rem;
    }
    .slide-content p {
        font-size: 0.9rem;
    }
    .btn-primary,
    .btn-outline {
        padding: 0.7rem 1.5rem;
        font-size: 0.85rem;
    }
    .stat-number {
        font-size: 1.5rem;
    }
    .team-image {
        height: 250px;
    }
    .contact-info .info-card {
        padding: 1rem;
    }
    .timeline {
        padding-left: 1rem;
    }
    .timeline-step {
        padding-left: 1.5rem;
    }
    .timeline-icon {
        left: -1.5rem;
        width: 1.2rem;
        height: 1.2rem;
        font-size: 0.6rem;
    }
}

/* ===== AJOUT : Animation pour le menu mobile ===== */
@media (max-width: 768px) {
    .nav-menu {
        overflow-y: auto;
    }
    
    /* Overlay pour fermer le menu en cliquant à l'extérieur */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}