/*
 * Blog components of the child theme (docs/blog/BLOG-V1.md §5), on top of the Actimonde design system
 * (assets/design/design.css, generated from the Symfony application). Same cascade layers; tokens only: no color,
 * size or font outside var(--…), as the application's components.
 */
@layer components {
    /* Blog home: search and themes under the title. */
    .c-blog-head__tools { display: grid; gap: var(--s-5); }
    .c-blog-search { width: min(100%, 26rem); }
    .c-blog-themes { display: grid; gap: var(--s-3); }
    .c-blog-themes ul { gap: var(--s-2); }
    .c-blog-themes .c-pill { font-weight: var(--w-medium); }

    /* Latest article, in large on the blog home. */
    .c-blog-feature {
        position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-6); align-items: center;
    }
    .c-blog-feature .c-media { aspect-ratio: 16 / 10; }
    .c-blog-feature .c-media > svg { width: 48px; height: 48px; margin: auto; stroke: var(--c-texte-2); }
    .c-blog-feature:hover .c-media img { transform: scale(1.03); }
    .c-blog-feature:focus-within { outline: 3px solid var(--c-focus); outline-offset: 4px; border-radius: var(--r-l); }
    .c-blog-feature__body { display: grid; gap: var(--s-3); }
    .c-blog-feature__title { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); }
    .c-blog-feature .c-card__text { font-size: var(--t-base); }
    .c-blog-list-title { font-size: var(--t-h3); }
    @media (max-width: 60rem) { .c-blog-feature { grid-template-columns: 1fr; gap: var(--s-4); } }

    /* Article cards: the selection card with a category, an excerpt and the date. */
    .c-card--post .c-card__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .c-card--post .c-card__body { align-content: start; }
    .c-media--brand { background: var(--c-fond-accent); }

    /* Article. */
    .c-article__wrap { max-width: 48rem; }
    .c-article__wrap--wide { max-width: 60rem; }
    .c-article__head h1 { font-size: clamp(2rem, 1.4rem + 2vw, 3rem); }
    .c-page-head__kicker a { color: inherit; text-decoration: none; }
    .c-page-head__kicker a:hover { text-decoration: underline; }
    .c-article__meta {
        display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-4); font-size: var(--t-s); color: var(--c-texte-2);
    }
    .c-article__meta svg { display: inline-block; width: 16px; height: 16px; stroke: currentColor; vertical-align: -3px; margin-inline-end: var(--s-2); }
    .c-article__meta a { color: var(--c-lien); }
    .c-article__cover { aspect-ratio: 16 / 9; margin-bottom: var(--s-6); }
    .c-article__tags { gap: var(--s-2); margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--c-trait); }
    .c-article__tags .c-pill svg { width: 14px; height: 14px; stroke: currentColor; }
    .c-article__pages { margin-top: var(--s-5); font-weight: var(--w-medium); }
    .c-article__related { background: var(--c-fond-doux); margin-top: var(--s-7); }

    /*
     * Stored article content (classic HTML of the legacy blog, blocks of later articles): readable prose. Styles
     * only: the markup, the links and their attributes are the stored ones.
     */
    .c-article__content { font-size: var(--t-base); line-height: 1.75; overflow-wrap: break-word; }
    .c-article__content > * + * { margin-top: var(--s-4); }
    .c-article__content h2 { font-size: clamp(1.4rem, 1.2rem + .6vw, 1.75rem); margin-top: var(--s-7); }
    .c-article__content h3 { font-size: var(--t-l); margin-top: var(--s-6); }
    .c-article__content h4 { font-size: var(--t-base); margin-top: var(--s-5); }
    .c-article__content :is(h2, h3, h4) + * { margin-top: var(--s-3); }
    .c-article__content a { color: var(--c-lien); text-decoration: underline; text-decoration-thickness: 1px; }
    .c-article__content a:hover { text-decoration-thickness: 2px; }
    .c-article__content :is(ul, ol) { padding-inline-start: 1.4em; display: grid; gap: var(--s-2); }
    .c-article__content li::marker { color: var(--c-bleu); }
    .c-article__content blockquote { border-inline-start: 4px solid var(--c-turquoise); padding: var(--s-2) var(--s-5); color: var(--c-texte-2); font-style: italic; }
    .c-article__content img { border-radius: var(--r-s); }
    .c-article__content :is(.aligncenter, img.aligncenter) { margin-inline: auto; }
    .c-article__content .alignleft { float: left; margin: var(--s-2) var(--s-5) var(--s-3) 0; max-width: 50%; }
    .c-article__content .alignright { float: right; margin: var(--s-2) 0 var(--s-3) var(--s-5); max-width: 50%; }
    .c-article__content::after { content: ""; display: table; clear: both; }
    .c-article__content :is(.wp-caption, figure) { max-width: 100%; }
    .c-article__content :is(.wp-caption-text, figcaption) { margin-top: var(--s-2); font-size: var(--t-xs); color: var(--c-texte-2); text-align: center; }
    .c-article__content table { width: 100%; border-collapse: collapse; font-size: var(--t-s); }
    .c-article__content :is(th, td) { border: 1px solid var(--c-trait); padding: var(--s-2) var(--s-3); text-align: left; vertical-align: top; }
    .c-article__content th { background: var(--c-fond-doux); }
    .c-article__content iframe { max-width: 100%; }
    @media (max-width: 40rem) { .c-article__content :is(.alignleft, .alignright) { float: none; margin: var(--s-4) auto; max-width: 100%; } }

    /* Bridge to the application. */
    .c-blog-explore { padding-bottom: 0; }
    .c-blog-explore__inner {
        display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-5);
        background: var(--c-fond-accent); border-radius: var(--r-l); padding: var(--s-7) var(--s-6);
    }
    .c-blog-explore__inner h2 { font-size: var(--t-h2); }
    .c-blog-explore .l-cluster { gap: var(--s-3); }
    @media (max-width: 40rem) { .c-blog-explore__inner { padding: var(--s-6) var(--s-5); } }

    /* WordPress admin bar (logged-in editors): the sticky header stays under it. */
    .admin-bar .c-header { top: var(--wp-admin--admin-bar--height, 32px); }
}
