/**
 * Styles custom Socialter (front + éditeur).
 */

/**
 * Citation en exergue (core/pullquote) — Figma 4814:66491.
 * Trait gauche 3,5px, padding 48px, texte Exergue 26px / cite Note 13px.
 */
figure.wp-block-pullquote {
	box-sizing: border-box;
	border: none;
	border-left: 3.5px solid var(--Accent-fonc, var(--wp--preset--color--primary-alt-accent, #00264d));
	margin-block: var(--wp--preset--spacing--x-large, 3rem);
	padding: var(--space-48, var(--wp--preset--spacing--x-large, 3rem)) !important;
	text-align: left;
	color: var(--Accent-fonc, var(--wp--preset--color--primary-alt-accent, #00264d));
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif);
}

figure.wp-block-pullquote::before,
figure.wp-block-pullquote::after,
figure.wp-block-pullquote blockquote::before,
figure.wp-block-pullquote blockquote::after {
	content: none;
	display: none;
}

figure.wp-block-pullquote blockquote {
	display: flex;
	flex-direction: column;
	gap: var(--space-12, 12px);
	margin: 0;
	max-width: none;
	padding: 0;
	border: none;
}

figure.wp-block-pullquote blockquote,
figure.wp-block-pullquote p,
figure.wp-block-pullquote cite {
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif);
}

figure.wp-block-pullquote p {
	margin: 0;
	color: inherit;
	font-size: var(--wp--preset--font-size--exergue, 1.625rem);
	font-weight: 500;
	line-height: 1.26;
	letter-spacing: 0;
}

figure.wp-block-pullquote cite {
	display: block;
	margin: 0;
	font-size: var(--wp--preset--font-size--note, 0.8125rem); /* 13px */
	font-weight: 400;
	font-style: normal;
	line-height: 1.1;
	letter-spacing: 0;
	color: inherit;
}

@media (max-width: 781px) {
	figure.wp-block-pullquote {
		margin-block: var(--wp--preset--spacing--medium, 1.5rem);
		padding: var(--wp--preset--spacing--medium, 1.5rem) !important;
	}
}

/**
 * Pastille (à ajouter sur le bloc Étiquettes / Termes, ou un élément unique).
 * Gutenberg : classes CSS supplémentaires → pastille  ou  pastille-bleu
 */
.pastille,
.pastille-bleu {
	background: none;
	padding: 0;
	box-sizing: border-box;
}

.pastille .wp-block-post-terms__separator,
.pastille-bleu .wp-block-post-terms__separator {
	display: none;
}

.pastille a,
.pastille>span,
.pastille>p {
	border-radius: var(--rgulier, 24px);
	background: var(--Gris-moyen, #ECECE9);
	display: inline-flex;
	padding: 6px var(--petit, 12px);
	justify-content: center;
	align-items: center;
	gap: var(--micro, 6px);
	width: fit-content;
	box-sizing: border-box;
	text-decoration: none;
	margin-inline-end: 10px;
	/* Catégorie */
	font-size: 12px;
	font-weight: 600;
	line-height: 110%;
	letter-spacing: 0.36px;
	text-transform: uppercase;
}

.pastille-bleu a,
.pastille-bleu>span,
.pastille-bleu>p {
	border-radius: 0;
	background: var(--Accent-clair, #DDF1FF);
	display: inline-flex;
	padding: var(--micro, 6px) var(--petit, 12px);
	justify-content: center;
	align-items: center;
	gap: var(--micro, 6px);
	width: fit-content;
	box-sizing: border-box;
	text-decoration: none;
	margin-inline-end: 10px;
	/* Catégorie */
	font-size: var(--wp--preset--font-size--x-small, 0.75rem);
	font-weight: 600;
	line-height: 110%;
	letter-spacing: 0.36px;
	text-transform: uppercase;
}

.pastille a:last-of-type,
.pastille>span:last-of-type,
.pastille>p:last-of-type,
.pastille-bleu a:last-of-type,
.pastille-bleu>span:last-of-type,
.pastille-bleu>p:last-of-type {
	margin-inline-end: 0;
}

.pastille:not(:has(a)):not(:has(span)):not(:has(p)) {
	display: inline-flex;
	padding: 6px var(--petit, 12px);
	justify-content: center;
	align-items: center;
	gap: var(--micro, 6px);
	width: fit-content;
	border-radius: var(--rgulier, 24px);
	background: var(--Gris-moyen, #ECECE9);
	font-size: 12px;
	font-weight: 600;
	line-height: 110%;
	letter-spacing: 0.36px;
	text-transform: uppercase;
}

.pastille-bleu:not(:has(a)):not(:has(span)):not(:has(p)) {
	display: inline-flex;
	padding: var(--micro, 6px) var(--petit, 12px);
	justify-content: center;
	align-items: center;
	gap: var(--micro, 6px);
	width: fit-content;
	border-radius: 0;
	background: var(--Accent-clair, #DDF1FF);
	font-size: var(--wp--preset--font-size--x-small, 0.75rem);
	font-weight: 600;
	line-height: 110%;
	letter-spacing: 0.36px;
	text-transform: uppercase;
}

/**
 * Hover bleu : uniquement .is-style-default.pastille cliquable (<a>).
 */
.is-style-default.pastille a {
	transition: background-color 0.15s ease;
}

.is-style-default.pastille a:hover,
.is-style-default.pastille a:focus-visible {
	border-radius: var(--rgulier, 24px);
	background: var(--Accent, #80caff);
}

/**
 * Taxonomie format : label non cliquable + typo Catégorie.
 */
.taxonomy-format,
.taxonomy-format a {
	pointer-events: none;
	cursor: default;
	text-decoration: none;
	/* Catégorie */
	font-size: 12px;
	font-weight: 600;
	line-height: 110%;
	letter-spacing: 0.36px;
	text-transform: uppercase;
}

/**
 * Pleine largeur (alignfull) : toute la largeur, sans plafond 79rem.
 * Contenu (39rem) et Grande largeur (59rem) restent ceux de theme.json.
 * Header / footer : pleine largeur, gouttières Figma.
 */
body {
	--stl-pad: var(--stl-gutter);
}

.alignfull,
.is-layout-constrained>.alignfull {
	width: 100%;
	max-width: none;
	margin-left: auto !important;
	margin-right: auto !important;
}

.stl-header,
.stl-footer {
	max-width: none !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

/**
 * Éditeur Gutenberg (iframe) : pleine largeur dans le canvas,
 * sans débordement (évite la partie coupée à droite).
 */
.editor-styles-wrapper {
	box-sizing: border-box;
	max-width: 100% !important;
	overflow-x: auto;
}

.editor-styles-wrapper .is-root-container,
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container,
.editor-styles-wrapper .wp-block-post-content,
.editor-styles-wrapper .block-editor-writing-flow {
	box-sizing: border-box;
	max-width: 100% !important;
	width: 100%;
	min-width: 0;
}

.editor-styles-wrapper .is-root-container>.wp-block,
.editor-styles-wrapper .is-root-container.is-layout-constrained> :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	box-sizing: border-box;
	max-width: 100%;
	width: 100%;
	min-width: 0;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.editor-styles-wrapper .alignfull,
.editor-styles-wrapper .is-layout-constrained>.alignfull {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.editor-styles-wrapper .wp-block-columns {
	max-width: 100%;
	min-width: 0;
}

/**
 * Accordéon core : + / croix remplacés par plus.svg (fermé) et moins.svg (ouvert).
 */
.wp-block-accordion-heading__toggle-icon {
	display: inline-block;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	overflow: hidden;
	font-size: 0;
	line-height: 0;
	color: transparent;
	background-image: url("../svg/plus.svg");
	background-repeat: no-repeat;
	background-position: center;
	transform: none !important;
}

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

.wp-block-accordion-heading__toggle[aria-expanded="true"] .wp-block-accordion-heading__toggle-icon {
	background-image: url("../svg/moins.svg");
}

/**
 * Largeur fixe desktop : stl-w-957
 * (mobile / tablette : largeur inchangée)
 */
@media (min-width: 782px) {
	.stl-w-957 {
		width: 957px;
		max-width: 100%;
	}
}

/**
 * Bouton « Voir les détails » (Figma 4205:38053).
 * Classe à poser sur l’accordéon, l’élément ou le titre : stl-voir-details
 */
.stl-voir-details .wp-block-accordion-heading__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	margin: 0;
	padding: 6px 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	box-shadow: none;
	color: var(--wp--preset--color--primary-alt-accent, #00264d);
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif);
	font-size: var(--wp--preset--font-size--chapo-petit, 1.0625rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.01em;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.stl-voir-details .wp-block-accordion-heading__toggle:hover,
.stl-voir-details .wp-block-accordion-heading__toggle:focus {
	background: transparent;
	color: var(--wp--preset--color--primary-alt-accent, #00264d);
	box-shadow: none;
}

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

.stl-voir-details .wp-block-accordion-heading__toggle-title {
	flex: 0 0 auto;
}

.stl-voir-details .wp-block-accordion-heading__toggle-icon {
	width: 24px;
	height: 24px;
	background-image: url("../svg/chevrons-down.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 24px 24px;
}

.stl-voir-details .wp-block-accordion-heading__toggle[aria-expanded="true"] .wp-block-accordion-heading__toggle-icon,
.stl-voir-details .wp-block-accordion-item.is-open>.wp-block-accordion-heading .wp-block-accordion-heading__toggle-icon {
	background-image: url("../svg/chevrons-up.svg");
}

/**
 * Dégradé « Personnalité » des sommaires (variable CSS posée sur l’archive).
 * Optionnel : classe `stl-personnalite-fond` sur un groupe.
 * Préférer le bloc Champ ACF (champ personnalite, contexte terme) dans l’en-tête.
 */
.stl-personnalite-fond {
	background-image: var(--stl-personnalite-gradient,
			linear-gradient(180deg, #6aa7dd 2.68%, #aaecfe 37.3%, #fffde5 74.73%, #ffffff 100%));
	background-repeat: no-repeat;
	background-size: 100% 100%;
}

/**
 * Encart numéro dans un article (Figma 2089:8654 / 4814:66479).
 * Classe à poser sur le bloc Colonnes : stl-numero-article
 */

@media (max-width: 781px) {
	.wp-block-columns.stl-numero-article:not(.is-not-stacked-on-mobile) {
		flex-wrap: nowrap !important;
		flex-direction: row !important;
		padding: 0px 18px;
		gap: 24px;
	}

	.wp-block-columns.stl-numero-article:not(.is-not-stacked-on-mobile)>.wp-block-column {
		flex-wrap: nowrap;
	}

	.wp-block-columns.stl-numero-article:not(.is-not-stacked-on-mobile)>.wp-block-column:first-child {
		flex: 0 0 98px !important;
		flex-basis: 98px !important;
		width: 98px !important;
	}

	.wp-block-columns.stl-numero-article:not(.is-not-stacked-on-mobile)>.wp-block-column:last-child {
		flex: 1 1 auto !important;
		flex-basis: 0 !important;
		width: auto !important;
	}
}

/* Surbrillance de la sélection de texte : Accent clair. */
::selection {
	background-color: var(--wp--preset--color--primary-accent, #ddf1ff);
	color: var(--wp--preset--color--primary-alt-accent, #00264d);
}

/**
 * Cartes d’offres : même hauteur dans une rangée de colonnes.
 * Classe à poser sur le bloc Colonnes : stl-offres
 */
.wp-block-columns.stl-offres {
	align-items: stretch;
}

.wp-block-socialter-vues-abonnement .wp-block-columns.stl-offres {
	margin-bottom: 0;
}

.wp-block-columns.stl-offres>.wp-block-column {
	display: flex;
	flex-direction: column;
	align-self: stretch;
}

.wp-block-columns.stl-offres>.wp-block-column>.wp-block-group.has-border-color {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	box-sizing: border-box;
	width: 100%;
	height: auto;
}

.wp-block-columns.stl-offres>.wp-block-column>.wp-block-group.has-border-color>p:last-child {
	margin-top: auto;
}

/**
 * Cartes de même hauteur, contenu centré.
 * Classe à poser sur le bloc Colonnes : stl-cartes-egales
 */
.wp-block-columns.stl-cartes-egales {
	align-items: stretch;
}

.wp-block-columns.stl-cartes-egales>.wp-block-column {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-self: stretch;
	box-sizing: border-box;
	height: auto;
}

.wp-block-columns.stl-cartes-egales>.wp-block-column>.wp-block-group.is-horizontal {
	align-items: center;
	width: 100%;
}

.wp-site-blocks>* {
	margin-block-start: 0;
}

/**
 * Corps des articles : Literata 18px, interligne 155 %, Accent foncé.
 * Le bloc Paragraphe reste en Rethink Sans 16px en dehors des articles.
 * Exclus (sans changer la spécificité, grâce à :where) : les blocs du compte et un groupe de
 * classe « socialter-compte » (page Mon compte construite dans le contenu de la page).
 */
.wp-block-post-content,
.wp-block-post-content p:not(.wp-block-socialter-legende-image-une):where(:not(:is(.socialter-compte, .socialter-mon-abonnement, .socialter-mdp-oublie-block, .socialter-nl-compte) p)),
.wp-block-post-content .wp-block-paragraph:not(.wp-block-socialter-legende-image-une):where(:not(:is(.socialter-compte, .socialter-mon-abonnement, .socialter-mdp-oublie-block, .socialter-nl-compte) .wp-block-paragraph)) {
	color: var(--wp--preset--color--primary-alt-accent, #00264d);
	font-family: var(--wp--preset--font-family--secondary, Literata, Georgia, serif);
	font-size: var(--wp--preset--font-size--base, 1.125rem);
	font-style: normal;
	font-weight: 400;
	line-height: 1.55;
	letter-spacing: 0;
}

/**
 * En-tête sommaire : description (évite :root :where(p) sur les <p> internes).
 */
.wp-block-socialter-entete-sommaire .esh-desc,
.wp-block-socialter-entete-sommaire .esh-desc p {
	color: var(--wp--preset--color--primary-alt-accent, #00264d) !important;
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif) !important;
	font-size: 1.25rem !important;
	font-style: normal;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	letter-spacing: 0.01em;
}

.wp-block-socialter-entete-sommaire p.esh-date {
	color: var(--wp--preset--color--primary-alt-accent, #00264d) !important;
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif) !important;
	font-size: 0.75rem !important;
	font-weight: 600 !important;
	line-height: 1.1 !important;
	letter-spacing: 0.36px;
	text-transform: uppercase;
}

@media (max-width: 781px) {
	.wp-block-socialter-entete-sommaire .esh-desc,
	.wp-block-socialter-entete-sommaire .esh-desc p {
		font-size: 1.1875rem !important;
	}
}

/**
 * Extraits des boucles : Chapô-petit (évite :root :where(p) et Corps édito Literata).
 * Markup en <div> ; règles renforcées au cas où.
 */
.ah-card__excerpt,
.ba-item__excerpt,
.bss-item__excerpt,
.t4a-item__excerpt,
.ala-item__excerpt,
.socialter-search-result-excerpt {
	color: var(--Accent-fonc, #00264d) !important;
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif) !important;
	font-size: var(--wp--preset--font-size--chapo-petit, 1.0625rem) !important; /* 17px */
	font-style: normal;
	font-weight: var(--wp--custom--font-weight--book, 470) !important;
	line-height: 140% !important;
	letter-spacing: 0;
}

/* Exergue : Rethink Sans (écrase le Corps édito Literata sur le <p> interne). */
.wp-block-post-content .wp-block-pullquote,
.wp-block-post-content .wp-block-pullquote blockquote,
.wp-block-post-content .wp-block-pullquote p,
.wp-block-post-content .wp-block-pullquote cite {
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif) !important;
}

/* Bloc auteur article : Rethink Sans (hors Corps édito Literata / :root :where(p)). */
.wp-block-socialter-auteur-article,
.wp-block-socialter-auteur-article .aa-kicker,
.wp-block-socialter-auteur-article .aa-name,
.wp-block-socialter-auteur-article .aa-desc,
.wp-block-socialter-auteur-article .aa-desc p,
.wp-block-socialter-auteur-article .aa-link {
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif) !important;
}

.wp-block-socialter-auteur-article .aa-kicker {
	font-size: var(--wp--preset--font-size--note, 0.8125rem) !important;
	font-weight: 400 !important;
	line-height: 1.1 !important;
	letter-spacing: 0;
	color: var(--wp--preset--color--secondary, #565656) !important;
}

.wp-block-socialter-auteur-article .aa-name {
	color: var(--Accent-fonc, #00264d) !important;
	text-align: right;
	font-size: 26px !important;
	font-style: normal;
	font-weight: 800 !important;
	line-height: 120% !important;
	letter-spacing: 0.26px;
}

.wp-block-socialter-auteur-article .aa-desc,
.wp-block-socialter-auteur-article .aa-desc p,
.wp-block-socialter-auteur-article .aa-link {
	font-size: var(--wp--preset--font-size--small, 1rem) !important;
	line-height: 1.4 !important;
	letter-spacing: 0.16px;
	color: var(--Accent-fonc, #00264d) !important;
}

.wp-block-socialter-auteur-article .aa-link {
	display: block;
	font-weight: 700 !important;
}

/* Crédits article : Note 13px Gris foncé (hors :root :where(p) / Corps édito). */
.wp-block-socialter-credits-article,
.wp-block-socialter-credits-article .credits-article__name,
.wp-block-socialter-credits-article time {
	color: var(--Gris-fonc, var(--wp--preset--color--secondary, #565656)) !important;
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif) !important;
	font-size: var(--wp--preset--font-size--note, 0.8125rem) !important;
	font-style: normal;
	line-height: 1.1 !important;
	letter-spacing: 0;
}

.wp-block-socialter-credits-article .credits-article__name {
	font-weight: 700 !important;
}

.wp-block-post-content .wp-block-pullquote p {
	font-size: var(--wp--preset--font-size--exergue, 1.625rem);
	font-weight: 500;
	line-height: 1.26;
	letter-spacing: 0;
}

/**
 * Légende image à la une : Note 13px, hors Corps édito.
 */
.wp-block-post-content p.wp-block-socialter-legende-image-une,
p.wp-block-socialter-legende-image-une {
	color: var(--wp--preset--color--secondary, #565656);
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif);
	font-size: 0.8125rem;
	font-style: normal;
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: 0;
	text-align: center;
	margin-top: 12px;
}

/**
 * Trait bas (bordure) : 12px d’écart sous le contenu.
 */
.bottom-trait {
	padding-bottom: 12px;
	border-bottom: 5px solid var(--Accent-fonc, #00264d);
}


.page-template-mon-compte {
	.has-global-padding {
		padding-left: 0;
		padding-right: 0;
	}
}

/**
 * Mon compte (maquette Figma 5249:49417) : tout en Rethink Sans, même quand la page est construite
 * dans son contenu (sinon le champ e-mail et les textes des blocs héritent de Literata).
 */
.wp-block-post-content :is(.socialter-compte, .socialter-mon-abonnement, .socialter-mdp-oublie-block, .socialter-nl-compte) {
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif);
	font-size: var(--wp--preset--font-size--small, 1rem);
	line-height: var(--wp--custom--line-height--body, 1.4);
	letter-spacing: 0.01em;
}

/*
 * Champ e-mail du mot de passe oublié : padding 12px, rayon 6px, Corps sans. Sélecteur renforcé :
 * la règle des champs d'Ollie (input:not([type="submit"]):not([type="radio"])) est plus forte que
 * celle du bloc et rendait le champ plus compact. La bordure reste réglée par le bloc.
 */
.socialter-mdp-oublie-block input.socialter-mdp-oublie-input:not([type="submit"]) {
	padding: 0.75rem;
	border-radius: var(--wp--preset--border-radius--sm, 0.375rem);
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif);
	font-size: var(--wp--preset--font-size--small, 1rem);
	line-height: var(--wp--custom--line-height--body, 1.4);
	letter-spacing: 0.01em;
	color: var(--wp--preset--color--primary-alt-accent, #00264d);
}

/* Note « Ces informations viennent du service abonnements »: style Note (13px, interligne 1,1). */
.socialter-mon-abonnement p.socialter-mon-abonnement__note {
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif);
	font-size: var(--wp--preset--font-size--note, 0.8125rem);
	line-height: 1.1;
	letter-spacing: 0;
}

/*
 * Statut sans abonnement (maquette Figma 5245:48769) : pastille sans fond, bordure 0,5px Accent foncé,
 * texte Noir bleuté. Classes posées d'après le statut Mahalo : is-aucun (00), is-echu (03, pas encore
 * dessiné : même pastille en attendant).
 */
.socialter-mon-abonnement .socialter-mon-abonnement__statut:is(.is-aucun, .is-echu),
.socialter-mon-abonnement .socialter-mon-abonnement__statut:not(.is-actif, .is-alerte) {
	border: 0.03125rem solid var(--wp--preset--color--primary-alt-accent, #00264d);
	background-color: transparent;
	color: #100033;
}

/* Newsletters : messages d'état (aucune newsletter, erreur) en Corps sans, comme le nom d'une newsletter. */
.socialter-nl-compte :is(.socialter-nl-compte__vide, .socialter-nl-compte__info-message) {
	padding: 0;
	font-family: var(--wp--preset--font-family--primary, "Rethink Sans", ui-sans-serif, system-ui, sans-serif);
	font-size: var(--wp--preset--font-size--small, 1rem);
	line-height: var(--wp--custom--line-height--body, 1.4);
	letter-spacing: 0.01em;
	color: var(--wp--preset--color--primary-alt-accent, #00264d);
}