@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --primary-color: #FFE962;
    --secondary-color: #E21C21;

    --h3-color: #F29913;

    --title-color: #8C8B8B;

    --h1-size: 1.25rem;
    --h2-size: 1rem;
}

img {
    max-width: 100%;
}

* {
    font-family: 'Roboto', sans-serif !important;
    box-sizing: border-box;
}

html,
body {
    line-height: 1.15rem;
    font-weight: 300;
}

html {
    background-color: #FEFDFD;
}

body {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

/* Désactiver le défilement sur le body quand le menu est ouvert */
body.no-scroll {
    overflow: hidden;
}

header,
main {
    margin: 1rem 1rem;
}

strong {
    font-weight: bold;
}

h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--h3-color);
}

.text-justify {
    text-align: justify;
}

.line-heigth-normal {
    line-height: 1.4rem;
}

@media (min-width: 830px) {
    .container {
        width: 830px;
        margin: 0 auto;
    }
}

@media (min-width: 730px) {
    section {
        margin-bottom: 4rem;
    }
}

/******************  HEADER  **********************/
.header-logo {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Bouton : Menu Hamburger */
button.mobile-menu-btn {
    position: relative;
    margin-right: 1rem;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: .25rem;
    border: solid 1px var(--secondary-color);
    z-index: 6;
}

button.mobile-menu-btn span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);

    display: block;
    width: 22px;
    height: 3px;

    background-color: var(--secondary-color);
}

button.mobile-menu-btn span::before,
button.mobile-menu-btn span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    transform: translateY(-8px);

    display: block;
    width: 22px;
    height: 3px;

    background-color: var(--secondary-color);

    transition: transform 0.5s;
}

button.mobile-menu-btn span::after {
    transform: translateY(8px);
}

/* Navigation */
nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-top: 30%;
    padding-inline: 2rem;
    position: fixed;
    background-color: var(--primary-color);
    inset: 0 30% 0 0;
    z-index: 5;
    transform: translateX(-100%);
    transition: transform .5s;
}

nav.open-mobile {
    transform: translateX(0);
}

nav>a.active {
    color: var(--secondary-color);
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Noir avec transparence */
    z-index: 5;
    /* Assurez-vous que le voile est au-dessus du contenu */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#overlay.active {
    opacity: 1;
    visibility: visible;
}

nav>a {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 3rem;
    text-transform: uppercase;
    text-decoration: none;
    color: black;
    border-bottom: solid 4px var(--secondary-color);
}

/* Adresse */
address {
    font-size: .7rem;
    text-align: center;
    margin-block: 1rem;


    & a {
        text-decoration: none;
        color: black;
    }
}

.header-menu-separator {
    height: 3px;
    background-color: var(--secondary-color);
    margin-left: .5rem;
    margin-bottom: .5rem;
}

@media (min-width: 730px) {
    button.mobile-menu-btn {
        visibility: collapse;
        display: none;
    }

    .header {
        display: grid;
        grid-template-columns: auto 1fr;
    }

    .header-logo {
        align-items: end;
    }

    .header-menu-items {
        display: grid;
        grid-template-rows: auto 1fr;
        justify-content: end;
    }

    address {
        text-align: center;
        line-height: 1.5rem;
        font-size: 1rem;
    }

    nav {
        position: relative;
        display: flex;
        flex-direction: initial;
        align-items: normal;
        transform: none;
        margin-top: 2rem;
        padding: .6rem 3rem .5rem 3rem;
        border-radius: 3rem;
        gap: 3rem;
    }

    nav>a {
        font-size: inherit;
        border: inherit;
        line-height: normal;
    }
}

/******************  Titres et Underline  **********************/
h1,
h2 {
    color: var(--title-color);
    text-align: center;
    margin-block: 1rem;
    transition: .3s;
}

h1 {
    font-size: var(--h1-size);
    font-weight: bold;
}

h2 {
    font-size: var(--h2-size);
}

.titre-page {
    display: flex;
    flex-direction: column;
}

span.underline {
    content: "";
    position: relative;
    background-color: transparent;
    height: 1px;
    width: 100%;
    box-shadow: 0px 2px 12px 1px #000;
    z-index: -2;
    margin-bottom: 2rem;
}

