/*
 * Blocs de contenu de la page éditoriale (maquette « Page type ») : bandeaux, accordéons, tableau, listes.
 */

/* Espacements de la page type : 30 px entre blocs, 10 px entre un paragraphe et sa liste. */
.wp-block-post-content > p + ul,
.wp-block-post-content > p + ol {
	margin-top: 10px;
}

.wp-block-post-content li + li {
	margin-top: 4px;
}

:where(.wp-block-post-content, .wp-block-tab-panel, .wp-block-accordion-panel) > p + p {
	margin-top: 1.2em;
}

/* Bandeaux d'information */
.wp-block-group[class*="is-style-info-"] {
	border-radius: 16px;
	font-weight: 500;
	padding: 20px 32px;
}

.wp-block-group[class*="is-style-info-"] > * {
	margin-block: 0;
}

.wp-block-group[class*="is-style-info-"] > * + * {
	margin-top: 20px;
}

.wp-block-group[class*="is-style-info-"] :where(h2, h3, h4, h5, h6) {
	font-size: 16px;
	font-weight: 700;
}

.wp-block-group.is-style-info-blue {
	background: rgba(136, 201, 238, 0.6);
}

.wp-block-group.is-style-info-purple {
	background: var(--wp--preset--color--light-purple-500);
}

.wp-block-group.is-style-info-yellow {
	background: var(--wp--preset--color--yellow);
}

.wp-block-group.is-style-info-green {
	background: var(--wp--preset--color--green);
}

/* Accordéons (core/accordion et core/details) */
.wp-block-accordion {
	--wp--style--block-gap: 0;
}

.wp-block-accordion-item,
.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--light-purple-500);
	margin-block: 0;
}

.wp-block-accordion-heading {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
}

.wp-block-accordion-heading__toggle,
.wp-block-details > summary {
	align-items: center;
	cursor: pointer;
	display: flex;
	font-size: 18px;
	font-weight: 700;
	gap: 10px;
	line-height: 1.219;
	list-style: none;
	padding: 26px 10px;
	text-align: left;
	width: 100%;
}

.wp-block-details > summary::-webkit-details-marker {
	display: none;
}

.wp-block-accordion-heading__toggle:hover .wp-block-accordion-heading__toggle-title {
	text-decoration: none;
}

.wp-block-accordion-heading__toggle-icon {
	display: none;
}

.wp-block-accordion-heading__toggle::before,
.wp-block-details > summary::before {
	background: currentColor;
	content: "";
	flex: none;
	height: 20px;
	-webkit-mask: url(../icons/chevron-down.svg) center / contain no-repeat;
	mask: url(../icons/chevron-down.svg) center / contain no-repeat;
	transition: transform 0.2s;
	width: 20px;
}

.wp-block-accordion-item.is-open .wp-block-accordion-heading__toggle::before,
.wp-block-details[open] > summary::before {
	transform: rotate(180deg);
}

.wp-block-accordion-panel,
.wp-block-details > :not(summary) {
	margin-block: 0;
	padding: 0 10px 24px 40px;
}

/* Tableau */
.wp-block-table {
	overflow-x: auto;
}

.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table th,
.wp-block-table td {
	border: 0;
	padding: 10px 20px;
	text-align: left;
	vertical-align: top;
}

.wp-block-table thead,
.wp-block-table tfoot {
	border: 0;
}

.wp-block-table thead th {
	background: var(--wp--preset--color--light-purple-400);
	font-weight: 700;
	padding-block: 18px;
}

.wp-block-table tbody tr:nth-child(odd) {
	background: var(--wp--preset--color--light-purple-300);
}

/* Images et médias */
.wp-block-image img,
.wp-block-media-text__media img,
.wp-block-post-featured-image img {
	border-radius: 30px;
}

.wp-block-media-text {
	gap: 24px;
}

.wp-block-media-text > .wp-block-media-text__content {
	padding: 0;
}

