/*
 * Thème Pierre-Erick Bruny — styles du site et de l’éditeur.
 * Couleurs, polices et tailles : theme.json (variables --wp--preset--*).
 */

:root {
	--peb-blue: var(--wp--preset--color--primary, #00209f);
	--peb-blue-dark: var(--wp--preset--color--primary-hover, #00127a);
	--peb-red: var(--wp--preset--color--haiti-red, #d21034);
	--peb-gold: var(--wp--preset--color--gold, #d19936);
	--peb-navy: var(--wp--preset--color--navy, #050f35);
	--peb-text: var(--wp--preset--color--foreground, #121a2b);
	--peb-muted: var(--wp--preset--color--muted-foreground, #52607d);
	--peb-border: var(--wp--preset--color--border, #e0e5f0);
	--peb-bg: var(--wp--preset--color--background, #fbfcfe);
	--peb-card: var(--wp--preset--color--white, #ffffff);
	--peb-light: var(--wp--preset--color--footer-foreground, #f1f3f9);
	--peb-light-muted: var(--wp--preset--color--footer-muted, #b2bed5);
	--peb-line: #546992;
	--peb-accent: var(--wp--preset--color--accent, #e3edff);
	--peb-serif: var(--wp--preset--font-family--gelasio, Gelasio, Georgia, serif);
	--peb-sans: var(--wp--preset--font-family--jost, Jost, Arial, sans-serif);
	--peb-header-h: 84px;
}

@media (min-width: 1280px) {
	:root {
		--peb-header-h: 68px;
	}
}

html {
	scroll-behavior: smooth;
}

body {
	min-width: 320px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
li {
	overflow-wrap: break-word;
}

a,
button,
input,
textarea,
select {
	outline-offset: 3px;
}

:focus-visible {
	outline: 2px solid var(--peb-blue);
	outline-offset: 3px;
}

.has-navy-background-color :focus-visible,
.has-primary-background-color :focus-visible,
.peb-site-footer :focus-visible,
.is-style-peb-hero :focus-visible {
	outline-color: var(--peb-gold);
}

::selection {
	background: var(--peb-accent);
	color: var(--peb-blue);
}

/* Le contenu de la page suit l’en-tête : les sections pleine largeur se touchent. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

.wp-block-post-content > .alignfull,
.wp-block-post-content > .alignfull + * {
	margin-block-start: 0;
}

.wp-block-post-content > .alignfull {
	margin-block-end: 0;
}

/* ------------------------------------------------------------------ */
/* En-tête                                                             */
/* ------------------------------------------------------------------ */

.peb-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--peb-bg);
	border-bottom: 1px solid var(--peb-border);
}

body.admin-bar .peb-site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
	body.admin-bar .peb-site-header {
		top: 0;
	}
}

.peb-site-header::before,
.peb-site-footer::before {
	content: "";
	display: block;
	height: 4px;
	background: linear-gradient(180deg, var(--peb-blue) 0 50%, var(--peb-red) 50%);
}

.peb-entete.wp-block-group {
	box-sizing: border-box;
	max-width: 1480px;
	height: 80px;
	margin: 0 auto;
	padding: 0 16px;
	gap: 16px;
	align-items: center;
}

@media (min-width: 640px) {
	.peb-entete.wp-block-group {
		padding: 0 24px;
	}
}

@media (min-width: 1024px) {
	.peb-entete.wp-block-group {
		padding: 0 32px;
	}
}

@media (min-width: 1280px) {
	.peb-entete.wp-block-group {
		height: 64px;
	}
}

.peb-logo,
.peb-logo-pied {
	margin: 0;
	flex-shrink: 1;
	min-width: 0;
}

.peb-logo a,
.peb-logo-pied a {
	display: block;
}

.peb-logo img {
	display: block;
	width: auto;
	height: 36px;
	max-width: 100%;
}

@media (min-width: 640px) and (max-width: 1279.98px) {
	.peb-logo img {
		height: 40px;
	}
}

/* Navigation principale */
.peb-nav {
	--navigation-layout-justification-setting: flex-end;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--peb-text);
}

.peb-nav .wp-block-navigation__container {
	gap: 4px;
	align-items: center;
}

.peb-nav .wp-block-navigation-item__content {
	position: relative;
	padding: 0.55rem 0.5rem;
	color: var(--peb-text);
	text-decoration: none;
	transition: color 180ms ease;
}

.peb-nav .wp-block-navigation-item__content:hover,
.peb-nav .wp-block-navigation-item__content:focus-visible,
.peb-nav .current-menu-item > .wp-block-navigation-item__content,
.peb-nav .current-menu-ancestor > .wp-block-navigation-item__content {
	color: var(--peb-blue);
}

.peb-nav .current-menu-item > .wp-block-navigation-item__content::after,
.peb-nav .current-menu-ancestor > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0.5rem;
	right: 0.5rem;
	bottom: 0.1rem;
	height: 2px;
	background: var(--peb-blue);
}

.peb-nav .wp-block-navigation__submenu-icon {
	width: 12px;
	height: 12px;
	margin-left: 2px;
}

.peb-nav .wp-block-navigation-submenu > .wp-block-navigation-item__content {
	padding-right: 0.25rem;
}

/* Sous-menu « L’École de Pensée » */
.peb-nav .wp-block-navigation__submenu-container {
	min-width: 224px !important;
	padding: 8px;
	border: 1px solid var(--peb-border) !important;
	background: var(--peb-bg) !important;
	color: var(--peb-text) !important;
}

.peb-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	display: block;
	padding: 8px 12px;
	font-size: 0.875rem;
	font-weight: 400;
}

.peb-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: var(--peb-accent);
}

.peb-nav .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content::after {
	display: none;
}

/* « Faire un don » : petit bouton bleu */
.peb-nav .peb-nav-don > .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	height: 32px;
	margin: 0 4px;
	padding: 0 12px;
	border-radius: 2px;
	background: var(--peb-blue);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
}

.peb-nav .peb-nav-don > .wp-block-navigation-item__content:hover,
.peb-nav .peb-nav-don > .wp-block-navigation-item__content:focus-visible {
	background: var(--peb-blue-dark);
	color: #fff;
}

.peb-nav .peb-nav-don > .wp-block-navigation-item__content::after {
	display: none;
}

/* Le menu passe en mode « mobile » sous 1280 px (au lieu de 600 px). */
@media (min-width: 600px) and (max-width: 1279.98px) {
	.peb-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.peb-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

.peb-nav .wp-block-navigation__responsive-container-open,
.peb-nav .wp-block-navigation__responsive-container-close {
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	color: var(--peb-text);
}

.peb-nav .wp-block-navigation__responsive-container-open:hover,
.peb-nav .wp-block-navigation__responsive-container-close:hover {
	background: var(--peb-accent);
	color: var(--peb-blue);
}

.peb-nav .wp-block-navigation__responsive-container-open svg,
.peb-nav .wp-block-navigation__responsive-container-close svg {
	width: 24px;
	height: 24px;
}

/* Menu ouvert (mobile et tablette) */
.peb-nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 0;
	background: var(--peb-bg) !important;
	color: var(--peb-text) !important;
	font-size: 1rem;
}

.peb-nav .is-menu-open .wp-block-navigation__responsive-close {
	max-width: 640px;
	margin: 0 auto;
}

.peb-nav .is-menu-open .wp-block-navigation__responsive-container-close {
	top: 20px;
	right: 16px;
}

.peb-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: stretch;
	padding: 76px 20px 32px;
}

.peb-nav .is-menu-open .wp-block-navigation__container {
	flex-direction: row !important;
	flex-wrap: wrap;
	align-items: stretch !important;
	gap: 0 12px !important;
	width: 100%;
}

.peb-nav .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
	flex: 0 0 100%;
	align-items: stretch !important;
	border-bottom: 1px solid var(--peb-border);
}

.peb-nav .is-menu-open .wp-block-navigation__submenu-container > .wp-block-navigation-item {
	flex: none;
	width: 100%;
	align-items: flex-start !important;
}

.peb-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	padding: 12px 0 !important;
	font-size: 1rem;
	font-weight: 500;
}

.peb-nav .is-menu-open .current-menu-item > .wp-block-navigation-item__content::after,
.peb-nav .is-menu-open .current-menu-ancestor > .wp-block-navigation-item__content::after {
	display: none;
}

.peb-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	align-items: stretch !important;
	text-align: left;
	min-width: 0 !important;
	padding: 4px 16px 8px !important;
	border: 0 !important;
	background: var(--wp--preset--color--muted, #f2f4fa) !important;
}

.peb-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item {
	border-bottom: 0;
}

.peb-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 8px 0 !important;
	font-weight: 400;
}

.peb-nav .is-menu-open .wp-block-navigation__container > .peb-nav-don,
.peb-nav .is-menu-open .wp-block-navigation__container > .peb-nav-contact {
	flex: 1 1 calc(50% - 6px);
	margin-top: 16px;
	border-bottom: 0;
}

.peb-nav .wp-block-navigation__responsive-container.is-menu-open .peb-nav-don > .wp-block-navigation-item__content,
.peb-nav .wp-block-navigation__responsive-container.is-menu-open .peb-nav-contact > .wp-block-navigation-item__content {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 40px;
	margin: 0;
	padding: 0 12px !important;
	border: 1px solid var(--peb-blue);
	border-radius: 2px;
	font-size: 0.875rem;
	font-weight: 600;
}

.peb-nav .wp-block-navigation__responsive-container.is-menu-open .peb-nav-contact > .wp-block-navigation-item__content {
	color: var(--peb-blue);
}

/* ------------------------------------------------------------------ */
/* Pied de page                                                        */
/* ------------------------------------------------------------------ */

.peb-site-footer {
	background: var(--peb-navy);
	color: var(--peb-light);
}

.peb-site-footer a {
	color: inherit;
	text-decoration: none;
}

.peb-site-footer a:hover,
.peb-site-footer a:focus-visible {
	color: var(--peb-gold);
}

.peb-pied.wp-block-group {
	padding-top: 56px;
	padding-bottom: 8px;
}

.peb-pied__haut.wp-block-columns {
	gap: 40px;
	margin: 0;
	padding-bottom: 40px;
	border-bottom: 1px solid var(--peb-line);
}

@media (min-width: 782px) and (max-width: 1023.98px) {
	.peb-pied__haut.wp-block-columns {
		flex-wrap: wrap !important;
	}

	.peb-pied__haut.wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
	}
}

.peb-logo-pied img {
	display: block;
	width: auto;
	height: 56px;
	max-width: 100%;
}

.peb-pied__devise {
	max-width: 24rem;
	margin-top: 20px !important;
	font-family: var(--peb-serif);
	font-size: 17px;
	font-style: italic;
	font-weight: 600;
	line-height: 26px;
	color: var(--peb-light-muted);
}

.peb-nav-pied {
	font-size: 0.875rem;
	font-weight: 400;
	color: var(--peb-light);
}

.peb-nav-pied .wp-block-navigation__container {
	gap: 12px 20px;
	justify-content: flex-start;
}

.peb-nav-pied .wp-block-navigation-item__content {
	color: var(--peb-light);
	text-decoration: none;
}

.peb-nav-pied .wp-block-navigation-item__content:hover,
.peb-nav-pied .wp-block-navigation-item__content:focus-visible {
	color: var(--peb-gold);
}

.peb-pied__bas.wp-block-group {
	gap: 24px;
	padding-top: 32px;
	padding-bottom: 32px;
	align-items: center;
}

.peb-pied__copyright {
	margin: 0;
	font-size: 0.875rem;
	color: var(--peb-light-muted);
}

/* Réseaux sociaux en carrés (pied de page) */
.wp-block-social-links.is-style-peb-carres {
	gap: 8px;
	margin: 0;
	padding: 0;
}

.wp-block-social-links.is-style-peb-carres .wp-social-link {
	margin: 0;
	border: 1px solid var(--peb-line);
	border-radius: 0;
	background: transparent !important;
	color: var(--peb-light) !important;
	transition: border-color 150ms ease, color 150ms ease;
}

.wp-block-social-links.is-style-peb-carres .wp-social-link:hover,
.wp-block-social-links.is-style-peb-carres .wp-social-link:focus-within {
	border-color: var(--peb-gold);
	color: var(--peb-gold) !important;
	transform: none;
}

.wp-block-social-links.is-style-peb-carres .wp-block-social-link-anchor {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	color: inherit !important;
}

.wp-block-social-links.is-style-peb-carres .wp-block-social-link-anchor svg {
	width: 19px;
	height: 19px;
	fill: currentColor;
}

/* Réseaux sociaux en liste avec noms (page Contact) */
.wp-block-social-links.is-style-peb-cartes {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin-top: 28px;
	padding: 0;
}

.wp-block-social-links.is-style-peb-cartes .wp-social-link {
	margin: 0;
	border-radius: 0;
	background: transparent !important;
	color: var(--peb-text) !important;
}

.wp-block-social-links.is-style-peb-cartes .wp-social-link:hover {
	transform: none;
}

.wp-block-social-links.is-style-peb-cartes .wp-block-social-link-anchor {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	box-sizing: border-box;
	padding: 12px;
	border: 1px solid #7886a2;
	color: var(--peb-text) !important;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 150ms ease, color 150ms ease;
}

.wp-block-social-links.is-style-peb-cartes .wp-block-social-link-anchor:hover,
.wp-block-social-links.is-style-peb-cartes .wp-block-social-link-anchor:focus-visible {
	border-color: var(--peb-blue);
	color: var(--peb-blue) !important;
}

.wp-block-social-links.is-style-peb-cartes .wp-block-social-link-anchor svg {
	display: none;
}

.wp-block-social-links.is-style-peb-cartes .wp-social-link span.wp-block-social-link-label {
	order: -1;
	margin: 0 !important;
	font-size: 1em;
}

.wp-block-social-links.is-style-peb-cartes .wp-block-social-link-anchor::after {
	content: "";
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ------------------------------------------------------------------ */
/* Styles de blocs (choisis dans l’éditeur, panneau « Styles »)        */
/* ------------------------------------------------------------------ */

/* Petit titre */
.is-style-peb-surtitre {
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--peb-red);
}

.has-navy-background-color .is-style-peb-surtitre,
.has-primary-background-color .is-style-peb-surtitre,
.is-style-peb-hero .is-style-peb-surtitre,
.peb-site-footer .is-style-peb-surtitre {
	color: var(--peb-gold);
}

/* Filet tricolore */
hr.wp-block-separator.is-style-peb-filet {
	width: 100%;
	height: 2px;
	margin-top: 28px;
	margin-bottom: 28px;
	border: 0;
	opacity: 1;
	background: linear-gradient(90deg, var(--peb-blue) 0 62%, var(--peb-red) 62% 78%, var(--peb-gold) 78%) left center / 5rem 2px no-repeat;
}

.has-navy-background-color hr.wp-block-separator.is-style-peb-filet,
.has-primary-background-color hr.wp-block-separator.is-style-peb-filet,
.is-style-peb-hero hr.wp-block-separator.is-style-peb-filet {
	background: linear-gradient(90deg, var(--peb-light) 0 62%, var(--peb-red) 62% 78%, var(--peb-gold) 78%) left center / 5rem 2px no-repeat;
}

/* Filet centré dans les sections centrées et le cadre doré. */
.peb-centre hr.wp-block-separator.is-style-peb-filet,
.is-style-peb-cadre hr.wp-block-separator.is-style-peb-filet {
	background-position: center center;
}

/* Introduction de page */
.wp-block-group.is-style-peb-intro {
	padding-top: 80px;
	padding-bottom: 80px;
	background: var(--wp--preset--color--intro, #f0f5fe);
	border-bottom: 1px solid var(--peb-border);
}

@media (min-width: 640px) {
	.wp-block-group.is-style-peb-intro {
		padding-top: 112px;
		padding-bottom: 112px;
	}
}

.is-style-peb-intro > * {
	margin-block-start: 0;
}

.is-style-peb-intro .is-style-peb-surtitre {
	margin-bottom: 0;
}

.is-style-peb-intro > .wp-block-heading,
.is-style-peb-intro > .peb-intro__titre {
	margin-top: 12px;
	font-size: var(--wp--preset--font-size--titre-page);
	line-height: 1.25;
	color: var(--peb-blue);
}

.is-style-peb-intro > .peb-intro__texte,
.is-style-peb-intro > p:last-child {
	max-width: 48rem;
	margin-left: max(0px, calc((100% - 984px) / 2)) !important;
	margin-right: auto !important;
	margin-bottom: 0;
	font-size: 1.125rem;
	line-height: 2rem;
	color: var(--peb-muted);
}

@media (min-width: 640px) {
	.is-style-peb-intro > .peb-intro__texte,
	.is-style-peb-intro > p:last-child {
		font-size: 1.25rem;
	}
}

/* Carte */
.wp-block-group.is-style-peb-carte {
	box-sizing: border-box;
	padding: 28px;
	border: 1px solid var(--peb-border);
	background: var(--peb-card);
	color: var(--peb-text);
}

.is-style-peb-carte > :first-child {
	margin-top: 0;
}

.is-style-peb-carte > :last-child {
	margin-bottom: 0;
}

.is-style-peb-carte .wp-block-image {
	margin-bottom: 0;
}

.is-style-peb-carte .wp-block-image img {
	display: block;
	width: 100%;
}

.is-style-peb-carte > h3.wp-block-heading {
	margin-top: 24px;
	font-size: 1.5rem;
	color: var(--peb-text);
}

/* Carte avec lien (toute la carte est cliquable) */
.wp-block-group.is-style-peb-carte-lien {
	position: relative;
	box-sizing: border-box;
	padding: 24px;
	border: 1px solid var(--peb-border);
	background: var(--peb-card);
	transition: border-color 150ms ease;
}

.wp-block-group.is-style-peb-carte-lien:hover,
.wp-block-group.is-style-peb-carte-lien:focus-within {
	border-color: var(--peb-blue);
}

.is-style-peb-carte-lien > * {
	margin-block: 0;
}

.is-style-peb-carte-lien h3,
.is-style-peb-carte-lien h2 {
	font-size: 1.5rem;
	color: var(--peb-text);
}

.is-style-peb-carte-lien h3 a,
.is-style-peb-carte-lien h2 a {
	color: inherit;
	text-decoration: none;
}

.is-style-peb-carte-lien h3 a::after,
.is-style-peb-carte-lien h2 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.is-style-peb-carte-lien p {
	margin-top: 8px;
	font-size: 0.875rem;
	line-height: 1.5rem;
	color: var(--peb-muted);
}

/* Puces rouges */
ul.wp-block-list.is-style-peb-puces {
	display: grid;
	gap: 16px;
	margin-top: 20px;
	padding: 0;
	list-style: none;
	font-size: 0.875rem;
	line-height: 1.5rem;
	color: var(--peb-muted);
}

ul.wp-block-list.is-style-peb-puces > li {
	position: relative;
	margin: 0;
	padding-left: 18px;
}

ul.wp-block-list.is-style-peb-puces > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 9px;
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--peb-red);
}

