/* Page "Type de piscine". Palette : #4fa9d3, #0F2454, #F3F7FA. Complète realisations.css (rp-hero, rp-cta, rp-zoom). */

/* ---------- Aperçu des types ---------- */
.tp-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.tp-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgb(15 36 84 / 10%);
    color: inherit;
    transition: transform .35s ease, box-shadow .35s ease;
}

.tp-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 48px rgb(15 36 84 / 18%);
    color: inherit;
}

.tp-card:focus-visible {
    outline: 3px solid #4fa9d3;
    outline-offset: 3px;
}

.tp-card-img {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.tp-card-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s ease;
}

.tp-card:hover .tp-card-img img {
    transform: scale(1.07);
}

.tp-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px 24px 26px;
}

.tp-card-body strong {
    font-size: 21px;
    font-weight: 700;
    color: #0F2454;
}

.tp-card-body span:last-child {
    font-size: 15px;
    line-height: 1.6;
}

.tp-card-num {
    color: #4fa9d3;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
}

/* ---------- Détail de chaque type ---------- */
.tp-type {
    scroll-margin-top: 90px;
}

.tp-row {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    align-items: center;
    gap: 64px;
}

.tp-row.is-reversed {
    grid-template-columns: 1.2fr .8fr;
}

.tp-row.is-reversed .tp-text {
    order: 2;
}

.tp-num {
    display: block;
    margin-bottom: 8px;
    color: #4fa9d3;
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    opacity: .35;
}

.tp-text .site-title {
    margin-bottom: 18px;
}

.tp-text p {
    margin-bottom: 28px;
    font-size: 18px;
    line-height: 1.8;
}

/* collage : une grande photo + deux plus petites, sans déformation (recadrage) */
.tp-photos {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: repeat(2, 200px);
    gap: 16px;
}

.tp-photo:first-child {
    grid-row: span 2;
}

.tp-photo {
    border-radius: 16px;
}

.tp-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Tablette et mobile ---------- */
@media (max-width: 991px) {
    .tp-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .tp-row,
    .tp-row.is-reversed {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .tp-row.is-reversed .tp-text {
        order: 0;
    }

    .tp-num {
        font-size: 48px;
    }

    .tp-photos {
        grid-template-rows: repeat(2, 180px);
    }
}

@media (max-width: 575px) {
    .tp-cards {
        grid-template-columns: 1fr;
    }

    .tp-text p {
        font-size: 16px;
    }

    .tp-photos {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 200px 120px;
        gap: 10px;
    }

    .tp-photo:first-child {
        grid-column: span 2;
        grid-row: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tp-card,
    .tp-card-img img {
        transition: none;
    }

    .tp-card:hover,
    .tp-card:hover .tp-card-img img {
        transform: none;
    }
}
