/* --- RESET & BASE --- */
:root {
    --primary-color: #000;
    --accent-beige: #B49282;
    --light-beige: #F5DBC4;
    --bg-gray: #f8f9fa;
    --text-dark: #333;
    --text-muted: #777;
    --sale-pink: black; /* Couleur Promo */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-gray);
    color: var(--text-dark);
    margin: 0;
}

/* --- LAYOUT PAGE --- */
.categorie-page {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.cat-header {
    text-align: center;
    margin-bottom: 50px;
}

.categorie-title {
    font-size: 2.5rem;
    margin: 0 0 10px 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.categorie-count {
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- GRID PRODUITS --- */
.produits-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* --- CARTE PRODUIT --- */
.produit-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* Nécessaire pour positionner le coeur */
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.produit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--light-beige);
}

.btn-fav-card {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10; /* Au-dessus de l'image et du lien global */
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc; /* Gris par défaut (cœur vide) */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1.1rem;
}

.btn-fav-card:hover {
    color: #B49282; /* Beige au survol */
    transform: scale(1.1);
}

/* Cœur plein (quand le produit est favori) */
.btn-fav-card.active {
    color: #d9534f; /* Rouge */
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* BADGES */
.badges-container {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.badge-sale {
    background-color: var(--sale-pink);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Image */
.card-image {
    position: relative;
    width: 100%;
    height: 300px;
    background-color: #f9f9f9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.produit-card:hover .card-image img {
    transform: scale(1.05);
}

/* Infos */
.card-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.produit-nom {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
    color: var(--primary-color);
}

/* Bloc Prix */
.price-block {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap; /* Permet au texte "A partir de" de se placer correctement */
}

.price-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.produit-prix {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: bold;
}

.promo-text {
    color: var(--sale-pink);
}

.old-price {
    font-size: 0.95rem;
    text-decoration: line-through;
    color: #999;
    font-weight: normal;
}

/* Avis / Etoiles */
.note-container {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.stars { color: #ffc107; font-size: 0.9rem; }
.stars.disabled { color: #ddd; }
.avis-count { font-size: 0.85rem; color: var(--text-muted); }
.text-muted { color: #aaa; font-style: italic; }

/* Bouton */
.card-action {
    padding: 0 20px 20px;
}

.btn-view {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: background 0.3s;
    opacity: 0;
    transform: translateY(10px);
}

.produit-card:hover .btn-view {
    opacity: 1;
    transform: translateY(0);
}

/* --- ETAT VIDE --- */
.no-produits-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
}
.no-produits-message i { font-size: 3rem; color: var(--light-beige); margin-bottom: 20px; }
.no-produits-message p { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 30px; }

.btn-back-home {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-beige);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: background 0.3s;
}
.btn-back-home:hover { background-color: #a07f6e; }

        /* Petit style rapide pour la barre de filtre */
.filters-bar {
display: flex;
justify-content: flex-end;
padding: 10px 20px;
margin-bottom: 20px;
background-color: #f9f9f9;
border-radius: 5px;
}
.sort-form select {
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
background-color: white;
cursor: pointer;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .categorie-title { font-size: 2rem; }
    .produits-container { grid-template-columns: 1fr; }
    .card-image { height: 250px; }
    .btn-view {
        opacity: 1;
        transform: translateY(0);
        background-color: #f0f0f0;
        color: #333;
    }
        .btn-fav-card {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}