/* ============================================================
 * TUSSOR — Carte produit (liste / produits liés / modal panier)
 * Charte : monochrome noir & blanc + accent rouge #DB021D
 * ============================================================ */

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    font-family: var(--t-font-base);
    background: var(--t-color-white);
    isolation: isolate;
}

/* ---------- Zone visuelle ---------- */

.product-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background-color: var(--t-gray-25);
}

/* Fallback ratio 1:1 pour Safari < 15 (qui ignore aspect-ratio) */
@supports not (aspect-ratio: 1 / 1) {
    .product-card__media {
        height: 0;
        padding-bottom: 100%;
    }
    .product-card__media-link {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.product-card__media-link {
    display: block;
    width: 100%;
    height: 100%;
}

.product-card__media-link:focus-visible {
    outline: var(--t-focus-ring);
    outline-offset: calc(var(--t-focus-ring-offset) * -1);
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-duration-slow) var(--t-ease-out);
}

.product-card:hover .product-card__image,
.product-card:focus-within .product-card__image {
    transform: scale(1.04);
}

/* ---------- Badge promo ---------- */

.product-card__badge {
    position: absolute;
    top: var(--t-space-3);
    left: var(--t-space-3);
    z-index: var(--t-z-base);
    padding: var(--t-space-1) var(--t-space-3);
    background: var(--t-color-red);
    color: var(--t-color-white);
    font-size: var(--t-text-xs);
    font-weight: var(--t-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--t-tracking-wide);
    line-height: 1.6;
}

/* ---------- CTA ajouter au panier (slide-up) ---------- */

.product-card__form {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--t-z-base);
    margin: 0;
}

.product-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--t-space-3);
    width: 100%;
    min-height: var(--t-touch-min);
    padding: 0 var(--t-space-5);
    background: var(--t-color-black);
    color: var(--t-color-white);
    font-size: var(--t-text-xs);
    font-weight: var(--t-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--t-tracking-wider);
    border: 0;
    cursor: pointer;
    transform: translateY(100%);
    transition: transform var(--t-duration-base) var(--t-ease-out),
                background-color var(--t-duration-md) var(--t-ease-default);
}

.product-card:hover .product-card__cta,
.product-card:focus-within .product-card__cta {
    transform: translateY(0);
}

.product-card__cta:hover {
    background: var(--t-color-red);
}

.product-card__cta:focus-visible {
    outline: var(--t-focus-ring-width) solid var(--t-color-white);
    outline-offset: calc(var(--t-focus-ring-offset) * -1 - 2px);
}

/* ---------- Corps : titre + prix ---------- */

.product-card__body {
    padding: var(--t-space-4) 0 var(--t-space-3);
    text-align: center;
}

.product-card__title {
    margin: 0 0 var(--t-space-2);
    font-size: var(--t-text-lg);
    font-weight: var(--t-weight-medium);
    text-transform: capitalize;
    line-height: var(--t-leading-snug);
}

.product-card__title a {
    color: var(--t-gray-800);
    text-decoration: none;
    transition: color var(--t-duration-base) var(--t-ease-default);
}

.product-card__title a:hover {
    color: var(--t-color-red);
}

.product-card__title a:focus-visible {
    color: var(--t-color-red);
    outline: var(--t-focus-ring);
    outline-offset: var(--t-focus-ring-offset);
}

.product-card__price {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--t-space-3);
    margin: 0;
    font-size: var(--t-text-base);
    font-weight: var(--t-weight-semibold);
    color: var(--t-gray-900);
    letter-spacing: var(--t-tracking-wide);
}

.product-card__price-original {
    color: var(--t-gray-300);
    font-weight: var(--t-weight-regular);
    font-size: var(--t-text-sm);
    text-decoration: line-through;
}

.product-card__price-current--promo {
    color: var(--t-color-red);
}

/* ---------- Responsive ---------- */

@media (max-width: 990px) {
    .product-card {
        margin-bottom: var(--t-space-5);
    }
}

/* Sur mobile : pas de hover, CTA permanent en icône seule */
@media (hover: none), (max-width: 720px) {
    .product-card__cta {
        transform: translateY(0);
        min-height: 40px;
        padding: 0 var(--t-space-4);
    }

    .product-card__cta-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}
