/*------------------------------------*\
    $Base / Version mobile
\*------------------------------------*/
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    margin: 0;
    background-color: #f4f4f4;
}

a {
    transition: all 0.1s ease-in;
    text-decoration: none;
}

/* Typographie de la marque */
header h1 a {
    font-family: 'Permanent Marker', cursive; /* [cite: 50] */
    font-size: 20px; /* [cite: 50] */
    color: white; /* [cite: 53] */
}

header h1 a:hover {
    color: #006eff; /* [cite: 54] */
}

/* Conteneur de base */
#conteneur {
    display: grid;
    grid-template-columns: 1fr;
}

/* En-tête */
header {
    background-color: #333;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#liens-secondaires {
    display: flex;
    align-items: center;
}

#liens-secondaires a {
    color: white;
    margin-left: 15px;
}

#liens-secondaires .material-icons {
    font-size: 24px;
    vertical-align: middle;
}

/* Menu de navigation */
#navigation-principale {
    background-color: #444;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#navigation-principale a {
    color: white; /* [cite: 53] */
    padding: 15px;
    text-transform: uppercase;
    font-size: 14px;
}

#navigation-principale a:hover {
    color: #006eff; /* [cite: 54] */
}

/* Aside / Filtres */
aside {
    padding: 20px;
    background-color: #fff;
}

#tri {
    display: flex;
    gap: 20px;
}

.tri-collection {
    display: flex;
    flex-direction: column;
}

.tri-collection label {
    text-transform: uppercase;
    color: #666;
    margin-bottom: 5px;
    font-size: 12px;
}

/* Articles */
#produits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

article {
    background: white;
    padding: 15px;
    text-align: center;
    width: 100%; 
    max-width: 300px;
    position: relative;
}

.article-image img {
    max-width: 150px; /* */
    height: auto;
}

.article-infos h5 { margin: 10px 0 5px; color: #333; }
.article-infos h6 { margin: 0; color: #666; }

/* Bonus : Effet de survol */
article .article-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.1); /* [cite: 60] */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

article:hover .article-overlay {
    opacity: 1;
}

article .article-overlay span {
    background-color: #006eff; /* [cite: 60] */
    color: white;
    padding: 10px 20px;
    border-radius: 2px;
}

/* Pied de page */
footer {
    background-color: #333;
    color: #aaa; /* [cite: 56] */
    padding: 30px 20px;
}

#footer-inner {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

footer h3 { color: white; text-transform: uppercase; font-size: 16px; }
footer ul { list-style: none; padding: 0; }
footer a { color: #aaa; } /* [cite: 56] */
footer a:hover { color: white; } /* [cite: 57] */

.credit { text-align: center; margin-top: 40px; font-size: 12px; }

/*------------------------------------*\
    $Version Tablette (> 480px)
\*------------------------------------*/
@media screen and (min-width: 480px) {
    #conteneur {
        grid-template-areas: 
            "header"
            "nav"
            "aside"
            "produits"
            "footer";
    }

    article {
        width: calc(50% - 20px);
    }

    #footer-inner {
        flex-direction: row;
        justify-content: space-between;
    }
}

/*------------------------------------*\
    $Version Desktop (> 960px)
\*------------------------------------*/
@media screen and (min-width: 960px) {
    #conteneur {
        display: grid;
        width: 100%; /* Prend toute la largeur de la fenêtre */
        grid-template-columns: 250px 1fr; /* 250px pour la sidebar, le reste pour les produits */
        grid-template-rows: auto auto 1fr auto;
        grid-template-areas: 
            "header header"
            "nav nav"
            "aside produits"
            "footer footer";
        max-width: none; /* Supprime la limitation de largeur */
        margin: 0;
    }

    header { grid-area: header; }
    #navigation-principale { grid-area: nav; }
    aside { grid-area: aside; border-right: 1px solid #ddd; }
    #produits { grid-area: produits; justify-content: flex-start; padding: 40px; }
    footer { grid-area: footer; }

    #tri {
        flex-direction: column; 
    }

    article {
        /* Permet d'afficher 3 à 4 articles par ligne selon la largeur de l'écran */
        width: calc(25% - 20px);
        min-width: 220px;
    }
}