
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}
body {
    background-color: #f5f5f5;
}
.test{
    min-height: unset;
    background: rgb(0, 0, 0);
    margin-top: 50px;
    border-radius: 20px 20px 20px 20px;
    border-left: 10px #b9061e solid;
    border-right: 10px #b9061e solid;
    border-top: 10px #b9061e solid;
    border-bottom: 10px #b9061e solid;
    height: fit-content;
    padding: 0 20px 20px 20px;
}

.test2 {
    min-height: 20vh;
    background: rgb(0, 0, 0);
    margin-top: 50px;
    border-radius: 20px 20px 20px 20px;
    border-left: 10px #b9061e solid;
    border-right: 10px #b9061e solid;
    border-top: 10px #b9061e solid;
    border-bottom: 10px #b9061e solid;
    
}

.elfsight-app-909f43fc-ee37-47b0-af65-ad626d9601c9 {
    min-height: 10vh;
    background: rgb(255, 255, 255);
    border-left: 10px #b9061e solid;
    border-right: 10px #b9061e solid;
    border-bottom: 10px #b9061e solid;
    border-radius: 1px 1px 20px 20px;

}

.serv {
    font-size: 2.5rem;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 10px #b9061e solid;
}

.test .serv {
    margin-left: -20px;
    margin-right: -20px;
}
.adresse {
    font-size: 2.5rem;
    color: #ffffff;
    text-align: center;

}
.ETelephone {
    display: flex;
    justify-content: center;
    align-items: center;
}
.ETelephone a{
    font-size: 2.0rem;
    color: #991c1c;
    text-align: center;
    display: inline-flex;
    align-items: center;
}

.ETelephone a:hover{
    font-size: 2.0rem;
    color: #ffffff;
}

.nom {
    font-size: 2.5rem;
    color: #ffffff;
    text-align: center;

}


.gogol {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: #132fce;
    text-align: center;
    padding: 15px 20px;
    background: rgb(255, 253, 253);
    font: 600 1.2rem Arial, sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,.2);
    border-left: 10px #b9061e solid;
    border-right: 10px #b9061e solid;
    border-top: 10px #b9061e solid;
    border-radius: 20px 20px 1px 1px;
}

.gogol a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.gogol a img {
    width: 20px;
    height: auto;
}

.ETelephone img {
    width: 50px;
    height: auto;
    vertical-align: middle;
    margin-right: 10px;

}

/* Centrer la map dans le bloc de contact */
.gogolmap {
    display: block;
    margin: 20px auto;
    width: 100%;
    max-width: 1000px;
    min-height: 550px;
    border: none;
}

.gogolmap iframe {
    width: 100%;
    height: 100%;
}

section {
    padding: 20px 12%;
}
ul  {
    list-style: none;
}
a {
    text-decoration: none;
}
button {
    cursor: pointer;
}
html {
    scroll-behavior: smooth;
}
.background {
    background: url("nimages/bg.jpeg") no-repeat;
    background-size: contain;
    background-position: center;
    background-attachment: fixed;
    background-color: #000000;
}
.background2 {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-size: contain;
    background-position: center;
    background-attachment: fixed;
    background-color: #000000;
}
.home {
    min-height: 100vh;
    position: relative;
    margin-bottom: 0;
    width: 100%;
    padding-top: 100vh;
}

.logo {
    font-weight: 700;
    color: #fff;
    font-size: 1.2rem;
}
.links {
    display: flex;
}
.links li {
    margin: 20px;
}
.links li a {
   color: #f5f5f5; 
}


/* Popup */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.popup-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.popup-box {
    background: #0a0a0a;
    border: 4px solid #b9061e;
    border-radius: 14px;
    padding: 20px 25px;
    text-align: center;
    position: relative;
    max-width: 420px;
    width: 90%;
}

.popup-img-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
}

.popup-img {
    width: auto;
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    display: block;
    border: none;
}

.popup-img-wrap .popup-title {
    position: absolute;
    top: 50%;
    left: 6%;
    transform: translateY(-50%);
    margin: 0;
    text-align: left;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.95), 0 0 15px rgba(0,0,0,0.8);
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 16px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.popup-close:hover {
    color: #b9061e;
}

.popup-title {
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 2.2rem;
    text-transform: uppercase;
    color: #c8c8c8;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.popup-red {
    color: #b9061e;
}

.popup-white {
    color: #ffffff;
}

.popup-sub {
    color: #888;
    font-size: 1rem;
    margin-bottom: 24px;
    color: #f3f2f2;
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
}

