/* =====================================================================
 * Archive du blog (home.php) — reproduction fidèle de site internet/blog.html
 * ("Actualités de la communauté"). Chargée uniquement sur cette page
 * (inc/enqueue.php, is_home()). Tokens/nav/footer viennent des feuilles
 * globales du thème ; seules les classes propres à cette page sont ici.
 * ===================================================================== */

/* ===== Hero ===== */
.blog-hero {
	position: relative;
	/* Même trick que .hero (front-page.css) : annule le padding-top: var(--nav-h)
	   global du body pour que le fond sombre remonte sous la nav fixe. */
	margin-top: calc(-1 * var(--nav-h));
	padding: calc(var(--nav-h) + 56px) 40px 44px;
	overflow: hidden;
}
.blog-hero-bg { position: absolute; inset: 0; z-index: 0; background: radial-gradient(ellipse 80% 60% at 70% 0%, #3a2800 0%, #1a1008 55%, #0a0a08 100%); }
.blog-hero-content { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.blog-hero-left { max-width: 620px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: rgba(255,255,255,.35); margin-bottom: 18px; }
.breadcrumb a { color: rgba(255,255,255,.55); transition: color .2s; }
.breadcrumb a:hover { color: var(--orange); }
.blog-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin-bottom: 14px; }
.blog-title {
	font-family: var(--font-display); font-size: clamp(34px, 4.6vw, 58px); font-weight: 800;
	text-transform: uppercase; letter-spacing: -.01em; line-height: .98; color: var(--blanc); margin-bottom: 14px;
}
.blog-title em { font-style: normal; color: var(--orange); }
.blog-sub { font-size: 14.5px; font-weight: 300; color: rgba(255,255,255,.6); line-height: 1.65; }

.btn-inform {
	flex-shrink: 0;
	display: flex; align-items: center; gap: 10px;
	background: var(--orange); color: var(--blanc);
	font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	padding: 16px 28px; border-radius: 40px;
	transition: background .2s, transform .2s var(--ease);
	box-shadow: 0 10px 30px rgba(232,104,26,.35);
}
.btn-inform:hover { background: var(--orange-dk); transform: scale(1.03); }
.btn-inform svg { width: 17px; }

/* ===== Layout ===== */
.blog-layout { max-width: 1200px; margin: 0 auto; padding: 44px 40px 90px; }

/* ---- Barre de recherche : même composant que sur l'archive des annonces
 * (archive-annonce.php / annonces.css), pour rester cohérent avec le reste
 * du site. ---- */
.search-bar { position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 64px; }
.search-bar-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--gris-mid); pointer-events: none; }
.search-bar-input {
	flex: 1;
	border: 1px solid rgba(0,0,0,.12);
	border-radius: 40px;
	padding: 14px 20px 14px 44px;
	font-size: 14px;
	font-family: var(--font-body);
	color: var(--noir);
	outline: none;
	transition: border-color .2s, box-shadow .2s;
}
.search-bar-input::placeholder { color: var(--gris-light); }
.search-bar-input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232,104,26,.12); }
.search-bar-submit {
	flex-shrink: 0;
	background: var(--orange);
	color: var(--blanc);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 14px 26px;
	border-radius: 40px;
	transition: background .2s;
}
.search-bar-submit:hover { background: var(--orange-dk); }

/* ---- Filtres catégories : vrais liens vers les archives de catégorie ---- */
.cat-filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.cat-chip {
	padding: 9px 18px; border-radius: 40px; border: 1.5px solid rgba(0,0,0,.13);
	font-size: 12.5px; font-weight: 600; color: var(--gris-mid);
	transition: border-color .2s, color .2s, background .2s;
}
.cat-chip:hover { border-color: rgba(232,104,26,.4); }
.cat-chip.is-active { border-color: var(--orange); background: var(--orange); color: var(--blanc); }

/* ---- Article à la une ---- */
.featured-article {
	display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
	background: var(--noir); border-radius: 10px; overflow: hidden; margin-bottom: 48px;
}
.featured-img { position: relative; min-height: 340px; background: var(--gris-fonce); display: flex; align-items: center; justify-content: center; }
.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-img-ph { font-family: var(--font-display); font-size: 32px; font-weight: 800; color: rgba(255,255,255,.1); text-transform: uppercase; text-align: center; padding: 20px; }
.featured-body { padding: 40px 42px; display: flex; flex-direction: column; justify-content: center; }

/* ---- Pastille catégorie : mêmes couleurs par catégorie que sur les fiches
 * article et l'ancien archive du blog (to_category_tag_class()), sous une
 * forme de pastille pleine comme dans la maquette blog.html. ---- */
