body, h1, h2, h3, p, ul, li {
    margin: 0;
    padding: 0;
}
html{
    width: 100%;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    transition: opacity 1.5s ease;
}

/* En-tête */
.navbar{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #168ea9;
    border: solid 1px;
}

.navbar #logo img {
    height: 50px;
}

#nomEntreprise{
    font-size: 30px;
    font-weight: 600;
    color: #eee;
}

.nav-links{
    list-style: none;
    padding: 0;
}

.nav-links li {
    display: inline;
    margin: 0 10px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s; 
}

nav ul li a:hover {
      color: #ffcc00;
    }

/* Effet de survol */
nav a:hover {
    color: #fff; 
    border-radius: 3px; 
}

/* Bannière principale */
#accueil {
    text-align: center;
    color: white;
    margin: auto;
}

#background-container {
    position: relative;
    width: 100%;
    height: 80vh;
    overflow: hidden;
    z-index: -2;
}

#background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80%;
    background-image: url('image/background.jpg'); 
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    z-index: -1;
    transition: opacity 0.5s ease-out;
}

.content {
    padding: 8%;
    z-index: -1;
}

#accueil h1{
    margin-top: -30%;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}

/* Section Services */
#text{
    padding-top: 5%;
    margin-left: 30%;
    text-align: center;
    width: 40%;
    font-size: 25px;
    color: #007bff;
    line-height: 110%;
}

#vertical-line{
    width: 5px;
    height: 100px;
    background-color: #8cd672;
    margin-top: 3%;
    margin-bottom: 3%;
}

#services {
    width: 100%;
    height: auto;
    background-color: #ffffff;
}

#service-container{
    width: 1000px;
    height: 1000px;
    margin: auto;
    position: relative;
    z-index: 2;
}

.service-description{
    position: relative;
    width: auto;
    height: auto;
    z-index: 5;
}

.service{
    position: absolute;
    width: auto;
    height: auto;
}

#service-info img{
    margin-top: 30px;
    margin-left: 30px;
    width: 120px;
    height: 120px;
}

#service-info{
    position: absolute;
    top: 2%;
    left: 2%;
    width: 51%;
    height: 67%;
    background-color: #007bff;
    color: white;
    border-radius: 5%;
    border: solid black 2px;
    transition: box-shadow 1s ease;
    z-index: 4;
}

#service-info:hover {
    box-shadow: 10px 5px 5px #535353;
}

#service-info #a {
    width: 450px;
    margin: auto;
    margin-top: 15px;
    text-align: start;
    line-height: 1.5em;
    font-size: 35px;
    line-height: 100%;
    margin-bottom: 5%;
}

#horizontal-line{
    background-color: #2DCB51;
    margin: auto;
    margin-top: 65px;
    width: 80%;
    height: 5px;
}

#img-service{
    position: absolute;
    top: 17%;
    left: 47%;
    z-index: 3;
}

#service-info #b{
    width: 450px;
    margin: auto;
    font-size: 19px;
    line-height: 1.5em;
    margin-top: 15%;
}

#img-service img{
    width: 510px;
    height: 670px;
    border-radius: 5%;
    border: solid 2px;
}

#backgroundService{
    position: relative;
    width: 100%;
    height: auto; 
    overflow: hidden; 
    padding-top: 20px;
    padding-bottom: 5%;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    gap: 20px; 
    background-image: url('image/fond 1.jpg');
    background-repeat: no-repeat;
    background-size: 100%;
    border-bottom: solid black 5px;
    overflow: hidden;
    z-index: 0;
}

#backgroundService::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    z-index: -1;
}

#titreServiceInformation{
    width: 60%;
    height: auto;
}
#titreServiceInformation h2{
    position: relative;
    top: 70px;
    left: 70px;
    font-family: impact;
    font-size: 100px;
    z-index: 2
}

#centerBox{ 
    width: 80%;
    position: relative;
    z-index: 2; 
}

.box-container {
    display: grid;
    margin: auto;
    grid-template-columns: 1fr 1fr;
    gap: 20px;  
    width: 100%;
    max-width: 1200px;
    padding-top: 10%;
}

.box {
    padding: 20px;
    border-radius: 10px;
    color: #fff;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.5s ease;
}

.box:hover{
    box-shadow: 15px 10px 5px #333333; 
}

#industriel {
    background-color: #eaf4fc;
    color: #333;
}

#bureaux {
    background-color: #009dff;
}

#immeubles {
    background-color: #7ee696;
    color: #333;
}

#specifique {
    background-color: #d4e8f9;
    color: #333;
}

.icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* À propos de Nous */
 #container-aPropos{
    margin: auto;
    width: 60%;
    height: auto;
    padding-top: 10%;
    padding-bottom: 15%;
}

#container-aPropos h2{
    font-size: 50px;
    margin-bottom: 15px;
}

#container-aPropos p{
    font-size: 25px;
    text-align: justify;
    padding-bottom: 7px;
}

#container-aPropos center{
    font-size: 25px;
    text-align: justify-all;
}

/*ECOLABEL*/

.ecolabel{
    background-color: #fff;
    position: relative;
    width: 100%;
    height: 550px;
    padding-top: 5%;
    padding-bottom: 5%;
    margin-bottom: 5%;
}

#ecolabel_cadre{
    position: absolute;
    top: 0%;
    left: 20%;
    width: 60%;
    height: 100%;
}

#droite {
    position: absolute;
    width: 30%;
    height: 60%;
    top: 35%;
    left: 0;
}

#gauche {
    position: absolute;
    width: 30%;
    height: 60%;
    top: 5%;
    left: 70%;
}

