@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    font-family: "Barlow", sans-serif;
    scroll-behavior: smooth;
}

:root {
    --bg-color: rgb(40,40,40);
    --bg-color-accent: rgb(20,20,20);
    --bg-color-accent-2: rgb(58, 58, 58);

    --c-accent-1: rgb(34, 184, 34);
    --c-accent-2: rgb(7, 138, 40);
    --c-accent-3: rgb(210, 210, 210);
    --c-accent-4: rgb(150, 150, 150);

    --ff-poppins: "Poppins", sans-serif;
    --ff-barlow: "Barlow", sans-serif;
}

body {
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
}

h1 {
    font-family: "Poppins", sans-serif;
    font-weight: 600;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    position: fixed;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
    transition: background-color 300ms, backdrop-filter 300ms, padding-block 300ms;
}
nav.scrolling {
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    padding-block: 1rem;
}

nav .search-icon {
    background-color: var(--c-accent-1);
    padding: 1rem;
    border-radius: 100px;
    cursor: pointer;
    transition: background-color 150ms;
}
nav .search-icon:hover {
    background-color: var(--c-accent-2);
}

nav .search-bar {
    position: absolute;
    width: 0;
    padding: 0;
    outline: none;
    border: none;
    background-color: var(--c-accent-1);
    border-radius: 100px;
    bottom: -2rem;
    box-sizing: border-box;
    color: white;
    font-size: 1.2rem;
    transform: translateY(100%);
    transition: all 300ms;
    overflow: hidden;
}
nav .search-icon.searching ~ .search-bar {
    width: 100%;
    padding: 1rem;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 4rem;
    font-size: 1.1rem;
    align-items: center;
    transition: gap 300ms;
    position: relative;
}
.nav-list.scrolling {
    gap: 2rem;
}
.nav-list a {
    display: inline-block;
    transition: color 150ms;
}
.nav-list a:hover i, .nav-list a:hover {
    color: var(--c-accent-3);
}

.nav-icons {
    display: flex;
    font-size: 1.5rem;
    gap: 2rem;
}

nav a, nav i {
    color: white;
    transition: color 150ms;
    text-decoration: none;
}
.nav-icons i:hover {
    color: var(--c-accent-1);
}

.nav-menu, .nav-menu-close {
    display: none !important;
    font-size: 2rem;
    transition: color 150ms;
}
.nav-menu:hover, .nav-menu-close:hover {
    color: var(--c-accent-1);
}

