/**
 * Chantilo — site stylesheet (child of Twenty Twenty-Five). Design: docs/design/design-system.md.
 * Tokens mirror theme.json (preset vars are the source of truth); class prefix « ch- ».
 * Breakpoints (§7): mobile < 600 · tablet 600–1023 · laptop 1024–1439 · desktop ≥ 1440. Mobile first.
 * The header and menu live in menu.css. Loaded in the editor too (components in posts look the same).
 *
 * 1 tokens · 2 base · 3 layout · 4 buttons, pills, chips · 5 motifs (measuring line, rounded tiles, brick levels, brick steps on a rail)
 * 6 cards · 7 heroes · 8 home · 9 devis band · 10 prose + post components · 11 loops · 12 footer · 13 breakpoints
 */

/* ── 1. Tokens ────────────────────────────────────── */
:root {
	--ch-base: #FFFFFF;
	--ch-contrast: #1C2B25;
	--ch-a1: #E8A93A;
	--ch-a2: #E4EEE7;
	--ch-a3: #1F5C46;
	--ch-a4: #5D6B64;
	--ch-a5: #FBF6EC;
	--ch-a6: #E6E0D2;
	--ch-sapin-text: #1F5C46;
	--ch-moutarde-text: #8A5A0B;
	--ch-moutarde-claire: #F6D58E;
	/* Derived, CSS only: sauge claire (tip callouts; moutarde-text on it 5.1:1), dotted leaders, muted footer text (10.3:1). */
	--ch-sauge-light: #EEF5F0;
	--ch-dots: #C6C2B0;
	--ch-footer-muted: #C9D5CE;
	--ch-error: #A1231B; /* form errors: 7.3:1 on white */
	--ch-error-bg: #FFF6F5;
	--ch-error-line: #E7B5B1;
	--ch-wide: 1240px;
	--ch-gutter: 16px;
	--ch-radius: 999px;
	--ch-r-card: 22px;
	--ch-r-big: 32px;
	--ch-shadow: 0 1px 0 rgba(28, 43, 37, .04), 0 14px 32px -20px rgba(28, 43, 37, .38);
	--ch-shadow-lg: 0 2px 0 rgba(28, 43, 37, .04), 0 28px 60px -28px rgba(28, 43, 37, .45);
	--ch-focus: var(--wp--preset--color--accent-3);
	--ch-section: clamp(48px, 7vw, 96px);
	/* Fine mustard measuring line (rule with ticks): section titles, active menu item, bottom edges. */
	--ch-ticks: repeating-linear-gradient(90deg, var(--ch-a1) 0 2px, transparent 2px 10px);
	--ch-ticks-big: repeating-linear-gradient(90deg, var(--ch-a1) 0 2px, transparent 2px 50px);
	/* Brick (the logo « Le mur de briques »): difficulty, bullets and badges. */
	--ch-brick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='1' y='6' width='22' height='12' rx='2.6'/%3E%3C/svg%3E");
	--ch-brick-row: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 27 24'%3E%3Crect x='1' y='6' width='22' height='12' rx='2.6'/%3E%3C/svg%3E");
	--ch-level-off: var(--ch-a6);
	--ch-on-dark: #F2C46D; /* small icons on the dark footer */
	--ch-a1-light: #FFEFB8;
	--ch-font-h: var(--wp--preset--font-family--heading, "Funnel Display", Arial, sans-serif);
}

