/*
 * Règles de contenu de Deft 2027.
 * Chargé sur le site et dans l'éditeur.
 * Chaque bloc renvoie à une règle de docs/regles-design-validees.md (R1, R6…).
 * Valeurs reconstituées d'après le carnet de Deftly, à comparer à l'export réel du CSS additionnel.
 */

/* ---------------------------------------------------------------------------
 * R1 — Mesure du texte : seul le texte est resserré, les médias gardent la largeur du contenu.
 * ------------------------------------------------------------------------- */
/*
 * « 72ch » se calcule avec la police de chaque bloc : un H2 sortait plus large que le texte,
 * un H4 plus étroit. La propriété enregistrée (@property, type <length>) fige la mesure en
 * pixels au niveau du contenu, d'après la taille du texte courant : tout s'aligne sur le même bord.
 */
@property --deft-measure {
	syntax: "<length>";
	inherits: true;
	/* px obligatoire : une valeur initiale relative (em, rem) invalide toute la règle. */
	initial-value: 736px;
}

.wp-block-post-content {
	--deft-measure: 72ch;
}

.wp-block-post-content > :where(p, ul, ol, h2, h3, h4, h5, h6, blockquote, .wp-block-quote) {
	max-width: var(--deft-measure);
	margin-left: auto;
	margin-right: auto;
}

/* ---------------------------------------------------------------------------
 * R8 — Liens éditoriaux visibles.
 * ------------------------------------------------------------------------- */
:where(.wp-block-post-content, .editor-styles-wrapper) :where(p, li, figcaption) a {
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

/* ---------------------------------------------------------------------------
 * En-tête compact, le même partout (décision de Julien, 20/11/2026) :
 * archives, recherche, articles, pages, boutique, panier, commande.
 * Une seule échelle de titre (40 à 76 px), définie ici une fois.
 * ------------------------------------------------------------------------- */
:root {
	--deft-titre-page: clamp(2.5rem, 1.6rem + 3.2vw, 4.75rem);
}

.deft-page-title,
.deft-archive-entete .wp-block-query-title {
	font-size: var(--deft-titre-page);
	line-height: 0.95;
	text-wrap: balance;
	overflow-wrap: break-word;
}

.deft-page-title {
	margin-bottom: var(--wp--preset--spacing--40);
}

/* Surtitre collé au titre qui le suit, partout (articles, panier, commande, 404). */
main > .deft-eyebrow:first-child,
main > .wp-block-post-terms.deft-eyebrow:first-child {
	margin-bottom: 0;
}

main > .deft-eyebrow:first-child + * {
	margin-block-start: 0.4rem !important;
}

/* Pages sans surtitre : la place est réservée (ligne vide) pour que le titre tombe au même endroit partout. */
.deft-eyebrow-vide {
	user-select: none;
}

/* ---------------------------------------------------------------------------
 * Barre d'en-tête : la ligne qui ferme l'en-tête, partout.
 * Archives : bascule et années. Articles : date. Pages : la ligne seule.
 * ------------------------------------------------------------------------- */
.deft-archive-barre,
.deft-entete-barre {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-block: 0 var(--wp--preset--spacing--40) !important;
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--border);
}

.deft-entete-barre:empty {
	padding-top: 0;
}

.deft-entete-barre > * {
	margin: 0;
}

/* ---------------------------------------------------------------------------
 * R6 — En-tête d'article : titre à gauche, date à droite, alignée sur la première ligne du titre.
 * La ligne (.deft-entete-barre) suit, vide.
 * ------------------------------------------------------------------------- */
/*
 * Même échelle que les autres en-têtes (--deft-titre-page).
 * Le titre se réduit si son mot le plus long ne tient pas dans la colonne :
 * --deft-mot (nombre de lettres, posé par functions.php) × 0,8 em environ par lettre en Unbounded gras.
 */
.deft-single-head {
	--deft-titre: var(--deft-titre-page);
	align-items: flex-start;
	margin-bottom: var(--wp--preset--spacing--40) !important;
}