.popup-diag {
    background-color: #b9061e;
    color: #f3f2f2;
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: inline-block;
    padding: 2px 12px;
    border-radius: 4px;
}


.popup-btn:hover {
    background: #8f0416;
    color: #fff;
}

.devis-tel {
    color: #ffffff;
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    transition: 0.3s;
}

.devis-tel:hover {
    font-size:  1.3rem;
}

/* Navbar styles */
.navbar{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent; /* show background behind the navbar */
    color: #ffffff;
    z-index: 1000;
    height: auto;
    min-height: 60px;
}
.navbar .container{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:0 5%;
    min-height: 60px;
    flex-wrap: wrap;
    gap: 10px;
}
.nav {
    display:flex;
    align-items:center;
    flex: 1;
    border-radius: 5px;
}
.nav .links{
    display:flex;
    gap: 0.5px;
    align-items:center;
    min-height: 20px;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-end;
}
.nav .links li {
    margin-left: 0;
}
.nav .links li a{
    color:#ffffff;
    padding:1px 12px;
    border-radius:5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    font-family: 'Roboto', sans-serif;
    font-style: italic;
    font-weight: 700;
    font-size: 2.5rem;
    white-space: nowrap;
}

.nav .links li a:hover{
    color:#941919;
}



.link2 {
    display: flex;
    align-items: stretch;
    background: #0a0a0a;
    border-left: 7px solid #b9061e;
    border-radius: 8px;
    margin: 10px 0;
    overflow: hidden;
    transition: box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.link2::before {
    content: '';
    background: linear-gradient(to right, rgb(185,6,30,0.45), rgb(240, 235, 235, 0.05));
    width: 0%;
    height: 100%;
    top: 0;
    left: 0;
    position: absolute;
    transition: 0.6s;
    z-index: -1;
}

.link2:hover::before {
    content: '';
    background: linear-gradient(to right, rgb(185,6,30,0.45), rgb(240, 235, 235, 0.05));
    width: 100%;
    height: 100%;
}

.link2 a {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 30px;
    width: 100%;
    color: #c8c8c8;
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 1.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(95deg, rgba(185,6,30,0.18) 0%, transparent 55%);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9), 0 0 8px rgba(200,200,200,0.15);
    transition: color 0.2s, background 0.2s;
}

.link2 a:hover {
    color: #ffffff;
    background: linear-gradient(95deg, rgba(185,6,30,0.35) 0%, transparent 60%);
}

.link2 .moteur {
    color: #c8c8c8;
}
.link2 .domi {
    color: #b9061e;
}
.link2 .pisse {
    color: #0668b9;
}
.link2 .egr {
    color: #b9061e;
}
.link2 .etan {
    color: #069b1f;
}
.link2 a img {
    width: 90px;
    height: auto;
    border-radius: 5px;
    flex-shrink: 0;
    filter: brightness(0.88) contrast(1.1) saturate(0.9);
    border: 2px solid rgba(185,6,30,0.5);
}

.nav .links li.social-icon {
    margin-left: 0;
}
.nav .links li.social-icon a {
    padding: 0px;
    border-radius: 6px;
    background: rgba(255,255,255,0.1);
}
.nav .links li.social-icon img {
    display: block;
    width: 50px;
    height: auto;
}
.nav .links li.social-icons {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 0 !important;
}
.nav .links li.social-icons a.social-icon {
    padding: 0px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.1);
}

.nav .links li.social-icons a.social-icon:hover {
    padding: 0px;
    border-radius: 6px;
    background:#941919;

}
.nav .links li.social-icons a.social-icon img {
    display: block;
    width: 50px;
    height: auto;
}
.scroll-link.active,
.scroll-link:hover {
    background: rgb(238, 236, 236);
}
/* Dropdown */
.nav .links li.has-dropdown {
    position: relative;
}

.nav .links li.has-dropdown .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(10,10,10,0.97);
    border-left: 4px solid #b9061e;
    border-bottom: 4px solid #b9061e;
    border-right: 4px solid #b9061e;
    border-radius: 0 0 8px 8px;
    min-width: 220px;
    z-index: 999;
    flex-direction: column;
    padding: 6px 0;
}

.nav .links li.has-dropdown:hover .dropdown {
    display: flex;
}

.nav .links li.has-dropdown .dropdown li {
    margin: 0;
    width: auto;
}