ul.wp-block-list.is-style-peb-puces strong {
	color: var(--peb-text);
}

/* Citation centrée */
.wp-block-quote.is-style-peb-citation {
	margin: 0 auto;
	padding: 0;
	border: 0;
	font-style: normal;
	text-align: center;
}

.wp-block-quote.is-style-peb-citation p {
	margin: 0;
	font-family: var(--peb-serif);
	font-size: 1.5rem;
	font-style: italic;
	font-weight: 600;
	line-height: 1.375;
	color: var(--peb-text);
}

@media (min-width: 640px) {
	.wp-block-quote.is-style-peb-citation p {
		font-size: 1.875rem;
	}
}

.wp-block-quote.is-style-peb-citation cite {
	display: block;
	margin-top: 16px;
	font-size: 0.75rem;
	font-style: normal;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--peb-muted);
}

/* Citation avec filet rouge */
.wp-block-quote.is-style-peb-citation-filet {
	margin-top: 48px;
	margin-bottom: 48px;
	padding-left: 28px;
	border-left: 4px solid var(--peb-red);
	font-style: normal;
}

.wp-block-quote.is-style-peb-citation-filet p {
	font-family: var(--peb-serif);
	font-size: 1.5rem;
	font-style: italic;
	font-weight: 600;
	line-height: 1.375;
	color: var(--peb-text);
}