.deft-single-head > .wp-block-column:first-child {
	container-type: inline-size;
}

.deft-single-head .wp-block-post-title {
	margin: 0;
	font-size: max(1.75rem, min(var(--deft-titre), calc(100cqi / (var(--deft-mot, 8) * 0.8))));
	line-height: 0.95;
	text-wrap: balance;
	overflow-wrap: break-word;
}

/* Titre de plus de 28 caractères : échelle « Titre » (36 à 64 px). */
.deft-single-head:has(.deft-titre-long) {
	--deft-titre: clamp(2.25rem, 1.8rem + 1.83vw, 4rem);
}

.deft-single-head .wp-block-post-date {
	margin: 0;
	line-height: calc(var(--deft-titre) * 0.95);
	text-align: right;
}

@media (max-width: 781px) {
	/* Valeurs du CSS additionnel en ligne, export du 20/11/2026. */
	.deft-single-head .wp-block-post-date {
		line-height: 1.2;
		text-align: left;
	}
}

/* ---------------------------------------------------------------------------
 * Légendes : un peu d'air sous l'image.
 * ------------------------------------------------------------------------- */
:where(.wp-block-image, .wp-block-video, .wp-block-gallery) .wp-element-caption {
	margin-top: 0.5rem;
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
 * R9 — Galerie masonry.
 * Même spécificité que la règle du cœur (:not(#individual-image)) pour éviter !important.
 * Les anciennes classes is-style-masonry / is-masonry-2 restent prises en charge.
 * ------------------------------------------------------------------------- */
.wp-block-gallery.is-style-deft-masonry,
.wp-block-gallery.is-style-masonry {
	display: block;
	columns: 2;
	column-gap: 1.5rem;
}

.wp-block-gallery.has-nested-images:is(.is-style-deft-masonry, .is-style-masonry) figure.wp-block-image:not(#individual-image) {
	width: 100%;
	margin: 0 0 2rem;
	break-inside: avoid;
}

.wp-block-gallery:is(.is-style-deft-masonry, .is-style-masonry) img {
	display: block;
	width: 100%;
	height: auto;
}

@media (max-width: 600px) {
	.wp-block-gallery.is-style-deft-masonry,
	.wp-block-gallery.is-style-masonry {
		columns: 1;
	}

	.wp-block-gallery.has-nested-images:is(.is-style-deft-masonry, .is-style-masonry) figure.wp-block-image:not(#individual-image) {
		margin-bottom: 1rem;
	}
}

/* ---------------------------------------------------------------------------
 * Style de liste « Fiche technique » (deft-fiche).
 * Fonctionne sur les listes existantes « Lieu : Gerzat », sans balisage particulier.
 * ------------------------------------------------------------------------- */
.wp-block-list.is-style-deft-fiche,
ul.is-style-deft-fiche {
	list-style: none;
	padding-left: 0;
	border-top: 1px solid var(--wp--preset--color--border);
	font-size: var(--wp--preset--font-size--small);
}

.is-style-deft-fiche > li {
	padding: 0.6rem 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.is-style-deft-fiche > li strong {
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--muted);
}

/* ---------------------------------------------------------------------------
 * Formulaires du contenu : Contact Form 7 (Contact, Devis), bloc Recherche
 * placé dans une page, tout champ saisi par le visiteur. Relevé à la recette
 * du 20/11/2026 : ces champs restaient blancs sur le fond sombre.
 * ------------------------------------------------------------------------- */
.wp-block-post-content :is(input:is([type="text"], [type="email"], [type="tel"], [type="url"], [type="number"], [type="search"], [type="password"], [type="date"]), textarea, select),
.wp-block-post-content .wp-block-search__input {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--foreground);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 2px;
	padding: 0.7em 0.9em;
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
	max-width: 100%;
	box-sizing: border-box; /* sinon width: 100% + padding fait déborder sur mobile (recette 0.11) */
}

.wp-block-post-content :is(input, textarea, select):focus {
	border-color: var(--wp--preset--color--accent);
	outline: none;
}

.wp-block-post-content ::placeholder {
	color: var(--wp--preset--color--muted);
	opacity: 1;
}

.wp-block-post-content .wpcf7-form label {
	display: block;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--meta);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.wp-block-post-content .wpcf7-form :is(input:not([type="checkbox"], [type="radio"], [type="submit"]), textarea, select) {
	display: block;
	width: 100%;
	margin-top: 0.4rem;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
}

.wp-block-post-content :is(.wpcf7-submit, input[type="submit"]) {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	border: 1px solid var(--wp--preset--color--accent);
	border-radius: 2px;
	padding: 0.8em 1.6em;
	font-size: var(--wp--preset--font-size--meta);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}

.wp-block-post-content :is(.wpcf7-submit, input[type="submit"]):is(:hover, :focus-visible) {
	background: var(--wp--preset--color--foreground);
	border-color: var(--wp--preset--color--foreground);
	color: var(--wp--preset--color--background);
}

.wp-block-post-content .wpcf7-response-output {
	border-color: var(--wp--preset--color--border) !important;
	border-radius: 2px;
	color: var(--wp--preset--color--foreground);
}

.wp-block-post-content .wpcf7-not-valid-tip {
	color: var(--wp--preset--color--accent);
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-post-content .wp-block-search__button {
	background: transparent;
	color: var(--wp--preset--color--foreground);
	border: 1px solid var(--wp--preset--color--foreground);
	border-radius: 2px;
}

/*
 * Complianz : bandeau de cookies aux couleurs du site.
 * Recette du 20/11/2026 : fond blanc réglé dans l'extension, mais titre et boutons
 * de catégories héritaient du texte clair du thème → illisibles. On donne aux
 * variables de Complianz les jetons de la palette (elles suivent donc les variantes).
 */
.cmplz-cookiebanner,
#cmplz-manage-consent {
	--cmplz_banner_background_color: var(--wp--preset--color--surface);
	--cmplz_banner_border_color: var(--wp--preset--color--border);
	--cmplz_banner_border_width: 1px;
	--cmplz_banner_border_radius: 2px;
	--cmplz_text_color: var(--wp--preset--color--foreground);
	--cmplz_hyperlink_color: var(--wp--preset--color--foreground);
	--cmplz_button_accept_background_color: var(--wp--preset--color--accent);
	--cmplz_button_accept_border_color: var(--wp--preset--color--accent);
	--cmplz_button_accept_text_color: var(--wp--preset--color--on-accent);
	--cmplz_button_deny_background_color: transparent;
	--cmplz_button_deny_border_color: var(--wp--preset--color--foreground);
	--cmplz_button_deny_text_color: var(--wp--preset--color--foreground);
	--cmplz_button_settings_background_color: transparent;
	--cmplz_button_settings_border_color: var(--wp--preset--color--border);
	--cmplz_button_settings_text_color: var(--wp--preset--color--foreground);
	--cmplz_button_border_radius: 2px;
	--cmplz_slider_active_color: var(--wp--preset--color--accent);
	--cmplz_slider_inactive_color: var(--wp--preset--color--border);
	--cmplz_slider_bullet_color: var(--wp--preset--color--foreground);
	--cmplz_category_header_always_active_color: var(--wp--preset--color--muted);
	color: var(--wp--preset--color--foreground);
	font-family: var(--wp--preset--font-family--body);
}

.cmplz-cookiebanner :is(.cmplz-title, .cmplz-category-title, .cmplz-category-toggle, .cmplz-description, .cmplz-message, .cmplz-close) {
	color: var(--wp--preset--color--foreground);
}

.cmplz-cookiebanner .cmplz-category {
	background: var(--wp--preset--color--background) !important;
	border-color: var(--wp--preset--color--border) !important;
}

.cmplz-cookiebanner .cmplz-links a {
	text-decoration-color: var(--wp--preset--color--accent);
}

/* Complianz : tableaux de services de la politique de cookies. */
.wp-block-post-content :is(.cmplz-dropdown, .cmplz-service-header, .cmplz-service-desc, .cmplz-dropdown summary, .cmplz-dropdown details, .cookies-per-purpose, .cookies-per-purpose *, .cmplz-category, .cmplz-category-header, .cmplz-category-title, .cmplz-description) {
	background: var(--wp--preset--color--surface) !important;
	color: var(--wp--preset--color--foreground) !important;
	border-color: var(--wp--preset--color--border) !important;
}

/* ---------------------------------------------------------------------------
 * Formulaire de recherche (recherche, 404).
 * ------------------------------------------------------------------------- */
.deft-search-form {
	max-width: 36rem;
}

.deft-search-form .wp-block-search__input {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--foreground);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 2px;
	padding: 0.7em 0.9em;
}

.deft-search-form .wp-block-search__button {
	background: transparent;
	color: var(--wp--preset--color--foreground);
	border: 1px solid var(--wp--preset--color--foreground);
	border-radius: 2px;
	font-size: var(--wp--preset--font-size--meta);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.deft-search-form .wp-block-search__button:hover {
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}

/* ---------------------------------------------------------------------------
 * Tableau « Registre » (deft-registre) : expositions, chronologies.
 * Même esprit que l'affichage Registre des archives.
 * ------------------------------------------------------------------------- */
.wp-block-table.is-style-deft-registre table {
	width: 100%;
	border-collapse: collapse;
	border-top: 1px solid var(--wp--preset--color--foreground);
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-table.is-style-deft-registre :is(th, td) {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: 10px 12px 10px 0;
	text-align: left;
	vertical-align: baseline;
}

.wp-block-table.is-style-deft-registre thead {
	border: 0;
}

.wp-block-table.is-style-deft-registre th {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--meta);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Première colonne : l'année, en chasse fixe. */
.wp-block-table.is-style-deft-registre td:first-child {
	width: 4.5rem;
	font-family: var(--wp--preset--font-family--monospace);
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--muted);
}

/* Deuxième colonne : le titre, en caractère d'affiche. */
.wp-block-table.is-style-deft-registre td:nth-child(2) {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 600;
	font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem);
	line-height: 1.15;
}

.wp-block-table.is-style-deft-registre td:nth-child(n + 3) {
	color: var(--wp--preset--color--muted);
}

.wp-block-table.is-style-deft-registre tbody tr:hover td {
	background: var(--wp--preset--color--surface);
}

.wp-block-table.is-style-deft-registre a {
	text-decoration-color: var(--wp--preset--color--accent);
}

@media (max-width: 600px) {
	.wp-block-table.is-style-deft-registre thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}

	.wp-block-table.is-style-deft-registre tr {
		display: grid;
		grid-template-columns: 3.5rem minmax(0, 1fr);
		gap: 0 12px;
		padding: 10px 0;
		border-bottom: 1px solid var(--wp--preset--color--border);
	}

	.wp-block-table.is-style-deft-registre td {
		border: 0;
		padding: 0;
		width: auto;
	}

	.wp-block-table.is-style-deft-registre td:first-child {
		grid-row: 1 / span 3;
	}

	.wp-block-table.is-style-deft-registre td:nth-child(n + 2) {
		grid-column: 2;
	}
}