.nav .links li.has-dropdown .dropdown li a {
    font-size: 1rem;
    font-style: italic;
    font-weight: 700;
    color: #c8c8c8;
    padding: 10px 16px;
    display: block;
    white-space: nowrap;
    text-shadow: none;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav .links li.has-dropdown .dropdown li a:hover {
    color: #b9061e;
    font-size: 1rem;
    padding: 10px 16px;
    background: rgba(185,6,30,0.12);
}

.nav-toggle{
    display:none;
    background:transparent;
    border:0;
    color:#fff;
    font-size:1.2rem;
}

/* Services 3 colonnes */
.defap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 3px;
    width: 150%;
    margin-left: -25%;
    margin-right: -25%;
    text-align: center;
}

.defap-grid .FAP,
.defap-grid .EGR,
.defap-grid .pisseblue {
    background: #0a0a0a;
    border: 3px solid #b9061e;
    border-radius: 10px;
    color: #c8c8c8;
    text-align: center;
}


.defap-grid h1 {
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 1.5rem;
    text-transform: uppercase;
    color: #b9061e;
    margin-bottom: 14px;
    border-bottom: 2px solid #b9061e;
    padding-bottom: 8px;
}

.defap-grid p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
    font-family: 'Roboto', Arial, sans-serif;
    font-style: italic;
    color: #f3f2f2;
}

/* ethanol */
.etan-grid {
    position: relative;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.etan-grid p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 10px;
    font-family: 'Roboto', Arial, sans-serif;
    font-style: italic;
    color: #f3f2f2;
}

.etan {   
    background: #0a0a0a;
    border: 3px solid #690916;
    border-radius: 10px;
    color: #c8c8c8;
    text-align:center;
}

.etanindex {   
    border-radius: 10px;
    color: #c8c8c8;
    text-align:center;
}

