/* demo-articles.css — Vignettes news/guides (Phase 4b, renderer article_cards).
 * Rendues comme .ui-cards-block (siblings du textContainer) → pas de scintillement
 * streaming (cf. CLAUDE.md : seules les cards markdown DANS textContainer sont touchées).
 * demo-core.css chargé en premier → variables --c-* dispo (pas de fallback hardcodé).
 */

/* Largeur clampée : la card occupe la colonne chat sur desktop, 100vw-48px sur mobile
 * (cf. CLAUDE.md : .chat-bubble.agent est shrink-to-fit → largeur explicite obligatoire). */
.article-cards-grid {
    width: min(720px, calc(100vw - 48px));
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 8px 0;
}

.article-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Anti-soulignement : .chat-bubble.agent a { text-decoration: underline } (demo-chat.css) est plus
 * spécifique que .article-card-link et soulignerait TOUT le contenu de la card (titre, extrait,
 * source). On neutralise comme pour les product/pro cards (même pattern !important scopé au chat). */
.chat-bubble.agent a.article-card-link,
.chat-bubble.agent a.article-card-link:hover,
.chat-bubble.agent a.article-card-link:visited {
    text-decoration: none !important;
}

.article-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    contain: layout paint style;
}

.article-card-link:hover .article-card,
.article-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.article-card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--c-bg-warm);
    overflow: hidden;
}

.article-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.article-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px 12px;
    flex: 1;
}

.article-card-badge {
    align-self: flex-start;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    border-radius: 9999px;
}

/* guide = haute fiabilité (teal) ; news = actualité (peach). */
.article-badge-guide {
    background: var(--c-primary-light);
    color: var(--c-primary);
}

.article-badge-news {
    background: var(--c-accent-light);
    color: var(--c-accent-hover);
}

/* story = belle histoire (Concierge feel-good) : corail vivid, se distingue de news/guide. */
.article-badge-story {
    background: var(--c-accent-vivid);
    color: var(--c-text-inverse);
    text-transform: none;
}

.article-card-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    color: var(--c-text);
    /* clamp 3 lignes */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-excerpt {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--c-text-secondary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card-source {
    margin-top: auto;
    font-size: 0.72rem;
    color: var(--c-text-muted);
}

@media (prefers-reduced-motion: reduce) {
    .article-card { transition: none; }
    .article-card-link:hover .article-card,
    .article-card:hover { transform: none; }
}
