/* --- Layout général --- */
body {
    font-family: 'Poppins', Arial, sans-serif;
    margin: 0;
    padding: 0;
}
main {
    width: 90%;
    margin: 0 auto;
    padding: 0 1.5vi;
}
.shop-title {
    text-align: center;
    font-size: 2.2vi;
    color: #455B94;
    margin: 2vi 0 2vi 0;
    letter-spacing: 0.05vi;
    font-weight: 700;
}
.shop-new {
    text-align: center;
    font-size: 2vi;
    color: #394b79;
    margin: 2vi 0 2vi 0;
    letter-spacing: 0.05vi;
    font-weight: 700;
}
.shop-note {
    text-align: center;
    font-size: 1.2vi;
    color: #3f3f3f;
    margin: 2vi 0 2vi 0;
    letter-spacing: 0.05vi;
    font-weight: 700;
}
.shop-layout {
    display: flex;
    gap: 2.5vi;
    align-items: flex-start;
}


/* --- Sidebar catégories --- */
.category-sidebar {
    background: #fff;
    border-radius: 1vi;
    box-shadow: 0 2px 16px #0001;
    padding: 2vi 1.5vi;
    min-width: 20vi;
    max-width: 20vi;
    margin-bottom: 2vi;
}
.category-sidebar h2 {
    color: #455B94;
    font-size: 1.5vi;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2vi;
    border-bottom: 2px solid #e6eaf7;
    padding-bottom: 1vi;
}
.category-sidebar h3{
    margin-bottom: 1.5vi;
    color: #23305a;
    font-size: 1.3vi;
    font-weight: 700;
    text-align: center;
}
.category-sidebar h4 {
    margin-bottom: 1.5vi;
    color: #23305a;
    font-size: 1.3vi;
    font-weight: 700;
    text-align: center;
    margin-top: 2vi;
}
.category-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1vi 0;
}
.category-sidebar li {
    margin-bottom: 0.4vi;
}
.category-sidebar a {
    display: block;
    padding: 0.5vi 1vi;
    border-radius: 0.5vi;
    font-size: 1.1vi;
    color: #23305a;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
}
.category-sidebar a.active,
.category-sidebar a:focus {
    background: #e6eaf7;
    color: #455B94;
}
.category-sidebar a:hover {
    background: #f0f3fa;
}

.category-sidebar a.reset-filter {
    display: inline;
    padding: 0.5vi 1vi;
    border-radius: 0.5vi;
    font-size: 1.1vi;
    color: #455B94;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
    border: 1px solid #455B94;
}

/* --- Checkbox sous-catégories --- */
.category-sidebar ul input[type="checkbox"] {
    accent-color: #455B94;
    width: 1.1vi;
    height: 1.1vi;
    margin-right: 0.6vi;
    vertical-align: middle;
    cursor: pointer;
}
.category-sidebar ul label {
    cursor: pointer;
    font-size: 1vi;
    color: #23305a;
    display: flex;
    align-items: center;
    gap: 0.5vi;
    font-weight: 500;
}
.category-sidebar ul li {
    margin-bottom: 0.5vi;
    padding-left: 0.2vi;
    transition: background 0.15s;
    border-radius: 0.4vi;
}
.category-sidebar ul li:hover {
    background: #f0f3fa;
}
.category-sidebar button[type="submit"] {
    margin-top: 1vi;
    background: #455B94;
    color: #fff;
    border: none;
    border-radius: 0.5vi;
    padding: 0.6vi 1.2vi;
    font-size: 1vi;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 1px 6px #0001;
    text-align: center;
}
.category-sidebar button[type="button"] {
    margin-top: 3vi;
    background: #fff;
    color: #455B94;
    border-radius: 0.5vi;
    padding: 0.6vi 1.2vi;
    font-size: 1.3vi;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 1px 6px #0001;
    text-align: center;
    border: 1px solid #455B94;
}
.category-sidebar button[type="submit"]:hover,
.category-sidebar button[type="submit"]:focus {
    background: #34446d;
    outline: none;
}

/* --- Filtre de sous-categories --- */
.reset-filter {
    display: block;
    margin: 1.2vi auto 0 auto;
    font-size: 1vi;
    text-decoration: underline;
    color: #455B94;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    background: none;
    border: none;
    transition: color 0.2s;
}
.reset-filter:hover,
.reset-filter:focus {
    color: #23305a;
    text-decoration: none;
}