/* Boutons : survol de la maquette (fond bleu foncé à 60 %, texte blanc) */
.wp-block-button__link {
	align-items: center;
	display: inline-flex;
	justify-content: center;
	min-height: 56px;
	padding-block: 12px;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus-visible {
	background: rgba(43, 40, 104, 0.6);
	border-color: transparent;
	color: #fff;
}

.wp-block-button.is-style-outline-m .wp-block-button__link {
	background: #fff;
	color: var(--wp--preset--color--dark-blue);
	font-size: 14px;
	min-height: 48px;
}

/* Encadré violet clair */
.wp-block-group.is-style-box {
	background: var(--wp--preset--color--light-purple-300);
	border-radius: 16px;
	padding: 20px;
}

.wp-block-group.is-style-box > * {
	margin-block: 0;
}

.wp-block-group.is-style-box > * + * {
	margin-top: 10px;
}

/* Liste de documents (espace ressources) */
.wp-block-list.is-style-documents {
	display: flex;
	flex-direction: column;
	gap: 14px;
	list-style: none;
	padding: 0;
}

.wp-block-list.is-style-documents li + li {
	margin-top: 0;
}

.wp-block-list.is-style-documents a {
	font-weight: 700;
	text-underline-offset: 3px;
}

.wp-block-list.is-style-documents a:hover {
	color: rgba(43, 40, 104, 0.6);
}

.wp-block-file {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
}

.wp-block-file .wp-block-file__button {
	background: #fff;
	border: 1px solid var(--wp--preset--color--dark-blue);
	border-radius: 50px;
	color: var(--wp--preset--color--dark-blue);
	font-size: 14px;
	font-weight: 700;
	padding: 8.5px 20px;
	text-decoration: none;
	transition: background-color 0.2s, color 0.2s;
}

.wp-block-file .wp-block-file__button:hover {
	background: rgba(43, 40, 104, 0.6);
	border-color: transparent;
	color: #fff;
}

/* Cartes (pattern « Nos vocations ») */
.wp-block-group.is-style-card {
	background: rgba(255, 255, 255, 0.55);
	border-radius: 30px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	padding: 16px;
	transition: background-color 0.25s;
}

.wp-block-group.is-style-card:hover {
	background: #fff;
}

.wp-block-group.is-style-card > * {
	margin-block: 0;
}

.wp-block-group.is-style-card > .wp-block-image {
	border-radius: 20px;
	margin-bottom: 22px;
	overflow: hidden;
}

.wp-block-group.is-style-card > .wp-block-image img {
	aspect-ratio: 281 / 177;
	border-radius: 0;
	display: block;
	height: auto;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
	width: 100%;
}

.wp-block-group.is-style-card:hover > .wp-block-image img {
	transform: scale(1.05);
}

.wp-block-group.is-style-card :where(h2, h3) {
	font-size: 18px;
	font-weight: 700;
}

.wp-block-group.is-style-card > :where(h2, h3) + p {
	margin-top: 10px;
}

.wp-block-group.is-style-card > p {
	font-weight: 500;
}

.wp-block-group.is-style-card > .wp-block-buttons {
	margin-top: 20px;
}

.wp-block-group.is-style-photo-card {
	background: var(--wp--preset--color--dark-blue);
	border-radius: 30px;
	box-sizing: border-box;
	color: #fff;
	display: flex;
	flex-direction: column;
	isolation: isolate;
	justify-content: flex-end;
	min-height: 492px;
	overflow: hidden;
	padding: 16px;
	position: relative;
}

.wp-block-group.is-style-photo-card > * {
	margin-block: 0;
}

.wp-block-group.is-style-photo-card > .wp-block-image {
	inset: 0;
	position: absolute;
	z-index: -2;
}

.wp-block-group.is-style-photo-card > .wp-block-image img {
	border-radius: 0;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
	width: 100%;
}

.wp-block-group.is-style-photo-card:hover > .wp-block-image img {
	transform: scale(1.05);
}

.wp-block-group.is-style-photo-card::before {
	background: linear-gradient(to bottom, rgba(13, 13, 113, 0), var(--wp--preset--color--dark-blue));
	content: "";
	inset: 0;
	position: absolute;
	z-index: -1;
}

.wp-block-group.is-style-photo-card :where(p, h2, h3) {
	color: #fff;
}

.wp-block-group.is-style-photo-card > p {
	font-size: 18px;
	font-weight: 700;
}

.wp-block-group.is-style-photo-card > :where(h2, h3) {
	font-size: 28px;
	font-weight: 700;
}

.wp-block-group.is-style-photo-card > .wp-block-buttons {
	margin-top: 10px;
}

@media (max-width: 47.99em) {
	.wp-block-group[class*="is-style-info-"] {
		padding: 20px;
	}

	.wp-block-accordion-panel,
	.wp-block-details > :not(summary) {
		padding-inline: 10px;
	}
}

/* Titre « display » des sections d'accueil : premier mot en gras noir, suite en maigre */
.wp-block-heading.is-style-display {
	color: #151576;
	font-size: 38px;
	font-weight: 400;
	line-height: 50px;
}

.wp-block-heading.is-style-display strong {
	font-weight: 900;
}

/* Liste de liens (Liens utiles) */
.wp-block-list.is-style-links {
	list-style: none;
	padding: 0;
}

.wp-block-list.is-style-links li {
	border-bottom: 1px solid var(--wp--preset--color--light-purple-500);
	margin: 0;
}

.wp-block-list.is-style-links a {
	align-items: center;
	display: flex;
	font-weight: 700;
	gap: 10px;
	min-height: 67px;
	text-decoration: none;
}

.wp-block-list.is-style-links a::before {
	background: currentColor;
	content: "";
	flex: none;
	height: 20px;
	-webkit-mask: url(../icons/chevron-right.svg) center / contain no-repeat;
	mask: url(../icons/chevron-right.svg) center / contain no-repeat;
	transition: translate 0.2s;
	width: 20px;
}

.wp-block-list.is-style-links a:hover::before {
	translate: 4px 0;
}

/* Petit bouton blanc (36 px) */
.wp-block-button.is-style-pill .wp-block-button__link {
	background: #fff;
	color: var(--wp--preset--color--dark-blue);
	font-size: 14px;
	padding: 8.5px 20px;
}

.wp-block-button.is-style-pill .wp-block-button__link:hover {
	background: var(--wp--preset--color--dark-blue);
	color: #fff;
}

@media (max-width: 47.99em) {
	.wp-block-heading.is-style-display {
		font-size: 28px;
		line-height: 36px;
	}
}
