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

/* Zone principale */
.inventory-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    margin-top: 90px;
    font-size: 3rem;
    text-align: center;
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 20px auto;
    font-size: 1.1rem;
    line-height: 1.6;
}


/* Conteneur principal */
.tri-container {
    max-width: 1200px;
    margin: 30px auto 10px auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    font-family: 'Manrope', sans-serif;
}

.tri-container label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4A443F;
    margin-right: 12px;
}

/* On aligne le select et le span côte à côte grâce au Flexbox */
.select-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #4A443F; /* La bordure gris foncé d'Oly */
    border-radius: 4px;
    padding: 8px 12px; /* Un peu d'espace interne */
    background-color: #ffffff;
    transition: border-color 0.3s;
}

/* Changement de bordure au survol avec ton vert fétiche */
.select-wrapper:hover {
    border-color: #76876e;
}

/* Le menu déroulant (on retire sa bordure et sa flèche d'origine) */
.tri-container select {
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    color: #4A443F;
    border: none; 
    background: none;
    cursor: pointer;
    outline: none;
    padding-right: 8px; /* Espace entre le texte et ta flèche span */

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Style de ta flèche dans le span */
.fleche-tri {
    font-size: 0.65rem; /* On la met petite et discrète */
    color: #4A443F;    /* Même couleur gris foncé que ton texte */
    pointer-events: none; /* Permet de cliquer à travers si besoin */
}

.articles-grid {
    display: flex;
    flex-wrap: wrap; 
    gap: 30px; 
    justify-content: center; 
}

.article-card {
    background-color: #ffffff;
    border-radius: 4px;
    width: 350px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column; 
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
}

.article-card:hover{
transform: scale(1.05);
}

.card-img-box {
    width: 100%;
    height: 380px;
}

.card-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}


.card-text-box {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}

.category-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #3B7597; 
    font-weight: bold;
    margin-bottom: 5px;
}

.card-text-box h3 {
    font-family: 'Oranienbaum', serif;
    font-size: 1.5rem;
    margin: 5px 0 10px 0;
}

.card-text-box p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #666;
}

.article-price {
    color: #76876e;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: auto; 
    margin-bottom: 15px;
}

@media (min-width: 768px) {

    .section-title {
        font-size: 4rem; /* Un titre un peu plus imposant sur desktop */
        margin-top: 120px; /* Plus d'espace sous ton menu fixe */
    }

    .section-subtitle {
        font-size: 1.2rem;
        margin-bottom: 40px;
    }

    /* Aligner proprement le bouton de tri sur la grille globale */
    .tri-container {
        padding: 0; 
        margin-bottom: 25px;
    }

    /* CORRECTION GRILLE : Passage en CSS Grid pour un alignement parfait au pixel près */
    .articles-grid {
        display: grid;
        /* Crée automatiquement autant de colonnes de 350px que l'écran le permet */
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 30px;
        justify-content: center;
        width: 100%;
    }

    .article-card {
        width: 100%; /* La carte prend toute la largeur de sa cellule Grid dynamique */
        max-width: 350px;
        margin: 0 auto; /* Permet de rester centrée si la cellule s'étire légèrement */
    }
}