@media (min-width: 640px) {
	.wp-block-quote.is-style-peb-citation-filet p {
		font-size: 1.875rem;
	}
}

/* Cadre doré (devise) */
.wp-block-group.is-style-peb-cadre {
	position: relative;
	box-sizing: border-box;
	padding: 40px 20px;
	border: 1px solid var(--peb-gold);
	text-align: center;
	color: var(--peb-light);
}

@media (min-width: 640px) {
	.wp-block-group.is-style-peb-cadre {
		padding: 64px 32px;
	}
}

.wp-block-group.is-style-peb-cadre::before {
	content: "";
	position: absolute;
	inset: 5px;
	border: 1px solid var(--peb-gold);
	pointer-events: none;
}

.is-style-peb-cadre > * {
	position: relative;
	margin-block: 0;
}

.is-style-peb-cadre hr.wp-block-separator.is-style-peb-filet {
	margin: 32px auto;
}

.peb-devise__texte {
	margin-top: 20px !important;
	font-family: var(--peb-serif);
	font-size: 28px;
	font-style: italic;
	font-weight: 600;
	line-height: 38px;
	color: var(--peb-light);
}

@media (min-width: 640px) {
	.peb-devise__texte {
		font-size: 40px;
		line-height: 52px;
	}
}

.peb-devise__traduction {
	font-size: 1rem;
	font-style: italic;
	color: var(--peb-light-muted);
}