/* ── 2. Base ──────────────────────────────────────── */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; background: var(--ch-a5); }
h1, h2, h3, .wp-block-post-title { text-wrap: balance; }
p, li { text-wrap: pretty; }
table, .wp-block-table, .ch-num { font-variant-numeric: tabular-nums; }
img { height: auto; max-width: 100%; }
::selection { background: var(--ch-moutarde-claire); color: var(--ch-contrast); }
:where(a, button, input, select, textarea, summary, .wp-element-button):focus-visible {
	outline: 3px solid var(--ch-focus);
	outline-offset: 2px;
}
a { text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
.wp-element-button, .wp-block-button__link { min-height: 44px; display: inline-flex; align-items: center; }
.wp-site-blocks > *, .ch-main > * { margin-block-start: 0; }
.wp-site-blocks { padding-top: 0; padding-bottom: 0; }
.screen-reader-text:not(:focus) { clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; white-space: nowrap; word-wrap: normal !important; }

/* ── 3. Layout ────────────────────────────────────── */
.ch-wrap { box-sizing: border-box; width: 100%; max-width: calc(var(--ch-wide) + 2 * var(--ch-gutter)); margin-inline: auto; padding-inline: var(--ch-gutter); }
.ch-section { position: relative; padding-block: var(--ch-section); }
.ch-section--white { background: var(--ch-base); }
.ch-section--rose { background: var(--ch-a2); }
.ch-head { max-width: 46rem; margin-bottom: clamp(24px, 3vw, 40px); }
.ch-head__title { margin: 0; }
.ch-head__lead { margin: .7rem 0 0; color: var(--ch-a4); font-size: 1.05rem; }
.ch-section__more { margin: 32px 0 0; }
.ch-main--search, .ch-main--archive { padding-bottom: 8px; }
.ch-main--search { background: var(--ch-base); }

/* ── 4. Buttons, pills, chips ─────────────────────── */
.ch-btn {
	box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	min-height: 48px; padding: .7rem 1.4rem; border: 2px solid transparent; border-radius: var(--ch-radius);
	font-family: var(--ch-font-h); font-weight: 700; font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none;
	cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.ch-btn--primary { background: var(--ch-a3); color: var(--ch-base); }
.ch-btn--primary:hover { background: var(--ch-contrast); color: var(--ch-base); }
.ch-btn--cta { background: var(--ch-a1); color: var(--ch-contrast); }
.ch-btn--cta:hover { background: var(--ch-contrast); color: var(--ch-a1); }
.ch-btn--ghost { background: transparent; color: var(--ch-contrast); border-color: var(--ch-contrast); }
.ch-btn--ghost:hover { background: var(--ch-contrast); color: var(--ch-base); }
.ch-btn--light { background: var(--ch-a5); color: var(--ch-contrast); }
.ch-btn--light:hover { background: var(--ch-a1); }
.ch-btn--small { min-height: 44px; padding: .5rem 1.1rem; font-size: .95rem; }
.ch-btn--block { width: 100%; }
/* Same looks for the core Button block (block styles, inc/50-components.php). */
.wp-block-button.is-style-ch-cta .wp-block-button__link { background: var(--ch-a1); color: var(--ch-contrast); }
.wp-block-button.is-style-ch-cta .wp-block-button__link:hover { background: var(--ch-contrast); color: var(--ch-a1); }
.wp-block-button.is-style-ch-ghost .wp-block-button__link { background: transparent; color: var(--ch-contrast); box-shadow: inset 0 0 0 2px var(--ch-contrast); }
.wp-block-button.is-style-ch-ghost .wp-block-button__link:hover { background: var(--ch-contrast); color: var(--ch-base); }
.wp-block-button.is-style-ch-light .wp-block-button__link { background: var(--ch-a5); color: var(--ch-contrast); }
.wp-block-button__link { font-weight: 700; min-height: 48px; }

.ch-pill {
	display: inline-flex; align-items: center; min-height: 32px; padding: .2rem .9rem; border-radius: var(--ch-radius);
	background: var(--ch-a2); color: var(--ch-sapin-text); font-family: var(--ch-font-h); font-weight: 700; font-size: .9rem; text-decoration: none; line-height: 1.2;
}
a.ch-pill { min-height: 44px; padding-inline: 1.1rem; }
.ch-pill .ch-icon { width: 18px; height: 18px; margin-right: .4rem; }
a.ch-pill:hover { background: var(--ch-sapin-text); color: var(--ch-base); }
.ch-pill--small { min-height: 28px; font-size: .82rem; padding: .15rem .7rem; }

.ch-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.ch-chip {
	display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .35rem 1.05rem; box-sizing: border-box;
	border-radius: var(--ch-radius); border: 1.5px solid var(--ch-a6); background: var(--ch-base); color: var(--ch-contrast);
	font-family: var(--ch-font-h); font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none;
	transition: border-color .15s ease, color .15s ease;
}
.ch-chip:hover { border-color: var(--ch-a3); color: var(--ch-sapin-text); }
.ch-chip .ch-icon { width: 20px; height: 20px; color: var(--ch-a3); }
.ch-link { font-family: var(--ch-font-h); font-weight: 700; color: var(--ch-sapin-text); text-decoration: underline; text-decoration-color: var(--ch-a3); text-underline-offset: .25em; display: inline-flex; align-items: center; min-height: 44px; }
.ch-link:hover { color: var(--ch-contrast); }

/* ── 5. Motifs ────────────────────────────────────── */
/* Roofline edge (.ch-rule): a row of little gables in the colour of the band below (--ch-rule-to), at the bottom of heroes and bands. */
.ch-rule {
	position: absolute; left: 0; right: 0; bottom: -1px; height: 14px; pointer-events: none; background: var(--ch-rule, var(--ch-a5));
	background: linear-gradient(var(--ch-a1), var(--ch-a1)) left bottom / 100% 2px no-repeat, var(--ch-ticks) left bottom / 100% 6px no-repeat, var(--ch-ticks-big) left bottom / 100% 10px no-repeat;
}
.ch-rule--top { top: -13px; bottom: auto; }
/* Stair-step mark (« pas à pas »): raspberry 40 × 10 under section titles and post H2s. */
.ch-head__title::after, .ch-prose h2::after, .ch-faq h2::after {
	content: ""; display: block; width: 40px; height: 10px; margin-top: .4em; background: linear-gradient(var(--ch-a1), var(--ch-a1)) left bottom / 100% 2px no-repeat, var(--ch-ticks) left bottom / 100% 7px no-repeat;
}
.ch-disc { flex: none; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--ch-a3); color: var(--ch-base); }
.ch-disc .ch-icon { width: 24px; height: 24px; }
.ch-disc--big { width: 64px; height: 64px; }
.ch-disc--big .ch-icon { width: 32px; height: 32px; }
.ch-disc--small { width: 36px; height: 36px; }
.ch-disc--small .ch-icon { width: 20px; height: 20px; }
.ch-icon { flex: none; }
.ch-icon--logo { width: 100%; height: auto; }
/* Difficulty: 1–3 small bricks (never stars), laid side by side like a course of the logo wall. */
.ch-level { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; line-height: 1; color: var(--ch-a4); white-space: nowrap; }
.ch-level__icons { display: inline-flex; gap: 3px; }
.ch-lvl { display: block; width: 22px; height: 22px; background: var(--ch-level-off); -webkit-mask: var(--ch-brick) center / contain no-repeat; mask: var(--ch-brick) center / contain no-repeat; }
.ch-lvl.is-on { background: var(--ch-a3); }
p[class*="is-style-ch-level-"] { display: flex; align-items: center; gap: .55rem; font-size: .9rem; color: var(--ch-a4); }
p[class*="is-style-ch-level-"]::before { content: ""; flex: none; width: 72px; }
p[class*="is-style-ch-level-"]::before { height: 22px; width: 77px; -webkit-mask: var(--ch-brick-row) 0 0 / 25.5px 22px repeat-x; mask: var(--ch-brick-row) 0 0 / 25.5px 22px repeat-x; }
p.is-style-ch-level-1::before { background: linear-gradient(90deg, var(--ch-a3) 0 25px, var(--ch-level-off) 25px); }
p.is-style-ch-level-2::before { background: linear-gradient(90deg, var(--ch-a3) 0 50px, var(--ch-level-off) 50px); }
p.is-style-ch-level-3::before { background: var(--ch-a3); }

/* Topics (mega panel, bottom sheet, home plan): icon, name, dotted leader, bricks. */
.ch-topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ch-topic__link { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ch-contrast); text-decoration: none; font-family: var(--ch-font-h); font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
.ch-topic__name { flex: 0 1 auto; }
.ch-topic__dots { flex: 1 1 24px; min-width: 24px; align-self: center; height: 0; border-bottom: 2.5px dotted var(--ch-dots); transform: translateY(4px); }
.ch-topic__count { font-family: var(--wp--preset--font-family--body); font-weight: 600; font-size: .85rem; color: var(--ch-a4); white-space: nowrap; }
.ch-topic__line { display: block; margin: -4px 0 6px; font-size: .9rem; line-height: 1.45; color: var(--ch-a4); }
.ch-topic__link:hover .ch-topic__name { color: var(--ch-sapin-text); text-decoration: underline; text-underline-offset: .2em; }

/* ── 6. Cards ─────────────────────────────────────── */
.ch-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.ch-grid > li { display: flex; }
.ch-grid > li > .ch-card, .ch-grid > .ch-card { width: 100%; }
.ch-card {
	position: relative; display: flex; flex-direction: column; overflow: hidden; height: 100%; box-sizing: border-box;
	background: var(--ch-base); border: 1px solid var(--ch-a6); border-radius: var(--ch-r-card); box-shadow: var(--ch-shadow);
}
.ch-card__media { position: relative; margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ch-a2); }
.ch-card__media img, .ch-card__media .ch-card__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ch-card__media::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 12px; background: var(--ch-base);
	background: linear-gradient(var(--ch-a1), var(--ch-a1)) left bottom / 100% 2px no-repeat, var(--ch-ticks) left bottom / 100% 6px no-repeat, var(--ch-ticks-big) left bottom / 100% 10px no-repeat;
}
.ch-card__media--empty { display: grid; place-items: center; aspect-ratio: 16 / 7; }
.ch-card__media--empty .ch-icon--logo { width: 72px; transform: rotate(-8deg); }
/* Query-loop cards without a featured image get the same rose band. */
.ch-loop .ch-card:not(:has(.ch-card__media)):not(.ch-card--devis):not(.ch-card--page)::before {
	content: ""; display: block; aspect-ratio: 16 / 7; background: radial-gradient(circle at 50% 120%, var(--ch-a1-light) 0 30%, transparent 31%), var(--ch-a2);
}
.ch-loop .ch-card:not(:has(.ch-card__media)):not(.ch-card--devis):not(.ch-card--page) .ch-card__body::before {
	content: ""; position: absolute; left: 0; right: 0; top: -11px; height: 12px; background: var(--ch-base);
	background: linear-gradient(var(--ch-a1), var(--ch-a1)) left bottom / 100% 2px no-repeat, var(--ch-ticks) left bottom / 100% 6px no-repeat, var(--ch-ticks-big) left bottom / 100% 10px no-repeat;
}
.ch-card__body { position: relative; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px 20px 22px; }
.ch-card__body > * { margin: 0; }
.ch-card__title { font-family: var(--ch-font-h); font-weight: 700; font-size: 1.2rem; line-height: 1.25; letter-spacing: -.01em; }
.ch-card__title a { color: var(--ch-contrast); text-decoration: none; }
.ch-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.ch-card:hover .ch-card__title a { text-decoration: underline; text-decoration-color: var(--ch-a3); }
.ch-card:focus-within { outline: 3px solid var(--ch-focus); outline-offset: 2px; }
.ch-card__title a:focus-visible { outline: none; }
.ch-card__excerpt, .ch-card__excerpt p { margin: 0; color: var(--ch-a4); font-size: .95rem; line-height: 1.55; }
.ch-card__excerpt .wp-block-post-excerpt__more-text { display: none; }
.ch-card__meta { margin-top: auto !important; padding-top: 6px; }
.ch-card__terms { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0; }
.ch-card__terms a {
	display: inline-flex; align-items: center; min-height: 28px; padding: .15rem .7rem; border-radius: var(--ch-radius);
	background: var(--ch-a2); color: var(--ch-sapin-text); font-family: var(--ch-font-h); font-weight: 700; font-size: .82rem; text-decoration: none; line-height: 1.2;
}
.ch-card__terms .wp-block-post-terms__separator { display: none; }
.ch-card--lead .ch-card__media { aspect-ratio: 16 / 9; }
.ch-card--lead .ch-card__title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
.ch-card--mini { border-left: 6px solid var(--ch-moutarde-claire); box-shadow: none; }
.ch-card--mini .ch-card__body { padding: 14px 18px; }
.ch-card--mini .ch-card__title { font-size: 1.05rem; }

