:root {
    --ivf-pink: #d84f68;
    --ivf-pink-dark: #b93751;
    --ivf-pink-pale: #fff1f4;
    --ivf-yellow: #fff5d7;
    --ivf-aqua: #e4f7f5;
    --ivf-lilac: #f2edff;
    --ivf-ink: #202032;
    --ivf-muted: #6e6a76;
    --ivf-border: #f0d2d9;
    --ivf-white: #fff;
}

html.ivf-no-scroll,
html.ivf-no-scroll body {
    overflow: hidden;
}

.ivf-root,
.ivf-root * {
    box-sizing: border-box;
}

.ivf-root {
    position: relative;
    display: grid;
    grid-template-columns: minmax(245px, 286px) minmax(0, 1fr);
    gap: clamp(24px, 3vw, 44px);
    width: 100%;
    color: var(--ivf-ink);
    font-family: inherit;
}

.ivf-panel {
    position: sticky;
    top: 86px;
    align-self: start;
    max-height: calc(100vh - 106px);
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--ivf-border);
    border-radius: 24px;
    background: var(--ivf-white);
    box-shadow: 0 13px 36px rgba(92, 42, 56, .08);
    scrollbar-color: #efc3ce transparent;
    scrollbar-width: thin;
}

.ivf-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 22px 18px;
    background: linear-gradient(135deg, var(--ivf-pink-pale), #fff9ed);
}

.ivf-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--ivf-pink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.ivf-panel h2 {
    margin: 0;
    color: var(--ivf-ink);
    font-size: clamp(21px, 2vw, 25px);
    line-height: 1.12;
}

.ivf-close {
    display: none;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: var(--ivf-ink);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.ivf-context {
    display: flex;
    flex-direction: column;
    margin: 16px 18px 4px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--ivf-aqua);
}

.ivf-context span {
    color: var(--ivf-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.ivf-context strong {
    margin-top: 2px;
    font-size: 15px;
}

.ivf-form {
    padding: 6px 18px 18px;
}

.ivf-group {
    border-bottom: 1px solid #f3e7ea;
}

.ivf-group:last-child {
    border-bottom: 0;
}

.ivf-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px 2px 13px;
    color: var(--ivf-ink);
    font-size: 16px;
    font-weight: 800;
    list-style: none;
    cursor: pointer;
}

.ivf-group summary::-webkit-details-marker {
    display: none;
}

.ivf-group summary span {
    color: var(--ivf-pink);
    font-size: 22px;
    font-weight: 500;
    transition: transform .2s ease;
}

.ivf-group[open] summary span {
    transform: rotate(45deg);
}

.ivf-options {
    padding-bottom: 13px;
}

.ivf-option {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 34px;
    gap: 9px;
    margin: 1px 0;
    padding: 5px 2px;
    border-radius: 8px;
    color: #343140;
    font-size: 14px;
    line-height: 1.25;
    cursor: pointer;
}

.ivf-option:hover {
    background: #fff8fa;
}

.ivf-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ivf-check {
    position: relative;
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    border: 1.5px solid #d9c9cd;
    border-radius: 6px;
    background: #fff;
    transition: .15s ease;
}

.ivf-check--radio {
    border-radius: 50%;
}

.ivf-option input:checked + .ivf-check {
    border-color: var(--ivf-pink);
    background: var(--ivf-pink);
}

.ivf-option input:checked + .ivf-check::after {
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    content: '';
    transform: rotate(45deg);
}

.ivf-option input:checked + .ivf-check--radio::after {
    top: 5px;
    left: 5px;
    width: 7px;
    height: 7px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    transform: none;
}

.ivf-option input:focus-visible + .ivf-check {
    outline: 3px solid rgba(216, 79, 104, .2);
    outline-offset: 2px;
}

.ivf-option-label {
    min-width: 0;
    flex: 1;
}

.ivf-option-count {
    min-width: 27px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #f7f2f4;
    color: var(--ivf-muted);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.ivf-option.is-empty {
    opacity: .36;
    cursor: not-allowed;
}

.ivf-option--extra {
    display: none;
}

.ivf-group.is-expanded .ivf-option--extra {
    display: flex;
}

.ivf-more {
    margin: 8px 0 2px 28px;
    padding: 9px 18px !important;
    border: 1px solid var(--ivf-pink) !important;
    border-radius: 999px !important;
    background: var(--ivf-pink) !important;
    color: #fff !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.ivf-more:hover {
    border-color: var(--ivf-pink-dark) !important;
    background: var(--ivf-pink-dark) !important;
    color: #fff !important;
}

.ivf-option--sale {
    margin-top: 7px;
    padding-top: 11px;
    border-top: 1px dashed var(--ivf-border);
    color: var(--ivf-pink-dark);
    font-weight: 700;
}

.ivf-panel-actions {
    display: flex;
    gap: 9px;
    padding: 14px 18px 18px;
    border-top: 1px solid #f3e7ea;
    background: #fff;
}

.ivf-reset,
.ivf-apply,
.ivf-open {
    min-height: 44px;
    border-radius: 13px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.ivf-reset {
    flex: 1;
    border: 1px solid var(--ivf-border);
    background: #fff;
    color: var(--ivf-pink-dark);
}

.ivf-apply {
    display: none;
    flex: 1.25;
    border: 1px solid var(--ivf-pink);
    background: var(--ivf-pink);
    color: #fff;
}

.ivf-main {
    min-width: 0;
}

.ivf-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    min-height: 56px;
    margin-bottom: 18px;
}

.ivf-toolbar-copy {
    min-width: 0;
}

.ivf-result-count {
    display: block;
    margin: 2px 0 8px;
    color: var(--ivf-ink);
    font-size: 18px;
    font-weight: 800;
}

.ivf-active {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ivf-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid #efc3ce;
    border-radius: 999px;
    background: var(--ivf-pink-pale);
    color: #8e2f44;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.ivf-chip b {
    font-size: 16px;
    line-height: .8;
}

.ivf-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ivf-open {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 0 15px;
    border: 1px solid var(--ivf-border);
    background: #fff;
    color: var(--ivf-ink);
}

.ivf-active-number {
    display: inline-grid;
    place-items: center;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--ivf-pink);
    color: #fff;
    font-size: 11px;
}

.ivf-sort-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--ivf-muted);
    font-size: 13px;
    font-weight: 700;
}