span.underline::after {
    content: "";
    position: absolute;
    background-color: #FEFDFD;
    width: 110%;
    transform: translateX(-5%);
    height: 50px;
    z-index: -1;
}

@media (min-width: 730px) {
    * {
        --h1-size: 2rem;
        --h2-size: 1.5rem;
    }

    h1 {
        text-align: left;
    }
}

/******************  Corner  **********************/
.with-corner {
    border: solid .4rem white;
    box-shadow: 0px 0px 4px #64646464;
}

/******************  Carousel  **********************/
.carousel-container {
    position: relative;
    margin-bottom: 4rem;
}

.thumbnails-container {
    width: 100%;
    overflow-x: hidden;
    padding: 5px 0;
    position: relative;
}

.thumbnails {
    display: flex;
    width: 100%;
    height: 94px;
    --items: 3;
    --gap: 6px;
    transition: transform 0.5s ease-in-out;
}

.thumbnail {
    min-width: calc((100% - (var(--items) - 1) * var(--gap)) / var(--items));
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border .5s;
}

.thumbnail.active {
    border: 2px solid var(--title-color);
    border-radius: .25rem;
}

.carousel {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.carousel-inner {
    display: flex;
    height: 240px;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    flex: 0 0 100%;
    display: flex;
    justify-content: center;

}

.carousel-item>img {
    object-fit: contain;
}

.carousel-btn {
    position: absolute;
    bottom: -4rem;
    cursor: pointer;
    background: none;
    color: var(--secondary-color);
    border: none;
    padding: 10px 15px 15px 15px;
    font-size: 2rem;
    z-index: 1;
    transition: .3s;
}

.carousel-btn.prev {
    left: calc(50% - 70px);
}

.carousel-btn.next {
    right: calc(50% - 70px);
}

@media (min-width: 730px) {
    .thumbnails {
        --items: 6
    }

    .carousel-btn {
        font-size: 3rem;
        bottom: initial;
        top: 50%;
    }

    .carousel-btn.prev {
        left: 10px;
    }

    .carousel-btn.next {
        right: 10px;
    }
}

/******************  Section : Présentation  **********************/
section.section-informations>div.container {
    position: relative;
}

.fond-presentation {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../images/ALTERNATEUR-YrxhfLx.png") no-repeat;
    background-size: contain;
    opacity: .15;
    z-index: -1;
}

p.presentation {
    padding-top: 1rem;
    margin-bottom: 2rem;
    line-height: 1.4rem;
    text-align: justify;
}

.infos {
    display: flex;
    position: relative;
    justify-content: space-around;
    gap: 1rem;
    padding-top: 7rem;
    padding-bottom: .5rem;
    margin-bottom: .5rem;
}

.infos::before {
    content: "";
    position: absolute;
    inset: -.5rem;
    background-color: var(--primary-color);
    border-radius: .5rem;
    opacity: .3;
    z-index: -1;
    transition: border-radius .3s;
}

/* Ventes */
.infos-ventes li {
    font-weight: 500;
    margin-bottom: .15rem;
}

/* Image */
img.img-facade {
    display: block;
    margin-inline: auto;
}

.infos-img {
    display: flex;
    justify-content: center;
    position: absolute;
    top: -2rem;
    left: 0;
    right: 0;
}

.infos-img>img {
    width: 200px;
    border-radius: 50%;
}

/* Horaires */
.infos-horaires {
    display: grid;
    grid-template-rows: auto 1fr;
}

.grille-horaires {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.horaires>p {
    font-weight: 300;
    font-size: .8rem;
}

p.jour {
    font-size: 1rem;
    font-weight: bold;
}

.horaires {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.horaires span {
    font-weight: 500;
    color: var(--h3-color);
}

/* Contact tarifs */
.contact-tarif {
    margin-bottom: 2rem;
}

.contact-tarif a {
    display: flex;
    gap: .25rem;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-weight: 500;
    font-size: .9rem;
    color: var(--title-color);
}

.contact-tarif a>span {
    margin-top: 1.25rem;
}

@media (min-width: 730px) {
    .infos {
        padding-top: 2rem;
    }

    .infos::before {
        border-radius: 4rem;
    }

    .infos-img {
        transform: translateX(-2%);
    }

    .infos-img>img {
        width: 250px;
        border-radius: 50%;
    }
}

/******************  Section : Marques Partenaires  **********************/
.marques-logos {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 1rem;
    margin-bottom: 2rem;
}

@media (min-width: 730px) {
    img.marque-logo {
        filter: saturate(0);
        transition: filter .3s;
    }

    img.marque-logo:hover {
        cursor: pointer;
        filter: saturate(1);
    }
}

/******************  Footer  **********************/
footer {
    background-color: var(--primary-color);
}

.footer-cards {
    display: grid;
    grid-template-columns: auto auto;
    row-gap: 1rem;
    margin: 2rem 1rem;
}

.footer-card {
    display: flex;
    font-size: .8rem;
    gap: .5rem;
    align-items: center;
}

.footer-card_icon {
    background-color: var(--secondary-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
}

.footer-card_icon>img {
    width: 35px;
    height: 35px;
    transform: translate(-2px, -2px);
}

.footer-card_infos h4 {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: .25rem;
}

.copyright {
    text-align: center;
    padding-bottom: .75rem;
    color: var(--title-color);
    font-size: .8rem;
}

@media (min-width: 730px) {
    .footer-cards {
        grid-template-columns: repeat(4, auto);
    }

    .copyright {
        display: flex;
        justify-content: space-around;
    }
}

/******************  Bouton : Up  **********************/
#btn-scrollup {
    position: fixed;
    display: flex;
    background-color: white;
    padding: .5rem .5rem;
    box-shadow: 0px 0px 4px #64646464;
    border-radius: 50%;
    bottom: 2rem;
    right: 2rem;
    cursor: pointer;
    visibility: hidden;
    font-size: 1.5rem;
    transform: translateY(200%);
    transition: transform .3s, visibility 1s;
}

#btn-scrollup.show {
    visibility: visible;
    transform: translateY(0%);
    transition: transform .3s;
}

#btn-scrollup.above-footer {
    position: absolute;
    bottom: 16rem;
}

@media (min-width: 730px) {
    #btn-scrollup.above-footer {
        bottom: 12rem;
    }
}

