/* ====================================================================
 * Primtee Single Product — design premium inspiré des meilleurs sites
 * e-commerce mode (Aimé Leon Dore, Sézane, Veja, COS).
 * Préfixe .psp / spécificité doublée .psp.psp pour résister aux thèmes.
 * ================================================================== */

.psp {
    --psp-fg: #0b0b0b;
    --psp-muted: #6e7480;
    --psp-line: rgba(15, 15, 15, 0.08);
    --psp-line-strong: rgba(15, 15, 15, 0.14);
    --psp-bg: #ffffff;
    --psp-bg-soft: #f4f4f2;
    --psp-bg-card: #ffffff;
    --psp-accent: #111;
    --psp-radius-xl: 22px;
    --psp-radius-lg: 18px;
    --psp-radius-md: 14px;
    --psp-radius-sm: 10px;
    --psp-gap: clamp(28px, 4vw, 64px);
    --psp-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --psp-transition: 320ms var(--psp-ease);
    --psp-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --psp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 14px rgba(0, 0, 0, 0.06);
    --psp-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06), 0 20px 44px rgba(0, 0, 0, 0.08);
    --psp-shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.08), 0 30px 60px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: clamp(16px, 2.4vw, 40px) clamp(14px, 2vw, 32px);
    color: var(--psp-fg);
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

.psp *,
.psp *::before,
.psp *::after {
    box-sizing: border-box;
}

/* Neutralisation pseudo-éléments thèmes (puces, bullets…) */
.psp.psp *::before,
.psp.psp *::after {
    content: none !important;
    background: none !important;
    background-image: none !important;
    background-color: transparent !important;
    border: 0 !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    text-indent: 0 !important;
}
.psp.psp ul,
.psp.psp ol,
.psp.psp li {
    list-style: none !important;
    list-style-type: none !important;
    list-style-image: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.psp.psp li {
    display: block !important;
    text-indent: 0 !important;
}
.psp.psp li::marker {
    content: none !important;
    color: transparent !important;
    font-size: 0 !important;
}

/* ====================================================================
 * Layout principal
 * ================================================================== */
.psp__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--psp-gap);
    align-items: flex-start;
}

@media (max-width: 1024px) {
    .psp__layout {
        grid-template-columns: 1fr;
        gap: clamp(24px, 4vw, 40px);
    }
}

/* ====================================================================
 * Galerie (desktop : image à gauche, miniatures empilées à droite —
 * hauteur max = 5 cases + flèches en dessous, pas de débordement sous l’image)
 * ================================================================== */
.psp__gallery {
    --psp-thumb-size: 74px;
    --psp-thumb-gap: 8px;
    --psp-thumbs-visible: 5;

    display: flex;
    flex-direction: row;
    gap: 14px;
    align-items: flex-start;
    position: sticky;
    top: 24px;
}

@media (max-width: 1024px) {
    .psp__gallery {
        position: relative;
        top: 0;
        flex-direction: column;
        align-items: stretch;
        --psp-thumb-size: 76px;
    }
}

/* ---------- Colonne miniatures (droite desktop, sous image mobile) ---------- */
.psp__thumbs-col {
    flex: 0 0 var(--psp-thumb-size);
    width: var(--psp-thumb-size);
    align-self: flex-start;
    order: -1;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
}

@media (max-width: 1024px) {
    .psp__thumbs-col {
        order: 2;
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0;
    }
}

/* Liste : desktop = fenêtre scrollable pour exactement ~5 vignettes visibles */
.psp__thumbs {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--psp-thumb-gap);
    width: 100%;
    max-height: calc(
        var(--psp-thumbs-visible) * var(--psp-thumb-size) + (var(--psp-thumbs-visible) - 1) * var(--psp-thumb-gap)
    );
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1px;
    scrollbar-width: none;
}

.psp__thumbs::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* Flèches compactes sous la pile — visibles uniquement si défilement utile */
.psp__thumbs-nav {
    display: none;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    width: 100%;
}

.psp__thumbs-col.has-overflow .psp__thumbs-nav {
    display: flex;
}

