/* =====================================================================
   Rifaa – Hub du blog [rifaa_blog_hub]
   Tout est préfixé .rfa-hub
   ===================================================================== */

html:has(.rfa-hub) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:has(.rfa-hub) { scroll-behavior: auto; } }

.rfa-hub-page { background: #F4F6F9; padding: 0 0 72px; }
.rfa-hub-page > :not(.rfa-hub) { max-width: 1200px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }

.rfa-hub {
	--rfa-navy: #1E3A5F;
	--rfa-amber: #F59E0B;
	--rfa-blue: #1B5FB0;
	--rfa-wa: #25D366;
	--rfa-wa-dark: #178C47;
	--rfa-bg: #F4F6F9;
	--rfa-line: #E3E8EF;
	--rfa-text: #334155;
	--rfa-muted: #64748B;
	--rfa-radius: 20px;

	background: var(--rfa-bg);
	color: var(--rfa-text);
	font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
.rfa-hub *, .rfa-hub *::before, .rfa-hub *::after { box-sizing: border-box; }
.rfa-hub a { text-decoration: none; }
.rfa-hub a:focus-visible { outline: 3px solid var(--rfa-amber); outline-offset: 3px; border-radius: 8px; }
.rfa-hub h1::after, .rfa-hub h2::after, .rfa-hub h3::after { display: none; } /* neutralise les soulignements du thème */

.rfa-hub-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Hero ---------- */
.rfa-hub-hero {
	background: var(--rfa-navy);
	padding: 56px 0 48px;
	border-bottom: 6px solid var(--rfa-amber);
}
.rfa-hub .rfa-hub-title {
	font-family: inherit;
	font-size: clamp(28px, 4vw, 46px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: #fff;
	margin: 0 0 16px;
	padding: 0;
	max-width: 22ch;
	text-transform: none;
}
.rfa-hub .rfa-hub-intro { margin: 0; max-width: 60ch; font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .8); }

.rfa-hub-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.rfa-hub-nav a {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 10px 12px 10px 18px; border-radius: 999px;
	font-size: 14px; font-weight: 700; color: #fff;
	border: 1.5px solid rgba(255, 255, 255, .35);
	transition: background-color .15s, border-color .15s;
}
.rfa-hub-nav a:hover { background: rgba(255, 255, 255, .1); border-color: #fff; color: #fff; }
.rfa-hub-count {
	min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--rfa-amber); color: var(--rfa-navy); font-size: 12px; font-weight: 800;
}

/* ---------- Silos ---------- */
.rfa-silo { padding-top: 56px; scroll-margin-top: 100px; }

.rfa-silo-head {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
	gap: 14px 32px; margin-bottom: 22px; padding-bottom: 16px;
	border-bottom: 2px solid var(--rfa-line);
}
.rfa-silo-heading { max-width: 64ch; }
.rfa-hub .rfa-silo-title {
	font-family: inherit; font-size: clamp(23px, 2.6vw, 30px); font-weight: 800;
	line-height: 1.2; color: var(--rfa-navy); margin: 0; padding: 0; text-transform: none;
}
.rfa-hub .rfa-silo-desc { margin: 8px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--rfa-muted); }

.rfa-silo-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.rfa-hub-more { font-size: 14px; font-weight: 700; color: var(--rfa-blue); border-bottom: 2px solid rgba(27, 95, 176, .25); padding-bottom: 2px; }
.rfa-hub-more:hover { color: var(--rfa-navy); border-bottom-color: var(--rfa-amber); }
.rfa-hub-more--shop { color: var(--rfa-navy); border-bottom-color: rgba(245, 158, 11, .5); }

/* Article pilier */
.rfa-feature {
	display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	background: #fff; border-radius: var(--rfa-radius); overflow: hidden;
	border: 1px solid transparent; transition: border-color .15s;
}
.rfa-feature:hover { border-color: var(--rfa-line); }
.rfa-feature-img { display: block; aspect-ratio: 16 / 10; background: var(--rfa-line); overflow: hidden; }
.rfa-feature-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rfa-feature-body { display: flex; flex-direction: column; gap: 12px; padding: 32px 36px; }
.rfa-feature-tag {
	align-self: flex-start; font-size: 12.5px; font-weight: 700; color: #92400E;
	background: #FEF3C7; padding: 5px 12px; border-radius: 999px;
}
.rfa-hub .rfa-feature-title {
	font-family: inherit; font-size: clamp(20px, 2.2vw, 26px); font-weight: 800;
	line-height: 1.25; color: var(--rfa-navy); margin: 0; padding: 0; text-transform: none;
}
.rfa-feature-excerpt { font-size: 14.5px; line-height: 1.65; color: var(--rfa-text); }
.rfa-feature-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--rfa-muted); }
.rfa-feature-cta {
	margin-top: auto; align-self: flex-start;
	padding: 11px 22px; border-radius: 999px;
	background: var(--rfa-navy); color: #fff; font-size: 14px; font-weight: 700;
	transition: background-color .15s;
}
.rfa-feature:hover .rfa-feature-cta { background: var(--rfa-blue); }