.imageEcolabel{
    border-radius: 0 5% 0 5%;
}

#ecolabel_container{
    width: 40%;
    height: 100%;
    margin: auto;
    background: linear-gradient(70deg, #af70db 5%, #8cd672 70%, #445f40 100%);
    color: white;
    border-radius: 0 5% 0 5%;
}

#planette {
    width: 100px;
    height: 100px;
    margin-top: 30px;
}

#ecolabel_cadre #a{
    width: 100%;
    height: 30%;
    font-size: 40px;
    line-height: 100%;
    padding-top: 5%;
    padding-bottom: 2%;
    color: white;
    text-align: center;
}

#ecolabel_cadre #a p{
    margin: auto;
}

.motPrecis{
    color: coral;
}

#ecolabel_cadre #b{
    width: 100%;
    height: 30%;
    font-size: 24px;
    line-height: 100%;
    text-align: center;
    padding-top: 5%;
}

/* Section Contact */
#contact {
    background-color: #f3f3f3;
    padding-top: 5%;
    padding-bottom: 5%;
    border-top: solid black 1px;
}

#container-contact{
    display: flex;
    justify-content: center;
    align-items: center;
}

#coordonnees{
    width: 500px;
    font-size: 16px;
}

#coordonnees h2{
    margin-bottom: 20px;
    font-size: 35px;
}

#formulaire{
    width: 45%;
}

#contact form{
    border-radius: 5%;
}

#formulaire h2{
    margin-top: 5%;
    margin-bottom: 2%;
}

form input, textarea{
    background-color: #f3f3f3;
    width: 90%;
}

form textarea{
    resize: none;
    width: 90%;
}

/* Pied de page */
footer {
    background-color: #333;
    color: #fff;
    padding: 20px 0;
}

footer ul {
    list-style: none;
    display: flex;
    justify-content: center;
}

footer li {
    margin-right: 20px;
}

footer a {
    text-decoration: none;
    color: #fff;
}

#copyright{
    margin: auto;
    display: flex;
    justify-content: center;
}

/* Style général pour le formulaire */
form {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Style pour les étiquettes des champs */
form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

/* Style pour les champs de saisie */
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Style pour le bouton de soumission */
form input[type="submit"] {
    background-color: #4CAF50;
    color: #fff;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

form input[type="submit"]:hover {
    background-color: green;
}

iframe{
    width: 100%;
    margin-bottom: 3px;
}



#back-to-top {
    position: fixed;
    bottom: 50px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #007bff; 
    color: white; 
    border-radius: 50%; 
    text-align: center;
    line-height: 50px; 
    font-size: 24px; 
    cursor: pointer; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0; 
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s; 
    z-index: 10;
}

#back-to-top.show {
    opacity: 1; 
    visibility: visible; 
}

/* Media Queries pour la responsive téléphone */
@media (max-width: 768px) {
    html{
        width: 100%;
    }
    .nav-links {
        display: none;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar #logo {
        margin: auto;
    }

    .cta-button {
        padding: 8px 16px;
        font-size: 14px;
    }

    #accueil h1{
        margin-top: -120%;
        margin-right: auto;
    }

    #background{
        transition: initial;
        background-attachment: initial;
    }

    body {
        overflow-x: hidden; 
    }

    section, div {
        max-width: 100%; 
    }

    #service-container {
        height: auto;
    }

    /*reset de mise en page*/
    .service-description, #service-info, #img-service {
        all: unset; 
        display: block;
        width: 100%;
        margin: 0 auto;
    }

    #service-info{
        background-color: #007bff;
        border-top: solid black 2px;
        border-bottom: solid black 2px;
        color: white;
    }

    #service-info img{
        margin-left: auto;
        margin-right: auto;
    }

    #a p{
        margin-left: 15px;
    }

    #b p{
        width: 97%;
        margin-left: 15px;
    }

    #horizontal-line{
        background-color: #2DCB51;
        margin-bottom: 30px;
        margin-top: 15px;
    }

    #img-service img {
        width: 100%; 
        height: auto; 
        border-radius: initial;
    }

    #titreServiceInformation{
        all: unset;
        display: block;
    }

    #titreServiceInformation h2{
        position: inherit;
        font-size: 50px;
        margin-top: 15%;
        margin-bottom: 5%;
        text-align: center;
    }

    #backgroundService{
        all: unset;
        display: block;
    }

    #centerBox{
        width: 100%;
    }

    .box-container{
        display: inherit;
    }

    .box{
        border-radius: 0%;
    }

    #container-aPropos{
        width: 100%;
        margin-left: 5px;
        margin-right: 5px;
    }

    #container-aPropos p{
        text-align: initial;
        font-size: 20px;
    }

    #ecolabel_cadre{
        all: unset;
        display: block;
    }

    #droite, #gauche{
        position: initial;
        display: none;
    }

    .imageEcolabel{
        all:unset;
        display: none;
    }

    #ecolabel_container{
        width: 100%;
        border-radius: 0%;
    }

    .ecolabel{
        padding-bottom: 0%;
        margin-bottom: 0%;
    }

    #ecolabel_container #b{
        padding-top: 12%;
    }

    #ecolabel_container #b p{
        padding-bottom: 15%;
    }

    #container-contact{
        display: initial;
    }

    #coordonnees h2{
        margin-top: 10%;
    }

    #coordonnees p {
        margin-left: 5px;
    }

    #formulaire{
        width: 100%;
    }

    #contact form{
        width: 90%;
        border-radius: 0%;
    }

    h1, h2, h3 {
        font-size: 1.5em;
        text-align: center;
    }
}