/* --- Filtre de prix --- */
.price-filter-form {
    margin-top: 2vi;
    text-align: center;
}
.price-filter-form h4 {
    margin-bottom: 1vi;
    font-size: 1.05vi;
    color: #23305a;
    font-weight: 700;
}
.price-slider-fields {
    display: flex;
    align-items: center;
    gap: 0.7vi;
    margin-bottom: 0.5vi;
    justify-content: center;
}
.price-slider-fields input[type="range"] {
    width: 6vi;
    accent-color: #455B94;
    margin: 0 0.2vi;
}
.price-slider-fields span {
    font-size: 1vi;
    color: #888;
    min-width: 2.5vi;
    text-align: center;
}
.price-slider-values {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.7vi;
    margin-bottom: 1vi;
    font-size: 1.05vi;
    color: #23305a;
    font-weight: 600;
}
.double-slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7vi;
    margin-bottom: 0.5vi;
    width: 100%;
}
.double-slider-container span {
    font-size: 1.05vi;
    color: #23305a;
    font-weight: 600;
    min-width: 2.5vi;
    text-align: center;
}
.double-slider {
    position: relative;
    width: 13vi;
    height: 2.5vi;
    display: flex;
    align-items: center;
    justify-content: center;
}
.double-slider input[type="range"] {
    position: absolute;
    left: 0; top: 1vi;
    width: 100%;
    pointer-events: none;
    background: none;
    height: 2vi;
    margin: 0;
    z-index: 2;
}
.double-slider input[type="range"]:first-child {
    z-index: 3;
}
.double-slider input[type="range"]:focus {
    outline: none;
}
.double-slider input[type="range"]::-webkit-slider-thumb {
    pointer-events: all;
    width: 1vi;
    height: 1vi;
    border-radius: 50%;
    background: #455B94;
    border: 2px solid #fff;
    box-shadow: 0 1px 6px #0002;
    cursor: pointer;
    transition: background 0.2s;
}
.double-slider input[type="range"]:hover::-webkit-slider-thumb {
    background: #34446d;
}
.double-slider input[type="range"]::-moz-range-thumb {
    pointer-events: all;
    width: 1vi;
    height: 1vi;
    border-radius: 50%;
    background: #455B94;
    border: 2px solid #fff;
    box-shadow: 0 1px 6px #0002;
    cursor: pointer;
    transition: background 0.2s;
}
.double-slider input[type="range"]:hover::-moz-range-thumb {
    background: #34446d;
}
.double-slider input[type="range"]::-ms-thumb {
    pointer-events: all;
    width: 1vi;
    height: 1vi;
    border-radius: 50%;
    background: #455B94;
    border: 2px solid #fff;
    box-shadow: 0 1px 6px #0002;
    cursor: pointer;
    transition: background 0.2s;
}
.double-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 0.5vi;
    background: transparent;
    border-radius: 0.2vi;
}
.double-slider input[type="range"]::-moz-range-track {
    height: 0.5vi;
    background: transparent;
    border-radius: 0.2vi;
}
.double-slider input[type="range"]::-ms-fill-lower,
.double-slider input[type="range"]::-ms-fill-upper {
    background: transparent;
}
.double-slider input[type="range"]::-ms-tooltip {
    display: none;
}
.double-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: none;
}
.double-slider .slider-track {
    position: absolute;
    left: 0; top: 1.75vi;
    height: 0.4vi;
    width: 100%;
    background: #e6eaf7;
    border-radius: 0.2vi;
    z-index: 1;
}
.slider-value {
    position: absolute;
    top: 0;
    font-size: 0.95vi;
    color: #23305a;
    background: #fff;
    padding: 0 0.3vi;
    border-radius: 0.3vi;
    font-weight: 600;
    pointer-events: none;
    transform: translateX(-50%);
    z-index: 10;
    white-space: nowrap;
}

/* --- Grille produits --- */
.shop-products-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15vi, 1fr));
    gap: 2vi;
    width: 100%;
}