/* ---------------------------------------------------------------------------
 * Page À propos (templates/page-deft-one.html, handoff/a-propos-blocs.html).
 * ------------------------------------------------------------------------- */
.deft-apropos-hero {
	align-items: end;
	margin-bottom: var(--wp--preset--spacing--60);
}

.deft-apropos-hero .wp-block-image img {
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: 2px;
}

.deft-apropos-name {
	margin: 0;
	font-size: clamp(3.5rem, 2rem + 7vw, 9rem);
	font-weight: 800;
	line-height: 0.9;
	letter-spacing: -0.03em;
}

.deft-apropos-aka {
	margin-top: 0.75rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--meta);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.deft-apropos-suivre .wp-block-social-links {
	margin-block: var(--wp--preset--spacing--30);
}

/* ---------------------------------------------------------------------------
 * Compositions de fiches (patterns/fiche-*.php).
 * ------------------------------------------------------------------------- */
.deft-chapo {
	font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
	line-height: 1.45;
}

.deft-fiche-titre {
	margin-top: var(--wp--preset--spacing--40);
	margin-bottom: 0.75rem;
	color: var(--wp--preset--color--muted);
}

/* Intitulés en colonne fixe quand ils sont en gras : « Lieu   Gerzat ». */
.is-style-deft-fiche > li:has(> strong:first-child) {
	display: grid;
	grid-template-columns: 8.5rem minmax(0, 1fr);
	gap: 12px;
	align-items: baseline;
}

