/**
 * Blog Master — Archive Header Front-end CSS
 * @since 7.0.0
 */

/* ─── Reset wrapper ─────────────────────────────────── */
.bmah-wrap {
	font-family: inherit;
	box-sizing: border-box;
	width: 100%;
}

.bmah-wrap *,
.bmah-wrap *::before,
.bmah-wrap *::after {
	box-sizing: inherit;
}

/* ─── SEO H1 invisible ──────────────────────────────── */
.bmah-seo-h1.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	position: absolute;
	width: 1px;
}

/* ══════════════════════════════════════════════════════
   HERO BANNER
══════════════════════════════════════════════════════ */
.bmah-hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, var(--bmah-hero-bg-from, #1a1040), var(--bmah-hero-bg-to, #2d1b69));
	padding: var(--bmah-hero-pad-v, 48px) var(--bmah-hero-pad-h, 48px);
	border-radius: var(--bmah-hero-radius, 20px);
	color: var(--bmah-hero-text, #fff);
}

/* Lune décorative */
.bmah-moon {
	position: absolute;
	right: -40px;
	top: -60px;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, rgba(139,92,246,0.25), rgba(109,40,217,0.08));
	border: 1px solid rgba(139,92,246,0.15);
	pointer-events: none;
}

/* ─── Hero top row : avatar + header text ───────────── */
.bmah-hero-main {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	margin-bottom: 28px;
}

/* Avatar */
.bmah-avatar-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.bmah-avatar-img {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid rgba(255,255,255,0.2);
}

.bmah-avatar-placeholder {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	background: rgba(255,255,255,0.08);
	border: 2px solid rgba(255,255,255,0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255,255,255,0.4);
}

.bmah-avatar-label {
	font-size: 9px;
	letter-spacing: 0.1em;
	color: rgba(255,255,255,0.5);
	text-transform: uppercase;
	background: rgba(255,255,255,0.1);
	padding: 3px 8px;
	border-radius: 4px;
	border: 1px solid rgba(255,255,255,0.15);
}

/* Header text */
.bmah-header-text {
	flex: 1;
	min-width: 0;
}

.bmah-badge {
	display: inline-block;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--bmah-badge-text, #e9d5ff);
	background: var(--bmah-badge-bg, rgba(255,255,255,0.1));
	border: 1px solid var(--bmah-badge-border, rgba(255,255,255,0.2));
	padding: 4px 12px;
	border-radius: 20px;
	margin-bottom: 12px;
}