.etanolh1 {
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 900;
    font-style: italic;
    font-size: 2.0rem;
    text-transform: uppercase;
    color: #f3f2f2;
    margin-bottom: 14px;
    border-bottom: 2px solid #690916;
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.etan-green {
    color: #14cc58;
}

.etan-img {
    text-align: center;
    width: 50px;
}

/* mecanique */

.mecanique {
    margin-top: 75px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.mechh1 {
    flex: 0 0 100%;
    text-align: center;
    font-size: 2.0rem;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-style: italic;
    border-bottom: 1px #690916 solid;
    padding-bottom: 5px;
    margin-bottom: 10px;
}



.mecha {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    gap: 6px;
}

.mecha-toggle {
    cursor: pointer;
}

.mecha-dropdown {
    position: absolute;
    top: 180px;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1a1a1a;
    border: 1px solid #b9061e;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    padding: 0 10px;
    width: 90vw;
    max-width: 600px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 100;
    text-align: left;
    box-sizing: border-box;
}

.mecha-toggle:hover .mecha-dropdown,
.mecha-toggle.open .mecha-dropdown {
    max-height: 300px;
    padding: 20px;
    opacity: 1;

}

.legal-main {
    flex: 1;
    padding-top: 100px;
}

.legal {
    color: #ffffff;
    font-size: 0.9rem;
    text-align: left;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.legal h1 {
    text-align: center;
    font-size: 1.8rem;
}

.legal h2 {
    font-size: 1rem;
}

.legal a {
    color: inherit;
}

@media (max-width: 768px) {
    .legal-main {
        padding-top: 70px;
    }
    .legal {
        padding: 0 4%;
        font-size: 0.85rem;
    }
    .legal h1 {
        font-size: 1.3rem;
    }
    .legal h2 {
        font-size: 0.95rem;
    }
}


.footer-content {
    margin: 10px;
    display: flex;
    justify-content: space-between;
    padding: 2px;
    align-items: center;
    background-color: #0a0a0a;
    color: #ffffff;
    font-size: 0.9rem;
}

.footer-content .links li {
    margin: 0 4px;
}

@media (max-width: 600px) {
    .mecha-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 0.8rem;
        border-radius: 6px;
        width: 88vw;
    }
}

.mecha-img {
    width: 100px;
    transition: 0.4s;
}

.mecha-img:hover {
    transform: scale(1.15);
}

.mecha-txt {
    font-size: 1.rem;
    font-weight: 700;
    text-align: center;
}

.faph1 {
    font-size: 2.0rem;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-style: italic;
    border-bottom: 1px #690916 solid;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid #b9061e;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.lightbox-close:hover {
    color: #b9061e;
}

/* Carousel */
.carousel {
    position: relative;
    width: 80%;
    max-width: 900px;
    margin: 80px auto 20px;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s ease;
}

.carousel-slide {
    min-width: 60%;
}

.carousel-slide img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(185, 6, 30, 0.8);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 10;
}

.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-btn:hover {
    background: #b9061e;
}

.carouh1 {

    text-align: center;
    font-size: 2.0rem;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-style: italic;
    border-bottom: 1px #690916 solid;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}

.carousel-dot.active {
    background: #b9061e;
}

@media (max-width: 768px) {
    .carousel-slide img {
        height: 220px;
    }
}

.fapegr {
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
    max-width: 1400px;
    text-align: center;
}

.disclaimer {
    font-size: 0.rem;
    color: #615c5c;
}

.reprogrammation {
    margin-top: 70px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    max-width: 1600px;
    height: 980px;
    text-align: center;
}

.reprog1 {
    font-size: 2.0rem;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-style: italic;
    border-bottom: 1px #690916 solid;
    padding-bottom: 5px;
    margin-bottom: 10px;
}
 .reprog2 {
    font-size: 1.0rem;
    color: #ffffff;
    padding-bottom: 5px;
 }

.price {
    color: #ffffff !important;
    background-color: #5f0511c0;
    border-radius: 10px;
    font-size: 2.0rem;
    transition: 0.3s;
    cursor: default;
}

.price:hover {
    color: #ffffff !important;
    background-color: #5f0511c0;
;
    font-size: 2.2rem;
}


.euro {
    color: #ffffff !important;
    background-color: #5f0511c0;;
    border-radius: 10px;
    font-size: 15px;
    vertical-align: super;
}

.popup-diag {
    background-color: #b9061e;
    color: #f3f2f2;
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: inline-block;
    padding: 2px 12px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        padding: 20px 5%;
    }
}



/* Tablet (768px and below) */
@media (max-width:768px){
    .popup-box {
        padding: 16px 16px;
        max-width: 95vw;
    }
    .popup-title {
        font-size: 1.7rem;
    }
    .popup-img {
        max-height: 200px;
    }
    .popup-diag {
        font-size: 0.95rem;
    }
    .popup-sub {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }
    .popup-btn {
        font-size: 0.95rem;
        padding: 10px 22px;
    }

    section {
        padding: 20px 10%;
    }
    
   .background {
        background-size: contain;
        background-position: center 50px;
        background-repeat: no-repeat;
        min-height: 100vh;
    }

.gogolmap {
    display: block;
    margin: 10px auto;
    width: 80%;
    max-width: 320px;
    min-height: 300px;
    border: none;
}

    .navbar .container {
        padding: 10px 5%;
        flex-direction: row;
    }
    
    .adresse {
    font-size: 2.0rem;
    color: #ffffff;
    text-align: center;

    }
    .ETelephone {
    font-size: 1.8rem;
    color: #991c1c;
    text-align: center;

    }

.nom {
    font-size: 2.0rem;
    color: #ffffff;
    text-align: center;

}
    .nav-toggle{display:block}
    .nav .links{
        display:none;
        position:fixed;
        top:60px;
        right:10%;
        flex-direction:column;
        background:rgba(0, 0, 0, 0.98);
        padding:10px;
        min-width:10px;
        width: auto;
        justify-content: flex-start;
        border-left: 4px #b9061e solid;
        border-right: 4px #b9061e solid;
        border-top: 4px #b9061e solid;
        border-bottom: 4px #b9061e solid;
        border-radius: 10px 10px 10px 10px;
    }
    .nav .links.show{display:flex}
    
    .nav .links li {
        margin: 1px 0;
    }

    .nav .links li.has-dropdown .dropdown {
        display: flex;
        position: static;
        border: none;
        border-left: 3px solid #b9061e;
        border-radius: 0;
        min-width: unset;
        padding: 0 0 0 12px;
        background: transparent;
    }

    .nav .links li.has-dropdown .dropdown li a {
        font-size: 0.9rem;
        padding: 6px 10px;
        color: #aaaaaa;
    }

    .nav .links li.has-dropdown .dropdown li a:hover {
        font-size: 0.9rem;
        padding: 6px 10px;
    }

    .nav .links li a {
        font-size: 1rem;
        padding: 10px 10px;
        display: block;
    }
    .nav .links li a:hover {
        font-size: 1rem;
        padding: 10px 10px;
    }

    .devis-tel {
        font-size: 0.9rem;
    }

    .test {
        padding: 0 12px 12px 12px;
    }
    .test .serv {
        margin-left: -12px;
        margin-right: -12px;
    }
    .serv {
        font-size: 1.8rem;
    }
    .link2 {
        margin: 7px 0;
    }
    .link2 a {
        font-size: 1.2rem;
        gap: 12px;
        padding: 10px 14px;
    }
    .link2 a img {
        width: 60px;
        height: auto;
    }
    
    .nav .links li.social-icons {
        display: flex;
        gap: 8px;
        margin: 10px 0;
    }
    
    .nav .links li.social-icons a.social-icon img {
        width: 40px;
    }
    
    .nav .links li.social-icon {
        margin: 10px 5px;
        display: inline-flex;
    }
    
    .nav {
        margin-left: 0;
        background: transparent;
        flex: 0;
    }
    
    .nav-toggle {
        font-size: 1.5rem;
    }

    /* Meca page – tablet */
    .mecanique {
        gap: 16px;
        padding: 10px 5%;
    }
    .mechh1 {
        font-size: 1.5rem;
    }
    .mecha {
        flex-direction: column;
        gap: 4px;
    }
    .mecha-img {
        width: 70px;
    }
    .mecha-txt {
        font-size: 0.85rem;
    }
    .defap-grid {
        grid-template-columns: 1fr;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .fapegr {
        overflow: hidden;
        padding: 10px 4%;
    }
    .faph1 {
        font-size: 1.5rem;
    }
    .defap-grid h1 {
        font-size: 1.2rem;
    }
    .defap-grid p {
        font-size: 0.85rem;
    }
    .price {
        font-size: 1.1rem;
    }
    .etan-grid {
        width: 100%;
    }
    .etanolh1 {
        font-size: 1.4rem;
        flex-wrap: wrap;
    }

    /* Mobile phones (480px and below) */
@media (max-width:480px){
    .popup-box {
        padding: 12px 12px;
        width: 95vw;
    }
    .popup-title {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }
    .popup-img {
        max-height: 150px;
    }
    .popup-diag {
        font-size: 0.85rem;
        padding: 2px 8px;
    }
    .popup-sub {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }
    .popup-btn {
        font-size: 0.85rem;
        padding: 8px 16px;
    }

    section {
        padding: 15px 5%;
    }
    
    .navbar .container {
        padding: 8px 5%;
    }
    
    .logo {
        font-size: 1rem;
    }

    .devis-tel {
        font-size: 0.8rem;
    }

    .devis-tel:hover {
    font-size:  0.9rem;
}
    
    .nav .links li.social-icon {
        margin: 10px 5px;
        display: inline-flex;
    }
    
    .nav .links li.social-icons {
        display: flex;
        gap: 8px;
        margin: 10px 0;
    }
    
    .nav .links li.social-icons a.social-icon img {
        width: 40px;
    }
    
    .nav .links li a {
        font-size: 0.9rem;
        padding: 6px 8px;
    }
    .nav .links li a:hover {
        font-size: 0.9rem;
        padding: 6px 8px;
    }

    .test {
        padding: 0 8px 8px 8px;
    }
    .test .serv {
        margin-left: -8px;
        margin-right: -8px;
    }
    .serv {
        font-size: 1.5rem;
    }
    .link2 {
        margin: 5px 0;
        border-left-width: 5px;
    }
    .link2 a {
        font-size: 1rem;
        gap: 10px;
        padding: 9px 10px;
        letter-spacing: 1px;
    }
    .link2 a img {
        width: 48px;
        height: auto;
    }
    
    .background {
        background-size: contain;
        background-position: center 50px;
        background-repeat: no-repeat;
        min-height: 100vh;
    }
    
    /* reprogrammation styles removed for mobile */
    
    section:not(.home){
        padding-top: 60px;
    }
    
    .nav-toggle {
        font-size: 1.3rem;
    }

    .gogolmap {
    display: block;
    margin: 5px auto;
    max-width: 300px;
    }

    .ETelephone img {
    width: 30px;
    height: auto;
    vertical-align: middle;
    margin-right: 5px;
    }

    /* Meca page – mobile */
    .mechh1 {
        font-size: 1.2rem;
    }
    .mecha-img {
        width: 50px;
    }
    .mecha-txt {
        font-size: 0.75rem;
    }
    .etanolh1 {
        font-size: 1.1rem;
    }
    .mecanique {
        gap: 10px;
    }

}
    
    /* reprogrammation styles removed for tablet */
}

/* Optional: when navbar needs a solid background on scroll, uncomment below and add JS to toggle `.scrolled` */
.navbar.scrolled{background: rgba(0,0,0,0.6);} 
/* stronger navbar state when scrolled */
.navbar.scrolled{
    background: rgba(0,0,0,0.85);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

