@import url("header.css");
@import url("footer.css");

html {
    height: 100%;
}

@media screen and (max-width: 768px) {
    html {
        min-height: 100%;
    }
}

body {
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    font-family: Arial, sans-serif;
    height: 100%;
}

.container {
    max-width: 80%;
    margin: auto;
}

/* Accueil */
#accueil {
    height: 80%;
    text-align: center;
    background: url('../img/background_acceuil.png') no-repeat center center/cover;
    color: #ffffff;
}

#accueil h1 {
    font-size: 48px;
    margin-bottom: 20px;
    margin-top: 0%;
    padding-top: 5%;
    text-shadow: #35424a 1px 1px 2px;
}

#accueil h2 {
    font-size: 36px;
    margin-bottom: 20px;
    text-shadow: #35424a 1px 1px 2px;
}

#accueil p {
    font-size: 20px;
    text-shadow: #35424a 1px 1px 2px;
}

/* Responsive de la page d'accueil */
@media screen and (max-width: 900px) {

    #accueil h1 {
        font-size: 32px;
        /* padding-top: 20%; */
    }

    #accueil h2 {
        font-size: 24px;
    }

    #accueil p {
        font-size: 16px;
        padding: 0 10px;
    }
}

/* Carrousel services */

.carousel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 100px;
    overflow: hidden;
    /* masque les éléments hors champ */
    width: 100%;
}

.carousel {
    display: flex;
    gap: 20px;
    align-items: center;
    scroll-behavior: smooth;
    width: 660px;
    /* 3 cartes de 200px + 2 gaps de 20px ≈ 640px → marge OK */
    margin: 0 10px;
}

.carousel .service {
    flex: 0 0 auto;
    /* largeur naturelle (évite le 33.33% qui fausse le calcul) */
    width: 200px;
    /* ta largeur d’image */
    text-align: center;
    opacity: 0.5;
    transform: scale(0.9);
    transition: transform .4s cubic-bezier(.4, 0, .2, 1), box-shadow .25s cubic-bezier(.4, 0, .2, 1), opacity .25s;
}


.carousel-btn {
    background: #35424a;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: #1f2a30;
}

.carousel .service.active {
    opacity: 1;
    transform: scale(1.07);
    z-index: 2;
    box-shadow: 0 8px 24px rgba(229, 57, 53, .15);
}

.carousel .service.active span {
    display: block;
}

.carousel .services-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 100px auto;
    border-radius: 5px;
    padding: 20px;
    width: fit-content;
}

.carousel .service img {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    display: block;
}

.carousel .service:hover {
    transform: scale(1.07);
    opacity: 1;
    box-shadow: 0 8px 24px rgba(229, 57, 53, 0.15);
    z-index: 2;
    cursor: pointer;
}

.carousel .service span {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    display: block;
    text-align: center;
    pointer-events: none;
    display: none;
    transition: opacity 0.3s ease;
}

.carousel .service:hover span {
    display: block;
}


/* Responsive carousel */
@media screen and (max-width: 900px) {
    .carousel {
        width: 100%;
        gap: 10px;
    }
    .carousel .service {
        width: 140px;
        height: auto;
    }
    .carousel .service img {
        width: 140px;
        height: 140px;
    }
}

@media screen and (max-width: 600px) {
    .carousel-container {
        flex-direction: column;
        gap: 10px;
        margin-top: 40px;
    }
    .carousel {
        width: 100%;
        gap: 5px;
        margin: 0;
    }
    .carousel .service {
        width: 100px;
    }
    .carousel .service img {
        width: 100px;
        height: 100px;
    }
    .carousel-btn {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}