/* Liste numérotée (chiffres romains automatiques) */
.wp-block-group.is-style-peb-priorites {
	counter-reset: peb-priorite;
}

.is-style-peb-priorites > * + * {
	margin-block-start: 20px;
}

.wp-block-group.is-style-peb-priorite {
	counter-increment: peb-priorite;
	display: grid;
	grid-template-columns: minmax(96px, auto) minmax(0, 1fr);
	row-gap: 0;
	box-sizing: border-box;
	border: 1px solid var(--peb-border);
	background: var(--peb-card);
}

.wp-block-group.is-style-peb-priorite::before {
	content: counter(peb-priorite, upper-roman);
	grid-column: 1;
	grid-row: 1 / span 30;
	padding: 24px;
	border-right: 1px solid var(--peb-border);
	font-family: var(--peb-serif);
	font-size: 40px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
	color: var(--peb-blue);
}

.wp-block-group.is-style-peb-priorite > * {
	grid-column: 2;
	min-width: 0;
	margin: 0;
	padding-inline: 24px;
}

.wp-block-group.is-style-peb-priorite > :first-child {
	padding-top: 24px;
}

.wp-block-group.is-style-peb-priorite > :last-child {
	padding-bottom: 24px;
}

.wp-block-group.is-style-peb-priorite > * + * {
	margin-top: 16px;
}