/* Articles récents du silo */
.rfa-hub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.rfa-hub-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--rfa-radius); overflow: hidden; }
.rfa-hub-card-img { display: block; aspect-ratio: 16 / 9; background: var(--rfa-line); overflow: hidden; }
.rfa-hub-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rfa-hub-card-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px 22px; }
.rfa-hub-card-date { font-size: 12.5px; color: var(--rfa-muted); }
.rfa-hub .rfa-hub-card-title {
	font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.4;
	color: var(--rfa-navy); margin: 0; padding: 0; text-transform: none;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rfa-hub-card:hover .rfa-hub-card-title { color: var(--rfa-blue); }
.rfa-hub-card-excerpt {
	font-size: 13.5px; line-height: 1.6; color: var(--rfa-muted);
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- CTA final ---------- */
.rfa-hub-cta {
	margin-top: 64px;
	display: flex; align-items: center; justify-content: space-between; gap: 24px 40px;
	background: #fff; border-radius: var(--rfa-radius);
	padding: 34px 40px; border-left: 8px solid var(--rfa-wa);
}
.rfa-hub .rfa-hub-cta-title {
	font-family: inherit; font-size: clamp(20px, 2.2vw, 25px); font-weight: 800;
	color: var(--rfa-navy); margin: 0 0 8px; padding: 0; line-height: 1.25; text-transform: none;
}
.rfa-hub .rfa-hub-cta p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--rfa-text); max-width: 58ch; }
.rfa-hub-btn {
	flex-shrink: 0; display: inline-flex; align-items: center; gap: 10px;
	padding: 16px 26px; border-radius: 999px;
	background: var(--rfa-wa); color: #fff; font-size: 15px; font-weight: 700;
	transition: background-color .15s;
}
.rfa-hub .rfa-hub-btn:hover { background: var(--rfa-wa-dark); color: #fff; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1023px) {
	.rfa-feature { grid-template-columns: minmax(0, 1fr); }
	.rfa-feature-img { aspect-ratio: 16 / 9; }
	.rfa-feature-body { padding: 24px 26px 28px; }
	.rfa-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rfa-hub-cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
	.rfa-hub-hero { padding: 36px 0 32px; }
	.rfa-hub-wrap { padding: 0 14px; }
	.rfa-hub-nav { flex-wrap: nowrap; overflow-x: auto; margin: 24px -14px 0; padding: 0 14px 4px; scrollbar-width: none; }
	.rfa-hub-nav::-webkit-scrollbar { display: none; }
	.rfa-hub-nav a { flex-shrink: 0; }
	.rfa-silo { padding-top: 40px; }
	.rfa-silo-head { align-items: flex-start; }
	.rfa-feature-body { padding: 20px 20px 24px; }
	.rfa-hub-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.rfa-hub-cta { padding: 26px 22px; border-left-width: 6px; margin-top: 48px; }
	.rfa-hub-btn { width: 100%; justify-content: center; }
}

/* =====================================================================
   ARCHIVES CATÉGORIE — extension du design hub
   ===================================================================== */

.rfa-cat-page { min-height: 60vh; }

.rfa-cat-hero { padding-top: 40px; padding-bottom: 44px; }
.rfa-cat-hero .rfa-hub-title { max-width: 26ch; margin-top: 6px; }