@media (max-width: 1024px) {
    .psp__thumbs {
        flex: 1 1 auto;
        flex-direction: row;
        max-height: none;
        height: auto;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
        scroll-snap-type: x mandatory;
        gap: 8px;
    }

    .psp__thumbs-nav {
        display: none !important;
    }

    .psp__thumbs-col.has-overflow .psp__thumbs-nav {
        display: none !important;
    }
}

.psp__thumbs-arrow {
    appearance: none;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--psp-line);
    background: rgba(255, 255, 255, 0.95);
    color: var(--psp-fg);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: var(--psp-shadow-xs);
    transition:
        background var(--psp-transition),
        opacity var(--psp-transition),
        border-color var(--psp-transition);
}

.psp__thumbs-arrow svg {
    width: 14px;
    height: 14px;
}

.psp__thumbs-arrow:hover:not([disabled]) {
    background: #fff;
    border-color: rgba(15, 15, 15, 0.2);
}

.psp__thumbs-arrow[disabled] {
    opacity: 0.35;
    cursor: default;
}

/* ---------- Stage (image principale) ----------
 * align-self: flex-start est CRUCIAL : sans ça, align-items: stretch sur
 * .psp__gallery étire le stage à la hauteur de la colonne thumbs et écrase
 * l'aspect-ratio → l'image déborde / est rognée verticalement. */
.psp__stage {
    position: relative;
    flex: 1 1 auto;
    align-self: flex-start;
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: var(--psp-radius-xl);
    overflow: hidden;
    background: var(--psp-bg-soft);
    isolation: isolate;
    min-width: 0;
}

@media (max-width: 1024px) {
    .psp__stage {
        align-self: auto;
        order: 1;
    }
}

.psp__main {
    position: absolute;
    inset: 0;
    cursor: zoom-in;
    --psp-zoom-x: 50%;
    --psp-zoom-y: 50%;
}

.psp__main-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 420ms var(--psp-ease), transform 700ms var(--psp-ease);
    transform-origin: var(--psp-zoom-x) var(--psp-zoom-y);
    will-change: opacity, transform;
}

.psp__main-img.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

@media (hover: hover) and (pointer: fine) {
    .psp__main.is-zooming .psp__main-img.is-active {
        transform: scale(1.6);
    }
}

/* ---------- Compteur 1/5 ---------- */
.psp__counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 1px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    backdrop-filter: blur(8px);
}

.psp__counter-sep {
    opacity: 0.55;
    padding: 0 4px;
}

/* ---------- Flèches navigation ---------- */
.psp__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    appearance: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.04);
    background: rgba(255, 255, 255, 0.92);
    color: var(--psp-fg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 8px 20px rgba(0, 0, 0, 0.06);
    opacity: 0;
    transition: opacity var(--psp-transition), transform var(--psp-transition), background var(--psp-transition);
}
.psp__nav svg {
    width: 16px;
    height: 16px;
}
.psp__nav--prev { left: 16px; }
.psp__nav--next { right: 16px; }

.psp__stage:hover .psp__nav,
.psp__stage:focus-within .psp__nav {
    opacity: 1;
}
.psp__nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.06);
}

@media (hover: none) {
    .psp__nav { display: none; }
}

/* ---------- Dots (mobile) ---------- */
.psp__dots {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    display: none;
    justify-content: center;
    gap: 6px;
    z-index: 5;
}
.psp__dot {
    appearance: none;
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    transition: width var(--psp-transition), background var(--psp-transition);
}
.psp__dot.is-active {
    width: 24px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.22);
}

/* ---------- Badges ---------- */
.psp__badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    z-index: 6;
    pointer-events: none;
}
.psp__badge {
    --psp-badge-bg: #111;
    --psp-badge-fg: #fff;
    background: var(--psp-badge-bg);
    color: var(--psp-badge-fg);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 7px 11px;
    border-radius: 999px;
    line-height: 1;
    box-shadow: var(--psp-shadow-sm);
}

