/* ===========================================================================
 * Rubrique « Découvrir » : templates/home.html (liste), archive.html (catégorie, étiquette, date),
 * single.html (article) et motif « À découvrir ».
 * Hero : base .eb-mhero (eb-modele.css, béton sombre). Blog fermé au public tant que la page
 * « Découvrir » n'est pas publiée (inc/blog.php).
 * ========================================================================= */

/* ---- Hero de la liste ---- */
.eb-bhero .eb-mhero__nom { font-size: clamp(3rem, 1rem + 7vw, 7.5rem); }
.eb-bhero__sur {
	display: flex; align-items: center; gap: 0.6rem;
	font-size: var(--wp--preset--font-size--x-small); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
	color: var(--eb-muted);
}
.eb-bhero__sur::before {
	content: ""; flex: none; width: 14px; height: 13.7px; background: var(--eb-accent);
	-webkit-mask: var(--eb-crochet-mask) center / contain no-repeat; mask: var(--eb-crochet-mask) center / contain no-repeat;
}
.eb-bhero__sur a, .eb-ahero__fil a { text-decoration: none; }
.eb-bhero__sur a:hover, .eb-ahero__fil a:hover { color: var(--eb-ink-on-dark); }

/* ---- Filtre par catégorie (bloc Catégories .eb-filtre, rendu par inc/blog.php) ---- */
.eb-filtre { margin-bottom: var(--wp--preset--spacing--50) !important; }
.eb-filtre ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.eb-filtre a {
	display: inline-flex; align-items: center; min-height: 44px; padding: 0.5rem 1.1rem;
	border-radius: var(--wp--custom--radius--small);
	background: var(--wp--preset--color--blanc); box-shadow: inset 0 0 0 1px var(--eb-line-on-light);
	font-size: var(--wp--preset--font-size--small); font-weight: 600; text-decoration: none;
	transition: color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.eb-filtre a:hover { color: var(--eb-accent); box-shadow: inset 0 0 0 1px var(--eb-accent); }
.eb-filtre a[aria-current] { background: var(--wp--preset--color--anthracite); color: var(--eb-ink-on-dark); box-shadow: none; }

/* ---- Grille de cartes ---- */
.eb-bquery > * { margin-block-start: 0 !important; }
.eb-cartes {
	list-style: none; margin: 0; padding: 0;
	display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--wp--preset--spacing--40);
}
.eb-cartes > li { display: flex; min-width: 0; margin: 0 !important; }
.eb-carte {
	position: relative; display: flex; flex-direction: column; width: 100%;
	background: var(--wp--preset--color--blanc); color: var(--wp--preset--color--anthracite);
	border-radius: var(--wp--custom--radius--large); overflow: hidden;
	transition: transform 0.35s var(--eb-ease), box-shadow 0.35s var(--eb-ease);
}
.eb-carte > * { margin-block-start: 0 !important; }
.eb-carte:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(50, 50, 50, 0.14); }
.is-style-section-blanche .eb-carte { background: var(--wp--preset--color--beton-clair); }

/* Visuel : image à la une, sinon béton sombre + iconographie (crochets) */
.eb-carte__visuel {
	position: relative; aspect-ratio: 3 / 2; overflow: hidden;
	background: var(--wp--preset--color--anthracite) url("../../textures/beton-sombre.jpg") 0 0 / 512px;
}
.eb-carte__visuel::before {
	content: ""; position: absolute; inset: 0; margin: auto; width: 40px; height: 58.6px;
	background: var(--eb-accent);
	-webkit-mask: var(--eb-icone-mask) center / contain no-repeat; mask: var(--eb-icone-mask) center / contain no-repeat;
}
.eb-carte__visuel .wp-block-post-featured-image { position: absolute; inset: 0; z-index: 1; margin: 0; height: 100%; }
.eb-carte__visuel .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--eb-ease); }
.eb-carte:hover .eb-carte__visuel img { transform: scale(1.04); }