/******************  A Propos  **********************/
.text-a_propos {
    margin-block: 4rem;
    line-height: 1.4rem;
    text-align: justify;
}

/******************  Services : Etapes  **********************/
.etapes {
    display: grid;
    row-gap: 1.5rem;
    margin-block: 2rem 4rem;
    transition: .3s;
}

.etape {
    display: flex;
    position: relative;
    gap: .5rem;
    align-items: center;
}

.etape>img {
    width: 130px;
    border-radius: 1rem;
    box-shadow: 0px 0px 4px #64646464;
}

.etape-tag {
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 1.5rem;
    font-weight: bold;
    width: 30px;
    height: 30px;
    background-color: #E21C21;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    border-radius: 50%;
}

.etape-infos>h4 {
    font-weight: bold;
    font-size: 1.1rem;
}

.etape-infos>p {
    font-weight: 300;
    line-height: 1.2rem;
}

@media (min-width: 730px) {
    .etapes {
        grid-template-columns: 1fr 1fr;
        column-gap: 2rem;
    }
}

/******************  Contact  **********************/
form {
    display: grid;
    margin-block: 2rem 4rem;
}

.mobile-form-col-1 {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1rem;
    align-items: center;
}

input,
textarea {
    background-color: #E6E6E6;
    border: none;
    padding: 5px 5px;
    font-size: 1rem;
    border-radius: 5px;
    margin: .25rem 0;
    color: var(--title-color);
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group li {
    font-size: .8rem;
    color: var(--secondary-color);
}

textarea:focus, input:focus{
    outline: 1px solid var(--title-color);
}

.required:after {
    content: " *";
    color: var(--secondary-color);
}

form>button {
    margin-top: 1rem;
}

.btn {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    padding: .5rem;
    border-radius: .25rem;
}

.map {
    width: 100%;
    height: 300px;
    transition: .3s;
    margin-bottom: 4rem;
}

@media (min-width: 730px) {
    form {
        margin-inline: 6rem;
    }

    .form-col-2 {
        display: grid;
        grid-template-columns: auto 1fr auto 1fr;
        column-gap: 1rem;
        align-items: center;
    }

    .mb-2 {
        margin-bottom: 2rem;
    }

    .map {
        display: block;
        margin-inline: auto;
    }
}