/* ── 7. Heroes ────────────────────────────────────── */
.ch-hero { position: relative; padding-block: clamp(24px, 4vw, 56px) clamp(52px, 6vw, 88px); background: var(--ch-base); }
.ch-hero__title { margin: 0; font-weight: 800; letter-spacing: -.03em; line-height: 1.06; }
.ch-hero__lead { margin: .9rem 0 0; max-width: 40rem; font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.6; }
.ch-hero__count { margin: 1rem 0 0; color: var(--ch-a4); }
.ch-hero__count strong { color: var(--ch-contrast); font-family: var(--ch-font-h); }
.ch-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 1.1rem 0 0; }
.ch-meta { display: inline-flex; align-items: center; gap: .4rem; font-size: .92rem; color: var(--ch-a4); }
.ch-meta .ch-icon { width: 18px; height: 18px; color: var(--ch-a3); }
.ch-hero__deco { display: none; }
.ch-hero__actions { margin: 24px 0 0; }
.ch-hero .ch-chips { margin-top: 20px; }
.ch-breadcrumb { margin: 0 0 14px; font-size: .875rem; color: var(--ch-a4); }
.ch-breadcrumb a { display: inline-block; padding-block: 11px; color: var(--ch-a4); text-decoration: underline; text-decoration-color: transparent; }
.ch-breadcrumb a:hover { color: var(--ch-contrast); text-decoration-color: currentColor; }
.ch-breadcrumb .breadcrumb_last { color: var(--ch-contrast); }

/* Home: papier, H1 + search + « Je veux… », stacked fiche card on the right. */
.ch-hero--home { background: var(--ch-a5); padding-block: clamp(28px, 5vw, 72px) clamp(64px, 7vw, 104px); overflow: hidden; }
.ch-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.ch-hero--home .ch-hero__title { font-size: clamp(2.6rem, 1.5rem + 4.6vw, 5.1rem); line-height: 1; letter-spacing: -.04em; max-width: 11ch; }
.ch-hero--home .ch-hero__lead { margin-top: 1.2rem; }
.ch-hero--home .ch-search { margin-top: 28px; max-width: 36rem; }
.ch-wants { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 22px; max-width: 40rem; }
.ch-wants__label { margin: 0; font-family: var(--ch-font-h); font-weight: 700; color: var(--ch-sapin-text); }
.ch-wants .ch-chips { margin: 0; }

.ch-stack { position: relative; margin: 8px auto 0; max-width: 430px; padding: 0 10px; }
.ch-stack__sheet { position: absolute; inset: 0 10px; border-radius: 28px; }
.ch-stack__sheet--1 { background: var(--ch-a1); transform: rotate(-5deg) translate(-6px, 10px); }
.ch-stack__sheet--2 { background: var(--ch-base); border: 1px solid var(--ch-a6); transform: rotate(2.5deg) translate(4px, 4px); }
.ch-sticker {
	position: absolute; top: -24px; right: -6px; display: block; width: 72px; height: 72px; border-radius: 22%;
	background: transparent; box-shadow: var(--ch-shadow-lg); transform: rotate(10deg); overflow: hidden;
}
.ch-sticker .ch-icon--logo { display: block; width: 100%; height: 100%; }

/* Fiche card (hero illustration and the « Fiche chantier » pattern in posts). */
.ch-fiche { position: relative; box-sizing: border-box; margin-block: 2rem; padding: clamp(20px, 3vw, 30px); background: var(--ch-a2); border-radius: 26px; color: var(--ch-contrast); }
.ch-fiche > * { margin-block: 0; }
.ch-fiche__label { display: flex; align-items: center; gap: .5rem; font-family: var(--ch-font-h); font-weight: 700; font-size: .95rem; color: var(--ch-sapin-text); }
.ch-fiche__label::before { content: ""; width: 20px; height: 20px; transform: rotate(-12deg); background: var(--ch-a1); -webkit-mask: var(--ch-brick) center / contain no-repeat; mask: var(--ch-brick) center / contain no-repeat; }
.ch-fiche__name { margin: .35rem 0 .5rem !important; font-family: var(--ch-font-h); font-weight: 800; font-size: 1.45rem; line-height: 1.15; letter-spacing: -.02em; }
.ch-fiche p[class*="is-style-ch-level-"] { margin: .5rem 0 1rem; }
.ch-fiche__cols { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px !important; margin: 1rem 0 0 !important; }
.ch-fiche__cols > div, .ch-fiche__cols > .wp-block-column { box-sizing: border-box; padding: 14px 16px; background: var(--ch-base); border-radius: 18px; margin: 0 !important; }
.ch-fiche__h, .ch-fiche h3.ch-fiche__h { margin: 0 0 .35rem; font-family: var(--ch-font-h); font-weight: 700; font-size: 1rem; letter-spacing: 0; color: var(--ch-contrast); }
.ch-fiche__h::after { content: none !important; }
.ch-fiche ul { margin: 0; padding-left: 1.1rem; font-size: .95rem; line-height: 1.5; }
.ch-fiche li { margin: .1rem 0; }
.ch-fiche li::marker { color: var(--ch-a3); }
.ch-fiche__finish { margin-top: 1rem !important; padding-top: .9rem; border-top: 2.5px dotted var(--ch-dots); font-size: .95rem; }
.ch-fiche--hero { margin: 0; box-shadow: var(--ch-shadow-lg); }
.ch-fiche--hero > .ch-fiche__h { margin-top: 1rem; }
.ch-fiche__rest { margin-top: .9rem !important; padding-top: .8rem; border-top: 2.5px dotted var(--ch-dots); font-size: .9rem; line-height: 1.5; }
.ch-fiche__rest strong { display: block; font-family: var(--ch-font-h); }
.ch-ministeps { list-style: none; margin: .3rem 0 0; padding: 0; counter-reset: ch-mini; display: grid; gap: 6px; }
.ch-ministeps li { position: relative; counter-increment: ch-mini; display: flex; align-items: center; gap: 10px; font-size: .95rem; line-height: 1.3; }
.ch-ministeps li::before { content: counter(ch-mini); flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ch-moutarde-claire); font-family: var(--ch-font-h); font-weight: 800; font-size: .9rem; }
.ch-ministeps li + li::after { content: ""; position: absolute; left: 13px; top: -8px; height: 8px; border-left: 2.5px dotted var(--ch-dots); }

