/* layout.css — container, header, footer, grilles de page */

/* --- Container --- */
.container {
	width: 100%;
	max-width: var(--container);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--gutter);
	padding-right: var(--gutter);
}

.container--narrow {
	max-width: var(--container-narrow);
}

/* --- Section spacing --- */
.section {
	padding-top: var(--sp-8);
	padding-bottom: var(--sp-8);
}

.section--sm {
	padding-top: var(--sp-6);
	padding-bottom: var(--sp-6);
}

.section--lg {
	padding-top: var(--sp-9);
	padding-bottom: var(--sp-9);
}

.section--surface {
	background: var(--c-surface);
}

.section--navy {
	background: var(--c-navy);
	color: var(--c-text-invert);
}

.section--navy h2,
.section--navy h3 {
	color: var(--c-white);
}

/* --- Section heading --- */
.section__header {
	margin-bottom: var(--sp-7);
	text-align: center;
}

.section__eyebrow {
	display: block;
	font-size: var(--fs-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--c-primary);
	margin-bottom: var(--sp-3);
}

.section__title {
	margin-bottom: var(--sp-4);
}

.section__lead {
	font-size: var(--fs-md);
	color: var(--c-text-muted);
	max-width: 60ch;
	margin-left: auto;
	margin-right: auto;
}

/* --- Grid layouts --- */
.grid {
	display: grid;
	gap: var(--sp-6);
}

.grid--cards {
	grid-template-columns: 1fr;
}

.grid--2 {
	grid-template-columns: 1fr;
}

.grid--3 {
	grid-template-columns: 1fr;
}

@media (min-width: 600px) {
	.grid--3    { grid-template-columns: repeat(2, 1fr); }
	.grid--cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 769px) {
	.grid--2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
	.grid--3    { grid-template-columns: repeat(3, 1fr); }
	.grid--cards { grid-template-columns: repeat(3, 1fr); }
}

/* --- Two-column page layout (content + sidebar) --- */
.layout--with-sidebar {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--sp-7);
	align-items: start;
}

@media (min-width: 900px) {
	.layout--with-sidebar {
		grid-template-columns: 1fr 300px;
	}
}

/* ================================================================
   SITE HEADER
================================================================ */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--c-white);
	border-bottom: 2px solid var(--c-primary);
	box-shadow: var(--shadow-sm);
	height: var(--header-height);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
	gap: var(--sp-5);
}

/* Logo */
.site-header__brand {
	flex-shrink: 0;
}

.site-header__brand a {
	display: flex;
	align-items: center;
	gap: var(--sp-3);
	text-decoration: none;
}

.site-header__logo {
	height: 72px;
	width: auto;
	transition: height 0.3s ease;
}

.site-header__name {
	font-family: var(--font-heading);
	font-size: var(--fs-lg);
	font-weight: 700;
	color: var(--c-navy);
	line-height: 1.1;
}

.site-header__name span {
	display: block;
	font-family: var(--font-body);
	font-size: var(--fs-xs);
	font-weight: 400;
	color: var(--c-text-muted);
	letter-spacing: 0.04em;
}

/* Primary navigation */
.nav {
	display: none;
}

.nav__list {
	display: flex;
	list-style: none;
	gap: var(--sp-2);
	padding: 0;
	margin: 0;
}

.nav__list a {
	display: block;
	padding: var(--sp-2) var(--sp-3);
	font-size: var(--fs-sm);
	font-weight: 700;
	color: var(--c-text);
	text-decoration: none;
	border-radius: var(--radius-sm);
	transition: color var(--transition), background var(--transition);
}

.nav__list a:hover,
.nav__list .current-menu-item > a,
.nav__list .current-page-ancestor > a {
	color: var(--c-primary);
	background: var(--c-primary-tint);
}

/* Hamburger button */
.nav-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: transparent;
	border: 2px solid var(--c-border);
	border-radius: var(--radius-sm);
	color: var(--c-text);
	transition: border-color var(--transition), background var(--transition);
}

.nav-toggle:hover {
	border-color: var(--c-primary);
	background: var(--c-primary-tint);
	color: var(--c-primary);
}

