/* responsive.css — optimisations mobiles */


/* Ecrans de tablette et téléphone */
@media screen and (max-width: 992px) {
    #accueil h1 {
        font-size: 3rem;
    }

    #accueil h2 {
        font-size: 1.5rem;
    }

    .about-content,
    .service-content {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        padding: 0 1rem;
    }

    .about-image img,
    .service-image img {
        aspect-ratio: 16/9;
        height: auto;
    }

    #specialite {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    #specialite div {
        height: auto;
        min-height: 250px;
    }

    #specialite div p {
        display: none;
    }

    .hero-content {
        padding: 2rem 1rem;
    }

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

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

    .services-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
    }

    .service-card {
        flex: 0 0 85vw;
        scroll-snap-align: start;
    }

    .partners-carousel-container {
        padding: 0 1rem;
    }

    footer {
        font-size: 0.9rem;
    }

    h1 {
        font-size: clamp(2.5rem, 8vw, 5rem);
    }

    .service-content {
        gap: 2rem;
    }
}


/* Ecrans téléphone et plus petit */
@media screen and (max-width: 768px) {

    nav {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        background-color: white;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }


    nav.active ul {
        display: flex;
    }

    nav.active ul ul {
        display: none;
    }

    nav ul li:hover>ul,
    nav ul ul a {
        display: none;
    }

    nav ul>li {
        margin-bottom: 0.5rem;
    }

    nav img {
        max-height: 40px;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        padding: 1rem;
    }

    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: #333;
        margin: 5px 0;
        transition: all 0.3s ease;
    }

    nav>div {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        background-color: white;
    }

    .nav-header a {
        display: flex;
        align-items: center;
    }

    nav.active .menu-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    nav.active .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    nav.active .menu-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    #scrollToTop {
        bottom: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    .hero-content {
        padding: 2rem 1rem;
    }

    #hero-electronique h1 {
        font-size: 3rem;
    }

    #hero-electronique p {
        font-size: 1.2rem;
    }

    .service-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-content.reverse {
        direction: ltr;
    }

    .service-text h2 {
        font-size: 2rem;
    }

    .service-section {
        padding: 4rem 1.5rem;
    }

    .partners-carousel-container {
        padding: 0 40px;
    }

    .partner {
        flex: 0 0 250px;
        height: 120px;
    }

    .partner img[alt="SNCF"] {
        width: 150px !important;
    }

    .partner img[alt="AMADA"] {
        width: 170px !important;
    }

    .partner img[alt="Stromag"] {
        width: 130px !important;
    }

    .partner img[alt="Saur"] {
        width: 120px !important;
    }

    .carousel-arrow {
        width: 35px;
        height: 35px;
    }

    .org-chart {
        padding: 0 1rem;
    }

    .services-container {
        justify-content: flex-start;
    }

    .service-card {
        flex: 0 0 min(280px, 80vw);
        padding: 1.25rem;
    }

    .service-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-content.reverse {
        direction: ltr;
    }

    .service-text {
        order: -1;
    }

    .about-section {
        padding: 4rem 1.5rem;
    }

    #contact .map-container #map #zoom-message {
        display: none;
    }

    /* Contact en deux colonnes responsive */
    #contact .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    #contact .map-container #map {
        height: 350px;
        min-height: 300px;
    }
}


/* Ecran téléphone et plus petit */
@media screen and (max-width: 480px) {
    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .feature {
        width: 100%;
        justify-content: center;
    }

    .service-card {
        flex: 0 0 85vw;
    }

    .service-card p {
        font-size: 0.9rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    #scrollToTop {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
    }

    .partner img {
        max-width: 140px !important;
    }
}

/* Retour à la mise en page desktop */
@media screen and (min-width: 992px) {
    #contact .contact-container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
    
    #contact .map-container #map {
        height: 100%;
        min-height: 450px;
    }
}

/* Ajustements pour les écrans larges */
@media screen and (max-width: 1200px) {
    .service-content {
        gap: 3rem;
    }
}