/* --- MISE EN PAGE DE BASE --- */
.artifact-catalog-wrapper {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.container-grid {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

/* --- BANNIÈRE DE TITRE DORÉE --- */
.artifact-title-badge {
    background-color: #b8860b;
    display: inline-flex;
    align-items: center;
    padding: 12px 40px;
    border-radius: 0 50px 50px 0;
    margin-left: -20px;
    box-shadow: 4px 4px 15px rgba(0,0,0,0.1);
}

.artifact-title-badge h1 {
    margin: 0;
    font-size: 24px;
    color: #000;
    font-weight: 800;
    padding-right: 20px;
}

.header-icon {
    font-size: 24px;
    color: #000;
}

/* --- SIDEBAR --- */
.sidebar {
    flex: 0 0 280px;
}

.filter-group h3 {
    text-transform: uppercase;
    font-size: 12px;
    color: #999;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.filter-box {
    background: #fdfaf5;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #f0e6d2;
}

.filter-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-box ul li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.filter-box ul li a {
    text-decoration: none;
    color: #444;
    font-size: 14px;
    transition: 0.2s;
}

.filter-box ul li a:hover {
    color: #b8860b;
}

.filter-box ul li a.active-link {
    color: #b8860b;
    font-weight: bold;
}

/* FILTRE PRIX */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-inputs input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
}

.btn-group {
    display: flex;
    gap: 8px;
}

.btn-filter {
    flex: 3;
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
}

.btn-filter:hover {
    background: #b8860b;
    color: #000;
}

.btn-reset {
    flex: 1;
    background: #eee;
    color: #333;
    text-decoration: none;
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.3s;
}

.btn-reset:hover {
    background: #ddd;
}

/* =========================================
   BARRE DE RECHERCHE CATALOGUE
   ========================================= */
.catalog-search-bar {
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 30px;
    border: 1px solid #eaeaea;
    display: flex !important; /* On force l'affichage */
    align-items: center;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.catalog-search-bar input[type="search"] {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: #333;
    outline: none;
    padding: 10px;
    width: 100%;
}

.catalog-search-bar button {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    white-space: nowrap; /* Empêche le texte du bouton de passer à la ligne */
}

.catalog-search-bar button:hover {
    background: #b8860b;
    color: #000;
}

.catalog-search-bar i {
    color: #888;
    font-size: 18px;
    margin-left: 5px;
}

/* --- GRILLE ET CARTES (CENTRÉ) --- */
.product-content {
    flex: 1;
    max-width: 100%;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    justify-content: center;
    justify-items: center;
}

@keyframes fadeInUpProduct {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    overflow: hidden;
    transition: 0.3s;
    width: 100%;
    max-width: 300px;
    text-align: center;
    display: flex;
    flex-direction: column;
    animation: fadeInUpProduct 0.6s ease-out both;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }
.product-card:nth-child(7) { animation-delay: 0.7s; }
.product-card:nth-child(8) { animation-delay: 0.8s; }

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    border-color: #b8860b;
}

/* --- SECTION IMAGE --- */
.img-container {
    height: 250px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

.img-container a {
    display: block;
    width: 100%;
    height: 100%;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .img-container img {
    transform: scale(1.05);
}

/* --- INFOS PRODUIT --- */
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h4 {
    margin: 0 0 10px 0;
    min-height: 40px;
}

.product-info h4 a {
    text-decoration: none;
    color: #1a1a1a;
    font-size: 16px;
    font-weight: 700;
}

.price-row {
    margin: 15px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.current-price {
    font-weight: 800;
    font-size: 20px;
    color: #000;
}

/* --- BOUTON AJOUTER AU PANIER --- */
.artifact-add-to-cart-container {
    margin-top: auto;
}

.artifact-add-to-cart-container .button {
    display: block;
    width: 100%;
    background-color: #1a1a1a !important;
    color: #fff !important;
    padding: 12px 0 !important;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    text-decoration: none;
    transition: 0.3s;
    border: none !important;
}

.artifact-add-to-cart-container .button:hover {
    background-color: #b8860b !important;
    color: #000 !important;
}

.artifact-add-to-cart-container .added_to_cart {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: #27ae60;
    font-weight: bold;
    text-decoration: none;
}

/* --- PAGINATION --- */
.pagination-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-numbers {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #eee;
    text-decoration: none;
    color: #333;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.2s;
}

.page-numbers:hover {
    background: #f5f5f5;
}

.page-numbers.current {
    background: #b8860b;
    color: #000;
    border-color: #b8860b;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 900px) {
    .container-grid {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        flex: none;
    }
    /* Adaptation de la barre de recherche sur mobile */
    .catalog-search-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }
    .catalog-search-bar i {
        display: none; /* Cache l'icône sur mobile pour gagner de la place */
    }
    .catalog-search-bar button {
        width: 100%;
    }
}