header {
    background-image: url('img/header_img.webp');
    background-attachment: scroll;
    background-position: center;
    height: 700px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

header h2 {
    font-family: var(--ff-barlow);
    font-weight: 500;
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.header-price-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.header-price-container .price {
    font-size: 2.5rem;
    color: white;
}

.reduction {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.3rem 0.5rem;
    color: white;
    border-radius: 5px;
    background-color: var(--c-accent-1);
}

.btn-outline {
    display: inline-block;
    text-decoration: none;
    color: white;
    border: 2px solid white;
    font-weight: 500;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.2rem;
    transition: background-color 150ms;
}
.btn-outline:hover {
    background-color: rgba(0,0,0,0.1);
}

.btn-green {
    display: inline-block;
    text-decoration: none;
    color: white;
    background-color: var(--c-accent-1);
    font-weight: 500;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.2rem;
    transition: background-color 150ms;
}
.btn-green:hover {
    background-color: var(--c-accent-2);
}

.container {
    max-width: 1280px;
    margin-inline: auto;
    padding: 4rem 2rem;
}
.container-full-dark {
    background-color: var(--bg-color-accent);
}
.container-full-light {
    background-color: var(--bg-color-accent-2);
}

h3 {
    font-size: 2rem;
    font-weight: 500;
    color: white;
    margin-bottom: 3rem;
    transition: color 150ms;
    display: inline-block;
}
h3:hover {
    color: var(--c-accent-3);
}

.grid-container-product {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

.grid-container-product .element {
    position: relative;
}

.grid-container-product img {
    aspect-ratio: 16/9;
    width: 100%;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    object-fit: cover;
    transition: transform 300ms;
    cursor: pointer;
}
.grid-container-product img:hover {
    transform: scale(1.05);
}
.grid-container-product img:hover ~ .reduction {
    opacity: 0;
}

.grid-container-product .text {
    display: flex;
    justify-content: space-between;
    width: 100%;
    color: white;
}

.grid-container-product .price {
    font-size: 1.5rem;
}

.grid-container-product .reduction {
    position: absolute;
    top: -5px;
    left: -5px;
    opacity: 1;
    transition: opacity 150ms;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.cards .element {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.cards h4 {
    color: white;
    font-family: var(--ff-barlow);
    font-weight: 500;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.cards i {
    font-size: 40px;
    color: var(--c-accent-1);
}

.cards .soustitre {
    color: var(--c-accent-4);
    font-weight: 400;
}

.avis .stars {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    color: rgb(255, 196, 0);
    margin-bottom: 2rem;
}

.avis p {
    color: var(--c-accent-4);
    font-size: 1.2rem;
    line-height: 30px;
    text-align: center;
    margin-bottom: 2rem;
}

.avis a {
    margin: 0 auto;
    display: block;
    max-width: fit-content;
}

article {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

article img {
    max-width: min(100%, 300px);
    border-radius: 10px;
}

article .date {
    color: var(--c-accent-4);
    margin-bottom: 0.5rem;
}

article .title {
    font-weight: 400;
    font-family: var(--ff-barlow);
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}
article .title:hover {
    text-decoration: underline;
}

article .description {
    color: var(--c-accent-4);
}

.inscription {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 1.5rem;
}

.inscription i {
    color: var(--c-accent-1);
    font-size: 3rem;
}

.inscription .big {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: white;
}

.inscription p {
    color: var(--c-accent-4);
    font-size: 1rem;
    text-align: center;
    line-height: 1.8rem;
}

footer .infos {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}
footer .infos > div {
    flex: 1;
}

footer .left {
    flex: 1.5 !important;
}
footer .left i {
    color: var(--c-accent-1);
}
footer .left p, footer .mid1 p {
    color: white;
    font-size: 1.1rem;
    transition: color 150ms;
    margin-bottom: 1rem;
    max-width: fit-content;
}
footer .left a:hover p, footer .mid1 a:hover p {
    color: var(--c-accent-1);
}

footer .mid img {
    display: block;
    margin-inline: auto;
    margin-bottom: 3rem;
    max-height: 40px;
}

footer .right {
    display: flex;
    justify-content: right;
    flex: 0.5 !important;
}
footer .right i {
    margin-left: 1rem;
    color: white;
    transition: color 150ms;
}
footer .right i:hover {
    color: var(--c-accent-1);
}

footer hr {
    outline: none;
    box-shadow: none;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 2rem;
}

footer .copyright {
    display: block;
    color: white;
    text-align: center;
}

@media screen and (max-width: 1280px) {
    .nav-list {
        gap: 2rem;
    }

    header {
        height: 600px;
    }

    .cards {
        grid-template-columns: 1fr 1fr;
        row-gap: 4rem;
    }
}

@media screen and (max-width: 850px) {
    .nav-list {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        background-color: rgba(0,0,0,0.85);
        padding-top: 6rem;
        transform: translateX(100%);
        transition: transform 300ms;
        border-left: solid white 1px;
    }
    nav.responsive .nav-list {
        transform: translateX(0);
    }

    .nav-icons {
        position: absolute;
        top: 15rem;
        right: 2rem;
        transform: translateX(150%);
        z-index: 2000;
        transition: transform 300ms;
    }
    nav.responsive .nav-icons {
        transform: translateX(0);

    }
    .search-icon {
        display: none !important;
    }

    .nav-list a {
        display: block;
        padding: 0.5rem 2rem;
        text-align: right;
        font-size: 1rem;
    }
    .nav-menu {
        display: block !important;
    }
    nav.responsive .nav-menu-close {
        display: block !important;
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
    }

    .grid-container-product {
        grid-template-columns: 1fr 1fr;
    }

    article {
        flex-direction: column;
        margin-bottom: 4rem;
    }

    footer .infos {
        flex-direction: column;
    }
    footer .infos > div {
        display: block;
        margin-inline: auto;
    }
    footer .infos > div:not(.right) a {
        display: flex !important;
        justify-content: center;
    }
}

@media screen and (max-width: 610px) {
    .grid-container-product {
        grid-template-columns: 1fr;
    }

    h2 {
        font-size: 2rem !important;
    }
    h3 {
        font-size: 1.5rem;
    }

    .cards {
        grid-template-columns: 1fr;
    }
    .cards .element:nth-child(1), .cards .element:nth-child(2) {
        display: none;
    }
}