/* --- Carte produit --- */
.shop-product-card {
    background: #fff;
    border-radius: 1vi;
    box-shadow: 0 2px 16px #0001;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5vi 1vi 1.5vi 1vi;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    max-height: 22vi;
}
.shop-product-card:hover {
    box-shadow: 0 6px 24px #0002;
    transform: translateY(-0.5vi) scale(1.03);
}
.shop-product-card img {
    width: 9vi;
    height: 9vi;
    object-fit: contain;
    margin-bottom: 1vi;
    background: #f8f8f8;
    border-radius: 0.7vi;
    box-shadow: 0 1px 6px #0001;
}
.shop-product-info {
    text-align: center;
    width: 100%;
}
.shop-product-info h2 {
    font-size: 1.15vi;
    color: #23305a;
    font-weight: 700;
    margin: 0 0 0.5vi 0;
    min-height: 2.5em;
}
.shop-product-price {
    font-size: 1.1vi;
    color: #455B94;
    font-weight: 700;
    margin-bottom: 0.7vi;
}
.shop-add-cart {
    background: #455B94;
    color: #fff;
    border: none;
    border-radius: 0.5vi;
    padding: 0.7vi 1vi;
    font-size: 1vi;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-top: 0.5vi;
    text-align: center;
    font-family: inherit;
    text-transform: uppercase;
    box-shadow: 0 1px 6px #0001;
}
.shop-add-cart:hover, .shop-add-cart:focus {
    background: #34446d;
    outline: none;
}
.shop-product-card .badge-rupture {
    position: absolute;
    top: 1vi;
    right: 1vi;
    background: #e74c3c;
    color: #fff;
    font-size: 0.95vi;
    font-weight: 700;
    padding: 0.3vi 1vi;
    border-radius: 1vi;
    box-shadow: 0 1px 6px #0002;
    letter-spacing: 0.04em;
}

/* --- Pagination --- */
.shop-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5vi;
    margin: 2vi 0 3vi 0;
}
.shop-pagination a {
    background: #f8f8ff;
    color: #455B94;
    border: 1px solid #b7c3e0;
    border-radius: 0.5vi;
    padding: 0.6vi 1.5vi;
    font-size: 1vi;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, color 0.2s, border 0.2s;
}
.shop-pagination a:hover, .shop-pagination a:focus {
    background: #455B94;
    color: #fff;
    border-color: #455B94;
    outline: none;
}
.shop-pagination-info {
    margin-top: 4vi;
    margin-bottom: 8px;
    text-align: center;
    font-size: 1.3vi;
    color: #23305a;
}

/* --- Ligne nuage décorative --- */
.cloud-line-boutique {
    width: 80%;
    height: 5vi;
    margin: 10px auto 20px auto;
    background: none;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden;
    position: relative;
}
.cloud-line-boutique::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 5vi;
    background: url('data:image/svg+xml;utf8,<svg width="100%" height="60" viewBox="0 0 1440 60" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 30 Q 60 60 120 30 T 240 30 T 360 30 T 480 30 T 600 30 T 720 30 T 840 30 T 960 30 T 1080 30 T 1200 30 T 1320 30 T 1440 30" stroke="%23425C92" stroke-width="3" fill="none"/></svg>') no-repeat center bottom;
    background-size: cover;
    pointer-events: none;
}

/* responsive adjustments */
@media (max-width: 800px) {
    .category-sidebar {
        min-width: 27vi;
        max-width: 27vi;
    }
    .shop-products-grid {
        grid-template-columns: repeat(auto-fit, minmax(25vi, 1fr));
    }
    .category-sidebar h2{
        font-size: 3vi;
    }
    .category-sidebar h3, .category-sidebar h4 {
        font-size: 2.5vi;
    }
    .category-sidebar a {
        font-size: 2vi;
    }
    .shop-title {
        font-size: 3.5vi;
    }
    .category-sidebar button[type="submit"] {
        padding: 1.2vi 2.5vi;
        font-size: 2vi;
    }
    .shop-product-card img {
        width: 18vi;
        height: 18vi;
    }
    .shop-product-info h2 {
        font-size: 2vi;
    }
    .shop-product-price {
        font-size: 2vi;
    }
    .shop-add-cart {
        padding: 1.2vi 2.5vi;
        font-size: 1.5vi;
    }
    .shop-product-card {
        max-height: none;
    }
    .shop-pagination a {
        padding: 1.2vi 2.5vi;
        font-size: 2vi;
    }
    .price-slider-values {
        font-size: 2vi;
    }
    .double-slider-container span {
        font-size: 1.8vi;
    }
    .slider-value {
        font-size: 1.5vi;
        padding: 0 0.5vi;
    }
    .double-slider input[type="range"]::-moz-range-thumb {
        width: 2vi;
        height: 2vi;
    }
    .double-slider .slider-track {
        height: 1vi;
        top: 1.50vi;
    }
    .shop-new {
        font-size: 2.5vi;
    }
    .shop-pagination-info {
        font-size: 2vi;
    }
    .category-sidebar ul label {
        font-size: 1.8vi;
    }
    .category-sidebar ul input[type="checkbox"] {
        width: 2vi;
        height: 2vi;
    }
}