.deft-fiche-colonnes {
	margin-block: var(--wp--preset--spacing--50);
}

/* ---------------------------------------------------------------------------
 * Composition des fiches (0.13.0) : rangées « Photo + texte ».
 * Principe : l'ordre du code est l'ordre du mobile (média, puis texte).
 * Sur ordinateur, le style « inversé » passe seulement le média à droite. Rien n'est dupliqué.
 * Doc : handoff/composition-fiches.md. Chaque règle dit comment revenir en arrière.
 * ------------------------------------------------------------------------- */

/* R1. Rangée : colonnes alignées en haut, un peu d'air autour.
 * Retour arrière : supprimer la règle ; les colonnes reprennent le rendu du cœur (étirées, marges par défaut). */
.wp-block-columns:is(.is-style-deft-duo, .is-style-deft-duo-inverse) {
	align-items: flex-start;
	gap: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	margin-block: var(--wp--preset--spacing--50);
}

/* R2. Inversion, au-dessus du point de rupture du thème seulement (782 px et plus).
 * En dessous, le cœur empile les colonnes dans l'ordre du code : média, puis texte.
 * Retour arrière : supprimer la règle ; le style « inversé » se comporte comme « Photo + texte ». */
@media (min-width: 782px) {
	.wp-block-columns.is-style-deft-duo-inverse {
		flex-direction: row-reverse;
	}
}

