/*
Theme Name: ECOTHIB
Description: Thème block d'ecothib.fr. Le CSS vient de la maquette V3 conformée (assets/css), chaque bloc porte le sien.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: ecothib-fr
*/

/* Template parts render inside a wrapper box; display:contents lets the sticky
 * .site-header resolve against the whole page, as in the mockup. */
.wp-site-blocks > .wp-block-template-part { display: contents; }

/* Editor parity: root blocks span the full canvas (the mockup sections are
 * full-bleed, their .wrap centres the content). */
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container > :where(:not(.alignleft):not(.alignright)) {
	max-width: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/* Blog (no mockup screen): built from the mockup tokens and primitives
 * (.sec, .wrap, .card, .h2, .h3, .eyebrow, .lede). */
.blog-head .h2 { margin: 12px 0 14px; max-width: 22ch; }
.blog-head .lede { max-width: 62ch; }
.blog-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 960px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card { overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.blog-card__img { margin: 0; }
.blog-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.blog-card__tag a { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.blog-card .h3 a { color: var(--ink); }
.blog-card .wp-block-post-excerpt__excerpt { color: var(--muted); line-height: 1.6; margin: 0; }
.blog-card__meta { color: var(--muted); font-size: 14px; }
.blog-pages { margin-top: 40px; gap: 10px; }
.blog-pages a, .blog-pages .current { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--brand); }
.blog-pages .current { background: var(--brand); color: var(--page); border-color: var(--brand); }

/* Article. */
.article__wrap { max-width: 820px; }
.article .h2 { margin: 12px 0 16px; }
.article__meta { gap: 6px 18px; color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.article__meta p, .article__meta .wp-block-post-date { margin: 0; }
.article__updated::before { content: "Mis à jour le "; }
.article__img { margin: 0 0 32px; border-radius: 14px; overflow: hidden; }
.prose { font-size: 17.5px; line-height: 1.7; color: var(--ink); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 1.8em; }
.prose h3 { font-size: 20px; font-weight: 600; margin-top: 1.4em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--tint); font-weight: 600; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--muted); }