/* Vignettes : dimensions pilotées par .psp__gallery (--psp-thumb-size). */
.psp__thumb {
    appearance: none;
    flex: 0 0 var(--psp-thumb-size);
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: var(--psp-radius-sm);
    overflow: hidden;
    width: var(--psp-thumb-size);
    height: var(--psp-thumb-size);
    cursor: pointer;
    position: relative;
    transition: transform var(--psp-transition);
    outline: none;
}

.psp__thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
    transition:
        opacity var(--psp-transition),
        filter var(--psp-transition);
    opacity: 0.48;
    filter: saturate(0.82);
}

.psp__thumb:hover .psp__thumb-img,
.psp__thumb:focus-visible .psp__thumb-img {
    opacity: 0.92;
    filter: saturate(1);
}

.psp__thumb.is-active .psp__thumb-img {
    opacity: 1;
    filter: saturate(1);
}

@media (max-width: 1024px) {
    .psp__thumb {
        flex: 0 0 76px;
        width: 76px;
        height: 76px;
        scroll-snap-align: start;
    }
}

@media (max-width: 640px) {
    .psp__stage {
        aspect-ratio: 1 / 1;
        border-radius: var(--psp-radius-lg);
    }
    .psp__thumb {
        flex: 0 0 64px;
        width: 64px;
        height: 64px;
        border-radius: 8px;
    }
    .psp__dots {
        display: flex;
    }
    .psp__nav {
        display: none;
    }
    .psp__badges {
        top: 12px;
        left: 12px;
    }
}

@media (max-width: 480px) {
    .psp {
        padding-inline: 12px;
    }
    .psp__counter {
        bottom: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 11px;
    }
    .psp__badge {
        font-size: 9px;
        padding: 6px 9px;
    }
}

/* ====================================================================
 * Colonne Info (droite)
 * ================================================================== */
.psp__info {
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-width: 0;
    padding-top: 4px;
}

/* ---------- Header (eyebrow + title + price + tagline) ---------- */
.psp__head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.psp__eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--psp-muted);
    line-height: 1;
}

.psp__eyebrow a {
    color: inherit;
    text-decoration: none;
    transition: color var(--psp-transition);
    cursor: pointer;
}

.psp__eyebrow a:hover,
.psp__eyebrow a:focus-visible {
    color: var(--psp-fg);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.psp__title {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--psp-fg);
}

.psp__price {
    font-size: clamp(22px, 2vw, 26px);
    font-weight: 600;
    color: var(--psp-fg);
    line-height: 1.2;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-top: 2px;
}
.psp__price .woocommerce-Price-amount,
.psp__price bdi {
    color: inherit;
}
.psp__price del {
    font-size: 0.78em;
    font-weight: 400;
    color: var(--psp-muted);
    opacity: 0.85;
}
.psp__price ins {
    text-decoration: none;
    color: var(--psp-fg);
    font-weight: 600;
}

.psp__tagline {
    margin-top: 4px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--psp-muted);
}
.psp__tagline p {
    margin: 0;
}
.psp__tagline p + p {
    margin-top: 6px;
}

/* ====================================================================
 * Formulaire
 * ================================================================== */
.psp__form {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin: 0;
}

.psp__attributes {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.psp__attribute {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.psp__attribute-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.psp__attribute-label {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    line-height: 1.3;
}

.psp__attribute-name {
    font-weight: 600;
    color: var(--psp-fg);
    letter-spacing: 0.01em;
}

.psp__attribute-value {
    color: var(--psp-muted);
    font-weight: 500;
}

/* Lien guide tailles (à droite du label) */
.psp__guide-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--psp-fg);
    text-decoration: none;
    padding: 6px 0;
    border-bottom: 1px solid currentColor;
    transition: opacity var(--psp-transition);
}
.psp__guide-link:hover {
    opacity: 0.7;
    color: var(--psp-fg);
}
.psp__guide-link svg {
    width: 14px;
    height: 14px;
}

