/* Pages de texte (mentions légales, confidentialité, cookies, FAQ, CGV, pages de la newsletter…) : sobres, sans couleur, colonne de lecture centrée ; en-tête centré, intertitres et texte alignés à gauche, questions dépliables. Mobile d'abord ; ruptures 768 / 1024 px. */

.page-texte,
.page-texte * {
	box-sizing: border-box;
}

body .page-texte * {
	margin-block: 0;
}

.page-texte {
	--page-texte-largeur: calc(1280px + 2 * var(--wp--preset--spacing--gouttiere));
	overflow-x: clip;
	padding-bottom: 64px;
	color: var(--wp--preset--color--texte);
}

.page-texte__entete,
.page-texte__contenu {
	width: 100%;
	max-width: var(--page-texte-largeur);
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--gouttiere);
}

/* Titre centré. */
.page-texte__entete {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding-top: 20px;
	padding-bottom: 28px;
	text-align: center;
}

.page-texte__entete > * {
	max-width: 760px;
}

.page-texte .page-texte__ariane .fil-ariane {
	height: auto;
	margin-block: -13px;
	justify-content: center;
	padding: 0;
	font-size: 13px;
}

body .page-texte .page-texte__titre {
	font-size: var(--wp--preset--font-size--titre-page);
	overflow-wrap: break-word;
	text-wrap: balance;
}

/* Contenu : colonne de lecture centrée dans la page. */
.page-texte__contenu {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	font-size: var(--wp--preset--font-size--texte);
	line-height: 1.7;
}

.page-texte__contenu > * {
	width: 100%;
	max-width: 760px;
}

.page-texte__contenu :is(h2, h3, [id]) {
	scroll-margin-top: 120px;
}

body .page-texte__contenu h2 {
	margin-top: 32px;
	padding-top: 32px;
	border-top: 1px solid var(--wp--custom--couleur--bordure);
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: clamp(24px, 1.2vw + 18px, 32px);
	font-weight: 400;
	line-height: 1.2;
}

body .page-texte__contenu > h2:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

body .page-texte__contenu h3 {
	margin-top: 12px;
	font-family: var(--wp--preset--font-family--dm-sans);
	font-size: var(--wp--preset--font-size--grand);
	font-weight: 600;
	line-height: 1.4;
}

.page-texte__contenu p,
.page-texte__contenu li {
	color: var(--wp--preset--color--texte-secondaire);
}

.page-texte__contenu strong {
	color: var(--wp--preset--color--texte);
	font-weight: 600;
}

.page-texte__contenu :is(ul, ol) {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-left: 22px;
}

.page-texte__contenu a {
	color: var(--wp--preset--color--texte);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	overflow-wrap: anywhere;
}

.page-texte__contenu a:hover {
	text-decoration-thickness: 2px;
}

.page-texte a:focus-visible,
.page-texte summary:focus-visible {
	outline: 2px solid var(--wp--preset--color--texte);
	outline-offset: 3px;
}

/* Chapeau (premier paragraphe) et date de mise à jour, centrés sous le titre. */
.page-texte__contenu > p:first-child {
	color: var(--wp--preset--color--texte);
	font-size: var(--wp--preset--font-size--grand);
	line-height: 1.6;
	text-align: center;
	text-wrap: pretty;
}

.page-texte__contenu .page-texte__maj {
	color: var(--wp--preset--color--texte-secondaire);
	font-size: var(--wp--preset--font-size--petit);
	text-align: center;
}

/* Page courte tout centrée (confirmation d'inscription à la newsletter). */
.page-texte__contenu .page-texte__centre {
	justify-content: center;
	text-align: center;
}

/* Boutons (ex. « Modifier mes choix ») : contour noir, sans couleur. */
.page-texte__contenu .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	border: 1.5px solid var(--wp--preset--color--texte);
	background: transparent;
	color: var(--wp--preset--color--texte);
	text-decoration: none;
}

.page-texte__contenu .wp-block-button__link:hover {
	background: var(--wp--preset--color--texte);
	color: var(--wp--preset--color--blanc);
}

/* Tableaux (liste des cookies) : défilement horizontal dans leur cadre sur mobile, jamais la page. */
.page-texte__contenu .wp-block-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.page-texte__contenu table {
	width: 100%;
	min-width: 520px;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--discret);
	line-height: 1.5;
}

.page-texte__contenu :is(th, td) {
	padding: 10px 12px;
	border: 0;
	border-bottom: 1px solid var(--wp--custom--couleur--bordure);
	text-align: left;
	vertical-align: top;
}

.page-texte__contenu th {
	color: var(--wp--preset--color--texte);
	font-weight: 600;
}

.page-texte__contenu td {
	color: var(--wp--preset--color--texte-secondaire);
}

/* Questions dépliables (bloc Détails). */
.page-texte__contenu .wp-block-details {
	border-bottom: 1px solid var(--wp--custom--couleur--bordure);
}

.page-texte__contenu .wp-block-details + .wp-block-details {
	margin-top: -16px;
}

.page-texte__contenu .wp-block-details summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 56px;
	padding-block: 14px;
	color: var(--wp--preset--color--texte);
	font-weight: 600;
	line-height: 1.4;
	list-style: none;
	cursor: pointer;
}

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

.page-texte__contenu .wp-block-details summary::after {
	content: "";
	flex: none;
	width: 20px;
	height: 20px;
	background: currentColor;
	-webkit-mask: url(../images/icones/chevron-bas.svg) center / contain no-repeat;
	mask: url(../images/icones/chevron-bas.svg) center / contain no-repeat;
	transition: transform var(--wp--custom--transition--douce);
}

.page-texte__contenu .wp-block-details[open] summary::after {
	transform: rotate(180deg);
}

.page-texte__contenu .wp-block-details > :not(summary) {
	padding-bottom: 16px;
}

.page-texte__contenu .wp-block-details > :not(summary) + :not(summary) {
	margin-top: -6px;
}

@media (min-width: 768px) {
	.page-texte {
		padding-bottom: 96px;
	}

	.page-texte__entete {
		padding-top: 28px;
		padding-bottom: 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.page-texte__contenu .wp-block-details summary::after {
		transition: none;
	}
}

/* FAQ : la ligne sous la dernière question sert de séparation, pas de second filet avant la rubrique suivante. */
body .page-texte__contenu .wp-block-details + h2 {
	margin-top: 40px;
	padding-top: 0;
	border-top: 0;
}