.bmah-title {
	font-size: var(--bmah-title-size, 42px);
	font-weight: 800;
	line-height: 1.15;
	margin: 0 0 12px;
	color: var(--bmah-hero-text, #fff);
}

.bmah-title em {
	font-style: italic;
	color: var(--bmah-hook-italic, #f59e0b);
}

.bmah-subtitle {
	font-size: var(--bmah-subtitle-size, 15px);
	color: var(--bmah-hero-subtitle, #c4b5fd);
	margin: 0 0 16px;
	line-height: 1.6;
}

/* Stats */
.bmah-stats {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0;
}

.bmah-stat {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	color: var(--bmah-stat-label, #c4b5fd);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.bmah-stat + .bmah-stat {
	margin-left: 16px;
	padding-left: 16px;
	border-left: 1px solid var(--bmah-stat-sep, rgba(255,255,255,0.3));
}

.bmah-stat strong {
	color: var(--bmah-stat-value, #fff);
	font-weight: 700;
}

.bmah-stat-icon {
	font-style: normal;
}

/* ─── Hero body row : hook + categories ─────────────── */
.bmah-hero-body {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 24px;
	align-items: start;
}

/* Hook / Insider zone */
.bmah-hook {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.bmah-hook-badge {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--bmah-hook-badge, #f59e0b);
}

.bmah-hook-title {
	font-size: var(--bmah-hook-title-size, 22px);
	font-weight: 800;
	line-height: 1.3;
	color: var(--bmah-hook-title, #fff);
}

.bmah-hook-title em {
	font-style: italic;
	color: var(--bmah-hook-italic, #f59e0b);
}

.bmah-hook-body {
	font-size: var(--bmah-hook-body-size, 13px);
	color: var(--bmah-hook-body, #c4b5fd);
	line-height: 1.65;
}

.bmah-hook-body strong {
	color: var(--bmah-hook-title, #fff);
	font-weight: 600;
}

/* CTA buttons */
.bmah-ctas {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 4px;
}

.bmah-cta-primary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--bmah-cta-primary-bg, #ec4899);
	color: var(--bmah-cta-primary-text, #fff) !important;
	padding: 12px 22px;
	border-radius: 50px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none !important;
	letter-spacing: 0.05em;
	transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
	box-shadow: 0 4px 14px rgba(236,72,153,0.35);
}

.bmah-cta-primary:hover {
	background: var(--bmah-cta-primary-hover, #db2777) !important;
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(236,72,153,0.45);
}

.bmah-cta-secondary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--bmah-cta-secondary-text, #c4b5fd) !important;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none !important;
	transition: color 0.2s ease;
}

.bmah-cta-secondary:hover {
	color: var(--bmah-cta-secondary-hover, #fff) !important;
}

/* Categories grid */
.bmah-cats {
	display: grid;
	grid-template-columns: repeat(var(--bmah-cat-cols, 2), 1fr);
	gap: var(--bmah-cat-gap, 10px);
}

.bmah-cat-item {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--bmah-cat-bg, rgba(255,255,255,0.05));
	border: 1px solid var(--bmah-cat-border, rgba(255,255,255,0.1));
	border-radius: 10px;
	padding: 12px 14px;
	text-decoration: none !important;
	transition: background 0.2s ease;
}

.bmah-cat-item:hover {
	background: var(--bmah-cat-bg-hover, rgba(255,255,255,0.12));
}

.bmah-cat-icon {
	font-size: 18px;
	color: var(--bmah-cat-icon, #a78bfa);
	flex-shrink: 0;
}

.bmah-cat-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.bmah-cat-title {
	font-size: 13px;
	font-weight: 600;
	color: var(--bmah-cat-title, #fff);
}

.bmah-cat-sub {
	font-size: 11px;
	color: var(--bmah-cat-subtitle, #a78bfa);
}

/* ══════════════════════════════════════════════════════
   PAGES PILIERS
══════════════════════════════════════════════════════ */
.bmah-pillars {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--bmah-pillar-gap, 16px);
	background: var(--bmah-pillar-bg, #fff);
	border-radius: 16px;
	padding: 20px 24px;
	margin-top: 12px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.bmah-pillars::-webkit-scrollbar {
	display: none;
}

.bmah-pillar {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 0 200px;
	min-width: 0;
	background: var(--bmah-pillar-bg, #fff);
	border: 1px solid var(--bmah-pillar-border, #f0f0f8);
	border-radius: var(--bmah-pillar-radius, 16px);
	padding: var(--bmah-pillar-pad-v, 14px) var(--bmah-pillar-pad-h, 16px);
	text-decoration: none !important;
	position: relative;
	transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.bmah-pillar:hover {
	box-shadow: 0 4px 16px rgba(0,0,0,0.08);
	transform: translateY(-1px);
}

/* Badge pilier */
.bmah-pillar-badge {
	position: absolute;
	top: -10px;
	left: 12px;
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 20px;
	white-space: nowrap;
}

.bmah-pillar-badge--new {
	background: var(--bmah-badge-new-bg, #ec4899);
	color: var(--bmah-badge-new-text, #fff);
}

.bmah-pillar-badge--coming {
	background: var(--bmah-badge-coming-bg, #f3f0ff);
	color: var(--bmah-badge-coming-text, #7c3aed);
}

.bmah-pillar-badge--read,
.bmah-pillar-badge--explore {
	background: transparent;
	color: inherit;
	position: static;
	padding: 0;
}

/* Icon */
.bmah-pillar-icon {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	flex-shrink: 0;
}

.bmah-pillar-icon img {
	width: 28px;
	height: 28px;
	object-fit: contain;
}

/* Content */
.bmah-pillar-content {
	flex: 1;
	min-width: 0;
}

.bmah-pillar-title {
	font-size: var(--bmah-pillar-title-size, 14px);
	font-weight: 700;
	color: var(--bmah-pillar-title, #1a1a2e);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bmah-pillar-sub {
	font-size: var(--bmah-pillar-sub-size, 12px);
	color: var(--bmah-pillar-subtitle, #666688);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 2px;
}

/* CTA arrow */
.bmah-pillar-cta {
	font-size: 11px;
	font-weight: 700;
	color: var(--bmah-pillar-cta, #7c3aed);
	letter-spacing: 0.05em;
	white-space: nowrap;
	flex-shrink: 0;
	transition: color 0.2s;
}

.bmah-pillar:hover .bmah-pillar-cta {
	color: var(--bmah-pillar-cta-hover, #5b21b6);
}

/* ══════════════════════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════════════════════ */
.bmah--anim-fade .bmah-hero,
.bmah--anim-fade .bmah-pillars {
	animation: bmah-fade-in 0.6s ease both;
}

.bmah--anim-slide-up .bmah-hero {
	animation: bmah-slide-up 0.5s ease both;
}

.bmah--anim-slide-up .bmah-pillars {
	animation: bmah-slide-up 0.5s 0.15s ease both;
}

@keyframes bmah-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes bmah-slide-up {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
	.bmah-hero {
		padding: 36px 28px;
	}
	.bmah-hero-body {
		grid-template-columns: 1fr;
	}
	.bmah-cats {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.bmah-hero {
		padding: 28px 20px;
		border-radius: 12px;
	}
	.bmah-hero-main {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
	.bmah-badge {
		margin: 0 auto 12px;
	}
	.bmah-stats {
		justify-content: center;
	}
	.bmah-ctas {
		justify-content: center;
	}
	.bmah-hero-body {
		grid-template-columns: 1fr;
	}
	.bmah-cats {
		grid-template-columns: 1fr;
	}
	.bmah-pillars {
		flex-wrap: nowrap;
		overflow-x: auto;
		padding: 16px;
	}
	.bmah-pillar {
		flex: 0 0 200px;
	}
}

@media (max-width: 480px) {
	.bmah-hero {
		padding: 20px 16px;
		border-radius: 10px;
	}
	.bmah-title {
		font-size: var(--bmah-title-size-mobile, 26px);
	}
	.bmah-hook-title {
		font-size: 18px;
	}
	.bmah-hook-body {
		font-size: 13px;
	}
}

/* ══════════════════════════════════════════════════════
   DARK MODE
══════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
	.bmah-pillars {
		background: #1e1e2e;
	}
	.bmah-pillar {
		background: #1e1e2e;
		border-color: #2e2e4e;
	}
	.bmah-pillar-title {
		color: #e8e8f0;
	}
	.bmah-pillar-sub {
		color: #a0a0c0;
	}
}