.eb-carte__corps { display: flex; flex-direction: column; gap: 0.75rem; flex: 1; padding: var(--wp--preset--spacing--40); }
.eb-carte__corps > * { margin: 0 !important; }
.eb-carte__meta { gap: 0.3rem 1rem; font-size: var(--wp--preset--font-size--x-small); }
.eb-carte__meta > * { margin: 0 !important; }
.eb-carte__cat { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.eb-carte__cat::before {
	content: ""; flex: none; width: 10px; height: 9.8px; background: var(--eb-accent);
	-webkit-mask: var(--eb-crochet-mask) center / contain no-repeat; mask: var(--eb-crochet-mask) center / contain no-repeat;
}
.eb-carte__cat a { text-decoration: none; }
.eb-carte__cat a:hover { color: var(--eb-accent); }
.eb-carte__date { color: var(--eb-muted-on-light); }
.eb-carte__titre { font-size: var(--wp--preset--font-size--large); line-height: 1.2; }
.eb-carte__titre a { text-decoration: none; }
/* Toute la carte est cliquable (lien du titre étendu), sauf dans l'éditeur */
body:not(.editor-styles-wrapper) .eb-carte__titre a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.eb-carte__titre a:focus-visible { outline: none; }
.eb-carte:has(.eb-carte__titre a:focus-visible) { outline: 2px solid var(--eb-accent); outline-offset: 3px; }
.eb-carte__extrait { font-size: var(--wp--preset--font-size--small); line-height: 1.55; color: var(--eb-muted-on-light); }
.eb-carte__extrait p { margin: 0; }
.eb-carte__lire {
	margin-top: auto !important; padding-top: 0.4rem; align-self: flex-start;
	display: inline-flex; align-items: center; gap: 0.6rem;
	font-size: var(--wp--preset--font-size--small); font-weight: 600; text-decoration: none;
}
.eb-carte__lire::after { content: ""; width: 22px; height: 2px; background: var(--eb-accent); transition: width 0.25s var(--eb-ease); }
.eb-carte:hover .eb-carte__lire::after { width: 36px; }

/* Liste, page 1 : le dernier article « à la une » sur toute la largeur */
@media (min-width: 1000px) {
	body.blog:not(.paged) .eb-bliste .eb-cartes > li:first-child { grid-column: 1 / -1; }
	body.blog:not(.paged) .eb-bliste .eb-cartes > li:first-child .eb-carte { flex-direction: row; }
	body.blog:not(.paged) .eb-bliste .eb-cartes > li:first-child .eb-carte__visuel { flex: 0 0 58%; aspect-ratio: auto; min-height: 400px; }
	body.blog:not(.paged) .eb-bliste .eb-cartes > li:first-child .eb-carte__corps { justify-content: center; padding: var(--wp--preset--spacing--60); }
	body.blog:not(.paged) .eb-bliste .eb-cartes > li:first-child .eb-carte__titre { font-size: var(--wp--preset--font-size--x-large); }
	body.blog:not(.paged) .eb-bliste .eb-cartes > li:first-child .eb-carte__extrait { font-size: var(--wp--preset--font-size--medium); }
	body.blog:not(.paged) .eb-bliste .eb-cartes > li:first-child .eb-carte__lire { margin-top: var(--wp--preset--spacing--30) !important; }
}
@media (max-width: 999px) { .eb-cartes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .eb-cartes { grid-template-columns: minmax(0, 1fr); } }

/* Aucun article */
.eb-bvide {
	padding: var(--wp--preset--spacing--50); border-radius: var(--wp--custom--radius--large);
	background: var(--wp--preset--color--blanc); font-size: var(--wp--preset--font-size--large); text-align: center;
}

/* Pagination */
.eb-pagination { margin-top: var(--wp--preset--spacing--60) !important; gap: 0.4rem; font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.eb-pagination > *, .eb-pagination .wp-block-query-pagination-numbers > * { margin: 0 !important; }
.eb-pagination .wp-block-query-pagination-numbers { display: flex; gap: 0.4rem; }
.eb-pagination a, .eb-pagination .page-numbers {
	display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 0.9rem;
	border-radius: var(--wp--custom--radius--small); background: var(--wp--preset--color--blanc); text-decoration: none;
}
.eb-pagination a:hover { color: var(--eb-accent); }
.eb-pagination .page-numbers.current { background: var(--wp--preset--color--anthracite); color: var(--eb-ink-on-dark); }
.eb-pagination .page-numbers.dots { background: none; min-width: 0; padding: 0 0.3rem; }

/* ---- Article : hero ---- */
.eb-ahero__inner > * + * { margin-top: var(--wp--preset--spacing--40) !important; }
.eb-ahero__fil {
	gap: 0.5rem; font-size: var(--wp--preset--font-size--x-small); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
	color: var(--eb-muted);
}
.eb-ahero__fil > * { margin: 0 !important; }
.eb-ahero__cat::before { content: "/"; margin-right: 0.5rem; color: var(--eb-accent); }
.eb-ahero__titre { font-size: clamp(2.2rem, 1.2rem + 3.6vw, 4.6rem); line-height: 1; letter-spacing: -0.02em; max-width: 22ch; }
.eb-ahero__date { font-size: var(--wp--preset--font-size--small); color: var(--eb-muted); }
/* L'image à la une chevauche le bas du hero */
.eb-article:has(.eb-article__image) .eb-ahero { padding-bottom: calc(var(--wp--preset--spacing--60) + var(--wp--preset--spacing--70)); }
.eb-article__image { margin-top: calc(-1 * var(--wp--preset--spacing--70)) !important; margin-bottom: var(--wp--preset--spacing--60) !important; aspect-ratio: 21 / 9; }
.eb-article__image img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: var(--wp--custom--radius--large); }
@media (max-width: 781px) { .eb-article__image { aspect-ratio: 4 / 3; } }

/* ---- Article : contenu ---- */
.eb-article__corps { display: flow-root; padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--70); } /* flow-root : la marge négative de l'image ne traverse pas le groupe */
.eb-article:has(.eb-article__image) .eb-article__corps { padding-top: 0; }
.eb-article__contenu { font-size: 1.0625rem; line-height: 1.75; }
.eb-article__contenu > * + * { margin-block-start: 1.25em; }
.eb-article__contenu > :is(h2, h3, h4) { margin-block-start: 2em; }
.eb-article__contenu > :is(h2, h3, h4) + * { margin-block-start: 0.75em; }
.eb-article__contenu h2 { font-size: var(--wp--preset--font-size--x-large); }
.eb-article__contenu h3 { font-size: var(--wp--preset--font-size--large); }
.eb-article__contenu a:not(.wp-block-button__link) { font-weight: 600; text-decoration: underline; text-decoration-color: var(--eb-accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.eb-article__contenu a:not(.wp-block-button__link):hover { color: var(--eb-accent); }
.eb-article__contenu :is(ul, ol) { padding-left: 1.3em; }
.eb-article__contenu li + li { margin-top: 0.4em; }
.eb-article__contenu li::marker { color: var(--eb-accent); font-weight: 700; }
.eb-article__contenu .wp-block-image img { border-radius: var(--wp--custom--radius--medium); }
.eb-article__contenu figcaption, .eb-article__contenu .wp-element-caption { margin-top: 0.6rem; font-size: var(--wp--preset--font-size--x-small); color: var(--eb-muted-on-light); text-align: left; }
.eb-article__contenu .wp-block-quote {
	position: relative; margin-inline: 0; padding: 0.2rem 0 0.2rem 2.4rem; border: 0;
	font-family: var(--wp--preset--font-family--goldman); font-size: var(--wp--preset--font-size--large); line-height: 1.4;
}
.eb-article__contenu .wp-block-quote::before {
	content: ""; position: absolute; left: 0; top: 0.35rem; width: 22px; height: 21.5px; background: var(--eb-accent);
	-webkit-mask: var(--eb-crochet-mask) center / contain no-repeat; mask: var(--eb-crochet-mask) center / contain no-repeat;
}
.eb-article__contenu .wp-block-quote cite { display: block; margin-top: 0.6rem; font-family: var(--wp--preset--font-family--montserrat); font-size: var(--wp--preset--font-size--small); font-style: normal; color: var(--eb-muted-on-light); }
.eb-article__contenu .wp-block-separator { border: 0; height: 1px; background: var(--eb-line-on-light); }

/* Pied d'article : étiquettes + retour */
.eb-article__pied {
	margin-top: var(--wp--preset--spacing--60) !important; padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--eb-line-on-light); gap: var(--wp--preset--spacing--30);
}
.eb-article__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: var(--wp--preset--font-size--x-small); font-weight: 600; }
.eb-article__tags .wp-block-post-terms__separator { display: none; }
.eb-article__tags a { padding: 0.35rem 0.7rem; border-radius: var(--wp--custom--radius--small); background: var(--wp--preset--color--blanc); text-decoration: none; }
.eb-article__tags a:hover { color: var(--eb-accent); }
.eb-article__retour { font-size: var(--wp--preset--font-size--small); }