.cat-badge {
	display: inline-flex; width: fit-content; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
	padding: 5px 12px; border-radius: 3px; margin-bottom: 16px;
}
.tag-restauration { background: var(--orange); color: var(--blanc); }
.tag-histoire      { background: var(--noir-soft); color: var(--orange); }
.tag-technique     { background: #1a3040; color: #7ec8e3; }
.tag-collection    { background: var(--vert-badge); color: #C0DD97; }
.tag-guide         { background: #3a2800; color: #E8A05A; }
.tag-modele        { background: var(--noir); color: var(--orange); border: 1px solid rgba(232,104,26,.3); }
.tag-actualite     { background: var(--rouge-badge); color: var(--blanc); }

.featured-title { font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); font-weight: 800; text-transform: uppercase; color: var(--blanc); line-height: 1.05; margin-bottom: 14px; }
.featured-excerpt { font-size: 13.5px; color: rgba(255,255,255,.5); line-height: 1.7; margin-bottom: 24px; }
.article-meta { display: flex; align-items: center; gap: 12px; }
.author-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--orange); color: var(--blanc); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 13px; font-weight: 800; flex-shrink: 0; }
.article-meta-text { font-size: 11.5px; color: rgba(255,255,255,.4); }
.article-meta-text strong { color: rgba(255,255,255,.7); font-weight: 600; }

/* ---- Grille d'articles ---- */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 20px; }
.article-card {
	background: var(--blanc); border-radius: 8px; overflow: hidden; border: 1px solid rgba(0,0,0,.06);
	transition: transform .2s var(--ease), box-shadow .2s;
}
.article-card:hover { transform: translateY(-4px); box-shadow: 0 20px 38px rgba(0,0,0,.09); }
.article-card-img { position: relative; aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center; background: var(--gris-fonce); }
.article-card-img img { width: 100%; height: 100%; object-fit: cover; }
.article-card-img-ph { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: rgba(255,255,255,.12); }
.article-card-body { padding: 20px 22px 22px; }
.article-card-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; text-transform: uppercase; color: var(--noir); line-height: 1.1; margin-bottom: 10px; }
.article-card-excerpt { font-size: 12.5px; color: var(--gris-mid); line-height: 1.6; margin-bottom: 18px; }
.article-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 16px; border-top: 1px solid rgba(0,0,0,.06); }
.article-card-footer .article-meta-text { color: var(--gris-mid); }
.article-card-footer .article-meta-text strong { color: var(--noir); }
.read-more-arrow { width: 30px; height: 30px; border-radius: 50%; background: var(--creme); display: flex; align-items: center; justify-content: center; transition: background .2s, transform .2s var(--ease); flex-shrink: 0; }
.article-card:hover .read-more-arrow { background: var(--orange); transform: translateX(2px); }
.read-more-arrow svg { width: 13px; color: var(--noir); transition: color .2s; }
.article-card:hover .read-more-arrow svg { color: var(--blanc); }

.no-results-msg { text-align: center; padding: 50px 0; color: var(--gris-mid); font-size: 13.5px; }

/* ---- Pagination WordPress (the_posts_pagination), même style que annonces.css ---- */
.load-more-row { margin-top: 12px; }
.load-more-row .nav-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.load-more-row .page-numbers {
	min-width: 40px; height: 40px;
	padding: 0 8px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 13px;
	font-weight: 600;
	color: var(--gris-mid);
	transition: background .2s, color .2s;
}
.load-more-row a.page-numbers:hover { background: var(--creme); color: var(--noir); }
.load-more-row .page-numbers.current { background: var(--noir); color: var(--blanc); }
.load-more-row .page-numbers.dots { pointer-events: none; }
.load-more-row .prev.page-numbers,
.load-more-row .next.page-numbers { width: auto; padding: 0 18px; border-radius: 40px; }

@media (max-width: 980px) {
	.featured-article { grid-template-columns: 1fr; }
	.featured-img { min-height: 220px; }
	.articles-grid { grid-template-columns: 1fr 1fr; }
	.blog-hero-content { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 620px) {
	.blog-hero { padding: calc(var(--nav-h) + 32px) 20px 36px; }
	.blog-hero .breadcrumb { justify-content: flex-start; }
	.blog-hero .btn-inform { width: 100%; justify-content: center; }
	.blog-layout { padding: 28px 20px 64px; }
	.articles-grid { grid-template-columns: 1fr; }
	.search-bar { gap: 8px; margin-bottom: 24px; }
	.search-bar-input { min-width: 0; padding: 13px 14px 13px 42px; }
	.search-bar-submit { padding: 13px 18px; }
	/* Catégories : une seule ligne défilable plutôt que 3 lignes de pastilles */
	.cat-filter-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 28px; padding: 0 20px; scrollbar-width: none; }
	.cat-filter-row::-webkit-scrollbar { display: none; }
	.cat-chip { flex-shrink: 0; }
	.featured-img { min-height: 180px; }
	.featured-body { padding: 24px 20px; }
	.articles-grid { gap: 16px; }
	.article-card-img { aspect-ratio: 2 / 1; }
	.article-card-body { padding: 16px 18px 18px; }
}