/* Post: white hero, pill, H1, lead, Fiche chantier + featured image with the rule edge. */
.ch-hero--post .ch-hero__text { max-width: 54rem; }
.ch-hero--post .ch-pill { margin-bottom: 14px; }
.ch-hero--post .ch-hero__title, .ch-hero--page .ch-hero__title, .ch-hero--archive .ch-hero__title, .ch-hero--cat .ch-hero__title, .ch-hero--search .ch-hero__title { font-size: clamp(2rem, 1.3rem + 2.9vw, 3.4rem); }
.ch-hero__top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.ch-hero__fiche .ch-fiche { margin: 0; box-shadow: var(--ch-shadow-lg); }
.ch-hero__figure { position: relative; margin: 28px 0 0; overflow: hidden; border-radius: 26px; aspect-ratio: 16 / 9; background: var(--ch-a2); }
.ch-hero__figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ch-hero__figure::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 16px; background: var(--ch-base);
	background: linear-gradient(var(--ch-a1), var(--ch-a1)) left bottom / 100% 2px no-repeat, var(--ch-ticks) left bottom / 100% 6px no-repeat, var(--ch-ticks-big) left bottom / 100% 10px no-repeat;
}

/* Page, blog, archives: white with the logo icon at the edge on large screens. */
.ch-hero--page .ch-hero__text, .ch-hero--archive .ch-hero__text { max-width: 50rem; }
.ch-hero--page .ch-wrap, .ch-hero--archive .ch-wrap, .ch-hero--search .ch-wrap { position: relative; }

/* Category: sauge-pâle band, icon disc, count, « Pour commencer ». */
.ch-hero--cat { background: var(--ch-a2); }
.ch-hero--cat .ch-disc { margin-bottom: 16px; }
.ch-chip--white { border-color: transparent; }
.ch-start { box-sizing: border-box; padding: 22px 22px 14px; background: var(--ch-base); border-radius: 26px; box-shadow: var(--ch-shadow); }
.ch-start__title { margin: 0 0 6px; font-family: var(--ch-font-h); font-weight: 800; font-size: 1.2rem; }
.ch-start__list { list-style: none; margin: 0; padding: 0; counter-reset: ch-start; }
.ch-start__item { counter-increment: ch-start; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 0 12px 44px; border-top: 2.5px dotted var(--ch-dots); }
.ch-start__item:first-child { border-top: 0; }
.ch-start__item::before { content: counter(ch-start); position: absolute; left: 0; top: 12px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ch-moutarde-claire); font-family: var(--ch-font-h); font-weight: 800; }
.ch-start__item a { font-family: var(--ch-font-h); font-weight: 700; font-size: 1.02rem; line-height: 1.3; color: var(--ch-contrast); text-decoration: none; }
.ch-start__item a:hover { color: var(--ch-sapin-text); text-decoration: underline; }

/* Search: papier with the rule into the white results. */
.ch-hero--search { background: var(--ch-a5); }
.ch-hero--search .ch-search { margin-top: 22px; max-width: 36rem; }

/* 404: « Ce chantier n’existe pas (encore) ». */
.ch-hero--404 { background: var(--ch-a5); text-align: center; padding-block: clamp(40px, 7vw, 96px) clamp(64px, 8vw, 120px); }
.ch-hero--404 .ch-hero__text { max-width: 42rem; margin-inline: auto; }
.ch-hero--404 .ch-hero__title { font-size: clamp(2rem, 1.3rem + 2.9vw, 3.2rem); }
.ch-hero--404 .ch-hero__lead { margin-inline: auto; }
.ch-hero--404 .ch-search { margin: 28px auto 0; max-width: 34rem; text-align: left; }
.ch-hero--404 .ch-chips { justify-content: center; }
.ch-hero__code { display: flex; justify-content: center; align-items: center; gap: .04em; margin: 0 0 12px; font-family: var(--ch-font-h); font-weight: 800; font-size: clamp(5rem, 3rem + 9vw, 9.5rem); line-height: 1; letter-spacing: -.04em; color: var(--ch-contrast); }
.ch-hero__code .ch-icon--logo { width: .95em; transform: rotate(-10deg) translateY(.06em); }

/* Search form (visible label, pill input). */
.ch-search__label { display: block; margin-bottom: 8px; font-family: var(--ch-font-h); font-weight: 700; font-size: 1rem; }
.ch-search__row { display: flex; gap: 8px; }
.ch-search__input {
	box-sizing: border-box; flex: 1; min-width: 0; min-height: 52px; padding: 0 20px; border: 2px solid var(--ch-a6); border-radius: var(--ch-radius);
	background: var(--ch-base); color: var(--ch-contrast); font: inherit; font-size: 1rem;
}
.ch-search__input::placeholder { color: var(--ch-a4); opacity: 1; }
.ch-search__input:focus { border-color: var(--ch-contrast); outline: none; box-shadow: 0 0 0 3px var(--ch-a2); }
.ch-search__btn { min-height: 52px; flex: none; }