@media (min-width: 640px) {
	.wp-block-group.is-style-peb-priorite::before {
		padding: 32px;
	}

	.wp-block-group.is-style-peb-priorite > * {
		padding-inline: 32px;
	}

	.wp-block-group.is-style-peb-priorite > :first-child {
		padding-top: 32px;
	}

	.wp-block-group.is-style-peb-priorite > :last-child {
		padding-bottom: 32px;
	}
}

.is-style-peb-priorite h2,
.is-style-peb-priorite h3 {
	font-size: 26px;
	line-height: 1.25;
	color: var(--peb-blue);
}

@media (min-width: 640px) {
	.is-style-peb-priorite h2,
	.is-style-peb-priorite h3 {
		font-size: 30px;
	}
}

.is-style-peb-priorite p {
	font-size: 1.125rem;
	line-height: 2rem;
	color: var(--peb-muted);
}

.is-style-peb-priorite p strong {
	color: var(--peb-text);
}

/* Boutons */
.wp-block-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	box-sizing: border-box;
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
	background: var(--peb-accent);
	color: var(--peb-blue);
	border-color: var(--peb-blue);
}

.wp-block-button.is-style-peb-inverse .wp-block-button__link {
	border-color: var(--peb-light);
	background: var(--peb-light);
	color: var(--peb-blue);
}

.wp-block-button.is-style-peb-inverse .wp-block-button__link:hover,
.wp-block-button.is-style-peb-inverse .wp-block-button__link:focus-visible {
	border-color: var(--peb-gold);
	background: var(--peb-gold);
	color: var(--peb-navy);
}

.wp-block-button.is-style-peb-texte .wp-block-button__link {
	font-size: 1rem;
	padding-left: 0;
	padding-right: 0;
	border-color: transparent;
	background: transparent;
	color: inherit;
}

