/* Cartes horizontales partagées — accueil (agenda, actualités) et page /actualites */

.home-agenda-events,
.home-news-grid,
.home-feed-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-feed-list > li {
    list-style: none;
    min-width: 0;
}

.home-feed-card {
    --home-thumb-w: clamp(200px, 28vw, 260px);
    --feed-accent: var(--color-primary);
    display: grid;
    grid-template-columns: var(--home-thumb-w) minmax(0, 1fr);
    align-items: stretch;
    position: relative;
    overflow: hidden;
    min-height: 11.5rem;
    width: 100%;
    max-width: none;
    border-radius: 16px;
    background: var(--color-surface, #fff);
    border: 1px solid rgba(10, 69, 72, 0.1);
    box-shadow: 0 10px 28px rgba(10, 69, 72, 0.08);
    transition:
        transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.28s ease,
        border-color 0.28s ease;
}

.home-feed-card::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--feed-accent);
    z-index: 3;
    pointer-events: none;
    border-radius: 16px 0 0 16px;
}

.home-feed-card:hover {
    transform: translateY(-2px);
    border-color: rgba(10, 69, 72, 0.16);
    box-shadow: 0 16px 36px rgba(10, 69, 72, 0.12);
}

.home-feed-card--featured {
    border-color: rgba(10, 69, 72, 0.18);
    box-shadow:
        0 14px 34px rgba(10, 69, 72, 0.11),
        0 0 0 1px rgba(10, 69, 72, 0.08);
}

.home-feed-card.is-past {
    opacity: 0.55;
}

.home-feed-card--famille     { --feed-accent: var(--color-secondary-brand, #d36b42); }
.home-feed-card--seniors     { --feed-accent: var(--color-primary-light, #147a7f); }
.home-feed-card--inclusion   { --feed-accent: var(--color-primary); }
.home-feed-card--jeunesse    { --feed-accent: #15803d; }
.home-feed-card--tous-publics { --feed-accent: var(--color-secondary, #b85d38); }
.home-feed-card--actualite   { --feed-accent: var(--color-primary-light, #147a7f); }

.home-feed-card__media {
    position: relative;
    overflow: hidden;
    width: var(--home-thumb-w);
    min-width: var(--home-thumb-w);
    min-height: 100%;
    align-self: stretch;
    background: var(--color-primary-dark);
}

.home-feed-card__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 27, 29, 0.08) 0%, rgba(10, 27, 29, 0.35) 100%);
    pointer-events: none;
    z-index: 1;
}

.home-feed-card__media img {
    width: 100%;
    height: 100%;
    min-height: 11.5rem;
    object-fit: cover;
    display: block;
}

.home-feed-card__media--no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(155deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

.home-feed-card__media-icon {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    z-index: 2;
}

.home-feed-card__date {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    padding: 0.4rem 0.5rem;
    border-radius: 12px;
    background: #fff;
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    line-height: 1.05;
    box-shadow: 0 6px 18px rgba(10, 27, 29, 0.18);
}

.home-feed-card__date-day {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
}

.home-feed-card__date-month {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-secondary-brand, #d36b42);
}

.home-feed-card__status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-main, #0a1b1d);
    background: var(--color-secondary-brand, #d36b42);
    box-shadow: 0 4px 12px rgba(10, 27, 29, 0.15);
}

.home-feed-card__status--today { background: var(--color-primary); color: #fff; }
.home-feed-card__status--soon  { background: #15803d; color: #fff; }
.home-feed-card__status--past  { background: rgba(27, 42, 53, 0.82); color: #fff; }

.home-feed-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
    min-width: 0;
    padding: clamp(1.1rem, 2.5vw, 1.5rem);
    background: #fff;
}

.home-feed-card__category {
    display: inline-block;
    width: fit-content;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    background: rgba(10, 69, 72, 0.07);
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
}

.home-feed-card__title {
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    font-weight: 800;
    color: var(--color-primary-dark);
    margin: 0;
    line-height: 1.28;
}

.home-feed-card__excerpt {
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-feed-card__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.1rem 0 0;
    padding: 0;
    list-style: none;
}

.home-feed-card__fact {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.32rem 0.65rem;
    border-radius: 999px;
    background: rgba(10, 69, 72, 0.05);
    border: 1px solid rgba(10, 69, 72, 0.08);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--color-text-main);
    line-height: 1.2;
}

.home-feed-card__fact-icon {
    color: var(--color-primary);
    flex-shrink: 0;
    font-size: 0.82rem;
}

.home-feed-card__fact-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-feed-card__cta {
    width: 100%;
    margin-top: auto;
    padding-top: 0.5rem;
    min-height: 48px;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-radius: 12px;
}

.page-actualites--modern .home-feed-card {
    border: 1px solid var(--actu-line, rgba(10, 69, 72, 0.12));
    box-shadow: 0 10px 28px rgba(10, 69, 72, 0.07);
}

.page-home--modern .home-feed-card {
    border: 1px solid var(--home-line, rgba(10, 69, 72, 0.12));
    box-shadow: 0 12px 32px rgba(10, 69, 72, 0.09);
}

.page-actualites--modern .home-feed-list {
    margin: 0;
    padding: 0;
}

@media (max-width: 720px) {
    .home-feed-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .home-feed-card__media {
        width: 100%;
        min-width: 0;
        min-height: 200px;
    }

    .home-feed-card__media img {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .home-feed-card__body {
        padding: 1rem 1.1rem 1.15rem;
    }

    .home-feed-card__fact-text {
        white-space: normal;
    }
}
