/**
 * Kadence Home Layout H — styles frontend
 * À la une (colonnes A+B fusionnées) + Brèves presse (colonnes C+D)
 * Base : grille stricte 4 colonnes, gouttières et axes identiques partout.
 */

.khh-section {
    --khh-gap: 2rem;
    --khh-radius: 4px;
}

.khh-section__header {
    margin-bottom: 1.75rem;
    text-align: center;
}

.khh-section__title {
    font-family: var(--global-heading-font-family);
    color: var(--global-palette4);
    margin: 0 0 0.5rem;
}

.khh-section__lead {
    font-family: var(--global-body-font-family);
    color: var(--global-palette5);
    max-width: 640px;
    margin: 0 auto;
}

/* Grille mère : 4 colonnes égales, la une prend A+B, les brèves prennent C+D */
.khh-section__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--khh-gap);
    align-items: start;
}

.khh-col--featured {
    grid-column: span 2;
}

.khh-col--briefs {
    grid-column: span 2;
}

/* Article à la une */
.khh-featured {
    height: 100%;
}

.khh-featured__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.khh-featured__image-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--khh-radius);
    background: var(--global-palette7);
}

.khh-featured__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.khh-featured__image--placeholder {
    width: 100%;
    height: 100%;
    background: var(--global-palette1);
}

.khh-featured__badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--global-palette1);
    color: var(--global-palette8);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.3rem 0.7rem;
    border-radius: 2px;
}

.khh-featured__body {
    padding: 1.25rem 0.1rem 0;
}

.khh-featured__title {
    font-family: var(--global-heading-font-family);
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 0 0 0.6rem;
    color: var(--global-palette4);
}

.khh-featured__excerpt {
    font-family: var(--global-body-font-family);
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--global-palette5);
    margin: 0 0 0.75rem;
}

.khh-featured__date {
    font-family: var(--global-body-font-family);
    font-size: 0.8rem;
    color: var(--global-palette6);
}

/* Brèves : grille interne 2 colonnes strictes (C + D), rangées alignées */
.khh-briefs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem var(--khh-gap);
    list-style: none;
    margin: 0;
    padding: 0;
}

.khh-briefs__item {
    border-top: 1px solid var(--global-palette6);
    padding-top: 0.9rem;
}

.khh-brief__link {
    display: grid;
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    row-gap: 0.15rem;
    text-decoration: none;
    color: inherit;
}

.khh-brief__thumb {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 56px;
    height: 56px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--global-palette7);
    align-self: start;
}

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

.khh-brief__thumb-img--placeholder {
    width: 100%;
    height: 100%;
    background: var(--global-palette1);
}

.khh-brief__body {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
}

.khh-brief__title {
    font-family: var(--global-body-font-family);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    color: var(--global-palette4);
}

.khh-brief__date {
    font-size: 0.72rem;
    color: var(--global-palette6);
}

/* Tablet */
@media (max-width: 1024px) {
    .khh-section__grid {
        grid-template-columns: 1fr;
    }

    .khh-col--featured,
    .khh-col--briefs {
        grid-column: span 1;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .khh-briefs {
        grid-template-columns: 1fr;
    }

    .khh-featured__title {
        font-size: 1.25rem;
    }
}
