/* ================================
   [homepage_section_1] — 3 cards
   ================================ */

.flip-s1-cards {
    display: flex;
    gap: 24px;
    align-items: stretch;
    width: 100%;
}

.flip-s1-card {
    position: relative;
    flex: 1 0 0;
    min-width: 0;
    height: 524px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* tout colle en bas */
    text-decoration: none;
    cursor: pointer;
    isolation: isolate;
}

/* Image de fond */
.flip-s1-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 1;
    transition: transform 0.5s ease;
}

.flip-s1-card:hover .flip-s1-card__img {
    transform: scale(1.04);
}

/* Gradient sombre en bas */
.flip-s1-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to bottom,
        rgba(8, 17, 28, 0) 0%,
        rgba(8, 17, 28, 0.85) 88%
    );
}

/* Bloc bas : texte + bouton dans le flux */
.flip-s1-card__body {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 32px;
}

/* Contenu texte */
.flip-s1-card__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flip-s1-card__title {
    font-family: 'DM Serif Display', serif;
    font-size: 25px;
    font-weight: 400;
    line-height: 1.45;
    color: #f4f5f5;
    margin: 0;
}

.flip-s1-card__desc {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: #d9dbdd;
    margin: 0;
    padding: 0;
}

/* Wrapper du bouton : fermé par défaut, s'ouvre au hover */
.flip-s1-card__btn-wrap {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    transition:
        max-height 0.35s ease,
        opacity 0.25s ease,
        margin-top 0.35s ease;
}

.flip-s1-card:hover .flip-s1-card__btn-wrap {
    max-height: 80px;
    opacity: 1;
    margin-top: 16px;
}

/* Bouton lui-même */
.flip-s1-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px 12px 32px;
    background: #0076ff;
    border-radius: 9999px;
    color: #f4f5f5;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 900px) {
    .flip-s1-cards {
        flex-direction: column;
    }

    .flip-s1-card {
        height: 420px;
    }

    .flip-s1-card__btn-wrap {
        max-height: 80px;
        opacity: 1;
        margin-top: 16px;
    }
}