/* « À lire aussi » : masqué s'il n'y a pas d'autre article */
.eb-alire:not(:has(.wp-block-post)) { display: none; }
.eb-alire .eb-section-title { margin-bottom: var(--wp--preset--spacing--50); }

/* ---- Motif « À découvrir » (home) ---- */
.eb-bdernieres__head { gap: var(--wp--preset--spacing--40); margin-bottom: var(--wp--preset--spacing--50) !important; }
.eb-bdernieres__head .eb-lede { margin-top: var(--wp--preset--spacing--30); }
.eb-bdernieres:not(:has(.wp-block-post)) { display: none; }

/* Articles Installation (02/11/2026) : badge lettre du modèle + ville, en haut à gauche de la photo */
.eb-carte__badge {
	position: absolute; z-index: 2; left: 0.75rem; top: 0.75rem;
	display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.3rem 0.65rem;
	border-radius: var(--wp--custom--radius--small, 4px); background: var(--wp--preset--color--anthracite);
	color: var(--wp--preset--color--blanc); font-size: 0.8rem; font-weight: 600; line-height: 1.2;
}
.eb-carte__badge b { font-family: var(--wp--preset--font-family--goldman); font-weight: 700; font-size: 0.95rem; color: var(--eb-accent); }
/* 05/11/2026 : la mise en page « flow » ajoutait 28 px de marge haute au badge quand il suit l'image à la une → badge plus bas que sur les cartes sans photo */
.eb-carte__visuel > .eb-carte__badge { margin-block-start: 0; }