/* ── 8. Home ──────────────────────────────────────── */
.ch-rayons { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.ch-rayon { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; box-sizing: border-box; padding: clamp(24px, 4vw, 44px); border-radius: var(--ch-r-big); background: var(--ch-a2); overflow: hidden; }
.ch-rayon--2 { background: var(--ch-a1); }
.ch-rayon--2 .ch-disc { background: var(--ch-contrast); color: var(--ch-a1); }
.ch-rayon__title { margin: 6px 0 0; font-weight: 800; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); letter-spacing: -.03em; }
.ch-rayon__title a { color: var(--ch-contrast); text-decoration: none; }
.ch-rayon__title a:hover { text-decoration: underline; text-decoration-color: var(--ch-a3); }
.ch-rayon__desc { margin: 0; max-width: 34rem; }
.ch-rayon__list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; }
.ch-rayon__list a { display: inline-flex; align-items: center; min-height: 44px; padding: .3rem 1rem; box-sizing: border-box; border-radius: var(--ch-radius); background: var(--ch-base); color: var(--ch-contrast); font-family: var(--ch-font-h); font-weight: 600; font-size: .95rem; text-decoration: none; }
.ch-rayon__list a:hover { color: var(--ch-sapin-text); text-decoration: underline; }
.ch-rayon__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: auto 0 0; padding-top: 12px; }
.ch-rayon__count { font-family: var(--ch-font-h); font-weight: 700; }

/* Tous les chantiers, projet par projet: a framed plan card (inner frame, dotted leaders, bricks for the difficulty). */
.ch-plan { position: relative; box-sizing: border-box; padding: clamp(32px, 5vw, 64px) clamp(22px, 5vw, 72px); background: var(--ch-base); border-radius: 36px; box-shadow: var(--ch-shadow-lg); outline: 1.5px solid var(--ch-a6); outline-offset: -12px; }
.ch-plan__head { text-align: center; max-width: 40rem; margin: 0 auto clamp(24px, 4vw, 44px); }
.ch-plan__logo { display: block; width: 58px; margin: 0 auto 8px; }
.ch-plan__title { margin: 0; font-weight: 800; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); letter-spacing: -.03em; }
.ch-plan__title::after { content: ""; display: block; width: 40px; height: 10px; margin: .45em auto 0; background: linear-gradient(var(--ch-a1), var(--ch-a1)) left bottom / 100% 2px no-repeat, var(--ch-ticks) left bottom / 100% 7px no-repeat; }
.ch-plan__lead { margin: .8rem 0 0; color: var(--ch-a4); }
.ch-plan__cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px clamp(32px, 5vw, 72px); }
.ch-plan__rayon { margin: 0 0 10px; padding-bottom: 10px; border-bottom: 1.5px solid var(--ch-a6); font-weight: 800; font-size: 1.25rem; color: var(--ch-sapin-text); }
.ch-topics--plan .ch-topic__link { font-size: 1.12rem; }

/* Steps: moutarde-claire discs linked by a dotted line (home « trois temps » and the « Étapes numérotées » list style). */
.ch-steps, .is-style-ch-steps { list-style: none; margin: 2rem 0; padding: 0; counter-reset: ch-step; }
.ch-steps > li, .is-style-ch-steps > li { position: relative; counter-increment: ch-step; min-height: 46px; margin: 0; padding: 6px 0 26px 66px; }
.ch-steps > li::before, .is-style-ch-steps > li::before {
	content: counter(ch-step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
	background: var(--ch-moutarde-claire); color: var(--ch-contrast); font-family: var(--ch-font-h); font-weight: 800; font-size: 1.3rem;
}
/* Steps on a rail: numbered bricks threaded on a straight rail with mustard ticks (a measuring rule). */
.ch-steps > li:not(:last-child)::after, .is-style-ch-steps > li:not(:last-child)::after {
	content: ""; position: absolute; left: 22px; top: 54px; bottom: 4px; width: 4px; border-radius: 2px;
	background: repeating-linear-gradient(to bottom, var(--ch-a6) 0 10px, var(--ch-a1) 10px 12px);
}
.ch-steps__title { margin: 0 0 .35rem; font-size: 1.3rem; }
.ch-steps p { margin: 0; color: var(--ch-contrast); max-width: 30rem; }
.ch-steps--row { margin: 0; }

/* Calculators teaser. */
.ch-tools { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ch-tool { display: flex; align-items: center; gap: 14px; min-height: 64px; box-sizing: border-box; padding: 12px 18px; background: var(--ch-base); border-radius: 18px; color: var(--ch-contrast); font-family: var(--ch-font-h); font-weight: 700; text-decoration: none; line-height: 1.25; }
.ch-tool:hover .ch-tool__name { color: var(--ch-sapin-text); text-decoration: underline; }
.ch-tool__icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ch-moutarde-claire); }

/* Latest guides: lead card + compact list. */
.ch-latest { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.ch-latest__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; align-content: start; }

/* FAQ (pattern home-faq: core Details blocks). */
.ch-faq { padding-inline: var(--ch-gutter); }
.ch-faq > h2 { margin-bottom: 20px; }
.ch-faq__item { margin: 12px 0 0 !important; background: var(--ch-base); border: 1px solid var(--ch-a6); border-radius: 20px; }
.ch-faq__item summary { position: relative; display: flex; align-items: center; min-height: 44px; padding: 16px 64px 16px 22px; cursor: pointer; list-style: none; font-family: var(--ch-font-h); font-weight: 700; font-size: 1.1rem; line-height: 1.3; }
.ch-faq__item summary::-webkit-details-marker { display: none; }
.ch-faq__item summary::after {
	content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
	background: var(--ch-moutarde-claire); font-size: 1.3rem; font-weight: 800; line-height: 1;
}
.ch-faq__item[open] summary::after { content: "−"; }
.ch-faq__item > :not(summary) { margin: 0; padding: 0 22px 18px; }

/* ── 9. Devis band (pistachio card, light piping along the top) ── */
.ch-devis { padding-block: clamp(40px, 6vw, 72px); }
.ch-devis--compact { padding-block: 24px 56px; }
.ch-devis__card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: center; box-sizing: border-box; padding: clamp(28px, 4vw, 48px); background: var(--ch-a1); border-radius: var(--ch-r-big); overflow: hidden; }
.ch-devis__card::before {
	content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 14px; background: var(--ch-a5); transform: scaleY(-1);
	background: linear-gradient(var(--ch-a1), var(--ch-a1)) left bottom / 100% 2px no-repeat, var(--ch-ticks) left bottom / 100% 6px no-repeat, var(--ch-ticks-big) left bottom / 100% 10px no-repeat;
}
.ch-devis__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ch-base); color: var(--ch-a3); }
.ch-devis__icon .ch-icon { width: 32px; height: 32px; }
.ch-devis__title { margin: 0; font-weight: 800; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); }
.ch-devis__text p { margin: .4rem 0 0; max-width: 36rem; }
.ch-devis__btn { justify-self: start; position: relative; z-index: 1; }
.ch-devis__logo { position: absolute; right: -18px; bottom: -26px; width: 150px; height: auto; transform: rotate(-14deg); opacity: .22; pointer-events: none; }
.ch-devis__text { position: relative; z-index: 1; }