.nav-toggle[aria-expanded="true"] {
	border-color: var(--c-primary);
	background: var(--c-primary);
	color: var(--c-white);
}

/* Mobile nav drawer */
.nav--mobile {
	display: none;
	position: fixed;
	top: var(--header-height);
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--c-white);
	overflow-y: auto;
	z-index: 99;
	padding: var(--sp-5);
	border-top: 1px solid var(--c-border);
}

.nav--mobile.is-open {
	display: block;
}

.nav--mobile .nav__list {
	flex-direction: column;
	gap: 0;
}

.nav--mobile .nav__list a {
	font-size: var(--fs-base);
	padding: var(--sp-4);
	border-bottom: 1px solid var(--c-border);
	border-radius: 0;
}

/* Desktop: hide hamburger, show nav */
@media (min-width: 769px) {
	.nav {
		display: block;
	}

	.nav-toggle {
		display: none;
	}
}

/* ================================================================
   SITE MAIN
================================================================ */
.site-main {
	min-height: 60vh;
}

/* ================================================================
   SITE FOOTER
================================================================ */
.site-footer {
	background: var(--c-navy);
	color: rgba(255, 255, 255, 0.85);
	padding-top: var(--sp-8);
	padding-bottom: var(--sp-5);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--sp-7);
	margin-bottom: var(--sp-7);
}

@media (min-width: 768px) {
	.site-footer__grid {
		grid-template-columns: 2fr 1fr 1fr;
	}
}

.site-footer__col-title {
	font-family: var(--font-heading);
	font-size: var(--fs-md);
	color: var(--c-white);
	margin-bottom: var(--sp-4);
}

.site-footer__brand {
	display: flex;
	align-items: center;
	gap: var(--sp-3);
	margin-bottom: var(--sp-4);
	text-decoration: none;
}

.site-footer__logo {
	height: 44px;
	width: auto;
}

.site-footer__name {
	font-family: var(--font-heading);
	font-size: var(--fs-md);
	font-weight: 700;
	color: var(--c-white);
}

.site-footer__desc {
	font-size: var(--fs-sm);
	line-height: var(--lh-base);
	color: rgba(255, 255, 255, 0.75);
	margin-bottom: var(--sp-5);
}

/* Footer nav */
.footer-nav {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-nav li {
	margin-bottom: var(--sp-3);
}

.footer-nav a {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	font-size: var(--fs-sm);
	transition: color var(--transition);
}

.footer-nav a:hover {
	color: var(--c-white);
}

/* Contact details */
.footer-contact {
	list-style: none;
	padding: 0;
	margin: 0;
}

.footer-contact li {
	display: flex;
	align-items: flex-start;
	gap: var(--sp-3);
	margin-bottom: var(--sp-3);
	font-size: var(--fs-sm);
	color: rgba(255, 255, 255, 0.8);
}

.footer-contact a {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
}

.footer-contact a:hover {
	color: var(--c-white);
}

/* Social icons */
.social-links {
	display: flex;
	gap: var(--sp-3);
	margin-top: var(--sp-4);
	padding: 0;
	list-style: none;
}

.social-links a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: var(--c-white);
	text-decoration: none;
	transition: background var(--transition), transform var(--transition);
}

.social-links a:hover {
	background: var(--c-primary);
	transform: translateY(-2px);
}

/* Footer bottom bar */
.site-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding-top: var(--sp-5);
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-4);
	justify-content: space-between;
	align-items: center;
}

.site-footer__copyright {
	font-size: var(--fs-sm);
	color: rgba(255, 255, 255, 0.6);
	margin: 0;
}

.site-footer__legal a {
	font-size: var(--fs-sm);
	color: rgba(255, 255, 255, 0.6);
	text-decoration: none;
}

.site-footer__legal a:hover {
	color: var(--c-white);
}

/* Partner credit in footer bottom bar */
.site-footer__partner {
	display: flex;
	align-items: center;
	gap: var(--sp-3);
}

.site-footer__partner-label {
	font-size: var(--fs-xs);
	color: rgba(255, 255, 255, 0.45);
	white-space: nowrap;
}