.wp-block-button.is-style-peb-texte .wp-block-button__link:hover,
.wp-block-button.is-style-peb-texte .wp-block-button__link:focus-visible {
	border-color: transparent;
	background: transparent;
	color: inherit;
	text-decoration: underline;
}

.wp-block-button.peb-bouton-grand .wp-block-button__link,
.is-style-peb-hero .wp-block-button .wp-block-button__link {
	min-height: 48px;
	padding: 12px 28px;
}

.wp-block-button.peb-fleche .wp-block-button__link::after {
	content: "";
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Galerie en vignettes carrées */
.wp-block-gallery.is-style-peb-grille.has-nested-images {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px !important;
}

.wp-block-gallery.is-style-peb-grille.has-nested-images figure.wp-block-image {
	width: auto !important;
	margin: 0 !important;
	aspect-ratio: 1 / 1;
}

.wp-block-gallery.is-style-peb-grille.has-nested-images figure.wp-block-image img {
	width: 100%;
	height: 100% !important;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	cursor: zoom-in;
}

/* ------------------------------------------------------------------ */
/* Bannière de l’accueil                                               */
/* ------------------------------------------------------------------ */

.wp-block-cover.is-style-peb-hero {
	display: block;
	min-height: 0;
	padding: 0;
	overflow: hidden;
	background-color: var(--peb-navy);
	color: var(--peb-light);
}

.wp-block-cover.is-style-peb-hero .wp-block-cover__image-background {
	position: relative;
	inset: auto;
	display: block;
	width: 100%;
	height: auto;
	max-height: 64svh;
	aspect-ratio: 5 / 6;
	object-fit: cover;
	z-index: 0;
}

.wp-block-cover.is-style-peb-hero .wp-block-cover__background {
	position: absolute;
	inset: 0 0 auto 0;
	height: min(64svh, 120vw);
	opacity: 1 !important;
	background: linear-gradient(0deg, var(--peb-navy) 0%, transparent 45%) !important;
	z-index: 1;
}

.wp-block-cover.is-style-peb-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
	box-sizing: border-box;
	width: 100%;
	max-width: 1280px;
	margin: -72px auto 0;
	padding: 0 24px 56px;
	color: var(--peb-light);
}

@media (min-width: 768px) {
	.wp-block-cover.is-style-peb-hero {
		display: flex;
		align-items: center;
		min-height: max(640px, calc(100svh - var(--peb-header-h)));
	}

	.wp-block-cover.is-style-peb-hero .wp-block-cover__image-background {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: auto;
		width: 68%;
		height: 100%;
		max-height: none;
		aspect-ratio: auto;
	}

	.wp-block-cover.is-style-peb-hero .wp-block-cover__background {
		inset: 0 0 0 auto;
		width: 68%;
		height: 100%;
		background:
			linear-gradient(90deg, var(--peb-navy) 0%, color-mix(in srgb, var(--peb-navy) 55%, transparent) 34%, transparent 64%),
			linear-gradient(0deg, var(--peb-navy) 0%, transparent 38%) !important;
	}

	.wp-block-cover.is-style-peb-hero .wp-block-cover__inner-container {
		margin: 0 auto;
		padding: 80px 32px;
	}
}

.peb-hero__contenu.wp-block-group {
	max-width: 620px;
}

.peb-hero__contenu > * {
	margin-block: 0;
}

.is-style-peb-hero h1.peb-hero__titre {
	margin-top: 16px;
	font-size: 30px;
	font-style: italic;
	line-height: 1.2;
	color: var(--peb-light);
}

@media (min-width: 768px) {
	.is-style-peb-hero h1.peb-hero__titre {
		font-size: 56px;
		line-height: 1.12;
	}
}

.peb-hero__texte {
	margin-top: 24px !important;
	font-size: 17px;
	line-height: 2rem;
	color: var(--peb-light);
}

@media (min-width: 768px) {
	.peb-hero__texte {
		font-size: 1.25rem;
	}
}

.peb-hero__actions.wp-block-buttons {
	flex-direction: column;
	align-items: stretch;
	gap: 20px;
	margin-top: 32px !important;
}

.peb-hero__actions .wp-block-button,
.peb-hero__actions .wp-block-button__link {
	width: 100%;
}

@media (min-width: 640px) {
	.peb-hero__actions.wp-block-buttons {
		flex-direction: row;
		align-items: center;
		gap: 32px;
	}

	.peb-hero__actions .wp-block-button,
	.peb-hero__actions .wp-block-button__link {
		width: auto;
	}
}

/* ------------------------------------------------------------------ */
/* Sections                                                            */
/* ------------------------------------------------------------------ */

.wp-block-group.peb-section {
	padding-top: 80px;
	padding-bottom: 80px;
}

@media (min-width: 640px) {
	.wp-block-group.peb-centre.peb-section {
		padding-top: 112px;
		padding-bottom: 112px;
	}
}

.peb-centre {
	text-align: center;
}