/* R3. Le média occupe toute sa colonne (photo, paire de photos, vidéo), sans vignette réduite.
 * Retour arrière : supprimer la règle ; les images gardent leur largeur réglée dans l'éditeur. */
:is(.is-style-deft-duo, .is-style-deft-duo-inverse) > .wp-block-column :is(.wp-block-image, .wp-block-video, .wp-block-gallery) {
	width: 100%;
	margin-inline: 0;
}

:is(.is-style-deft-duo, .is-style-deft-duo-inverse) > .wp-block-column :is(.wp-block-image img, .wp-block-video video) {
	width: 100%;
	height: auto;
}

/* R4. Le texte de la rangée commence au ras du haut de la photo.
 * Retour arrière : supprimer la règle ; le premier paragraphe garde sa marge haute. */
:is(.is-style-deft-duo, .is-style-deft-duo-inverse) > .wp-block-column > :first-child {
	margin-top: 0;
}

/* R5. Fiche technique : un seul format, qui s'adapte à la place disponible.
 * Deux colonnes dès qu'il y a la place pour deux colonnes de 16 rem (fiche seule en bas d'article, sur ordinateur) ;
 * une seule sur téléphone et dans une colonne étroite (fiches pas encore reprises) : aucune régression.
 * Retour arrière : supprimer la règle ; la fiche redevient une liste sur une colonne. */
.wp-block-list.is-style-deft-fiche,
ul.is-style-deft-fiche {
	columns: 2 16rem;
	column-gap: var(--wp--preset--spacing--50);
}

.is-style-deft-fiche > li {
	break-inside: avoid;
}

/* R6. Fiche seule en bas d'article : sur toute la largeur du contenu, alignée sur les rangées photo + texte,
 * plutôt que centrée sur la mesure de lecture (72 ch), ce qui la décalait par rapport aux photos.
 * Retour arrière : supprimer la règle ; la fiche reprend la mesure de lecture, centrée. */
