/**
 * Kadence Home Layout G — styles frontend
 * 3 vignettes gauche + featured centraux (grande image) + 3 vignettes droite
 */

.khg-section {
    --khg-title-font-size: 16px;
    --khg-title-color: var(--global-palette4);
    --khg-badge-color: var(--global-palette1);
}

.khg-section__header {
    margin-bottom: 1.5rem;
}

.khg-section__title {
    font-family: var(--global-heading-font-family);
    color: var(--global-palette4);
}

.khg-section__lead {
    font-family: var(--global-body-font-family);
    color: var(--global-palette5);
}

.khg-section__grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Colonnes latérales (gauche/droite, symétriques) */
.khg-col--side {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.khg-card {
    background: var(--global-palette7);
    border-radius: 4px;
    overflow: hidden;
}

.khg-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.khg-card__image-wrapper {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.khg-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.khg-card__badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    background: var(--khg-badge-color);
    color: var(--global-palette8);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.25rem 0.6rem;
    border-radius: 2px;
}

.khg-card__body {
    padding: 0.75rem 0.9rem 0.9rem;
}

.khg-card__title {
    font-family: var(--global-heading-font-family);
    font-size: var(--khg-title-font-size);
    line-height: 1.3;
    margin: 0 0 0.35rem;
    color: var(--khg-title-color);
}

.khg-card__date {
    font-family: var(--global-body-font-family);
    font-size: 0.78rem;
    color: var(--global-palette5);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Colonne centrale featured (grande image, empilée) */
.khg-col--featured {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.khg-featured {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.khg-featured__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.khg-featured__image-wrapper {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 4px;
}

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

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

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

.khg-featured__body {
    padding: 1rem 0.1rem 0;
}

.khg-featured__title {
    font-family: var(--global-heading-font-family);
    font-size: calc(var(--khg-title-font-size) * 1.4);
    line-height: 1.3;
    margin: 0 0 0.4rem;
    color: var(--khg-title-color);
}

.khg-featured__date {
    font-family: var(--global-body-font-family);
    font-size: 0.85rem;
    color: var(--global-palette5);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

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

    .khg-col--featured {
        grid-column: 1 / -1;
        order: -1;
        flex-direction: row;
    }

    .khg-col--featured .khg-featured {
        flex: 1;
    }
}

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

    .khg-col--featured {
        flex-direction: column;
    }
}