.peb-centre hr.wp-block-separator.is-style-peb-filet {
	margin: 32px auto;
}

.peb-centre > * {
	margin-block-start: 0;
}

.peb-centre > .wp-block-heading {
	margin-top: 16px;
}

.peb-titre-centre,
h2.peb-titre-centre {
	font-size: clamp(2.25rem, 1.75rem + 2vw, 3rem);
	line-height: 1.2;
	color: var(--peb-blue);
}

.peb-texte-centre {
	font-size: 1.125rem;
	line-height: 2.25rem;
	color: var(--peb-muted);
}

.peb-centre .peb-texte-centre + hr.wp-block-separator.is-style-peb-filet {
	margin-top: 56px;
}

.peb-centre .peb-texte-centre strong,
.article-body strong,
.article-body b {
	color: var(--peb-text);
}

.peb-grande-citation {
	margin-top: 48px !important;
	font-family: var(--peb-serif);
	font-size: 30px;
	font-style: italic;
	font-weight: 600;
	line-height: 1.3;
	color: var(--peb-text);
}

@media (min-width: 640px) {
	.peb-grande-citation {
		font-size: 44px;
	}
}

.peb-sous-citation {
	margin-top: 16px !important;
	font-size: 22px;
	font-style: italic;
	color: var(--peb-muted);
}

/* « Agir ensemble » */
.wp-block-group.peb-section--agir {
	border-top: 1px solid var(--peb-border);
	border-bottom: 1px solid var(--peb-border);
}

.peb-section--agir > * {
	margin-block-start: 0;
}

.peb-section--agir > .wp-block-heading {
	margin-top: 8px;
	line-height: 1.25;
}

.peb-section--agir > hr.wp-block-separator.is-style-peb-filet {
	margin: 20px 0 40px;
}

.wp-block-columns.peb-colonnes-cartes {
	gap: 20px;
	margin-bottom: 0;
}

.peb-colonnes-cartes > .wp-block-column {
	display: flex;
}

.peb-colonnes-cartes > .wp-block-column > .wp-block-group {
	flex: 1;
}

@media (min-width: 782px) and (max-width: 1023.98px) {
	.wp-block-columns.peb-colonnes-cartes {
		flex-wrap: wrap !important;
	}

	.wp-block-columns.peb-colonnes-cartes > .wp-block-column {
		flex-basis: 100% !important;
	}
}

/* Devise */
.wp-block-group.peb-section-devise {
	padding-top: 64px;
	padding-bottom: 64px;
}

/* Liste des priorités, cartes de l’École, encadré de don */
.wp-block-group.peb-section--liste {
	padding-top: 64px;
	padding-bottom: 64px;
}

.wp-block-group.peb-section--cartes {
	padding-top: 0;
	padding-bottom: 64px;
}

.peb-section--cartes > * + * {
	margin-block-start: 16px;
}

.wp-block-group.peb-section--don {
	padding-top: 16px;
	padding-bottom: 64px;
}

@media (min-width: 640px) {
	.wp-block-group.peb-section--don {
		padding-top: 32px;
	}
}

.wp-block-group.peb-don {
	padding: 24px;
	text-align: center;
}

@media (min-width: 640px) {
	.wp-block-group.peb-don {
		padding: 40px;
	}
}

.peb-don::before {
	content: "";
	display: block;
	width: 40px;
	height: 40px;
	margin: 0 auto;
	background: var(--peb-red);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.peb-don > * {
	margin-block: 0;
}

.peb-don > .wp-block-heading {
	margin-top: 20px;
	font-size: 1.875rem;
	color: var(--peb-text);
}

.peb-don__texte {
	margin-top: 16px !important;
	line-height: 1.75rem;
	color: var(--peb-muted);
}

.peb-don__actions.wp-block-buttons {
	justify-content: center;
	margin-top: 28px !important;
}

@media (max-width: 639.98px) {
	.peb-don__actions .wp-block-button,
	.peb-don__actions .wp-block-button__link {
		width: 100%;
	}
}

.peb-don__note {
	margin-top: 16px !important;
	font-size: 0.875rem;
	color: var(--peb-muted);
}

/* Contact */
.wp-block-group.peb-section--contact {
	padding-top: 64px;
	padding-bottom: 64px;
}

.wp-block-columns.peb-contact {
	gap: 48px;
	margin: 0;
}

@media (min-width: 782px) and (max-width: 1023.98px) {
	.wp-block-columns.peb-contact {
		flex-wrap: wrap !important;
	}

	.wp-block-columns.peb-contact > .wp-block-column {
		flex-basis: 100% !important;
	}
}

.peb-contact__titre {
	margin-top: 0;
	font-size: 1.875rem;
	color: var(--peb-blue);
}

.peb-contact__texte {
	margin-top: 16px;
	line-height: 1.75rem;
	color: var(--peb-muted);
}

/* ------------------------------------------------------------------ */
/* Texte des pages et des articles                                     */
/* ------------------------------------------------------------------ */

.wp-block-group.peb-section--texte,
.wp-block-post-content.peb-section--texte {
	padding-top: 64px;
	padding-bottom: 64px;
}

.article-body {
	font-size: 1.125rem;
	line-height: 2rem;
	color: var(--peb-muted);
}

.article-body > * {
	margin-block-start: 0;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body figure,
.article-body .wp-block-quote,
.article-body .wp-block-gallery {
	margin-top: 0;
	margin-bottom: 1.2em;
}

.article-body h2 {
	margin: 1.5em 0 0.5em;
	font-family: var(--peb-serif);
	font-size: 1.875rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--peb-blue);
}

.article-body h3 {
	margin: 1.25em 0 0.5em;
	font-family: var(--peb-serif);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
}

.article-body h4 {
	margin: 1.25em 0 0.5em;
	font-size: 1.25rem;
}

.article-body > :first-child {
	margin-top: 0;
}

.article-body ul {
	padding-left: 1.25em;
	list-style: none;
}

.article-body ul > li {
	position: relative;
}

.article-body ul > li::before {
	content: "";
	position: absolute;
	left: -1em;
	top: 0.8em;
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--peb-red);
}

