/* Container principal */
.container,
.single-cheval {
    width: 90%;
}

.horse-card {
    background-color: #FFFEFC;
    border-radius: 10px;
    margin-bottom: 40px;
}

.single-cheval__title {
    text-align: center;
    margin: 0 !important;
    padding: 8px;
    width: 100%;
    background-color: #C1E7DF;
    border-radius: 10px 10px 0 0;
}

/* Image principale */
.image-paysage {
    width: 100%;
    margin: 0 auto 20px;
    overflow: hidden;
}

.image-paysage img {
    width: 100%;
    display: block;
    height: 250px;
    object-fit: cover;
}

/* GALERIE MINIATURES */
.mini-gallery {
    display: flex;
    justify-content: center;
    gap: 1rem;
    overflow-x: auto;
    padding: 0 1rem;
    margin-bottom: 20px;
}

.mini-gallery .thumb img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.mini-gallery .thumb-video {
    position: relative;
}

.mini-gallery .thumb-video .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

.single-cheval__content {
    width: 90%;
    margin: 0 auto;
}

/* Contenu */
.pedigree-table-container {
    width: 100%;
    overflow-x: auto;
    /* scroll sur mobile si table trop large */
    margin: 0;
    padding: 10px;
    padding-bottom: 40px;
}

.pedigree-table {
    width: auto;
    border: 1px solid #C1E7DF;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    table-layout: auto;
}

.pedigree-table td {
    width: 25%;
    padding: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-height: 80px;
    vertical-align: middle;
    border: 1px solid #C1E7DF;
}

/* Générations */
.pedigree-table .gen0 {
    font-weight: bold;
    font-size: 1.1rem;
    background-color: #C1E7DF;
}

.pedigree-table .gen1,
.pedigree-table .gen2 {
    background-color: #E9F5F2;
}


/* Métadonnées */
.single-cheval__metas {
    width: 100%;
    background-color: #C1E7DF;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    /* pour que ça retombe proprement sur mobile */
    justify-content: space-between;
    gap: 1rem;
    /* écart entre tes colonnes */
    margin-top: 2rem;
    border-radius: 0 0 10px 10px;
    text-align: center;
}

.single-cheval__metas .meta-col {
    flex: 1 1 45%;
    /* min-width 200px, elles se partagent l’espace */
    text-align: center;
}

.meta-col h3 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #2D2216;
}

.meta-col .meta-label {
    font-size: .75rem;
    text-transform: uppercase;
    color: #4F4F4F;
    margin-bottom: .75rem;
    display: block;
}

.single-cheval__metas .meta-col:empty {
    display: none;
}

/* Bouton retour */
.single-cheval__back {
    text-align: center;
}

/* Desktop – largeur fixe, centrage */
@media (min-width: 768px) {
    .container.single-cheval {
        max-width: 800px;
        margin: 0 auto;
    }

    .image-paysage {
        width: 800px;
    }

    .image-paysage img {
        height: 500px;
    }

    .mini-gallery {
        margin-bottom: 40px;
    }

    .mini-gallery .thumb img {
        width: 100px;
        height: 100px;
    }

    .single-cheval__metas .meta-col {
        flex: 1 1 30%;
        /* min-width 200px, elles se partagent l’espace */
        text-align: center;
    }

    .meta-col h3 {
        font-size: 16px;
    }

    .horse-asso {
        grid-template-columns: repeat(2, 1fr);
    }

    .pedigree-table-container {
        padding: 32px;
    }

    .pedigree-table {
        margin: 0 auto;
    }

    .single-cheval__metas {
        padding: 2rem 1rem;
    }
}