.rfa-cat-crumb {
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
	font-size: 13.5px; color: rgba(255, 255, 255, .7); margin: 0 0 18px;
}
.rfa-cat-crumb a { color: rgba(255, 255, 255, .75); transition: color .15s; }
.rfa-cat-crumb a:hover { color: #fff; }
.rfa-cat-crumb [aria-current] { color: var(--rfa-amber); font-weight: 700; max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rfa-cat-crumb [aria-hidden] { color: rgba(255, 255, 255, .35); }

.rfa-cat-meta {
	display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center;
	margin-top: 26px;
}
.rfa-cat-meta-count {
	display: inline-flex; align-items: center;
	padding: 8px 16px; border-radius: 999px;
	background: rgba(245, 158, 11, .15); color: var(--rfa-amber);
	font-size: 13.5px; font-weight: 700;
	border: 1px solid rgba(245, 158, 11, .4);
}
.rfa-cat-meta-shop {
	color: #fff !important; font-size: 14.5px; font-weight: 700;
	border-bottom: 2px solid rgba(255, 255, 255, .35);
	padding-bottom: 3px; transition: border-color .15s;
}
.rfa-cat-meta-shop:hover { border-bottom-color: var(--rfa-amber); }

/* Espaces */
.rfa-cat .rfa-feature { margin-top: 44px; }
.rfa-cat .rfa-cat-grid { margin-top: 28px; }

/* Pagination */
.rfa-pagination {
	display: flex; flex-wrap: wrap; justify-content: center;
	gap: 8px; margin-top: 48px;
}
.rfa-pagination a,
.rfa-pagination span {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 42px; height: 42px; padding: 0 14px;
	border-radius: 10px;
	background: #fff; color: var(--rfa-navy);
	font-weight: 700; font-size: 14px; text-decoration: none;
	border: 1px solid var(--rfa-line);
	transition: background-color .15s, border-color .15s, color .15s;
}
.rfa-pagination a:hover { background: var(--rfa-navy); color: #fff; border-color: var(--rfa-navy); }
.rfa-pagination .current { background: var(--rfa-navy); color: #fff; border-color: var(--rfa-navy); }
.rfa-pagination .dots { background: transparent; border: none; }

/* Vide */
.rfa-empty { text-align: center; padding: 60px 20px; color: var(--rfa-muted); font-size: 15px; }

/* Autres catégories */
.rfa-cat-others { margin-top: 64px; }
.rfa-hub .rfa-cat-others-title {
	font-family: inherit; font-size: clamp(21px, 2.2vw, 26px); font-weight: 800;
	color: var(--rfa-navy); margin: 0 0 22px; padding: 0; line-height: 1.25;
	text-transform: none;
}
.rfa-cat-others-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rfa-cat-other {
	display: flex; flex-direction: column; gap: 8px;
	padding: 26px 28px; background: #fff; border-radius: var(--rfa-radius);
	border: 1px solid var(--rfa-line);
	transition: border-color .15s, transform .15s;
}
.rfa-cat-other:hover { border-color: var(--rfa-navy); transform: translateY(-2px); }
.rfa-cat-other-name { font-size: 18px; font-weight: 800; color: var(--rfa-navy); }
.rfa-cat-other-desc { font-size: 13.5px; line-height: 1.55; color: var(--rfa-muted); }
.rfa-cat-other-meta { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--rfa-blue); }

/* Mobile */
@media (max-width: 640px) {
	.rfa-cat-hero { padding-top: 28px; padding-bottom: 32px; }
	.rfa-cat-crumb { font-size: 12.5px; margin-bottom: 14px; }
	.rfa-cat-crumb [aria-current] { max-width: 20ch; }
	.rfa-cat-meta { gap: 10px 16px; margin-top: 20px; }
	.rfa-cat .rfa-feature { margin-top: 28px; }
	.rfa-cat .rfa-cat-grid { margin-top: 20px; }
	.rfa-cat-others { margin-top: 48px; }
	.rfa-cat-others-grid { grid-template-columns: minmax(0, 1fr); }
	.rfa-cat-other { padding: 22px 22px; }
	.rfa-pagination a, .rfa-pagination span { min-width: 38px; height: 38px; font-size: 13px; padding: 0 12px; }
}