.wp-block-post-content > :is(.is-style-deft-fiche, .deft-fiche-titre) {
	max-width: none;
}

/* ---------------------------------------------------------------------------
 * Bouton « Plein » (style du cœur is-style-fill) : l'action principale, en accent.
 * ------------------------------------------------------------------------- */
.wp-block-button.is-style-fill > .wp-block-button__link {
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
}

.wp-block-button.is-style-fill > .wp-block-button__link:is(:hover, :focus) {
	background: var(--wp--preset--color--foreground);
	border-color: var(--wp--preset--color--foreground);
	color: var(--wp--preset--color--background);
}

/* ---------------------------------------------------------------------------
 * Bouton « Contour » (style du cœur is-style-outline).
 * ------------------------------------------------------------------------- */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	border-color: currentColor;
	color: var(--wp--preset--color--foreground);
}

.wp-block-button.is-style-outline > .wp-block-button__link:is(:hover, :focus) {
	background: var(--wp--preset--color--foreground);
	color: var(--wp--preset--color--background);
}

/* ---------------------------------------------------------------------------
 * Panoramas : les deux blocs de l'extension maison, présents dans 38 articles
 * (inventaire de Deftly, 20/11/2026). Le thème ne remplace pas les extensions,
 * il aligne leur rendu sur ses jetons (fond, filets, accent) et ses largeurs.
 * ------------------------------------------------------------------------- */

/* LFG Panorama (lfg-block-custom/lfg-block-panorama), 30 articles. */
.lfg-panorama-section {
	margin-block: var(--wp--preset--spacing--50);
}

.lfg-panorama-section .blockImg {
	height: clamp(200px, 38vw, 520px);
	max-height: none;
	min-width: 0;
	background-color: var(--wp--preset--color--surface);
	scrollbar-color: var(--wp--preset--color--accent) transparent;
	scrollbar-width: thin;
}

.lfg-panorama-section .blockImg figure {
	margin: 0;
}

/* Panorama Gallery (w0/panorama-gallery), 8 articles. */
.wp-block-w0-panorama-gallery__container {
	margin-block: var(--wp--preset--spacing--50);
}

.wp-block-w0-panorama-gallery__panorama-wrapper {
	background: var(--wp--preset--color--surface);
	border-radius: 0;
	scrollbar-color: var(--wp--preset--color--accent) transparent;
	scrollbar-width: thin;
}

.wp-block-w0-panorama-gallery__image {
	height: clamp(160px, 30vw, 420px);
}

.wp-block-w0-panorama-gallery__minimap {
	background: var(--wp--preset--color--surface);
	border-radius: 0;
	box-shadow: none;
}

.wp-block-w0-panorama-gallery__minimap-viewport {
	border-color: var(--wp--preset--color--accent);
	border-radius: 0;
	box-shadow: none;
}

/* ---------------------------------------------------------------------------
 * Médias : jamais de débordement.
 * ------------------------------------------------------------------------- */
.wp-block-post-content :where(video, iframe) {
	max-width: 100%;
}

.wp-block-post-content video {
	height: auto;
}

/* Visionneuse (image agrandie au clic) : l'image entière, jamais recadrée.
 * WordPress recopie l'object-fit de la vignette (cover dans une galerie recadrée) en style en ligne,
 * d'où le !important. Demande de Deftly du 21/11/2026, vérifiée sur Lempdes. */
.wp-lightbox-overlay .lightbox-image-container img {
	object-fit: contain !important;
}

/* ---------------------------------------------------------------------------
 * Compatibilité avec le contenu écrit pour fulldeft-fse.
 * Relevé sur la base Local du 25/02/2026 (voir docs/etat-des-lieux.md).
 * ------------------------------------------------------------------------- */
.has-extra-small-font-size {
	font-size: var(--wp--preset--font-size--small) !important;
}

/* Ancien dégradé et anciennes couleurs violettes : ramenés à la palette Nuit d'atelier. */
.has-background-quinary-gradient-background {
	background: var(--wp--preset--color--surface) !important;
}