/* ── 10. Prose + post components ─────────────────── */
.ch-prose { padding-block: clamp(32px, 4vw, 48px) clamp(32px, 4vw, 56px); }
.ch-prose > * { margin-block: 0 1.1em; }
.ch-prose > h2 { margin-top: 2.2em; }
.ch-prose > h3 { margin-top: 1.7em; }
.ch-prose > :first-child { margin-top: 0; }
.ch-prose a:where(:not(.wp-element-button)) { color: var(--ch-sapin-text); }
.ch-prose a:where(:not(.wp-element-button)):hover { color: var(--ch-contrast); }
.ch-prose ul:not([class*="is-style"]) li::marker, .ch-prose ol:not([class*="is-style"]) li::marker { color: var(--ch-a3); font-weight: 700; }
.ch-prose li { margin-block: .25em; }
.ch-prose img { border-radius: 18px; }
.ch-prose figcaption, .wp-element-caption { font-size: .875rem; color: var(--ch-a4); }
.ch-prose blockquote { margin-inline: 0; padding: 4px 0 4px 22px; border-left: 4px solid var(--ch-moutarde-claire); font-size: 1.1rem; }
.ch-prose hr { border: 0; height: 10px; background: linear-gradient(var(--ch-a1), var(--ch-a1)) left bottom / 100% 2px no-repeat, var(--ch-ticks) left bottom / 100% 7px no-repeat; }

/* Callouts: info (sauge pâle), tip (« Astuce », sauge claire), warn (sapin outline). */
.is-style-ch-callout-info, .is-style-ch-callout-tip, .is-style-ch-callout-warn, .ch-callout--info, .ch-callout--tip, .ch-callout--warn {
	box-sizing: border-box; margin-block: 1.6rem; padding: 18px 22px; border-radius: 20px; background: var(--ch-a2);
}
:is(.is-style-ch-callout-info, .is-style-ch-callout-tip, .is-style-ch-callout-warn, [class*="ch-callout--"]) > * { margin-block: 0 .5em; }
:is(.is-style-ch-callout-info, .is-style-ch-callout-tip, .is-style-ch-callout-warn, [class*="ch-callout--"]) > :last-child { margin-bottom: 0; }
.is-style-ch-callout-tip, .ch-callout--tip { background: var(--ch-sauge-light); }
.is-style-ch-callout-warn, .ch-callout--warn { background: var(--ch-base); box-shadow: inset 0 0 0 2px var(--ch-a3); }
.ch-callout__label { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem !important; font-family: var(--ch-font-h); font-weight: 700; color: var(--ch-sapin-text); }
.ch-callout__label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.is-style-ch-callout-tip .ch-callout__label, .ch-callout--tip .ch-callout__label { color: var(--ch-moutarde-text); }

/* Tables: encre sapin header, papier zebra, tabular numbers, scroll box on phones. */
.ch-prose .wp-block-table, .wp-block-table.is-style-ch-table { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-inline: 0; }
.ch-prose .wp-block-table table, .wp-block-table.is-style-ch-table table { width: 100%; min-width: 520px; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--ch-a6); border-radius: 18px; background: var(--ch-base); font-variant-numeric: tabular-nums; }
.ch-prose .wp-block-table :is(th, td), .wp-block-table.is-style-ch-table :is(th, td) { border: 0; padding: .7rem 1rem; text-align: left; vertical-align: top; }
.ch-prose .wp-block-table thead, .wp-block-table.is-style-ch-table thead { border: 0; }
.ch-prose .wp-block-table th, .wp-block-table.is-style-ch-table th { background: var(--ch-contrast); color: var(--ch-base); font-family: var(--ch-font-h); font-weight: 600; }
.ch-prose .wp-block-table tbody tr:nth-child(even) td, .wp-block-table.is-style-ch-table tbody tr:nth-child(even) td { background: var(--ch-a5); }
.ch-prose .wp-block-table tbody td, .wp-block-table.is-style-ch-table tbody td { border-top: 1px solid var(--ch-a6); }

/* ── 11. Loops, pagination, empty states ─────────── */
.ch-loop { padding-block: clamp(28px, 4vw, 48px) clamp(48px, 6vw, 80px); }
.ch-loop .wp-block-post-template { margin: 0; }
.ch-pagination { margin-top: 40px; gap: 8px; flex-wrap: wrap; }
.ch-pagination :is(a, .current) {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; box-sizing: border-box; padding: 0 14px;
	border-radius: var(--ch-radius); background: var(--ch-base); border: 1.5px solid var(--ch-a6); color: var(--ch-contrast);
	font-family: var(--ch-font-h); font-weight: 700; text-decoration: none;
}
.ch-pagination .current { background: var(--ch-contrast); border-color: var(--ch-contrast); color: var(--ch-base); }
.ch-pagination a:hover { border-color: var(--ch-a3); color: var(--ch-sapin-text); }
.ch-pagination .wp-block-query-pagination-numbers { display: flex; flex-wrap: wrap; gap: 8px; }
.ch-empty { box-sizing: border-box; max-width: 46rem; margin: 0 auto; padding: 28px; text-align: center; background: var(--ch-base); border: 2px dashed var(--ch-a6); border-radius: 24px; }
.ch-empty__text { margin: 0 0 16px; }
.ch-empty .ch-chips { justify-content: center; }
.ch-related .ch-grid { margin-top: 4px; }

/* ── 12. Footer (encre sapin, scalloped top, devis strip, reversed logo, five columns) ── */
.ch-site-footer { margin-top: 0; }
.ch-footer { position: relative; margin-top: 14px; padding-block: 0 28px; background: var(--ch-contrast); color: var(--ch-a5); }
.ch-footer::before {
	content: ""; position: absolute; left: 0; right: 0; top: -13px; height: 14px; background: var(--ch-contrast);
	background: linear-gradient(var(--ch-a1), var(--ch-a1)) left bottom / 100% 2px no-repeat, var(--ch-ticks) left bottom / 100% 6px no-repeat, var(--ch-ticks-big) left bottom / 100% 10px no-repeat;
}
.ch-footer a { color: var(--ch-a5); }
.ch-footer a:hover { color: var(--ch-a1); }
.ch-footer__devis {
	position: relative; top: -28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: center; box-sizing: border-box;
	padding: 22px 24px; background: var(--ch-a1); color: var(--ch-contrast); border-radius: 26px; box-shadow: var(--ch-shadow-lg);
}
.ch-footer__devis p { margin: 0; }
.ch-footer__devis-title { font-family: var(--ch-font-h); font-weight: 800; font-size: 1.2rem; line-height: 1.25; }
.ch-footer__devis-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ch-base); color: var(--ch-a3); }
.ch-footer__devis .ch-btn--primary { justify-self: start; color: var(--ch-base); }
.ch-footer__devis .ch-btn--primary:hover { color: var(--ch-base); }
.ch-footer__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 12px; }
.ch-footer__brand > * { margin: 0; }
.ch-footer__logo { display: inline-block; }
.ch-footer__logo img { display: block; width: 170px; height: auto; }
.ch-footer__tagline { margin-top: 16px !important; font-family: var(--ch-font-h); font-weight: 700; font-size: 1.15rem; color: var(--ch-a1); }
.ch-footer__about { margin-top: 6px !important; color: var(--ch-footer-muted); max-width: 24rem; font-size: .95rem; }
.ch-footer__title { display: flex; align-items: center; gap: .5rem; margin: 0 0 4px; font-family: var(--ch-font-h); font-weight: 700; color: var(--ch-a1); }
.ch-footer__title a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: var(--ch-a1); text-decoration: none; }
.ch-footer__title .ch-icon { width: 22px; height: 22px; color: var(--ch-on-dark); }
.ch-footer__links { list-style: none; margin: 0; padding: 0; }
.ch-footer__links a { display: inline-flex; align-items: center; min-height: 40px; font-size: .95rem; text-decoration: underline; text-decoration-color: rgba(251, 246, 236, .3); }
.ch-footer__links--icons a { gap: .55rem; }
.ch-footer__links--icons .ch-icon { width: 18px; height: 18px; color: var(--ch-on-dark); }
.ch-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(251, 246, 236, .16); font-size: .875rem; color: var(--ch-footer-muted); }
.ch-footer__bottom > * { margin: 0; }
.ch-footer__disclaimer { max-width: 52rem; }