.site-footer__partner-logo {
	display: flex;
	align-items: center;
}

.footer-partner-img {
	height: 48px;
	width: auto;
	object-fit: contain;
}

@media (max-width: 600px) {
	.site-footer__partner {
		order: -1; /* move above copyright on small screens */
		width: 100%;
		justify-content: center;
	}
}

/* ================================================================
   BREADCRUMB
================================================================ */
.breadcrumb {
	font-size: var(--fs-sm);
	color: var(--c-text-muted);
	padding: var(--sp-4) 0;
}

.breadcrumb a {
	color: var(--c-text-muted);
}

.breadcrumb a:hover {
	color: var(--c-primary);
}

.breadcrumb__sep {
	margin: 0 var(--sp-2);
}

/* ================================================================
   PAGE HEADER BAND (used by inner pages)
================================================================ */
.page-hero {
	position: relative;
	background: var(--c-navy);
	color: var(--c-white);
	padding: var(--sp-9) 0 var(--sp-8);
	overflow: hidden;
	text-align: left;
}

/* Animated gradient background */
@media (prefers-reduced-motion: no-preference) {
	@keyframes page-hero-grad {
		0%, 100% { background-position: 0% 50%; }
		50%       { background-position: 100% 50%; }
	}
	.page-hero {
		background: linear-gradient(-55deg, var(--c-navy-dark), var(--c-navy), #283593, var(--c-navy));
		background-size: 400% 400%;
		animation: page-hero-grad 16s ease infinite;
	}
}

/* Red left-edge accent bar */
.page-hero::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 5px;
	background: linear-gradient(to bottom, var(--c-primary-light), var(--c-primary));
}

/* Decorative geometric shapes */
.page-hero::after {
	content: '';
	position: absolute;
	top: -60px;
	right: -60px;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
	pointer-events: none;
}

/* Diagonal red strip bottom-right */
.page-hero .page-hero__deco {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 260px;
	height: 100%;
	background: linear-gradient(135deg, transparent 55%, rgba(183,28,28,0.08) 55%);
	pointer-events: none;
}

.page-hero .container {
	position: relative;
	z-index: 2;
}

.page-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-2);
	font-size: var(--fs-xs);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--c-primary-light);
	margin-bottom: var(--sp-4);
}

.page-hero__eyebrow::before {
	content: '';
	display: block;
	width: 28px;
	height: 2px;
	background: var(--c-primary-light);
	flex-shrink: 0;
}

.page-hero h1 {
	color: var(--c-white);
	margin: 0;
	max-width: 18ch;
	line-height: var(--lh-snug);
}

@media (prefers-reduced-motion: no-preference) {
	@keyframes ph-fade-up {
		from { opacity: 0; transform: translateY(20px); }
		to   { opacity: 1; transform: translateY(0); }
	}
	.page-hero__eyebrow { animation: ph-fade-up 0.6s var(--anim-ease, ease) both; }
	.page-hero h1       { animation: ph-fade-up 0.6s 0.12s var(--anim-ease, ease) both; }
}

/* Keep lead hidden — not used on new pages */
.page-hero__lead { display: none; }

/* ================================================================
   PAGINATION
================================================================ */
.pagination,
.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-2);
	justify-content: center;
	margin-top: var(--sp-8);
}

.page-numbers,
.nav-links a,
.nav-links span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 var(--sp-3);
	border-radius: var(--radius-sm);
	font-weight: 700;
	font-size: var(--fs-sm);
	text-decoration: none;
	background: var(--c-surface);
	color: var(--c-text);
	transition: background var(--transition), color var(--transition);
}

.page-numbers:hover,
.nav-links a:hover {
	background: var(--c-primary-tint);
	color: var(--c-primary);
}

.page-numbers.current {
	background: var(--c-primary);
	color: var(--c-white);
}

/* ================================================================
   SIDEBAR
================================================================ */
.sidebar .widget {
	margin-bottom: var(--sp-6);
}