:is(.has-primary-color, .has-secondary-color, .has-tertiary-color) {
	color: var(--wp--preset--color--accent) !important;
}

:is(.has-quaternary-color, .has-quinary-color) {
	color: var(--wp--preset--color--muted) !important;
}

:is(.has-primary-background-color, .has-secondary-background-color, .has-tertiary-background-color) {
	background-color: var(--wp--preset--color--accent) !important;
	color: var(--wp--preset--color--on-accent);
}

:is(.has-quaternary-background-color, .has-quinary-background-color) {
	background-color: var(--wp--preset--color--surface) !important;
}

/* ---------------------------------------------------------------------------
 * Surtitre (rubrique, recherche…).
 * ------------------------------------------------------------------------- */
.deft-eyebrow {
	margin-bottom: 0.5rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--meta);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* Écran seulement : texte lu par les lecteurs d'écran et les moteurs, invisible. */
.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;
}

/* ---------------------------------------------------------------------------
 * Logo : le nom du site en texte (« DEFT ONE »), direction A.
 * Police, graisse, capitales : theme.json (core/site-title). L'ancien logo est dans le pied de page.
 * ------------------------------------------------------------------------- */
.deft-logo {
	margin: 0;
	font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem);
	line-height: 1;
	white-space: nowrap;
}

.deft-logo a {
	color: var(--wp--preset--color--foreground);
	text-decoration: none;
}

.deft-logo a:hover {
	color: var(--wp--preset--color--accent);
}

/* Tablette : le logo en texte est plus large que l'ancien, on resserre le menu pour qu'il tienne sur une ligne. */
@media (min-width: 600px) and (max-width: 1100px) {
	.deft-site-header .wp-block-navigation {
		--navigation-layout-gap: 0.9rem;
		gap: 0.9rem;
		font-size: 0.9375rem;
	}

	.deft-site-header .wp-block-navigation__container {
		gap: 0.9rem;
	}

	.deft-site-header > .wp-block-group {
		gap: var(--wp--preset--spacing--30);
	}
}

/* Tablette (600 à 899 px) : le menu ne tient pas sur une ligne (avec l'entrée « Deft »), on garde le bouton ☰ comme sur mobile. */
@media (min-width: 600px) and (max-width: 899px) {
	.deft-site-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.deft-site-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* ---------------------------------------------------------------------------
 * Brève (modèle single-breve) : texte à gauche, affiche (image de une) à droite.
 * Repris du modèle créé par Deftly sous fulldeft-fse le 20/11/2026. Empilé sous 782 px, texte d'abord.
 * ------------------------------------------------------------------------- */
.deft-breve {
	--deft-titre: var(--deft-titre-page);
	align-items: flex-start;
	gap: var(--wp--preset--spacing--50);
	margin-block-start: 0.4rem !important;
}

.deft-breve-texte {
	container-type: inline-size;
}

.deft-breve-texte > * {
	margin-block: 0;
}

.deft-breve .wp-block-post-title {
	font-size: max(1.75rem, min(var(--deft-titre), calc(100cqi / (var(--deft-mot, 8) * 0.8))));
	line-height: 0.95;
	text-wrap: balance;
	overflow-wrap: break-word;
}

.deft-breve:has(.deft-titre-long) {
	--deft-titre: clamp(2.25rem, 1.8rem + 1.83vw, 4rem);
}

.deft-breve-texte .wp-block-post-date {
	margin-block: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--meta);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.deft-breve-contenu > :first-child {
	margin-top: 0;
}

.deft-breve-affiche .wp-block-post-featured-image {
	margin: 0;
}

.deft-breve-affiche .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---------------------------------------------------------------------------
 * reCAPTCHA : badge flottant masqué, mention sous le formulaire à la place (functions.php).
 * visibility et non display : avec display: none, reCAPTCHA peut ne plus fonctionner.
 * ------------------------------------------------------------------------- */
.grecaptcha-badge {
	visibility: hidden;
}

.deft-recaptcha-mention {
	margin-top: var(--wp--preset--spacing--30);
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--meta);
	line-height: 1.5;
}