/* ---------- Pastilles couleurs ---------- */
.psp__swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.psp__swatch {
    --psp-swatch: #ccc;
    --psp-ring: transparent;
    appearance: none;
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background: var(--psp-swatch);
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    line-height: 0;
    margin: 4px;
    transition: transform var(--psp-transition), box-shadow var(--psp-transition);
    outline: none;
    /* Anneau réalisé en box-shadow (les pseudo-éléments sont neutralisés). */
    box-shadow: 0 0 0 2px #fff, 0 0 0 2px var(--psp-ring);
}
.psp__swatch:hover {
    --psp-ring: rgba(0, 0, 0, 0.35);
    transform: scale(1.05);
}
.psp__swatch[aria-checked="true"] {
    --psp-ring: var(--psp-fg);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--psp-fg);
}
.psp__swatch:focus-visible {
    --psp-ring: var(--psp-fg);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--psp-fg);
}
.psp__swatch.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-image: linear-gradient(to top right,
        transparent calc(50% - 1px),
        rgba(0, 0, 0, 0.55) calc(50% - 1px),
        rgba(0, 0, 0, 0.55) calc(50% + 1px),
        transparent calc(50% + 1px));
}
.psp__swatch.is-disabled:hover {
    transform: none;
    --psp-ring: transparent;
    box-shadow: 0 0 0 2px #fff, 0 0 0 2px transparent;
}

/* ---------- Options (tailles, etc.) ---------- */
.psp__options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Pour les tailles : grille auto-fit compacte (mieux quand 10+ variantes). */
.psp__options--sizes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    gap: 6px;
    max-width: 100%;
}

.psp__option {
    appearance: none;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    padding: 10px 12px;
    min-height: 40px;
    min-width: 44px;
    border-radius: var(--psp-radius-sm);
    border: 1px solid var(--psp-line);
    background: #fff;
    color: var(--psp-fg);
    cursor: pointer;
    text-align: center;
    /* Utilise un fond rayé pour "indisponible" (image gradient, neutre face aux thèmes). */
    background-repeat: no-repeat;
    background-position: center;
    transition: border-color var(--psp-transition), background var(--psp-transition),
        color var(--psp-transition), transform var(--psp-transition);
}
.psp__option:hover {
    border-color: var(--psp-fg);
}
.psp__option[aria-checked="true"] {
    background: var(--psp-fg);
    color: #fff;
    border-color: var(--psp-fg);
}
.psp__option.is-disabled {
    color: var(--psp-muted);
    background: transparent;
    cursor: not-allowed;
    border-color: var(--psp-line);
    background-image: linear-gradient(to top right,
        transparent calc(50% - 0.5px),
        rgba(0, 0, 0, 0.28) calc(50% - 0.5px),
        rgba(0, 0, 0, 0.28) calc(50% + 0.5px),
        transparent calc(50% + 0.5px));
}
.psp__option.is-disabled:hover {
    border-color: var(--psp-line);
}
.psp__option:focus-visible {
    outline: 2px solid var(--psp-fg);
    outline-offset: 2px;
}

/* ---------- Stock alert ---------- */
.psp__stock {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #b91c1c;
    background: #fef2f2;
    padding: 10px 14px;
    border-radius: var(--psp-radius-sm);
    align-self: flex-start;
    border: 1px solid rgba(185, 28, 28, 0.18);
}
.psp__stock[hidden] { display: none; }
.psp__stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

/* ---------- Quantité + bouton panier ---------- */
.psp__cart-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-top: 2px;
}

.psp__qty {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--psp-line-strong);
    border-radius: var(--psp-radius-md);
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
    height: 56px;
}
.psp__qty-btn {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--psp-fg);
    cursor: pointer;
    width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--psp-transition);
}
.psp__qty-btn:hover {
    background: var(--psp-bg-soft);
}
.psp__qty-btn svg {
    width: 14px;
    height: 14px;
}
.psp__qty-input {
    width: 44px;
    border: 0;
    background: transparent;
    text-align: center;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--psp-fg);
    -moz-appearance: textfield;
    height: 100%;
}
.psp__qty-input::-webkit-outer-spin-button,
.psp__qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.psp__qty-input:focus {
    outline: none;
}