/* ── 12b. Shared bits: « bientôt », selects, topic icons, split heads ── */
.ch-soon {
	flex: none; display: inline-flex; align-items: center; padding: .12rem .6rem; border-radius: var(--ch-radius); background: var(--ch-moutarde-claire);
	color: var(--ch-contrast); font-family: var(--ch-font-h); font-weight: 700; font-size: .78rem; line-height: 1.3; white-space: nowrap;
}
.ch-topic__icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ch-a2); color: var(--ch-sapin-text); }
.ch-topic__icon .ch-icon { width: 20px; height: 20px; }
.ch-topic__line { padding-left: 44px; }
.ch-topic.is-soon .ch-topic__name { color: var(--ch-a4); }
.ch-topic.is-soon .ch-topic__icon { background: var(--ch-a5); color: var(--ch-a4); }
.ch-select {
	box-sizing: border-box; min-height: 52px; width: 100%; padding: 0 44px 0 18px; border: 2px solid var(--ch-a6); border-radius: var(--ch-radius);
	background: linear-gradient(45deg, transparent 50%, var(--ch-contrast) 50%) calc(100% - 22px) 50% / 7px 7px no-repeat, linear-gradient(135deg, var(--ch-contrast) 50%, transparent 50%) calc(100% - 15px) 50% / 7px 7px no-repeat, var(--ch-base);
	color: var(--ch-contrast); font: inherit; font-size: 1rem; -webkit-appearance: none; appearance: none; cursor: pointer;
}
.ch-select:focus { border-color: var(--ch-contrast); outline: none; box-shadow: 0 0 0 3px var(--ch-a2); }
.ch-head--split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; max-width: none; }
.ch-head--split .ch-head { margin-bottom: 0; }