.article-body ol {
	padding-left: 1.5em;
	list-style: decimal;
}

.article-body li > ul,
.article-body li > ol {
	margin-bottom: 0;
}

.article-body .wp-block-quote:not(.is-style-peb-citation):not(.is-style-peb-citation-filet) {
	padding-left: 1em;
	border-left: 3px solid var(--peb-blue);
	font-style: italic;
}

.article-body a {
	color: var(--peb-blue);
	text-decoration: underline;
}

.article-body img {
	height: auto;
	max-width: 100%;
}

.article-body .wp-block-image:not(.is-resized) img {
	width: 100%;
}

.article-body figure:not(.wp-block-gallery) img,
.article-body p img {
	cursor: zoom-in;
}

.article-body figcaption {
	margin-top: 0.5em;
	font-size: 0.875rem;
	font-style: italic;
	text-align: center;
}

/* ------------------------------------------------------------------ */
/* 404, archives et recherche                                          */
/* ------------------------------------------------------------------ */

.peb-404__code {
	margin: 0;
	font-family: var(--peb-serif);
	font-size: 4.5rem;
	font-weight: 600;
	line-height: 1;
	color: var(--peb-blue);
}

.peb-404 h1 {
	margin-top: 16px;
	font-family: var(--peb-sans);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--peb-text);
}

.peb-404 .wp-block-buttons {
	justify-content: center;
	margin-top: 24px;
}

.peb-grille-cartes {
	gap: 24px;
}

.peb-carte-requete.wp-block-group {
	height: 100%;
	padding: 0 0 24px;
}

.peb-carte-requete > :not(.wp-block-post-featured-image) {
	padding-inline: 24px;
}

.peb-carte-requete .wp-block-post-featured-image {
	margin: 0 0 24px;
}

.peb-carte-requete .wp-block-post-title {
	margin-top: 12px;
	font-size: 1.5rem;
}

.peb-carte-requete .wp-block-post-title a {
	color: var(--peb-text);
	text-decoration: none;
}

.peb-carte-requete .wp-block-post-excerpt {
	font-size: 0.875rem;
	line-height: 1.5rem;
	color: var(--peb-muted);
}

.wp-block-query.peb-requete {
	padding-top: 64px;
	padding-bottom: 64px;
}

.wp-block-query-pagination {
	margin-top: 40px;
	gap: 12px;
}

/* ------------------------------------------------------------------ */
/* Animation à l’apparition, bouton « haut de page », agrandissement    */
/* ------------------------------------------------------------------ */

@keyframes peb-reveal {
	from {
		opacity: 0;
		transform: translateY(22px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.peb-reveal {
			animation: peb-reveal 700ms ease both;
			animation-timeline: view();
			animation-range: entry 5% cover 25%;
		}
	}
}

.editor-styles-wrapper .peb-reveal {
	animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

.peb-haut-de-page {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 40;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: var(--peb-blue);
	color: #fff;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: opacity 200ms ease, visibility 200ms ease, background-color 150ms ease;
}

.peb-haut-de-page.is-visible {
	opacity: 1;
	visibility: visible;
}

.peb-haut-de-page:hover,
.peb-haut-de-page:focus-visible {
	background: var(--peb-blue-dark);
}

.peb-haut-de-page svg {
	width: 16px;
	height: 16px;
}

.peb-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: color-mix(in srgb, var(--peb-navy) 95%, transparent);
	cursor: zoom-out;
}

@media (min-width: 640px) {
	.peb-lightbox {
		padding: 48px;
	}
}

.peb-lightbox[hidden] {
	display: none;
}

.peb-lightbox img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	cursor: default;
}

.peb-lightbox__fermer {
	position: absolute;
	top: 16px;
	right: 16px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.3);
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.peb-lightbox__fermer:hover,
.peb-lightbox__fermer:focus-visible {
	border-color: var(--peb-gold);
	color: var(--peb-gold);
}

.peb-lightbox__fermer svg {
	width: 20px;
	height: 20px;
}

.screen-reader-text:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