/* ---------- Bouton ajouter au panier ---------- */
.psp__add-to-cart {
    appearance: none;
    flex: 1 1 auto;
    min-height: 56px;
    padding: 0 32px;
    border: 0;
    border-radius: var(--psp-radius-md);
    background: var(--psp-fg);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: transform var(--psp-transition), box-shadow var(--psp-transition), background var(--psp-transition);
}
.psp__add-to-cart::after {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.18) 50%, rgba(255,255,255,0) 100%) !important;
    background-color: transparent !important;
    transform: translateX(-100%);
    transition: transform 900ms var(--psp-ease);
    pointer-events: none;
    border: 0 !important;
    box-shadow: none !important;
}
.psp__add-to-cart:hover:not([disabled])::after {
    transform: translateX(100%);
}
.psp__add-to-cart:hover:not([disabled]) {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14), 0 14px 30px rgba(0, 0, 0, 0.1);
}
.psp__add-to-cart:active:not([disabled]) {
    transform: translateY(0);
}
.psp__add-to-cart[disabled] {
    background: #d4d4d4;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 0.95;
}
.psp__add-to-cart-label {
    transition: opacity var(--psp-transition);
}
.psp__add-to-cart-arrow {
    width: 18px;
    height: 18px;
    transition: transform var(--psp-transition);
}
.psp__add-to-cart:hover:not([disabled]) .psp__add-to-cart-arrow {
    transform: translateX(3px);
}
.psp__add-to-cart.is-loading .psp__add-to-cart-label,
.psp__add-to-cart.is-loading .psp__add-to-cart-arrow {
    opacity: 0;
}
.psp__add-to-cart.is-loading .psp__add-to-cart-spinner {
    display: block;
}
.psp__add-to-cart.is-success {
    background: #16a34a;
}
.psp__add-to-cart-spinner {
    display: none;
    position: absolute;
    inset: 0;
    margin: auto;
    width: 22px;
    height: 22px;
    animation: psp-spin 0.8s linear infinite;
}
@keyframes psp-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 520px) {
    .psp__cart-row {
        flex-direction: column;
        gap: 10px;
    }
    .psp__qty {
        width: 100%;
        justify-content: space-between;
    }
    .psp__qty-btn {
        width: 52px;
    }
    .psp__qty-input {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }
    .psp__add-to-cart {
        width: 100%;
        min-height: 54px;
        justify-content: center;
        padding-inline: 18px;
    }
}

@media (max-width: 380px) {
    .psp__title {
        font-size: 24px;
    }
    .psp__price {
        font-size: 20px;
        gap: 8px;
    }
    .psp__add-to-cart {
        font-size: 14px;
        min-height: 52px;
    }
    .psp__add-to-cart-arrow {
        width: 16px;
        height: 16px;
    }
}

/* ====================================================================
 * Trust signals — capsule compacte, plus élégante et cohérente DA plugin
 * ================================================================== */
.psp.psp .psp__trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding-block: clamp(8px, 1vw, 10px) !important;
    padding-inline: clamp(4px, 0.55vw, 7px) !important;
    list-style: none;
    background: linear-gradient(180deg, #f6f6f5 0%, #f2f2f1 100%);
    border: 1px solid rgba(15, 15, 15, 0.07);
    border-radius: var(--psp-radius-xl);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75), var(--psp-shadow-xs);
    overflow: hidden;
}

/* ====================================================================
 * Ligne "À propos" + "Infos" : 2/3 - 1/3 sur desktop
 * ================================================================== */
.psp__insights-row {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
    align-items: stretch;
    gap: clamp(12px, 1.6vw, 18px);
    margin-top: clamp(42px, 5.6vw, 68px);
}

.psp__insights-main,
.psp__insights-side {
    min-width: 0;
}

.psp__insights-row .psp__highlight {
    margin: 0;
    height: 100%;
}

.psp__insights-row .psp__trust {
    margin: 0;
    height: 100%;
}

@media (max-width: 980px) {
    .psp__insights-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: clamp(26px, 5vw, 38px);
    }
}

.psp.psp .psp__trust-item {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    gap: 7px;
    padding: clamp(6px, 0.8vw, 8px) clamp(5px, 0.7vw, 8px) !important;
    min-width: 0;
    position: relative;
}

.psp__trust-item + .psp__trust-item {
    box-shadow: none;
}