/* ── 13. Breakpoints ──────────────────────────────── */
@media (min-width: 600px) {
	:root { --ch-gutter: 24px; }
	.ch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.ch-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ch-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ch-footer__devis { grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; padding: 24px 28px; }
	.ch-footer__devis .ch-btn--primary { justify-self: end; }
	.ch-sticker { width: 84px; height: 84px; right: -14px; }
	.ch-sticker .ch-icon--logo { display: block; width: 100%; height: 100%; }
}
@media (min-width: 768px) {
	.ch-rayons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
	.ch-devis__card { grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; }
	.ch-devis__btn { justify-self: end; }
	.ch-steps--row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
	.ch-steps--row > li { padding: 70px 0 0; }
	.ch-steps--row > li:not(:last-child)::after { left: 62px; right: -14px; top: 22px; bottom: auto; width: auto; height: 4px; background: repeating-linear-gradient(to right, var(--ch-a6) 0 10px, var(--ch-a1) 10px 12px); }
	.ch-hero--cat .ch-hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; }
}
@media (min-width: 1024px) {
	:root { --ch-gutter: 32px; }
	.ch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ch-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ch-hero--home .ch-hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: 56px; }
	.ch-stack { margin-top: 0; max-width: 440px; margin-right: 12px; }
	.ch-hero__top.has-fiche { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; }
	.ch-hero__figure { aspect-ratio: 21 / 8; }
	.ch-hero__deco { display: block; position: absolute; right: var(--ch-gutter); top: 50%; width: clamp(120px, 12vw, 180px); transform: translateY(-50%) rotate(10deg); }
	.ch-hero--page .ch-hero__text, .ch-hero--archive .ch-hero__text, .ch-hero--search .ch-hero__text { padding-right: 220px; box-sizing: border-box; max-width: calc(50rem + 220px); }
	.ch-plan__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ch-latest { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
	.ch-footer__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, .9fr); gap: 40px; }
	.ch-footer__col--projects .ch-footer__links { columns: 2; column-gap: 24px; }
}
@media (min-width: 1440px) {
	.ch-hero--home .ch-hero__grid { gap: 80px; }
	.ch-stack { max-width: 460px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ── Tiles and bricks (the logo « Le mur de briques »): icons sit on rounded tiles like the logo, step numbers are bricks ── */
.ch-disc, .ch-topic__icon, .ch-tool__icon, .ch-ticket__icon, .ch-steps__icon, .ch-devis__icon, .ch-footer__devis-icon, .ch-project__icon, .ch-devisbox__icon { border-radius: 28% !important; clip-path: none; }
.ch-steps > li::before, .is-style-ch-steps > li::before { width: 56px; height: 40px; top: 4px; border-radius: 9px; box-shadow: inset 0 -3px 0 rgba(28, 43, 37, .12); }
.ch-steps > li:not(:last-child)::after, .is-style-ch-steps > li:not(:last-child)::after { left: 26px; }
.ch-steps > li, .is-style-ch-steps > li { padding-left: 72px; }
.ch-steps--row > li { padding-left: 0; }
.ch-steps--row > li:not(:last-child)::after { left: 66px; top: 22px; }
.ch-ministeps li::before { width: 30px; height: 22px; border-radius: 5px; }
.ch-start__item::before { border-radius: 8px; width: 38px; height: 28px; }
.ch-steps__icon { width: 44px; height: 44px; }

/* Query-loop card grids: WordPress adds a block-gap margin-top to every post after the first, which pushed cards
   2, 3… 20 px down inside the grid. Grid gap handles spacing; every card in a row has the same top and height. */
.wp-block-post-template > .wp-block-post { margin-block-start: 0 !important; display: flex; }
.wp-block-post-template > .wp-block-post > .ch-card { width: 100%; }
@media (max-width: 479px) { .ch-fiche:not(.ch-fiche--hero) .ch-fiche__cols { grid-template-columns: minmax(0, 1fr); } }

/* ── Page cards in mixed lists (inc/55-cards.php): devis CTA, calculator, text-only ── */
.ch-card__kicker { margin: 0 !important; font-family: var(--ch-font-h); font-weight: 700; font-size: .82rem; color: var(--ch-sapin-text); }
.ch-card__tile { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 28%; background: var(--ch-base); color: var(--ch-a3); box-shadow: inset 0 -3px 0 rgba(28, 43, 37, .1); }
.ch-card__tile .ch-icon { width: 26px; height: 26px; }
.ch-card__tile--big { width: 72px; height: 72px; background: var(--ch-moutarde-claire); color: var(--ch-contrast); }
.ch-card__tile--big .ch-icon { width: 38px; height: 38px; }
.ch-card--devis { background: var(--ch-a1); border-color: var(--ch-a1); }
.ch-card--devis .ch-card__body { gap: 10px; padding: 22px; }
.ch-card--devis .ch-card__kicker { color: var(--ch-contrast); }
.ch-card--devis .ch-card__title { font-size: 1.35rem; font-weight: 800; }
.ch-card--devis .ch-card__excerpt { color: var(--ch-contrast); }
.ch-card__ticks { gap: 6px; font-size: .9rem; }
.ch-card__ticks li::before { background: var(--ch-base); }
.ch-card__btn { position: relative; z-index: 0; margin-top: auto; pointer-events: none; }
.ch-card--devis:hover .ch-card__btn { background: var(--ch-contrast); }
.ch-card__media--tool { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--ch-a2); }
.ch-card__go { display: inline-flex; align-items: center; gap: .3rem; margin-top: auto !important; padding-top: 4px; font-family: var(--ch-font-h); font-weight: 700; font-size: .92rem; color: var(--ch-sapin-text); }
.ch-card__go .ch-icon { width: 16px; height: 16px; }
.ch-card--page { background: var(--ch-a5); box-shadow: none; }
.ch-card--page .ch-card__body { padding-top: 20px; }

/* Footer without its devis strip (the page already shows a devis block): give the columns room under the measuring line. */
.ch-footer .ch-wrap > .ch-footer__grid:first-child { padding-top: 56px; }
@media (min-width: 1024px) { .ch-footer .ch-wrap > .ch-footer__grid:first-child { padding-top: 72px; } }

/* ── Post hero, « fiche chantier » layout (inc/35-heroes.php ch_render_post_hero()) ──
 * Head across the content width; then the photo (7/12) and the « En bref » panel in solid sapin (5/12), same height. */
.ch-hero--post { background: var(--ch-a5); }
.ch-hero__head { max-width: 58rem; }
.ch-hero--post .ch-hero__title { max-width: 18ch; font-size: clamp(2rem, 1.3rem + 2.9vw, 3.5rem); }
.ch-hero--post .ch-hero__lead { max-width: 46rem; }
.ch-hero--post .ch-hero__meta { gap: 8px 10px; }
.ch-hero--post .ch-hero__meta .ch-meta, .ch-hero--post .ch-hero__meta .ch-level { min-height: 36px; padding: 0 .8rem; border-radius: var(--ch-radius); background: var(--ch-base); box-shadow: inset 0 0 0 1px var(--ch-a6); }
.ch-meta--link { color: var(--ch-contrast); text-decoration: none; font-family: var(--ch-font-h); font-weight: 600; min-height: 44px !important; }
.ch-meta--link:hover { box-shadow: inset 0 0 0 1.5px var(--ch-a3) !important; color: var(--ch-sapin-text); }
.ch-hero__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 28px; }
.ch-hero__photo { position: relative; margin: 0; overflow: hidden; border-radius: 20px; aspect-ratio: 16 / 10; background: var(--ch-a2); }
.ch-hero__photo-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ch-hero__photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: linear-gradient(var(--ch-a1), var(--ch-a1)) left bottom / 100% 2px no-repeat, var(--ch-ticks) left bottom / 100% 6px no-repeat, var(--ch-ticks-big) left bottom / 100% 10px no-repeat; }
.ch-brief { display: flex; flex-direction: column; box-sizing: border-box; padding: 24px; border-radius: 20px; background: var(--ch-a3); color: var(--ch-base); }
.ch-brief__label { display: inline-flex; flex-direction: column; align-self: flex-start; gap: 5px; margin: 0 0 14px; font-family: var(--ch-font-h); font-weight: 700; font-size: .95rem; color: var(--ch-a1); }
.ch-brief__label::after { content: ""; display: block; width: 100%; height: 6px; background: linear-gradient(var(--ch-a1), var(--ch-a1)) left bottom / 100% 2px no-repeat, var(--ch-ticks) left bottom / 100% 6px no-repeat; }
.ch-brief__text p { margin: 0; font-size: 1.02rem; line-height: 1.65; color: var(--ch-base); }
.ch-brief__text a { color: var(--ch-a1); }
.ch-brief__figures { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: auto 0 0; padding: 20px 0 0; }
.ch-brief__figures li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); border-left: 4px solid var(--ch-a1); }
.ch-brief__figures strong { font-family: var(--ch-font-h); font-weight: 800; font-size: 1.45rem; line-height: 1.15; color: var(--ch-a1); font-variant-numeric: tabular-nums; }
.ch-brief__figures span { font-size: .85rem; line-height: 1.35; color: var(--ch-footer-muted); }
@media (min-width: 1024px) {
	.ch-hero__row.has-both { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: stretch; }
	.ch-hero__row.has-both .ch-hero__photo { aspect-ratio: auto; height: 100%; min-height: 400px; }
	.ch-brief { padding: 30px; min-height: 400px; }
	.ch-brief__text p { font-size: 1.06rem; }
}

/* Sommaire in the content, before the first H2: a collapsed bar, numbered rows (2 columns ≥ 1024). */
.ch-toc { margin: 1.8rem 0 2rem !important; }
.ch-toc__fold { border-radius: 18px; background: var(--ch-base); border: 1px solid var(--ch-a6); box-shadow: var(--ch-shadow); }
.ch-toc__bar { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 14px 6px 10px; cursor: pointer; list-style: none; }
.ch-toc__bar::-webkit-details-marker { display: none; }
.ch-toc__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 28%; background: var(--ch-a2); color: var(--ch-a3); }
.ch-toc__icon .ch-icon { width: 20px; height: 20px; }
.ch-toc__title { font-family: var(--ch-font-h); font-weight: 800; font-size: 1.05rem; }
.ch-toc__count { padding: .1rem .6rem; border-radius: var(--ch-radius); background: var(--ch-a5); border: 1px solid var(--ch-a6); font-size: .8rem; color: var(--ch-a4); }
.ch-toc__toggle { margin-left: auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ch-a5); }
.ch-toc__toggle .ch-icon { width: 20px; height: 20px; transition: transform .2s ease; }
.ch-toc__fold[open] .ch-toc__toggle .ch-icon { transform: rotate(180deg); }
.ch-prose .ch-toc__list { list-style: none; margin: 0; padding: 4px 14px 14px; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 18px; border-top: 1px solid var(--ch-a6); }
.ch-toc__list li { margin: 0; border-bottom: 1px dashed var(--ch-a6); }
.ch-toc__list a { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 0; color: var(--ch-contrast) !important; text-decoration: none; font-size: .95rem; line-height: 1.35; }
.ch-toc__list a:hover { color: var(--ch-sapin-text) !important; }
.ch-toc__n { flex: none; display: grid; place-items: center; width: 28px; height: 22px; border-radius: 6px; background: var(--ch-moutarde-claire); font-family: var(--ch-font-h); font-weight: 800; font-size: .8rem; }
@media (min-width: 1024px) { .ch-prose .ch-toc__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .ch-toc__toggle .ch-icon { transition: none; } }
