@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800;900&display=swap');

*{
    padding: 0;
    margin: 0;
    font-family: 'Montserrat', sans-serif;/*police pricipale du site*/
    font-size: 1rem;
    font-weight:500;
    user-select:none;/*empêche l'utilisateur de séléctionner les éléments du site*/
}
html{
    overflow-x: hidden; /* permet de cacher les bouts du site qui sortent du cadre.*/
}

#wrapper_message{
    display: none;
    justify-content: center;
    align-items: center;
    padding: 2em 0 0 0;
}

#message{
    display: flex;
    justify-content: center;
    align-items: center;
    height: 3em;
    width: min(90vw 20em);
    font-size: 2em;
    font-weight: 700;
    color: #ffffff;
    background-color: #71B498;
    border-radius: .5em;
    padding: 0 1.5em;
}
#message_text{
    font-weight: 600;
}

#centrer_panier{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 2em 0 0;
    min-height: 60vh;/*pour avoir le footer en bas de la page, bien guez surement à changer*/
}

#wrapper_panier>h1{
    font-weight: 900;
    font-size: 2em;
    color: #494949;
    margin-bottom: .5em;

}
#wrapper{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap:4em;
}

/* bien de la merde ce code, à refaire*/

#descriptif_produits{
    border-top: 1px solid #494949;
    display: grid;
    grid-template-columns: 3fr 1.1fr .5fr;
    column-gap: 4em;
    padding: 2em 2em 1.5em 1.25em;
    min-width: min(50em, 80vw);
}
#descriptif_produits>p{
    font-weight: 700;
    font-size:1.25em;
    color: #494949;
}

/*-------------------liste des produits-------------------*/
#panier_vide{
    font-size: 1.8em;
    font-weight: 700;
    text-align: center;
    color: #494949;
    margin: 1em 0;
}

.card_produit{
    display: flex;
    gap: 1.5em;
    margin-bottom: 2em;
}

.box_image_produit{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 7.5em;
    height: 7.5em;
    border-radius: .5em;
    text-decoration: none;
}

.image_produit{
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: .5em;
}
.box_description_produit{
    display: flex;
    align-items: center;
    justify-content:end;
    gap: 1em;/* a voir pour la responsiveness*/
    background-color: #F9F9F9;
    padding: 2em 2.7em;
    border: 1px solid #BBBBBB;
    border-radius: .5em;
    width: min(60vw,35em);
}

.nom_produit{
    width: 16em;
    text-decoration: none;
    font-weight: 700;
    color: #494949;

}
.box_description_produit>p{
    font-weight: 700;
    color: #494949;
}

.quantite_selector{
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    width: 7em;
    border: 1px solid #BBBBBB;
    border-radius: .5em;
    margin-right: 5em;
}

.quantite_selector>button{
    background: none;
    border: none;
    cursor: pointer;
    padding: .5em;
    font-size: 1.5em;
    color: #494949;
}

.wrapper_bouton_supprimer{
    position: relative;
    height: 0;
    width: 0;
}
.bouton_supprimer_panier{
    position: relative;
    background: none;
    cursor: pointer;
    height: 1.5em;
    width: 1.5em;
    border: none;
    top:3em;
}
.bouton_supprimer_panier>img{
    height: 1.5em;
    width: 1.5em;
}

.prix_total_produit{
    width: 5em;
    text-align: end;
}


/*-------------------code promo-------------------*/


#code_promo{
    padding:.5em .5em;
    width: 17em;
    text-align: center;
    font-weight: 600;
    border:1px solid #BBBBBB;
    border-radius: .5em;
    display: block;
    outline: none;
    margin: 2.5em 0 .7em;
}
#valider_promo{
    padding:.5em .5em;
    width: 18.2em;
    background-color: #71B498;
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: .5em;
    box-shadow: .15em .15em .4em #a5a5a5;
}

/*-------------------recapitulatif du panier-------------------*/

#recapitulatif{
    padding:1.8em 2.2em 2.8em 2.2em;
    background-color: #F9F9F9;
    border:1px solid #BBBBBB;
    border-radius: .5em;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: min(20em, calc(100vw - 4.4em));
}
#recapitulatif>H2{
    font-weight: 700;
    color: #494949;
    margin-bottom: 1em;
    text-align: center;
    font-size: 1.6em;
}
.infos_recapitulatif{
    display: flex;
    justify-content: space-between;
    margin: .5em 0 1em;
    width: 100%;
}

.infos_recapitulatif>p{
    font-weight: 700;
    color: #494949;
}

#infos_expedition{
    margin-bottom: 1em;

}
#infos_expedition>a{
    text-decoration: none;
    color: #71B498;
}
#infos_expedition>p{
    font-weight: 400;
}

.total_panier{
    font-size:1.25em;
}

#form_validation{
    display: flex;
    flex-direction: column;
    width: 100%;
    
}

#valider_panier{
    padding:1em .5em;
    width: 100%;
    background-color: #71B498;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    border: none;
    border-radius: .5em;
    box-shadow: .15em .15em .4em #a5a5a5;
    display: block;
    text-align: center;
    margin-top:.5em;
}

#continuer_achats{
    padding:1em .5em;
    width: calc(100% - 1em);
    background-color: #ffffff;
    color: #494949;
    font-weight: 700;
    border-radius: .5em;
    box-shadow: .15em .15em .4em #a5a5a5;
    margin-top: 1em;
    display: block;
    text-align: center;
    text-decoration: none;
}

@media screen and (max-width: 800px){
    #wrapper_panier>h1{
        margin-left:1em;
    }
    #descriptif_produits{
        max-width: calc(90vw - 3.25em);

    }

    .card_produit{
        gap:.7em;
        align-items: center;
    }
    .bouton_supprimer_panier{
        position: static;
    }
    .box_image_produit{
        width: 4.5em;
        height: 4.5em;
    }

    .box_description_produit{
        padding: .5em .9em;
    }
    .quantite_selector{
        margin: 0;
    }

    #code_promo_box{
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    #code_promo{
        margin: .5em 0 1em;
    }
}