/* ==========================================================================
   Layout — conteneur, en-tête, pied de page, grilles de page
   ========================================================================== */

/* --- Conteneur ------------------------------------------------------------ */

.hsb-container {
	box-sizing: border-box;
	max-width: var(--hsb-content-width);
	margin-inline: auto;
	padding-inline: var(--hsb-gutter);
}

.hsb-main {
	padding-bottom: 48px;
}

/* --- En-tête -------------------------------------------------------------- */

.hsb-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background-color: var(--hsb-bg-card);
	border-bottom: 1px solid var(--hsb-border);
}

.admin-bar .hsb-header {
	top: 32px;
}

.hsb-header__inner {
	display: flex;
	align-items: center;
	gap: 28px;
	padding-block: 14px;
}

.hsb-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--hsb-green-deep);
}

.hsb-brand:hover {
	color: var(--hsb-green-deep);
}

.hsb-brand__mark {
	display: block;
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: var(--hsb-radius-xs);
	background-color: var(--hsb-turquoise);
}

.hsb-brand__name {
	font-family: var(--hsb-font-script);
	font-size: 25px;
	font-weight: 700;
	white-space: nowrap;
}

.hsb-nav {
	margin-left: auto;
}

.hsb-nav ul {
	display: flex;
	align-items: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hsb-nav a {
	font-size: 15px;
	color: var(--hsb-green-deep);
	white-space: nowrap;
}

/* Classe CSS « is-muted » à poser sur l'entrée « À propos » dans Apparence → Menus */
.hsb-nav .is-muted > a {
	color: var(--hsb-text-muted);
}

.hsb-nav a:hover,
.hsb-nav .current-menu-item > a,
.hsb-nav .current-menu-parent > a {
	color: var(--hsb-turquoise-dark);
}

/* --- Page avec colonne latérale (rubrique) -------------------------------- */

.hsb-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 40px;
	align-items: start;
}

/* Page article : sommaire à gauche */
.hsb-layout--article {
	grid-template-columns: 230px minmax(0, 1fr);
	gap: 48px;
}

.hsb-sidebar {
	position: sticky;
	top: var(--hsb-sticky-offset);
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* --- Pied de page --------------------------------------------------------- */

.hsb-footer {
	position: relative;
	overflow: hidden;
	background-color: var(--hsb-bg-page);
	isolation: isolate;
}

/* Forme organique : grande forme jaune sur 68 % de la largeur */
.hsb-footer::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	z-index: -1;
	width: 68%;
	background-color: var(--hsb-yellow);
	border-radius: 0 46% 46% 0 / 0 58% 58% 0;
}

/* … et blob vert profond débordant à droite */
.hsb-footer::after {
	content: "";
	position: absolute;
	top: 70px;
	right: -90px;
	z-index: -1;
	width: 330px;
	height: 360px;
	background-color: var(--hsb-green-deep);
	border-radius: 54% 46% 42% 58% / 46% 54% 46% 54%;
}

.hsb-footer__main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
	gap: 40px;
	padding-block: 64px 48px;
}

.hsb-footer__title {
	max-width: 16ch;
	margin-bottom: 40px;
	font-size: 44px;
}

.hsb-footer__contacts {
	display: grid;
	gap: 22px;
	max-width: 38ch;
}

.hsb-footer__contact-label {
	margin: 0 0 2px;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hsb-green-deep);
}

.hsb-footer__contact-value {
	margin: 0;
	font-size: 15px;
	color: var(--hsb-text-on-yellow);
}

.hsb-footer__contact-value a {
	color: inherit;
}

.hsb-footer__aside {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: flex-end;
	gap: 14px;
	padding-bottom: 8px;
}

.hsb-social {
	display: flex;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hsb-social a {
	display: flex;
	color: var(--hsb-green-deep);
}

.hsb-social svg {
	width: 22px;
	height: 22px;
}

/* Bandeau blanc du bas : recouvre les formes */
.hsb-footer__bottom {
	position: relative;
	background-color: var(--hsb-bg-card);
	border-top: 1px solid var(--hsb-border);
}

.hsb-footer__bottom-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 24px;
	padding-block: 20px;
	font-size: 13px;
	color: var(--hsb-text-muted);
}

.hsb-footer__brand {
	font-family: var(--hsb-font-script);
	font-size: 22px;
	font-weight: 600;
	color: var(--hsb-green-deep);
}

.hsb-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hsb-footer__links a,
.hsb-footer__legal a {
	color: var(--hsb-text-muted);
}

.hsb-footer__links a:hover,
.hsb-footer__legal a:hover {
	color: var(--hsb-turquoise-dark);
}

.hsb-footer__legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-left: auto;
}

/* --- Responsive ----------------------------------------------------------- */

@media (max-width: 960px) {
	.hsb-header__inner {
		flex-wrap: wrap;
		gap: 12px 20px;
	}

	/* Menu défilant horizontalement sous la marque */
	.hsb-nav {
		order: 3;
		width: 100%;
		margin-left: 0;
		overflow-x: auto;
	}

	.hsb-header__cta {
		margin-left: auto;
	}

	.hsb-layout,
	.hsb-layout--article {
		grid-template-columns: minmax(0, 1fr);
	}

	.hsb-sidebar {
		position: static;
	}

	.hsb-footer__main {
		grid-template-columns: minmax(0, 1fr);
	}

	.hsb-footer__aside {
		align-items: flex-start;
	}

	.hsb-footer::before {
		width: 88%;
	}

	.hsb-footer::after {
		top: auto;
		bottom: 40px;
		right: -160px;
	}
}

@media (max-width: 782px) {
	.admin-bar .hsb-header {
		top: 0;
	}
}

@media (max-width: 600px) {
	.hsb-footer__title {
		font-size: 36px;
	}

	.hsb-footer::before {
		width: 100%;
		border-radius: 0 0 46% 0 / 0 0 22% 0;
	}

	.hsb-footer::after {
		display: none;
	}

	.hsb-footer__legal {
		margin-left: 0;
	}
}
