@import url('https://fonts.googleapis.com/css2?family=Courgette&family=Montserrat+Alternates: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&family=Oswald:wght@200..700&display=swap');

* {
    margin: 0;
    padding: 0;
}

body {
    background: #f2f2f2;
    display: flex;
    flex-direction: column;
}

.topbar {
    text-align: center;
    background: black;
    color: #F5D5F6;
}

p.left {
    float: left;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin: 1.2em;
}

.container i {
    color: #f1c3f3;
    font-size: 1.6em;
}

p span {
    font-weight: bold;
}

header.container a img {
    float: left;
}

nav {
    clear: both;
}

header .container {
    background: #F6D4F5;
    padding: 0 7.9em;
}

nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.container nav a:hover {
    transition: 0.2s ease;
    background: #E4AFE2;

}

nav a {
    text-decoration: none;
    font-size: 1.2em;
    color: black;
    padding: 1em;
}

#cart {
    float: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

main.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f2f2f2;
}

section#slider h2 {
    background: rgba(246, 212, 245, 0.8);
    position: absolute;
    padding: 0.8em;
}

span {
    font-weight: normal;
    font-size: 0.9em;
}

#slider img {
    width: 100%;
}

section#slider {
    margin-top: 2em;
    background: white;
    padding: 1em;
    width: 71.5%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

section#select h1 {
    position: absolute;
    padding-left: 1em;
}

section#select {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    background: white;
    margin-top: 1em;
    width: 73.8%;
    padding: 1em 0;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}


/* Style par défaut : toutes les images en couleur */
.escarpin img {
    filter: grayscale(0%);
    transition: filter 0.2s ease, transform 0.3s ease;
}

/* Lorsqu'un escarpin est survolé, grise les autres */
section#select:has(.escarpin:hover) .escarpin:not(:hover) img {
    filter: opacity(50%);
}

section#select:has(.escarpin:hover) .escarpin:not(:hover) h3 {
    filter: opacity(50%);
}

/* Agrandissement léger de l'escarpin survolé */
.escarpin:hover img {
    transform: scale(1.2);
}

/* Cette solution fonctionnera dans les navigateurs qui supportent :has(), mais elle ne sera pas compatible avec tous (comme Chrome et Firefox pour le moment). */

section#select article h3 {
    position: absolute bottom;
    text-align: center;
    font-family: "Courgette", sans-serif;
}

#info article small {
    font-family: sans-serif;
}

section#select article img {
    width: 50%;
    height: 50%;
    margin: 2em;
    margin-top: 2.4em;
}

section#news {
    display: flex;
    justify-content: space-between;
    width: 73.8%;
    margin-top: 2em;
    margin-bottom: 2em;
}

section#news article {
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

h3 {
    font-family: "Courgette", sans-serif;
}

section#news article h3,
small {
    font-family: "Courgette", sans-serif;

}

section#news article h2 {
    width: 90%;
    color: white;
    font-weight: normal;
    font-size: 1.2em;
    margin-top: 1em;
}

section#news article img {
    width: 90%;
}

#new h2 {
    background: #EA32C4;
    padding: 0.3em;
    margin-bottom: 0.8em;
}

#best h2 {
    background: #92BE44;
    padding: 0.3em;
    margin-bottom: 0.8em;
}

#crush h2 {
    background: #0099b4;
    padding: 0.3em;
    margin-bottom: 0.8em
}

footer section#info {
    display: flex;
    justify-content: space-around;
    background: #E4AFE2;
    padding-top: 1em;
    padding-bottom: 1em;
}

#info article {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#info article:hover {
    transition: 0.6s ease;
    color: white;
    cursor: pointer;
}


#bottombar {
    background: #F6D4F5;
    display: flex;
    justify-content: space-around;
}

#bottombar article {
    display: flex;
    flex-direction: column;
}

#bottombar article ul li {
    list-style: none;
    text-align: center;
    font-size: 0.8em;
}

#bottombar article h2 {
    text-align: center;
    font-size: 1.2em;
}

@media (max-width: 640px) {

    #cart {
        display: none;
    }

    div.container a img {
        float: none;
        width: 100%;
    }

    header .container {
        flex-direction: column;
        padding: 0;
    }

    nav {
        flex-direction: column;
    }

    section#slider h2 {
        position: static;
        margin-bottom: 0.7em;
    }

    section#news {
        flex-direction: column;
    }

    section#news article {
        margin: 0.8em 0;
    }

    footer section#info {
        flex-direction: column;
        align-content: center;
    }

    #info article {
        margin: 0.8em 0;
    }

    #bottombar {
        flex-direction: column;
    }

    #bottombar article {
        margin: 0.8em 0;
    }

    #bottombar article ul li {
        margin: 0.2em;
    }
}