.ivf-sort {
    min-height: 44px;
    min-width: 184px;
    padding: 0 38px 0 14px;
    border: 1px solid var(--ivf-border);
    border-radius: 13px;
    background-color: #fff;
    color: var(--ivf-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ivf-live-status {
    height: 0;
    overflow: visible;
    color: var(--ivf-muted);
    font-size: 13px;
}

.ivf-live-status.is-error {
    height: auto;
    margin: -6px 0 16px;
    padding: 10px 13px;
    border-radius: 10px;
    background: #fff0f2;
    color: #982d44;
}

.ivf-results {
    position: relative;
    min-height: 280px;
    transition: opacity .16s ease;
}

.ivf-root.is-loading .ivf-results {
    opacity: .42;
    pointer-events: none;
}

.ivf-root.is-loading .ivf-results::before {
    position: absolute;
    z-index: 20;
    top: 100px;
    left: 50%;
    width: 38px;
    height: 38px;
    margin-left: -19px;
    border: 4px solid rgba(216, 79, 104, .18);
    border-top-color: var(--ivf-pink);
    border-radius: 50%;
    content: '';
    animation: ivf-spin .7s linear infinite;
}

@keyframes ivf-spin {
    to { transform: rotate(360deg); }
}

.ivf-results ul.products {
    display: grid !important;
    grid-template-columns: repeat(var(--ivf-columns, 4), minmax(0, 1fr));
    gap: clamp(18px, 2.2vw, 30px) clamp(12px, 2vw, 26px);
    margin: 0 !important;
}

.ivf-root[data-columns="2"] { --ivf-columns: 2; }
.ivf-root[data-columns="3"] { --ivf-columns: 3; }
.ivf-root[data-columns="4"] { --ivf-columns: 4; }
.ivf-root[data-columns="5"] { --ivf-columns: 5; }

.ivf-results ul.products::before,
.ivf-results ul.products::after {
    display: none !important;
}

.ivf-results ul.products li.product {
    float: none !important;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
}

.ivf-root--archive .ivf-results > .woocommerce-result-count,
.ivf-root--archive .ivf-results > .woocommerce-ordering {
    display: none !important;
}

.ivf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 42px 0 12px;
}

.ivf-pagination button,
.ivf-pagination span {
    display: inline-grid;
    place-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 9px;
    border: 1px solid var(--ivf-border);
    border-radius: 12px;
    background: #fff;
    color: var(--ivf-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
}

.ivf-pagination button {
    cursor: pointer;
}

.ivf-pagination button:hover,
.ivf-pagination button.is-current {
    border-color: var(--ivf-pink);
    background: var(--ivf-pink);
    color: #fff;
}

.ivf-pagination button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.ivf-empty {
    display: grid;
    justify-items: center;
    padding: clamp(44px, 8vw, 86px) 22px;
    border: 1px dashed var(--ivf-border);
    border-radius: 24px;
    background: linear-gradient(145deg, #fff8fa, #fffdf5);
    text-align: center;
}

.ivf-empty > span {
    font-size: 43px;
}

.ivf-empty h3 {
    margin: 12px 0 6px;
    font-size: 23px;
}

.ivf-empty p {
    margin: 0 0 18px;
    color: var(--ivf-muted);
}

.ivf-empty .ivf-reset {
    flex: none;
    padding: 0 18px;
}

.ivf-overlay {
    display: none;
}

@media (min-width: 941px) {
    .ivf-panel {
        width: calc(100% + 20px);
        margin-left: clamp(-96px, calc(2px - 4.5vw), -46px);
    }
}

@media (max-width: 1180px) {
    .ivf-results ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 940px) and (min-width: 768px) {
    .ivf-root {
        grid-template-columns: 235px minmax(0, 1fr);
        gap: 20px;
    }

    .ivf-results ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ivf-sort-wrap > span {
        display: none;
    }
}

@media (max-width: 767px) {
    .ivf-root {
        display: block;
        width: 100%;
    }

    .ivf-panel {
        position: fixed;
        z-index: 100002;
        top: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        width: min(92vw, 390px);
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        overflow: hidden;
        border: 0;
        border-radius: 24px 0 0 24px;
        box-shadow: -18px 0 55px rgba(32, 32, 50, .18);
        overscroll-behavior: contain;
        transform: translateX(105%);
        transition: transform .24s ease;
    }

    .ivf-panel-head,
    .ivf-context,
    .ivf-panel-actions {
        flex: 0 0 auto;
    }

    .ivf-form {
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        padding-bottom: 32px;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
    }

    .ivf-root.is-panel-open .ivf-panel {
        transform: translateX(0);
    }

    .ivf-overlay {
        position: fixed;
        z-index: 100001;
        inset: 0;
        display: block;
        background: rgba(36, 27, 31, .36);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    .ivf-root.is-panel-open .ivf-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .ivf-close,
    .ivf-apply,
    .ivf-open {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .ivf-panel-actions {
        position: relative;
        z-index: 3;
        padding-bottom: max(18px, env(safe-area-inset-bottom));
        box-shadow: 0 -10px 24px rgba(55, 32, 39, .07);
    }

    .ivf-toolbar {
        align-items: stretch;
        gap: 10px;
        margin-bottom: 16px;
    }

    .ivf-toolbar-copy {
        flex: 1;
    }

    .ivf-result-count {
        font-size: 16px;
    }

    .ivf-toolbar-actions {
        align-items: flex-start;
    }

    .ivf-sort-wrap {
        display: block;
    }

    .ivf-sort-wrap > span {
        display: none;
    }

    .ivf-sort {
        min-width: 132px;
        width: 132px;
        padding-right: 28px;
        font-size: 13px;
    }

    .ivf-active {
        width: calc(100vw - 28px);
        max-width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 3px;
        scrollbar-width: none;
    }

    .ivf-active::-webkit-scrollbar {
        display: none;
    }

    .ivf-chip {
        flex: 0 0 auto;
    }

    .ivf-results ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 10px;
    }

    .ivf-pagination {
        gap: 5px;
        margin-top: 34px;
    }

    .ivf-pagination button,
    .ivf-pagination span {
        min-width: 36px;
        height: 38px;
        border-radius: 10px;
    }
}

@media (max-width: 390px) {
    .ivf-toolbar {
        flex-wrap: wrap;
    }

    .ivf-toolbar-actions {
        order: -1;
        width: 100%;
        justify-content: space-between;
    }

    .ivf-open {
        flex: 1;
    }

    .ivf-sort {
        width: 124px;
        min-width: 124px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ivf-panel,
    .ivf-overlay,
    .ivf-results {
        transition: none !important;
    }

    .ivf-root.is-loading .ivf-results::before {
        animation-duration: 1.4s;
    }
}


/* Correctif mobile : les filtres actifs occupent une ligne complete. */
@media (max-width: 767px) {
  .ivf-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; }
  .ivf-toolbar-copy { display:contents; }
  .ivf-result-count { grid-column:1; grid-row:1; align-self:center; }
  .ivf-toolbar-actions { grid-column:2; grid-row:1; }
  .ivf-active { grid-column:1 / -1; grid-row:2; width:100%; max-width:none; min-width:0; }
}
@media (max-width: 390px) {
  .ivf-toolbar-actions { width:auto; justify-content:flex-end; }
  .ivf-open { flex:0 1 auto; padding-left:12px; padding-right:12px; }
}


/* Panneau de filtres repliable sur ordinateur. */
.ivf-desktop-toggle {
    display: none;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--ivf-border);
    border-radius: 13px;
    background: var(--ivf-pink-pale);
    color: var(--ivf-pink-dark);
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}
.ivf-desktop-toggle:hover,
.ivf-desktop-toggle:focus-visible {
    border-color: #e7a8b7;
    background: #ffe7ed;
}
.ivf-desktop-toggle-icon {
    font-size: 25px;
    font-weight: 500;
    line-height: .8;
    transition: transform .2s ease;
}
.ivf-desktop-toggle.is-collapsed .ivf-desktop-toggle-icon {
    transform: rotate(180deg);
}
@media (min-width: 941px) {
    .ivf-root { transition: grid-template-columns .22s ease, gap .22s ease; }
    .ivf-panel { transition: opacity .16s ease, transform .22s ease; }
    .ivf-desktop-toggle { display: inline-flex; }
    .ivf-results ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ivf-root.is-panel-collapsed {
        grid-template-columns: 0 minmax(0, 1fr);
        gap: 0;
    }
    .ivf-root.is-panel-collapsed .ivf-panel {
        width: 0;
        min-width: 0;
        max-width: 0;
        height: 0;
        max-height: 0;
        margin: 0;
        overflow: hidden;
        border: 0;
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transform: translateX(-18px);
    }
    .ivf-root.is-panel-collapsed .ivf-results ul.products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
