/* ==========================================================================
   Structure générale : header / (menu + contenu) / footer
   ========================================================================== */
.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* ---- Header (pleine largeur, aligné sur les colonnes menu/contenu) ---- */
.site-header {
	display: grid;
	grid-template-columns: minmax(var(--nav-width-min), var(--nav-width)) 1fr;
	align-items: center;
	column-gap: 0;
	padding: 0;
	border-bottom: 1px solid var(--color-border);
	background-color: #464646;
}

/* Texte et liens du header : blancs, avec un hover qui reste lisible
   sur le fond #464646 (gris clair plutôt que blanc pur, pour un vrai
   effet visible au survol). */
.site-header,
.site-header .site-title-link {
	color: #ffffff;
}

.site-header a {
	color: #ffffff;
}

.site-header a:hover,
.site-header a:focus {
	color: #d4d4d4;
	text-decoration: underline;
}

/* Zone gauche : logo/texte, même largeur que le menu en dessous */
.site-header-left {
	grid-column: 1;
	display: flex;
	align-items: center;
	gap: 1rem;
	min-width: 0;
	padding: 0;
	justify-content: center;
	background-color: #464646;
}

/* Zone droite : bannière, même largeur adaptative que le contenu en dessous */
.site-header-right {
	grid-column: 2;
	display: flex;
	justify-content: flex-end;
	min-width: 0;
	max-height: 158px!important;	
}

.site-header-left img {
	max-height: 158px;
	max-width: 100%;
}

.site-banner {
	display: block;
	width: 100%;
	height: auto;
	min-width: 0; /* empêche l'image (800px) de forcer sa taille d'origine et de déborder de sa colonne */
	max-width: 100%;
	background-color: #464646 !important;
}

.site-title-link {
	font-size: 1.25rem;
	font-weight: 700;
	text-decoration: none;
}

/* Bouton hamburger, caché sur desktop */
.menu-toggle {
	display: none;
	align-items: center;
	gap: 0.5rem;
	background: transparent;
	border: 1px solid var(--color-border);
	color: #ffffff;
	border-radius: 4px;
	padding: 0.5rem 0.75rem;
}

.menu-toggle-icon {
	display: inline-block;
	width: 20px;
	height: 2px;
	background: currentColor;
	position: relative;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
	content: "";
	position: absolute;
	left: 0;
	width: 20px;
	height: 2px;
	background: currentColor;
}

.menu-toggle-icon::before {
	top: -6px;
}

.menu-toggle-icon::after {
	top: 6px;
}

/* ---- Zone menu + contenu (grid à 2 colonnes) ---- */
.site-main {
	flex: 1 0 auto;
	display: grid;
	/* La colonne de menu est pilotée par --nav-width (voir base.css).
	   Le contenu prend automatiquement le reste avec 1fr. */
	grid-template-columns: minmax(var(--nav-width-min), var(--nav-width)) 1fr;
	align-items: start;
}

.site-nav {
	background: var(--color-bg-nav);
	border-right: 1px solid var(--color-border);
	padding: 1.5rem 0;
	height: 100%;
}

.site-content {
	padding: 10px 10px;
	max-width: var(--content-max-width);
	background-color:#fff;
}

/* ---- Footer (une colonne centrée) ---- */
.site-footer {
	text-align: center;
	padding: 1.5rem;
	border-top: 1px solid var(--color-border);
	color: var(--color-text-muted);
}

/* ==========================================================================
   Mobile : menu en tiroir
   ========================================================================== */
@media (max-width: 960px) {
	.site-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.site-header-left {
		width: 100%;
		justify-content: space-between;
		gap: 0.75rem;
	}

	.menu-toggle {
		display: inline-flex;
	}

	.site-header-right {
		display: none;
	}

	.site-banner {
		display: none;
	}

	.site-main {
		display: block;
	}

	.site-nav {
		position: fixed;
		top: 0;
		left: 0;
		width: 82%;
		max-width: 320px;
		height: 100%;
		overflow-y: auto;
		border-right: none;
		box-shadow: 2px 0 12px rgba(0, 0, 0, 0.18);
		transform: translateX(-100%);
		transition: transform 0.25s ease;
		z-index: 1000;
	}

	.site-nav.is-open {
		transform: translateX(0);
	}

	/* Voile sombre derrière le tiroir ouvert */
	body.nav-open::after {
		content: "";
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.4);
		z-index: 900;
	}

	body.nav-open {
		overflow: hidden;
	}

	.site-content {
		padding: 1.5rem;
		max-width: 100%;
	}
}
