// ==========================================================================
// Actualité Hub Card Component
// Card used in the actualité hub grid (templates/components/_actualite_hub_card.html.twig).
// BEM Methodology: .actualite-hub-page__card (Block) → .actualite-hub-page__card-element
//
// NOTE: this is placeholder/minimal styling only — see
// spec-driven-development/2026-07-11-actualite-hub-page-template.md
// (node-id=143-1125). The scss-component-integrator design pass should
// replace/refine these values, not just add to them.
// ==========================================================================

@use '../base/variables' as *;

.actualite-hub-page__card {
    display: flex;
    flex-direction: column;
    gap: $spacing-xs;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid $color-primary-dark;

    &.is-hidden {
        display: none;
    }

    &:hover {
        .actualite-hub-page__card-img {
            transform: scale(1.05);
        }
    }

    &--light {
        border-bottom: 1px solid $color-neutral;

        .actualite-hub-page__card-date,
        .actualite-hub-page__card-title {
            color: $color-neutral;
        }
    }
}

.actualite-hub-page__card-image {
    aspect-ratio: 7 / 5;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.05);

    // Torn/wavy bottom edge, inverted: full solid mask XOR'd with the svg
    // strip (34px, bottom) — pixels where both masks overlap cancel out, so
    // the shape cut is the inverse of the raw svg silhouette.
    -webkit-mask-image: linear-gradient(#000, #000), url("../../images/mask-news-card.svg");
    mask-image: linear-gradient(#000, #000), url("../../images/mask-news-card.svg");
    -webkit-mask-size: 100% 100%, 100% 30px;
    mask-size: 100% 100%, 100% 30px;
    -webkit-mask-position: top center, bottom center;
    mask-position: top center, bottom center;
    -webkit-mask-repeat: no-repeat, repeat-x;
    mask-repeat: no-repeat, repeat-x;
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    margin-bottom: $spacing-xs;
}

.actualite-hub-page__card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.actualite-hub-page__card-img--placeholder {
    background-color: rgba(0, 0, 0, 0.08);
}

.actualite-hub-page__card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: $spacing-sm;
}

.actualite-hub-page__card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: $spacing-xs;
}

.actualite-hub-page__card-date {
    font-family: $font-family-sans;
    font-size: 14px;
    color: $color-primary-dark;
    white-space: nowrap;
    margin-left: auto;
}

.actualite-hub-page__card-title {
    font-family: $font-family-sans;
    font-size: $font-size-h4;
    font-weight: 700;
    color: $color-primary-dark;
    line-height: 1.4;
    margin: 0;
    margin-bottom: $spacing-md;
}