.psp__trust-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 15, 15, 0.06);
    color: var(--psp-fg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.psp__trust-icon svg {
    width: 17px;
    height: 17px;
    stroke-width: 1.7;
}

.psp__trust-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
    line-height: 1.3;
}

.psp__trust-title {
    display: block;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--psp-fg);
}

/* Une seule phrase (ex. prise en charge %) : pas de capitales, typo lisible. */
.psp__trust-title--sentence {
    text-transform: none;
    letter-spacing: -0.015em;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    max-width: 28ch;
    overflow-wrap: anywhere;
}

.psp__trust-desc {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--psp-muted);
    letter-spacing: -0.005em;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .psp.psp .psp__trust {
        grid-template-columns: 1fr;
        border-radius: var(--psp-radius-lg);
        gap: 2px;
        padding-block: 8px !important;
        padding-inline: 6px !important;
    }

    .psp.psp .psp__trust-item {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 10px;
        padding-block: 7px !important;
        padding-inline: 6px !important;
    }

    .psp__trust-item + .psp__trust-item {
        box-shadow: none;
    }

    .psp__trust-body {
        align-items: flex-start;
        text-align: left;
        gap: 2px;
    }
}

@media (max-width: 420px) {
    .psp__insights-row {
        gap: 10px;
    }
    .psp.psp .psp__trust-item {
        gap: 8px;
    }
    .psp__trust-icon {
        width: 28px;
        height: 28px;
    }
    .psp__trust-icon svg {
        width: 15px;
        height: 15px;
    }
    .psp__trust-title {
        font-size: 10px;
        letter-spacing: 0.05em;
    }
    .psp__trust-title--sentence {
        font-size: 10.5px;
        line-height: 1.3;
    }
    .psp__trust-desc {
        font-size: 11.5px;
    }
}

@media (max-width: 820px) {
    .psp.psp .psp__trust {
        grid-template-columns: 1fr;
        border-radius: var(--psp-radius-lg);
    }
}

/* ---------- SKU ---------- */
.psp__sku {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--psp-muted);
    letter-spacing: 0.04em;
}
.psp__sku span {
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.08em;
}
.psp__sku code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--psp-fg);
    background: var(--psp-bg-soft);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
}

/* ====================================================================
 * Section "À propos" — version compacte, ligne premium moderne
 * Pas de fond bruyant, juste de la typo et un eyebrow discret.
 * ================================================================== */
.psp__highlight {
    margin: clamp(26px, 3.2vw, 40px) auto clamp(16px, 2vw, 24px);
    max-width: 760px;
    padding: clamp(18px, 2vw, 24px) clamp(16px, 2vw, 24px);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    background: linear-gradient(180deg, rgba(246, 246, 244, 0.85) 0%, rgba(242, 242, 240, 0.75) 100%);
    border: 1px solid rgba(15, 15, 15, 0.07);
    border-radius: var(--psp-radius-lg);
    box-shadow: var(--psp-shadow-xs);
}

/* Filets horizontaux subtils de chaque côté de l'eyebrow (effet éditorial). */
.psp__highlight-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--psp-muted);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.psp.psp .psp__highlight-eyebrow::before,
.psp.psp .psp__highlight-eyebrow::after {
    content: '' !important;
    display: inline-block !important;
    width: 32px !important;
    height: 1px !important;
    background: var(--psp-line-strong) !important;
    background-color: var(--psp-line-strong) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

.psp__highlight-content {
    font-size: clamp(15px, 1.2vw, 17px);
    line-height: 1.58;
    font-weight: 400;
    color: var(--psp-fg);
    letter-spacing: -0.005em;
    max-width: 620px;
}

.psp__highlight-content p {
    margin: 0;
}

.psp__highlight-content p + p {
    margin-top: 8px;
}

.psp__highlight-content a {
    color: var(--psp-fg);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ====================================================================
 * Section "En savoir plus" (accordéons)
 * ================================================================== */
.psp__details {
    margin-top: clamp(24px, 3vw, 36px);
    padding-top: clamp(28px, 3vw, 48px);
    border-top: 0;
}

.psp__details-inner {
    max-width: 900px;
    margin: 0 auto;
}

.psp__details-title {
    margin: 0 0 24px;
    font-size: clamp(20px, 2vw, 26px);
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: center;
    color: var(--psp-fg);
}

.psp__accordions {
    display: flex;
    flex-direction: column;
}

.psp__accordion {
    border-top: 1px solid var(--psp-line);
    padding: 0;
}
.psp__accordion:last-child {
    border-bottom: 1px solid var(--psp-line);
}

.psp__accordion-summary {
    list-style: none;
    cursor: pointer;
    padding: 22px 4px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    font-weight: 600;
    color: var(--psp-fg);
    transition: color var(--psp-transition);
}

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

.psp__accordion-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--psp-bg-soft);
    color: var(--psp-fg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--psp-transition);
}
.psp__accordion-icon svg {
    width: 16px;
    height: 16px;
}

