/* Variables et configuration */
:root {
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --filter-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --card-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --color-background: #f8f9fa;
    --color-text: #2d3436;
    --color-gold-light: #f7e9d7;
    --color-gold-hover: #c49b63;
    --color-gold: #D4AF37;
    --header-height: 57px;
    --filters-width: 230px;
    --card-hover-y: -8px;
}

/* Structure principale */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--color-background);
}

main {
    min-height: calc(100vh - var(--header-height));
    margin-top: var(--header-height);
    position: relative;
}

/* Contenu principal */
.products-section {
    margin-left: var(--filters-width);
    padding: 2rem;
    max-width: 1400px;
}

/* Section Filtres */
.filters {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--filters-width);
    height: calc(100vh - var(--header-height));
    background: white;
    padding: 1.5rem;
    box-shadow: var(--filter-shadow);
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filter-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.filter-groups-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.filter-group {
    width: 100%;
}

.filter-toggle {
    width: 100%;
    padding: 0.8rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-toggle:hover {
    background: var(--color-gold-light);
    border-color: var(--color-gold);
}

.filter-options {
    margin-top: 0.5rem;
    padding: 0.8rem;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-option:hover {
    background: var(--color-gold-light);
    border-radius: 4px;
}

/* Boutique header */
.boutique-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.boutique-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--color-text);
    margin-bottom: 1rem;
}

.boutique-header .subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* Actions des filtres */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.apply-filters,
.reset-filters {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.apply-filters {
    background: var(--color-gold);
    color: white;
    border: none;
}

.apply-filters:hover {
    background: var(--color-gold-hover);
}

.reset-filters {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.reset-filters:hover {
    background: var(--color-gold-light);
    border-color: var(--color-gold);
}

/* Mobile */
/* Boutons de filtres mobile */
.filter-toggle-mobile {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-gold);
    border: none;
    color: white;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.filter-toggle-mobile iconify-icon {
    font-size: 24px;
}

.filter-close,
.filters-overlay {
    display: none;
}

/* Responsive design */
@media (max-width: 1024px) {
    .filters {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 85%;
        max-width: 350px;
    }

    .filters.active {
        transform: translateX(0);
    }

    .products-section {
        margin-left: 0;
        padding: 1rem;
    }

    .filter-toggle-mobile {
        display: flex !important;
    }

    .filter-toggle-mobile:hover {
        background: var(--color-gold-hover);
        transform: scale(1.1);
    }

    .filter-close {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        color: var(--color-text);
        cursor: pointer;
        padding: 0.5rem;
        transition: color 0.3s ease;
    }

    .filter-close:hover {
        color: var(--color-gold);
    }

    .filters-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .filters-overlay.active {
        display: block;
        opacity: 1;
    }
}

/* Grille des produits */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
}

.product-card:hover {
    transform: translateY(var(--card-hover-y));
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
}

/* Price range slider */
.price-range {
    padding: 1rem 0;
}

.price-values {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text);
}

.selected-price {
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
    color: var(--color-gold);
}

.slider {
    width: 100%;
    margin: 1rem 0;
}