*,
*::after,
*::before {
    box-sizing: border-box;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url(../img/background.webp);
    background-size: cover;
    background-position: center;
    opacity: 0.4;
    z-index: -1;
}

body {
    position: relative;
    margin: 0;
    font-family: "Jaro", sans-serif;
    color: white;
    background-color: #000000;
}

ul li:nth-child(2) a {
    color: #ED0D11;
}

a {
    color: #ffffff;
    text-decoration: none;
}

/*Stylisé la barre de navigation, j'ai mis une propriété sticky mais je ne crois pas qu'elle fonctionne [à vérifier]*/
nav {
    font-size: 2.5rem;
    margin-top: -20px;
}

nav .nav-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 2vw;
}

/*Faire le style à chaque éléments de la liste de la nav barre*/
.nav-list li {
    list-style-type: none;
    color: #ED0D11;
    padding: 20px;
    position: relative;
}

/*Pour faire en sorte que les 2 derniers éléments de la nav barre aille à droite*/
.nav-list li:nth-child(2) {
    margin-left: auto;
}

/*Styliser la barre de recherche*/
.search-bar {
    display: inline-flex;
    align-items: center;
    border: 1px solid;
    border-radius: 20px;
    background-color: #312A2A;
    color: white;
    height: 40px;
    width: 300px;
    padding-right: 40px;
    /*Pour faire en sorte que l'écriture dans la barre de recherche n'aille pas derrière l'image de la loupe*/
}

/*Dimensionner tout le bouton de recherche*/
.nav-list button {
    position: absolute;
    right: 8%;
    top: 63%;
    transform: translateY(-50%);
    background: transparent;
    cursor: pointer;
    border: none;
}

/*Dimensionner la loupe*/
.nav-list button img {
    width: 44px;
    height: 44px;
    padding: 5px;
    margin-bottom: 5px;
}

/*Enlever la croix à la fin de la barre de recherche qui apparait automatiquement*/
.search-bar::-webkit-search-cancel-button {
    display: none;
}


/* Les filtres */

.filtres {
    display: flex;
    gap: 10px;
    margin: 20px 2vw;
}

.filtres button,
.filtres select {
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    background: #ED1D24;
    color: white;
    font-family: "Jaro", sans-serif;
    font-size: 1rem;
    cursor: pointer;
}

/* Carte des objets */

.card-object {
    background: #ED0D11;
    border-radius: 30px;
    padding: 10px 10px 14px;
    display: flex;
    flex-direction: column;
    height: 53vh;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-inline: 2vw;
}

.card-object>p:nth-child(1) {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

.card-object>p:nth-child(1) img {
    width: 100%;
    height: 224px;
    object-fit: cover;
    border-radius: 30px;
    background: #111;
}

.card-object>h4 {
    font-size: 1.5rem;
    margin: 2px 0;
}

.card-object>p:nth-child(3) {
    display: block;
    font-size: 0.8rem;
    color: #fff;
    margin-bottom: 5px;
}

.card-object>p:nth-child(4) {
    text-align: right;
    font-size: 1rem;
    color: #000000;
    margin-top: auto;
    margin-bottom: 0;
}

footer {
    height: 10vh;
    margin-top: 50px;
    margin-left: 82%;
}

footer a {
    color: white;
    font-size: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

@media (max-width: 768px) {

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}