.psp__accordion-title {
    flex: 1 1 auto;
    letter-spacing: -0.005em;
}

.psp__accordion-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--psp-fg);
    transition: transform 320ms var(--psp-ease);
}
.psp__accordion-toggle svg {
    width: 16px;
    height: 16px;
}

.psp__accordion[open] .psp__accordion-toggle {
    transform: rotate(180deg);
}

.psp__accordion[open] .psp__accordion-icon {
    background: var(--psp-fg);
    color: #fff;
}

.psp__accordion-body {
    padding: 0 4px 26px 54px;
    font-size: 14px;
    line-height: 1.65;
    color: #3f4451;
    animation: psp-fade-down 320ms var(--psp-ease);
}
.psp__accordion-body p {
    margin: 0 0 10px;
}
.psp__accordion-body p:last-child {
    margin-bottom: 0;
}
.psp__accordion-body a {
    color: var(--psp-fg);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@keyframes psp-fade-down {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: none; }
}

@media (max-width: 640px) {
    .psp__accordion-summary {
        padding: 18px 2px;
        font-size: 14px;
    }
    .psp__accordion-body {
        padding-left: 50px;
        padding-bottom: 22px;
    }
}

/* ====================================================================
 * Ventes incitatives
 * ================================================================== */
.psp__upsells {
    margin-top: clamp(56px, 7vw, 96px);
    padding-top: clamp(32px, 4vw, 56px);
    border-top: 1px solid var(--psp-line);
}

.psp__upsells-head {
    text-align: center;
    margin-bottom: clamp(28px, 3.5vw, 44px);
}

.psp__upsells-title {
    margin: 0 0 8px;
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--psp-fg);
}

.psp__upsells-sub {
    margin: 0;
    font-size: 14px;
    color: var(--psp-muted);
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.psp__upsells-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 26px);
}

@media (max-width: 1024px) {
    .psp__upsells-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .psp__upsells-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (max-width: 420px) {
    .psp__upsells-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .psp__upsells-sub {
        font-size: 13px;
    }
}

.psp__upsell {
    display: flex;
    flex-direction: column;
    background: transparent;
}

.psp__upsell-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    width: 100%;
    overflow: hidden;
    border-radius: var(--psp-radius-md);
    background: var(--psp-bg-soft);
    isolation: isolate;
    text-decoration: none;
}

.psp__upsell-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.psp__upsell-img--secondary {
    opacity: 0;
}

.psp__upsell-media--has-hover .psp__upsell-img {
    transition: opacity var(--psp-transition), transform 700ms var(--psp-ease);
}

@media (hover: hover) and (pointer: fine) {
    .psp__upsell-media--has-hover:hover .psp__upsell-img--primary { opacity: 0; }
    .psp__upsell-media--has-hover:hover .psp__upsell-img--secondary { opacity: 1; }
    .psp__upsell-media--has-hover:hover .psp__upsell-img { transform: scale(1.04); }
}

.psp__upsell-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
    z-index: 2;
    pointer-events: none;
}

.psp__upsell-badge {
    --psp-badge-bg: #111;
    --psp-badge-fg: #fff;
    background: var(--psp-badge-bg);
    color: var(--psp-badge-fg);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 9px;
    border-radius: 999px;
    line-height: 1;
    box-shadow: var(--psp-shadow-xs);
}

