/*
------------------------------------------------
Perm'Educ — layout.css
Barre latérale fixe + décalage du contenu + pied de page
------------------------------------------------
*/

:root { --pe-sidebar-w: 300px; }

/* ---- Barre latérale ---- */
.pe-sidebar {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--pe-sidebar-w);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 28px 24px;
	background: var(--color-surface);
	border-right: 1px solid var(--color-stone);
	overflow-y: auto;
	z-index: 100;
}

.pe-logo { display: block; width: 100%; max-width: 100%; margin: 0 auto 8px; }
.pe-logo svg,
.pe-logo img {
	width: 100%;
	height: auto;
	display: block;
}

.pe-sidebar .wp-block-site-title,
.pe-sidebar .pe-brandline {
	display: none;
}
.pe-sidebar .wp-block-site-title-hidden {
	font-family: "Cormorant Garamond", serif;
	font-size: 30px;
	line-height: 1.1;
	text-align: center;
	margin: 4px 0 0;
}
.pe-sidebar .wp-block-site-title a { color: var(--color-forest); text-decoration: none; }

.pe-brandline { font-size: .8rem; color: var(--color-moss); line-height: 1.5; margin: 0 0 6px; }

.pe-nav { display: flex; flex-direction: column; gap: 2px; width: 100%; margin-top: 6px; }
.pe-nav a {
	display: flex; align-items: center; gap: 12px;
	padding: 10px 12px; border-radius: 12px;
	color: var(--color-text); font-weight: 500; text-decoration: none;
	transition: background .2s ease, color .2s ease;
}
.pe-nav a svg,
.pe-nav a img {
	width: 20px; height: 20px; flex: 0 0 20px;
	color: var(--color-moss);
}
.pe-nav a img {
	object-fit: contain;
}
.pe-nav a:hover { background: rgba(127,152,126,.14); color: var(--color-forest); }
.pe-nav a:hover svg,
.pe-nav a:hover img { color: var(--color-forest); opacity: 1; }
.pe-nav a.is-active {
	background: rgba(127,152,126,.18);
	color: var(--color-forest);
	font-weight: 600;
}
.pe-nav a.is-active svg,
.pe-nav a.is-active img { color: var(--color-forest); opacity: 1; }

.pe-sidebar-ornament { margin-top: 14px; opacity: .85; }
.pe-sidebar-ornament svg { width: 80px; height: auto; }

.pe-proverb {
	font-family: "Cormorant Garamond", serif;
	font-style: italic; font-size: 1rem; color: var(--color-moss);
	line-height: 1.45; margin-top: auto;
}
.pe-proverb__cite { font-family: "Source Sans 3", sans-serif; font-style: normal; font-size: .78rem; color: var(--color-moss); }
.pe-social { margin-top: 6px; }

/* ---- Décalage du contenu ---- */
.wp-site-blocks > header { margin: 0; }
.wp-site-blocks > main,
.wp-site-blocks > footer { margin-left: var(--pe-sidebar-w); }

/* ---- Pied de page ---- */
.site-footer {
	margin-top: 0;
	padding: 64px 0;
	background: var(--color-forest);
	color: var(--color-background);
}
.site-footer a, .site-footer h3, .site-footer h4 { color: var(--color-background); }
.site-footer .wp-block-navigation { flex-direction: column; gap: 12px; }

/* ---- Bouton menu mobile (injecté par navigation.js) ---- */
.pe-nav-toggle {
	display: none;
	position: fixed; top: 16px; left: 16px; z-index: 200;
	width: 46px; height: 46px;
	border: 1px solid var(--color-stone); border-radius: 12px;
	background: var(--color-surface); color: var(--color-forest); font-size: 20px;
}




@media (max-width: 1000px) {
	.permeduc-hero,
	.permeduc-method-band,
	.permeduc-nook-band {
		width: 100vw;
		max-width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
	}
}



/* Logo un peu plus large dans le menu élargi */


/* Logo seul dans le menu — pas de titre / slogan en double */
.pe-sidebar .wp-block-site-title,
.pe-sidebar .pe-brandline {
	display: none !important;
}
.pe-logo img {
	width: 100%;
	height: auto;
	display: block;
}


/* Bandeaux dans la colonne principale (à droite du menu) */
.wp-site-blocks > main .permeduc-hero,
.wp-site-blocks > main .permeduc-method-band,
.wp-site-blocks > main .permeduc-nook-band {
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}

main .alignfull.permeduc-hero,
main .alignfull.permeduc-method-band,
main .alignfull.permeduc-nook-band {
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}


/* Bandeau haut des articles et des pages — pleine largeur de la zone
   principale. « Pleine largeur » s'entend hors barre latérale : celle-ci est
   en position fixe, un alignfull s'étendrait donc jusqu'au bord de la fenêtre
   et passerait dessous. L'illustration s'en trouvait à la fois agrandie et
   masquée sur sa gauche. */
.wp-site-blocks > .article-hero,
.wp-site-blocks > .page-hero,
.article-hero.alignfull,
.page-hero.alignfull {
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}
/* Si le bandeau est enfant direct de wp-site-blocks, décalage menu */
.wp-site-blocks > .article-hero,
.wp-site-blocks > .page-hero {
	margin-left: var(--pe-sidebar-w);
	width: calc(100% - var(--pe-sidebar-w));
	max-width: calc(100% - var(--pe-sidebar-w));
}
@media (max-width: 1000px) {
	.wp-site-blocks > .article-hero,
	.wp-site-blocks > .page-hero {
		margin-left: 0;
		width: 100%;
		max-width: 100%;
	}
}
