/* ──────────────────────────────────────────
   td-prod-slider
   Reprend la même logique que td-ref-slider
────────────────────────────────────────── */

.td-prod-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    background: #000;
}

.td-prod-slider .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.td-prod-slider .carousel-item {
    display: none;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.td-prod-slider .carousel-item.active {
    display: block;
}

.td-prod-slider .img-fluid {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* bouton loupe */
.td-prod-slider .carousel-popup {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background .2s;
}

.td-prod-slider .carousel-popup:hover,
.td-prod-slider .carousel-popup:focus {
    background: rgba(0, 0, 0, .85);
    outline: 2px solid #fff;
}

/* contrôles prev / next */
.td-prod-slider .carousel-control-prev,
.td-prod-slider .carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .45);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background .2s;
    padding: 0;
}

.td-prod-slider .carousel-control-prev { left: 10px; }
.td-prod-slider .carousel-control-next { right: 10px; }

.td-prod-slider .carousel-control-prev:hover,
.td-prod-slider .carousel-control-next:hover,
.td-prod-slider .carousel-control-prev:focus,
.td-prod-slider .carousel-control-next:focus {
    background: rgba(0, 0, 0, .8);
    outline: 2px solid #fff;
}

@media (min-width: 1000px) {
    .td-prod-slider .carousel-control-prev,
    .td-prod-slider .carousel-control-next {
        width: 48px;
        height: 48px;
    }

    .td-prod-slider .carousel-popup {
        width: 42px;
        height: 42px;
    }
}


/* ──────────────────────────────────────────
   td-prod-resources
────────────────────────────────────────── */

.td-prod-resources {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.td-prod-resources__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #f5f5f5;
    border-radius: 6px;
    text-decoration: none;
    color: #001932;
    font-weight: 600;
    transition: background .2s, color .2s;
    border: 1px solid #e0e0e0;
}

.td-prod-resources__item:hover,
.td-prod-resources__item:focus {
    background: #001932;
    color: #fff;
    outline: none;
}

/* icône téléchargement en CSS pur */
.td-prod-resources__icon {
    flex-shrink: 0;
    display: block;
    width: 14px;
    height: 16px;
    position: relative;
    border: 2px solid currentColor;
    border-radius: 2px;
}

.td-prod-resources__icon::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 2px;
    transform: translateX(-50%);
    width: 2px;
    height: 7px;
    background: currentColor;
}

.td-prod-resources__icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 7px;
    transform: translateX(-50%) rotate(0deg);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
}

.td-prod-resources__label {
    flex: 1;
    font-size: 0.9rem;
}

.td-prod-resources__ext {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: .05em;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, .1);
    flex-shrink: 0;
}

.td-prod-resources__item:hover .td-prod-resources__ext,
.td-prod-resources__item:focus .td-prod-resources__ext {
    background: rgba(255, 255, 255, .2);
}

@media (min-width: 1000px) {
    .td-prod-resources {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .td-prod-resources__item {
        flex: 1 1 200px;
    }
}


/* ──────────────────────────────────────────
   td-prod-related (produits & références)
────────────────────────────────────────── */

.td-prod-related {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.td-prod-related__item {
    display: flex;
}

.td-prod-related__link {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
    color: #001932;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow .2s;
}

.td-prod-related__link:hover,
.td-prod-related__link:focus {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
    outline: none;
}

.td-prod-related__thumbnail {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f0f0f0;
}

.td-prod-related__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}

.td-prod-related__link:hover .td-prod-related__thumbnail img {
    transform: scale(1.04);
}

.td-prod-related__title {
    display: block;
    padding: 10px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}

@media (min-width: 1000px) {
    .td-prod-related {
        grid-template-columns: repeat(4, 1fr);
    }
}