.sidebar .widget__title {
	font-size: var(--fs-md);
	margin-bottom: var(--sp-4);
	padding-bottom: var(--sp-3);
	border-bottom: 2px solid var(--c-primary);
	color: var(--c-navy);
}

.sidebar .widget_categories ul,
.sidebar .widget_recent_entries ul {
	list-style: none;
	padding: 0;
}

.sidebar .widget_categories li,
.sidebar .widget_recent_entries li {
	padding: var(--sp-2) 0;
	border-bottom: 1px solid var(--c-border);
}

.sidebar .widget_categories a,
.sidebar .widget_recent_entries a {
	text-decoration: none;
	font-size: var(--fs-sm);
	color: var(--c-text);
}

.sidebar .widget_categories a:hover,
.sidebar .widget_recent_entries a:hover {
	color: var(--c-primary);
}

/* ================================================================
   STICKY HEADER — SCROLLED STATE
================================================================ */
.site-header {
	transition: height 0.3s ease, box-shadow 0.3s ease, background 0.3s ease,
				backdrop-filter 0.3s ease;
}

.site-header.scrolled {
	height: 60px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom-color: var(--c-border);
	box-shadow: 0 2px 16px rgba(28, 34, 48, 0.1);
}

.site-header.scrolled .site-header__logo {
	height: 44px;
}

/* ================================================================
   SCROLL-REVEAL ANIMATIONS
================================================================ */
@media (prefers-reduced-motion: no-preference) {
	[data-animate] {
		opacity: 0;
		transition: opacity 0.6s var(--anim-ease, ease),
					transform 0.6s var(--anim-ease, ease);
	}

	[data-animate="fade-up"]     { transform: translateY(30px); }
	[data-animate="fade-in"]     { /* opacity only */ }
	[data-animate="slide-left"]  { transform: translateX(-40px); }
	[data-animate="slide-right"] { transform: translateX(40px); }

	[data-animate].is-visible {
		opacity: 1;
		transform: none;
	}
}

/* ================================================================
   STATISTICS STRIP
================================================================ */
.stats-strip {
	background: var(--c-navy);
	color: var(--c-white);
	padding: var(--sp-8) 0;
}

.stats-strip__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--sp-7) var(--sp-6);
	text-align: center;
}

@media (min-width: 600px) {
	.stats-strip__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

.stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--sp-2);
}

.stat__number {
	font-family: var(--font-heading);
	font-size: var(--fs-3xl);
	font-weight: 700;
	color: var(--c-primary-light);
	line-height: 1;
}

.stat__label {
	font-size: var(--fs-sm);
	color: rgba(255, 255, 255, 0.72);
	line-height: var(--lh-snug);
}

/* ================================================================
   SECTION DIVIDERS (SVG wave wrappers)
================================================================ */
.section-divider {
	display: block;
	line-height: 0;
	overflow: hidden;
	pointer-events: none;
}

.section-divider svg {
	display: block;
	width: 100%;
}

.section-divider--flip svg {
	transform: scaleX(-1);
}

/* ================================================================
   RESPONSIVE SECTION PADDING
================================================================ */
@media (max-width: 900px) {
	.section    { padding-top: var(--sp-7); padding-bottom: var(--sp-7); }
	.section--lg { padding-top: var(--sp-8); padding-bottom: var(--sp-8); }
	.section--sm { padding-top: var(--sp-5); padding-bottom: var(--sp-5); }
}

@media (max-width: 600px) {
	.section    { padding-top: var(--sp-6); padding-bottom: var(--sp-6); }
	.section--lg { padding-top: var(--sp-7); padding-bottom: var(--sp-7); }
}

/* ================================================================
   RESPONSIVE PAGE HERO
================================================================ */
@media (max-width: 768px) {
	.page-hero { padding: var(--sp-7) 0; }
}

@media (max-width: 479px) {
	.page-hero { padding: var(--sp-6) 0; }
	.page-hero h1 { max-width: 100%; }
}

/* ================================================================
   FOOTER NAV — MOBILE TAP TARGETS
================================================================ */
@media (max-width: 768px) {
	.footer-nav a { display: block; padding: var(--sp-2) 0; min-height: 44px; }
}
