/* ============================================================
   Shortcode [habari_query_loop] — Bloc articles par catégorie
   ============================================================ */

.habari-ql {
    margin: 2rem 0;
}

/* Liste */
.habari-ql__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.habari-ql__item {
    border-bottom: 1px solid var(--habari-dark-off);
}

.habari-ql__item:first-child {
    border-top: 1px solid var(--habari-dark-off);
}

/* Card horizontale : contenu gauche, image droite */
.habari-ql__card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s;
}

.habari-ql__item:hover .habari-ql__card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
}

/* Partie texte */
.habari-ql__body {
    flex: 1;
    min-width: 0;
}

.habari-ql__title {
    font-size: 0.9rem;
    font-family: var(--habari-font-heading);
    font-weight: 700;
    color: var(--habari-dark-shark);
    margin: 0 0 6px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.1s;
}

.habari-ql__item:hover .habari-ql__title {
    color: var(--habari-primary-brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.habari-ql__date {
    display: block;
    font-size: 0.72rem;
    color: var(--habari-dark-pale);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Vignette 1:1 */
.habari-ql__thumb {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
    overflow: hidden;
    margin: 0;
    background: var(--habari-dark-off);
}

.habari-ql__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.2s;
}

.habari-ql__item:hover .habari-ql__thumb img {
    transform: scale(1.03);
}

/* Badge accès — petit espacement sous le badge avant le titre */
.habari-ql__body .habari-access-badge {
    margin-bottom: 4px;
}

/* Pied de bloc : bouton "Voir tout" */
.habari-ql__footer {
    margin-top: 18px;
    text-align: center;
}

.habari-ql__see-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--habari-primary-brand);
    font-size: 0.82rem;
    font-weight: 700;
    font-family: var(--habari-font-heading);
    text-decoration: none;
    border-bottom: 1px solid var(--habari-primary-brand-pale);
    padding-bottom: 2px;
    transition: color 0.1s, border-color 0.1s;
}

.habari-ql__see-all:hover {
    color: var(--habari-primary-brand-light);
    border-bottom-color: var(--habari-primary-brand);
}

/* Mobile : réduit légèrement le thumb */
@media (max-width: 480px) {
    .habari-ql__thumb {
        width: 80px;
        height: 80px;
    }

    .habari-ql__title {
        font-size: 0.85rem;
    }
}