.psp__upsell-body {
    padding: 12px 2px 2px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.psp__upsell-title {
    margin: 0;
    font-size: clamp(13px, 0.95vw, 15px);
    font-weight: 500;
    line-height: 1.3;
}

.psp__upsell-title a {
    color: inherit;
    text-decoration: none;
}

.psp__upsell-title a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.psp__upsell-price {
    font-size: 13px;
    color: var(--psp-muted);
    font-weight: 500;
}

.psp__upsell-price .woocommerce-Price-amount,
.psp__upsell-price bdi {
    color: inherit;
}

.psp__upsell-price del { opacity: 0.5; margin-right: 6px; }

.psp__upsell-price ins {
    text-decoration: none;
    color: var(--psp-fg);
    font-weight: 600;
}

.psp__upsell-colors {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.psp__upsell-color {
    --psp-swatch: #ccc;
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--psp-swatch);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* ====================================================================
 * Sticky bottom bar (mobile)
 * ================================================================== */
.psp__mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--psp-line);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(110%);
    transition: transform 420ms var(--psp-ease);
}
.psp__mobile-bar.is-visible {
    transform: none;
}
.psp__mobile-bar[hidden] {
    display: none;
}

.psp__mobile-price {
    flex: 0 0 auto;
    font-size: 16px;
    font-weight: 700;
    color: var(--psp-fg);
    min-width: 0;
}
.psp__mobile-price .woocommerce-Price-amount,
.psp__mobile-price bdi {
    color: inherit;
}
.psp__mobile-price del {
    font-size: 0.7em;
    font-weight: 400;
    color: var(--psp-muted);
    margin-right: 6px;
}
.psp__mobile-price ins {
    text-decoration: none;
    color: var(--psp-fg);
    font-weight: 700;
}

.psp__mobile-cta {
    appearance: none;
    flex: 1 1 auto;
    height: 50px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--psp-radius-md);
    background: var(--psp-fg);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform var(--psp-transition), background var(--psp-transition);
}
.psp__mobile-cta:hover:not([disabled]) {
    transform: translateY(-1px);
}
.psp__mobile-cta[disabled] {
    background: #d4d4d4;
    color: #fff;
    cursor: not-allowed;
}
.psp__mobile-cta svg {
    width: 16px;
    height: 16px;
}

@media (min-width: 1025px) {
    .psp__mobile-bar { display: none !important; }
}

@media (max-width: 1024px) {
    .psp {
        padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .psp__mobile-bar {
        gap: 8px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    }
    .psp__mobile-price {
        font-size: 14px;
    }
    .psp__mobile-cta {
        height: 46px;
        padding: 0 12px;
        font-size: 13px;
    }
}

/* ====================================================================
 * Toast (succès ajout panier)
 * ================================================================== */
.psp.psp .psp__toast {
    position: fixed;
    z-index: 2147483000 !important;
    right: 24px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #fff;
    border-radius: var(--psp-radius-md);
    border: 1px solid var(--psp-line);
    box-shadow: var(--psp-shadow-lg);
    max-width: calc(100vw - 48px);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 280ms ease, transform 280ms var(--psp-ease);
}
.psp.psp .psp__toast.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.psp.psp .psp__toast[hidden] {
    display: flex;
}
.psp__toast-icon {
    width: 28px;
    height: 28px;
    color: #16a34a;
    flex-shrink: 0;
    background: #dcfce7;
    border-radius: 50%;
    padding: 5px;
}
.psp__toast-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.psp__toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--psp-fg);
}
.psp__toast-link {
    font-size: 13px;
    color: var(--psp-fg);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 640px) {
    .psp.psp .psp__toast {
        right: 14px;
        left: 14px;
        bottom: 84px;
        max-width: none;
    }
}

/* ====================================================================
 * Reduced motion
 * ================================================================== */
@media (prefers-reduced-motion: reduce) {
    .psp *,
    .psp *::before,
    .psp *::after {
        animation: none !important;
        transition: none !important;
    }
}