.deft-recaptcha-mention a {
	color: inherit;
}

/* Brève : le surtitre suit la largeur étendue des colonnes (le bloc Termes ne sait pas passer en « large »). */
main > .deft-single-rubrique:has(+ .deft-breve) {
	max-width: var(--wp--style--global--wide-size) !important;
}

/* R7. Intertitres dans les rangées « Photo + texte » : taille « Intertitre » (20 à 24 px) au lieu de « Grand » (24 à 40 px).
 * À côté d'une photo, un H2 en taille pleine concurrençait le titre de la page. Ils restent des H2 (structure, référencement).
 * Retour arrière : supprimer la règle ; les intertitres reprennent la taille des titres de section. */
:is(.is-style-deft-duo, .is-style-deft-duo-inverse) :is(h2, h3) {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.2;
	margin-bottom: 0.75rem;
}

/* R8. Paire de photos dans une rangée (composition « Rangée paire de photos ») : deux photos côte à côte,
 * dans leur format, écart serré. Sur mobile aussi, elles restent côte à côte.
 * Retour arrière : supprimer la règle ; écart de galerie par défaut. */
:is(.is-style-deft-duo, .is-style-deft-duo-inverse) .wp-block-gallery.deft-paire {
	--wp--style--unstable-gallery-gap: 8px;
	gap: 8px;
	align-items: flex-start;
}

/* ---------------------------------------------------------------------------
 * Pagination (archives, recherche, boutique, Fil) : une barre fermée par la ligne du thème,
 * « Page précédente » à gauche, numéros au centre, « Page suivante » à droite.
 * Cibles de 44 px (tactile). Sur mobile : numéros en haut, boutons dessous.
 * ------------------------------------------------------------------------- */
.wp-block-query-pagination.wp-block-query-pagination {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	grid-template-areas: "precedent numeros suivant";
	align-items: center;
	gap: var(--wp--preset--spacing--30);
	margin-top: var(--wp--preset--spacing--60);
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--border);
}

.wp-block-query-pagination-previous {
	grid-area: precedent;
	justify-self: start;
}

.wp-block-query-pagination-next {
	grid-area: suivant;
	justify-self: end;
}

.wp-block-query-pagination-numbers {
	grid-area: numeros;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}

.wp-block-query-pagination :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next) {
	display: inline-flex;
	box-sizing: border-box;
	align-items: center;
	gap: 0.6em;
	min-height: 2.75rem;
	padding: 0 1.1rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 2px;
	color: var(--wp--preset--color--foreground);
	font-size: var(--wp--preset--font-size--meta);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
}

.wp-block-query-pagination .page-numbers {
	display: grid;
	box-sizing: border-box;
	place-items: center;
	min-width: 2.75rem;
	height: 2.75rem;
	padding: 0 0.5rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 2px;
	color: var(--wp--preset--color--foreground);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
}

.wp-block-query-pagination .page-numbers.current {
	background: var(--wp--preset--color--foreground);
	border-color: var(--wp--preset--color--foreground);
	color: var(--wp--preset--color--background);
}

.wp-block-query-pagination .page-numbers.dots {
	min-width: auto;
	border-color: transparent;
	color: var(--wp--preset--color--muted);
}

.wp-block-query-pagination :is(a.page-numbers, .wp-block-query-pagination-previous, .wp-block-query-pagination-next):is(:hover, :focus-visible) {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

@media (max-width: 600px) {
	.wp-block-query-pagination.wp-block-query-pagination {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"numeros numeros"
			"precedent suivant";
	}

	.wp-block-query-pagination :is(.wp-block-query-pagination-previous, .wp-block-query-pagination-next) {
		width: 100%;
		justify-content: center;
		padding: 0 0.6rem;
		gap: 0.4em;
		letter-spacing: 0.04em;
		white-space: nowrap;
	}
}
