/* Listes d'articles et cartes (inc/blog.php, template-parts/blog/). Chargée sur les listes et les articles. */

body.heka-blog-liste .main { padding: 0; }

.heka-blog {
	--navy: #172a6f;
	--navy-d: #0b1230;
	--sky: #aac3db;
	--soft: #f1f5f9;
	--line: #e3e8f2;
	--muted: #5b6070;
	color: #323334;
}
.heka-blog__wrap { box-sizing: content-box; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Menu du site : transparent et posé sur la photo, comme avec les bandeaux du thème
   (règle reprise du CSS personnalisé du modèle Elementor 5120, qui n'est plus affiché ici). */
body.heka-blog-liste .custom-header { position: absolute; background: transparent; }

/* En-tête : mêmes codes que les bandeaux du site (photo assombrie en noir, titre centré, fil d'Ariane),
   avec la hauteur des articles sur ordinateur. Photo : image mise en avant de la page « Blog ».
   La marge haute laisse la place au menu. */
.heka-blog__hero { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; min-height: 420px; padding: 132px 0 32px; background: #111; color: #fff; text-align: center; }
.heka-blog__hero > .heka-blog__wrap { width: calc(100% - 48px); }
.heka-blog__hero img.heka-blog__photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center 55%; }
.heka-blog__hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, 0.55); }
.heka-blog .heka-blog__title { margin: 0; color: #fff; font-size: 60px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; text-wrap: balance; }
.heka-blog__intro { max-width: 760px; margin: 2px auto 0; color: #fff; font-size: 16px; line-height: 1.6; }
.heka-blog__hero .breadcrumb-container { margin: 8px 0 0; padding: 0; background: none; }
.heka-blog__hero .breadcrumb { justify-content: center; margin: 0; padding: 0; color: #fff; font-size: 14px; line-height: 1.6; }
.heka-blog__hero .breadcrumb a { color: rgba(255, 255, 255, 0.75); }
.heka-blog__hero .breadcrumb a:hover { color: #fff; }

/* Recherche. */
.heka-search { display: flex; align-items: center; gap: 10px; max-width: 640px; margin: 20px auto 0; padding: 6px 6px 6px 18px; border-radius: 14px; background: #fff; box-shadow: 0 10px 30px rgba(5, 10, 40, 0.22); }
.heka-search { text-align: left; }
.heka-search:focus-within { outline: 3px solid var(--sky); outline-offset: 2px; }
.heka-search__icon { flex: none; width: 20px; height: 20px; fill: none; stroke: #6b7280; stroke-width: 2.4; stroke-linecap: round; }
.heka-search input.heka-search__field { flex: 1 1 auto; width: 100%; min-width: 0; height: 46px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--navy-d); font-size: 16px; text-overflow: ellipsis; outline: 0; }
.heka-search__button { flex: none; min-width: 48px; height: 46px; margin: 0; padding: 0 22px; border: 0; border-radius: 10px; background: var(--navy); color: #fff; font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.heka-search__button:hover { background: var(--navy-d); }
.heka-search__short { display: none; }

.heka-blog__body { padding-top: 28px; padding-bottom: 64px; }

/* Filtres : même largeur, tous visibles. */
.heka-blog ul.heka-blog__chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin: 0 0 30px; padding: 0; list-style: none; }
.heka-blog__chips li { margin: 0; }
.heka-blog ul.heka-blog__chips li > a { display: flex; align-items: center; justify-content: center; box-sizing: border-box; height: 100%; min-height: 46px; padding: 6px 4px; border: 1.5px solid #cfd7e8; border-radius: 99px; color: var(--navy); font-size: 14px; font-weight: 700; line-height: 1.25; text-align: center; }
.heka-blog ul.heka-blog__chips li:not(.current-menu-item) > a:hover { border-color: var(--navy); color: var(--navy); }
.heka-blog ul.heka-blog__chips li.current-menu-item > a { border-color: var(--navy); background: var(--navy); color: #fff; }

/* Cartes. */
.heka-blog__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.heka-post { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; transition: box-shadow 0.2s, transform 0.2s; }
.heka-post:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(11, 18, 48, 0.12); }
.heka-post__media { position: relative; aspect-ratio: 3 / 2; background: var(--navy-d); }
.heka-post__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.heka-post__body { padding: 18px 20px 22px; }
.heka-post p { margin: 0; }
.heka-post .heka-post__meta { margin-bottom: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.heka-post__category { color: var(--navy); font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.heka-blog .heka-post__title { text-wrap: pretty; margin: 0 0 10px; font-size: 18px; font-weight: 700; line-height: 1.32; letter-spacing: 0; }
.heka-blog .heka-post__title a { color: var(--navy-d); }
.heka-post__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
/* Repère de position au clavier seulement (jamais au clic) : autour de la carte, qui est entièrement cliquable. */
.heka-post__title a:focus-visible { outline: 0; }
.heka-post__title a:focus-visible::after { border-radius: 18px; outline: 3px solid var(--navy); outline-offset: -3px; }
.heka-post .heka-post__excerpt { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 13.5px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.heka-post .heka-post__date { margin-top: 12px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

/* À la une. */
.heka-post--featured { display: grid; grid-template-columns: 1.35fr 1fr; margin-bottom: 34px; border: 0; border-radius: 22px; background: var(--soft); }
.heka-post--featured .heka-post__media { min-height: 380px; aspect-ratio: auto; }
.heka-post--featured .heka-post__body { align-self: center; padding: 36px; }
.heka-post .heka-post__tag { display: inline-block; margin-bottom: 16px; padding: 4px 12px; border-radius: 99px; background: var(--navy); color: #fff; font-size: 11px; font-weight: 700; }
.heka-blog .heka-post--featured .heka-post__title { margin-bottom: 14px; font-size: 30px; line-height: 1.2; }
.heka-post--featured .heka-post__excerpt { font-size: 14.5px; -webkit-line-clamp: 3; }
.heka-post .heka-post__more { margin-top: 20px; color: var(--navy); font-size: 14px; font-weight: 800; }

/* Pagination native. Le thème parent ajoute un lien « grille » et ses propres tailles. */
.heka-blog__pages .post-nav-blog { display: none; }
.heka-blog__pages .page-numbers.next,
.heka-blog__pages .page-numbers.prev { width: auto; height: 46px; margin: 0; border-color: #cfd7e8; color: var(--navy); }
.heka-blog__pages { margin: 36px 0 0; }
.heka-blog__pages .nav-links { align-items: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.heka-blog__pages .page-numbers { display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 46px; height: 46px; margin: 0; padding: 0 16px; border: 1.5px solid #cfd7e8; border-radius: 99px; color: var(--navy); font-size: 14px; font-weight: 700; }
.heka-blog__pages a.page-numbers:hover { border-color: var(--navy); color: var(--navy); }
.heka-blog__pages .page-numbers.current { border-color: var(--navy); background: var(--navy); color: #fff; }
.heka-blog__pages .page-numbers.dots { border-color: transparent; }

.heka-blog__empty { padding: 28px; border-radius: 18px; background: var(--soft); }
.heka-blog__empty h2 { margin: 0 0 8px; font-size: 22px; }
.heka-blog__empty p { margin: 0 0 6px; }
.heka-blog__empty a { color: var(--navy); font-weight: 700; text-decoration: underline; }

/* Articles associés, sous un article. */
.heka-related { margin-top: 40px; }
.heka-blog .heka-related__title { margin: 0 0 18px; color: var(--navy-d); font-size: 24px; line-height: 1.3; }

/* Commencez ici. */
.heka-start { margin-top: 44px; padding: 28px; border-radius: 22px; background: var(--soft); }
.heka-blog .heka-start h2 { margin: 0 0 18px; color: var(--navy-d); font-size: 22px; line-height: 1.3; }
.heka-blog .heka-start ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.heka-start li { position: relative; display: flex; align-items: center; gap: 14px; margin: 0; }
.heka-start img { flex: none; width: 72px; height: 72px; border-radius: 12px; object-fit: cover; }
.heka-start a { color: var(--navy-d); font-size: 14px; font-weight: 700; line-height: 1.35; }
.heka-start a::after { content: ""; position: absolute; inset: 0; }

/* Appel à réserver. */
.heka-blog__cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 44px; padding: 32px 36px; border-radius: 22px; background: var(--navy); color: #fff; }
.heka-blog .heka-blog__cta h2 { margin: 0; color: #fff; font-size: 24px; line-height: 1.3; }
.heka-blog__cta p { margin: 6px 0 0; color: var(--sky); font-size: 14px; }
.heka-blog__cta a { flex: none; display: inline-flex; align-items: center; min-height: 50px; padding: 10px 26px; border-radius: 99px; background: #fff; color: var(--navy); font-size: 14px; font-weight: 800; text-align: center; }
.heka-blog__cta a:hover { background: var(--soft); color: var(--navy-d); }

@media (max-width: 991px) {
	.heka-blog .heka-blog__title { font-size: 48px; }
	.heka-blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
	.heka-blog ul.heka-blog__chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.heka-post--featured { grid-template-columns: 1fr; }
	.heka-post--featured .heka-post__media { min-height: 0; aspect-ratio: 16 / 9; }
	.heka-post--featured .heka-post__body { padding: 24px; }
	.heka-blog .heka-start ul { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
	.heka-blog__wrap { padding: 0 16px; }
	.heka-blog__hero { min-height: 400px; padding: 128px 0 24px; }
	.heka-blog__hero > .heka-blog__wrap { box-sizing: border-box; width: 100%; }
	.heka-blog .heka-blog__title { font-size: 36px; }
	.heka-blog__intro { font-size: 14px; }
	.heka-blog__hero .breadcrumb { font-size: 12px; }
	.heka-search { margin-top: 16px; padding-left: 14px; }
	.heka-search__button { padding: 0 12px; }
	.heka-search__long { display: none; }
	.heka-search__short { display: inline; }
	.heka-blog__body { padding-top: 18px; padding-bottom: 40px; }
	.heka-blog__pages .nav-links { gap: 6px; }
	.heka-blog__pages .page-numbers { min-width: 40px; height: 44px; padding: 0 10px; }
	.heka-blog ul.heka-blog__chips { gap: 8px; margin-bottom: 18px; }
	.heka-blog ul.heka-blog__chips li > a { min-height: 44px; font-size: 12px; }
	.heka-blog__grid { grid-template-columns: 1fr; gap: 0; }
	.heka-blog__grid .heka-post { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
	.heka-blog__grid .heka-post:hover { transform: none; box-shadow: none; }
	.heka-blog__grid .heka-post__media { overflow: hidden; aspect-ratio: 1; border-radius: 12px; }
	.heka-blog__grid .heka-post__body { padding: 0; }
	.heka-blog__grid .heka-post__excerpt { display: none; }
	.heka-blog .heka-blog__grid .heka-post__title { margin: 0; font-size: 14.5px; }
	.heka-blog__grid .heka-post .heka-post__meta { margin-bottom: 4px; font-size: 11px; }
	.heka-post .heka-post__date { margin-top: 4px; font-size: 11px; }
	.heka-post--featured { margin-bottom: 18px; border-radius: 18px; }
	.heka-post--featured .heka-post__media { aspect-ratio: 16 / 10; }
	.heka-post--featured .heka-post__body { padding: 16px 18px 18px; }
	.heka-post--featured .heka-post__tag,
	.heka-post--featured .heka-post__excerpt,
	.heka-post--featured .heka-post__more { display: none !important; }
	.heka-blog .heka-post--featured .heka-post__title { margin: 0; font-size: 20px; }
	.heka-start { margin-top: 28px; padding: 20px; }
	.heka-blog .heka-related__title { margin-bottom: 4px; font-size: 20px; }
	.heka-blog__cta { flex-direction: column; align-items: flex-start; margin-top: 28px; padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.heka-post { transition: none; }
	.heka-post:hover { transform: none; }
}
