/*
Theme Name: Atelier Moni
Theme URI: https://atelier-moni.fr/
Author: Atelier Moni
Description: Thème coloré pour mettre en valeur les tableaux : fiches qui relient une sortie récente (film, livre) à l’œuvre qui l’a inspirée. À utiliser avec le plugin « Atelier Moni – Fiches ».
Version: 1.3.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: atelier-moni
*/

/* ---------------------------------------------------------------
   Variables
--------------------------------------------------------------- */
:root {
	/* Palette reprise du site d’origine : pétrole du logo, orange des titres, bleu acier du coup de pinceau. */
	--paper: #f4f7f8;
	--white: #ffffff;
	--ink: #0b2a36;
	--muted: #44585f;
	--petrol: #113b48;
	--petrol-deep: #0b2a36;
	--amber: #ffa705;
	--clay: #d4651f;
	--steel: #5e8e9e;
	--mist: #dbe7ea;
	--serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--wrap: 76rem;
	--read: 42rem;
}

/* ---------------------------------------------------------------
   Base
--------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.125rem;
	line-height: 1.7;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--petrol); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }

h1, h2, h3, h4 {
	font-family: var(--serif);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.015em;
	margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1.1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.screen-reader-text,
.skip-link:not(:focus) {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 200;
	padding: 0.6rem 1rem;
	background: var(--ink);
	color: var(--white);
}

.btn {
	display: inline-block;
	padding: 0.85rem 1.6rem;
	border: 2px solid var(--ink);
	background: var(--amber);
	color: var(--ink);
	font-weight: 700;
	font-size: 1.02rem;
	text-decoration: none;
	line-height: 1.2;
	box-shadow: 0.25rem 0.25rem 0 var(--ink);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:hover {
	background: var(--amber);
	color: var(--ink);
	transform: translate(0.12rem, 0.12rem);
	box-shadow: 0.1rem 0.1rem 0 var(--ink);
}

.btn--plain { background: var(--white); }
.btn--plain:hover { background: var(--white); }

/* ---------------------------------------------------------------
   En-tête
--------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--white);
	border-bottom: 3px solid var(--ink);
}

.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.site-header__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding-block: 0.6rem;
}

.site-title {
	font-family: var(--serif);
	font-size: 1.7rem;
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
}

/* Le logo est contenu pour ne pas écraser le menu. */
.custom-logo-link { display: block; flex: none; line-height: 0; }
.custom-logo { width: auto; height: auto; max-height: 4.2rem; max-width: 12rem; }

.site-nav ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.2rem 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Menu déroulant « Les fiches » */
.site-nav .has-dropdown { display: flex; align-items: center; }
.site-nav .has-dropdown > a { padding-right: 0.3rem; }

.dropdown-toggle {
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	margin-left: -0.2rem;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.dropdown-toggle::after {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	margin-top: -0.2rem;
	border: solid currentColor;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	transition: transform 0.15s ease;
}

.dropdown-toggle[aria-expanded="true"]::after { margin-top: 0.2rem; transform: rotate(225deg); }
.dropdown-toggle:hover { background: var(--mist); }

.site-nav .has-dropdown.current-menu-item > .dropdown-toggle { color: var(--white); }

.dropdown {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 60;
	padding: 1.6rem 0 1.8rem;
	background: var(--white);
	border-bottom: 3px solid var(--ink);
	box-shadow: 0 1.2rem 1.6rem -1rem rgba(11, 42, 54, 0.35);
}

/* Pont invisible : le menu reste ouvert quand la souris descend vers lui. */
.dropdown::before { content: ""; position: absolute; left: 0; right: 0; top: -1.2rem; height: 1.2rem; }

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown,
.has-dropdown.is-open > .dropdown { display: block; }

.dropdown__cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
	gap: 1.6rem 2rem;
}

.dropdown__title {
	margin: 0 0 0.5rem;
	padding-bottom: 0.4rem;
	border-bottom: 3px solid var(--amber);
	font-family: var(--serif);
	font-size: 1.15rem;
	font-weight: 700;
}

.site-nav .dropdown ul { display: block; margin: 0; padding: 0; }
.site-nav .dropdown li { margin: 0; }

.site-nav .dropdown a {
	display: block;
	padding: 0.3rem 0.5rem;
	margin-left: -0.5rem;
	border-radius: 0.4rem;
	font-weight: 500;
	font-size: 1rem;
	background: transparent;
	color: var(--ink);
}

.site-nav .dropdown a:hover { background: var(--mist); color: var(--ink); }

.dropdown__all {
	display: inline-block;
	margin-top: 1.4rem;
	font-weight: 700;
}

.site-nav a {
	display: block;
	padding: 0.45rem 0.9rem;
	color: var(--ink);
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
	border-radius: 2rem;
}

.site-nav a:hover { background: var(--mist); }

.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
	background: var(--petrol);
	color: var(--white);
}

.nav-toggle {
	display: none;
	padding: 0.5rem 1.1rem;
	border: 2px solid var(--ink);
	background: var(--amber);
	color: var(--ink);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

@media (max-width: 860px) {
	.nav-toggle { display: inline-block; }
	.site-header__row { flex-wrap: wrap; }
	.site-nav { display: none; width: 100%; }
	.site-nav.is-open { display: block; padding-bottom: 0.6rem; }
	.site-nav ul { flex-direction: column; align-items: stretch; }
	.site-nav a { border-radius: 0.4rem; padding: 0.7rem 0.9rem; }

	.site-nav .has-dropdown { flex-wrap: wrap; }
	.site-nav .has-dropdown > a { flex: 1; }
	.dropdown-toggle { width: 2.6rem; height: 2.6rem; }
	.dropdown {
		position: static;
		width: 100%;
		padding: 0.6rem 0.9rem 1rem;
		border: 0;
		border-left: 4px solid var(--amber);
		box-shadow: none;
		background: var(--mist);
		border-radius: 0 0.4rem 0.4rem 0;
	}
	.dropdown::before { display: none; }
	.has-dropdown:hover > .dropdown,
	.has-dropdown:focus-within > .dropdown { display: none; }
	.has-dropdown.is-open > .dropdown { display: block; }
	.dropdown__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
}

/* ---------------------------------------------------------------
   Enchaînement : sortie récente, tableau, technique
--------------------------------------------------------------- */
.chain { list-style: none; margin: 0; padding: 0; }

.chain li { position: relative; padding: 0 0 1.6rem 2.4rem; }
.chain li:last-child { padding-bottom: 0; }

.chain li::before {
	content: "";
	position: absolute;
	left: 0.1rem;
	top: 0.35rem;
	width: 1.05rem;
	height: 1.05rem;
	border: 2px solid var(--ink);
	border-radius: 50%;
	background: var(--amber);
}

.chain li:nth-child(2)::before { background: var(--clay); }
.chain li:nth-child(3)::before { background: var(--steel); }

.chain li::after {
	content: "";
	position: absolute;
	left: calc(0.1rem + 0.525rem);
	top: 1.5rem;
	bottom: 0.1rem;
	width: 2px;
	background: var(--ink);
}

.chain li:last-child::after { display: none; }

.chain__label {
	display: block;
	margin: 0 0 0.1rem;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--muted);
}

.chain__main { margin: 0; font-family: var(--serif); font-size: 1.4rem; font-weight: 700; line-height: 1.25; }
.chain__sub { margin: 0.2rem 0 0; color: var(--muted); font-size: 1rem; }
.chain a { color: inherit; }

/* ---------------------------------------------------------------
   Accueil : bandeau d'ouverture
--------------------------------------------------------------- */
.hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(3rem, 8vw, 6.5rem);
	background: var(--petrol);
	color: var(--white);
	border-bottom: 3px solid var(--ink);
}

.hero__strokes {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.hero__grid {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	gap: clamp(2rem, 6vw, 5rem);
	align-items: center;
}

.hero h1 { margin-bottom: 0.45em; color: var(--white); }

.hero__lede {
	max-width: 36rem;
	font-size: clamp(1.15rem, 2vw, 1.35rem);
	color: #d7e6ea;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.8rem; }

.hero .btn { box-shadow: 0.25rem 0.25rem 0 var(--ink); }

.hero__card {
	padding: clamp(1.5rem, 3vw, 2.4rem);
	background: var(--white);
	color: var(--ink);
	border: 3px solid var(--ink);
	box-shadow: 0.7rem 0.7rem 0 var(--amber), 0.7rem 0.7rem 0 3px var(--ink);
}

.hero__card h2 { margin-bottom: 1.2rem; font-size: 1.15rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0; }

@media (max-width: 860px) {
	.hero__grid { grid-template-columns: 1fr; }
	.hero__card { box-shadow: 0.45rem 0.45rem 0 var(--amber), 0.45rem 0.45rem 0 3px var(--ink); }
}

/* ---------------------------------------------------------------
   Sections d'accueil
--------------------------------------------------------------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }

.section--mist { background: var(--mist); border-block: 3px solid var(--ink); }
.section--amber { background: var(--amber); border-block: 3px solid var(--ink); }
.section--ink { background: var(--ink); color: var(--white); }

.section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.6rem 2rem;
	margin-bottom: 2rem;
}

.section__head h2 { margin: 0; }

.section__intro { max-width: var(--read); margin: 0.6rem 0 0; color: var(--muted); font-size: 1.15rem; }

.steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.step {
	position: relative;
	padding: 2rem 1.6rem 1.8rem;
	border: 3px solid var(--ink);
	box-shadow: 0.4rem 0.4rem 0 var(--ink);
}

.step:nth-child(1) { background: var(--amber); }
.step:nth-child(2) { background: var(--steel); color: var(--ink); }
.step:nth-child(3) { background: var(--petrol); color: var(--white); }

.step__n {
	display: grid;
	place-items: center;
	width: 2.6rem;
	height: 2.6rem;
	margin-bottom: 1rem;
	border: 3px solid var(--ink);
	border-radius: 50%;
	background: var(--white);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.3rem;
	font-weight: 700;
}

.step h3 { margin-bottom: 0.4rem; }
.step p { margin: 0; font-size: 1.05rem; }

.split {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 2rem;
}

.panel {
	padding: clamp(1.4rem, 3vw, 2.2rem);
	background: var(--white);
	border: 3px solid var(--ink);
	box-shadow: 0.4rem 0.4rem 0 var(--ink);
}

.panel h3 { font-size: 1.6rem; }
.panel p { color: var(--muted); }

.notice { margin: 1.2rem 0 0; font-size: 0.95rem; color: var(--muted); }

.studio {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 1.5rem 3rem;
	align-items: center;
}

.studio h2 { color: var(--white); }
.studio p { max-width: 40rem; margin: 0; color: #cfe0e5; font-size: 1.15rem; }

@media (max-width: 820px) {
	.split { grid-template-columns: 1fr; }
	.studio { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   Cartes et archives
--------------------------------------------------------------- */
.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
	gap: 2.2rem 1.8rem;
}

.card { background: var(--white); border: 3px solid var(--ink); box-shadow: 0.4rem 0.4rem 0 var(--ink); transition: transform 0.12s ease, box-shadow 0.12s ease; }
.card:hover { transform: translate(0.15rem, 0.15rem); box-shadow: 0.2rem 0.2rem 0 var(--ink); }

.card__link { display: block; color: inherit; text-decoration: none; }

.card__media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--mist); border-bottom: 3px solid var(--ink); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }

.card__placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(140deg, var(--petrol) 0 38%, var(--clay) 38% 62%, var(--amber) 62%); }
.card__placeholder--b { background: linear-gradient(140deg, var(--steel) 0 40%, var(--amber) 40% 66%, var(--petrol) 66%); }

.card__body { padding: 1rem 1.2rem 1.3rem; }

.card__kind {
	display: inline-block;
	margin: 0 0 0.5rem;
	padding: 0.1rem 0.7rem;
	background: var(--amber);
	border: 2px solid var(--ink);
	border-radius: 2rem;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.5;
}

.card__title { margin: 0 0 0.5rem; font-size: 1.45rem; }
.card__link:hover .card__title, .card__link:focus-visible .card__title { color: var(--petrol); }
.card__meta { margin: 0 0 0.2rem; color: var(--muted); font-size: 1rem; line-height: 1.5; }

.card--demo { cursor: default; }
.card--demo:hover { transform: none; box-shadow: 0.4rem 0.4rem 0 var(--ink); }

.preview-note {
	margin: 0 0 1.6rem;
	padding: 0.8rem 1.1rem;
	background: var(--white);
	border: 2px dashed var(--ink);
	font-size: 1rem;
}

.page-head { padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; }
.page-head p { max-width: var(--read); color: var(--muted); font-size: 1.2rem; }

.filters { margin-bottom: 2.4rem; padding: 1.2rem 1.4rem; background: var(--white); border: 3px solid var(--ink); }
.filters__group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.5rem 0; }
.filters__name { min-width: 7rem; font-weight: 700; }

.filters a {
	padding: 0.25rem 0.95rem;
	border: 2px solid var(--ink);
	border-radius: 2rem;
	color: var(--ink);
	font-size: 1rem;
	text-decoration: none;
	background: var(--white);
}

.filters a:hover { background: var(--mist); }
.filters a[aria-current="true"] { background: var(--petrol); border-color: var(--ink); color: var(--white); }

.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pagination .page-numbers { padding: 0.35rem 1rem; border: 2px solid var(--ink); color: var(--ink); text-decoration: none; background: var(--white); }
.pagination .page-numbers.current { background: var(--ink); color: var(--white); }

.empty { padding: 2rem; border: 3px dashed var(--ink); background: var(--white); }

/* ---------------------------------------------------------------
   Fiche détaillée
--------------------------------------------------------------- */
.fiche-page { padding-block: clamp(2rem, 5vw, 3.5rem) 3rem; }

.fiche__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
}

.fiche__tableau { margin: 0; position: sticky; top: 6rem; }
.fiche__tableau img { width: 100%; border: 3px solid var(--ink); box-shadow: 0.5rem 0.5rem 0 var(--clay), 0.5rem 0.5rem 0 3px var(--ink); background: var(--white); }
.fiche__tableau figcaption { margin-top: 1.2rem; color: var(--muted); font-size: 0.98rem; line-height: 1.5; }

.fiche__kind {
	display: inline-block;
	margin: 0 0 0.8rem;
	padding: 0.1rem 0.8rem;
	background: var(--amber);
	border: 2px solid var(--ink);
	border-radius: 2rem;
	font-size: 0.95rem;
	font-weight: 700;
}

.fiche__lede { font-family: var(--serif); font-size: 1.3rem; line-height: 1.5; color: var(--muted); }

.fiche-page .chain { margin: 2rem 0; padding: 1.6rem 1.5rem; background: var(--white); border: 3px solid var(--ink); box-shadow: 0.4rem 0.4rem 0 var(--ink); }

.fiche__block { margin-top: 2.8rem; }
.fiche__block h2 { font-size: 1.8rem; }

.entry { max-width: var(--read); }
.entry > * { max-width: 100%; }
.entry h2, .entry h3 { margin-top: 1.8em; }

.pistes { margin: 0; padding-left: 1.2rem; }
.pistes li { margin-bottom: 0.7rem; padding-left: 0.3rem; }
.pistes li::marker { color: var(--clay); }

.ressources { padding: 1.6rem; background: var(--amber); border: 3px solid var(--ink); box-shadow: 0.4rem 0.4rem 0 var(--ink); }
.ressources h2 { margin-top: 0; }
.ressources ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.ressources a:not(.btn) { color: var(--ink); font-weight: 600; }
.ressources .btn { background: var(--white); }
.ressources__notice { margin: 1rem 0 0; color: var(--ink); font-size: 0.95rem; }

@media (max-width: 900px) {
	.fiche__grid { grid-template-columns: 1fr; }
	.fiche__tableau { position: static; }
}

/* ---------------------------------------------------------------
   Pages et articles
--------------------------------------------------------------- */
.article { padding-block: clamp(2.5rem, 6vw, 4rem) 4rem; }
.article .entry { margin-inline: auto; }
.article__head { max-width: var(--read); margin: 0 auto 2rem; }

/* Bandeau de titre des pages internes */
.page-hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(2.2rem, 6vw, 4.5rem);
	background-color: var(--petrol);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 300' preserveAspectRatio='xMidYMid slice'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M-40 250 C200 150 360 300 620 220 S980 140 1260 210' stroke='%23ffa705' stroke-width='34' opacity='.9'/%3E%3Cpath d='M-40 292 C220 220 400 320 660 262 S1000 190 1260 250' stroke='%23d4651f' stroke-width='22' opacity='.9'/%3E%3Cpath d='M820 -10 C880 60 980 20 1040 90 S1160 120 1250 60' stroke='%235e8e9e' stroke-width='28' opacity='.85'/%3E%3C/g%3E%3Ccircle cx='1090' cy='60' r='24' fill='%23ffa705'/%3E%3C/svg%3E");
	background-size: cover;
	background-position: center;
	color: var(--white);
	border-bottom: 3px solid var(--ink);
}

.page-hero h1 { margin: 0; max-width: 20ch; font-size: clamp(2.2rem, 5.5vw, 3.8rem); color: var(--white); }
.page-hero__meta { margin: 0.8rem 0 0; color: #d7e6ea; }

/* Corps des pages : pleine largeur, texte courant à largeur de lecture */
.page-body { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.page-body .entry { max-width: none; }

.page-body .entry > p,
.page-body .entry > ul,
.page-body .entry > ol,
.page-body .entry > h2,
.page-body .entry > h3,
.page-body .entry > h4,
.page-body .entry > blockquote { max-width: var(--read); }

.page-body .entry > .alignwide,
.page-body .entry > .alignfull { max-width: none; }

/* Les blocs de contenu (colonnes, images, formulaires) occupent toute la largeur. */
.page-body .entry > div,
.page-body .entry > figure,
.page-body .entry > section,
.page-body .entry > form { max-width: none; width: 100%; }

.page-body .entry img { max-width: 100%; height: auto; }

.page-body .entry .wp-block-columns { gap: 2rem; }

@media (max-width: 781px) {
	.page-body .entry .wp-block-columns { flex-wrap: wrap; }
	.page-body .entry .wp-block-column { flex-basis: 100% !important; }
}

/* Galerie : colonnes qui s’adaptent, tableaux affichés sans recadrage.
   Les règles couvrent la galerie de WordPress et celle de Kadence. */
.page-body .wp-block-gallery,
.page-body .blocks-gallery-grid,
.page-body .kb-gallery-ul,
.page-body .gallery {
	display: block !important;
	columns: 16rem 4;
	column-gap: 1.4rem;
	margin: 2rem 0 0 !important;
	padding: 0 !important;
	list-style: none;
}

.page-body .wp-block-gallery .wp-block-image,
.page-body .wp-block-gallery figure,
.page-body .blocks-gallery-item,
.page-body .kb-gallery-item,
.page-body .gallery-item {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 0 1.4rem !important;
	padding: 0 !important;
	break-inside: avoid;
	list-style: none;
}

.page-body .wp-block-gallery img,
.page-body .blocks-gallery-item img,
.page-body .kb-gallery-item img,
.page-body .gallery img {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: auto !important;
	border: 3px solid var(--ink);
	border-radius: 0 !important;
	box-shadow: 0.3rem 0.3rem 0 var(--ink);
	transition: transform 0.12s ease;
}

.page-body .wp-block-gallery a:hover img,
.page-body .kb-gallery-item a:hover img { transform: translate(0.1rem, 0.1rem); }

/* Boutons et champs de formulaire dans le contenu */
.page-body .wp-block-button__link,
.page-body input[type="submit"],
.page-body button[type="submit"] {
	padding: 0.85rem 1.6rem;
	border: 2px solid var(--ink);
	border-radius: 0;
	background: var(--amber);
	color: var(--ink);
	font-weight: 700;
	box-shadow: 0.25rem 0.25rem 0 var(--ink);
	cursor: pointer;
}

.page-body input[type="text"],
.page-body input[type="email"],
.page-body input[type="tel"],
.page-body textarea,
.page-body select {
	width: 100%;
	max-width: 100%;
	padding: 0.7rem 0.9rem;
	border: 2px solid var(--ink);
	border-radius: 0;
	background: var(--white);
	font: inherit;
}

/* ---------------------------------------------------------------
   Pied de page
--------------------------------------------------------------- */
.site-footer { padding-block: 2.2rem; background: var(--ink); color: var(--white); border-top: 3px solid var(--amber); }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--amber); }
.site-footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin: 0; padding: 0; list-style: none; }
.site-footer p { margin: 0; }

/* ---------------------------------------------------------------
   Mouvement réduit
--------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------
   Thèmes : tuiles, puces, navigation entre fiches
--------------------------------------------------------------- */
.tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
	gap: 1.2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tile {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 7.5rem;
	padding: 1.1rem 1.2rem;
	border: 3px solid var(--ink);
	box-shadow: 0.35rem 0.35rem 0 var(--ink);
	color: var(--ink);
	text-decoration: none;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.tile:hover { color: var(--ink); transform: translate(0.12rem, 0.12rem); box-shadow: 0.15rem 0.15rem 0 var(--ink); }

.tiles li:nth-child(4n+1) .tile { background: var(--amber); }
.tiles li:nth-child(4n+2) .tile { background: var(--steel); }
.tiles li:nth-child(4n+3) .tile { background: var(--white); }
.tiles li:nth-child(4n+4) .tile { background: var(--mist); }

.tile__name { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.tile__count { margin-top: 0.6rem; font-size: 0.95rem; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }

.chip {
	display: inline-block;
	padding: 0.15rem 0.85rem;
	border: 2px solid var(--ink);
	border-radius: 2rem;
	background: var(--white);
	color: var(--ink);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
}

.chip:hover { background: var(--mist); color: var(--ink); }
.chip--fiche_theme { background: var(--amber); }
.chip--fiche_theme:hover { background: var(--amber); text-decoration: underline; }
.chip--fiche_technique { background: var(--petrol); color: var(--white); }
.chip--fiche_technique:hover { background: var(--petrol); color: var(--white); text-decoration: underline; }

.fiche-nav { padding-block: 2rem; }

.fiche-nav__row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.2rem;
	align-items: stretch;
}

.fiche-nav a {
	display: block;
	height: 100%;
	padding: 1rem 1.2rem;
	background: var(--white);
	border: 3px solid var(--ink);
	color: var(--ink);
	text-decoration: none;
}

.fiche-nav a:hover { background: var(--mist); }
.fiche-nav__label { display: block; font-size: 0.92rem; font-weight: 600; color: var(--muted); }
.fiche-nav__title { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.fiche-nav__next { text-align: right; }
.fiche-nav__all { display: grid; place-items: center; text-align: center; background: var(--amber) !important; font-weight: 700; }

@media (max-width: 760px) {
	.fiche-nav__row { grid-template-columns: 1fr; }
	.fiche-nav__next { text-align: left; }
}

/* Fiche sans image : cadre coloré avec le titre du tableau */
.fiche__placeholder {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 0.3rem;
	aspect-ratio: 4 / 5;
	padding: 1.6rem;
	border: 3px solid var(--ink);
	box-shadow: 0.5rem 0.5rem 0 var(--clay), 0.5rem 0.5rem 0 3px var(--ink);
	background: linear-gradient(140deg, var(--petrol) 0 42%, var(--steel) 42% 66%, var(--amber) 66%);
	color: var(--white);
}

.fiche__placeholder-title { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; line-height: 1.15; text-shadow: 0 1px 0 rgba(11, 42, 54, 0.6); }
.fiche__placeholder-artist { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.fiche__hint { margin: 1.2rem 0 0; padding: 0.6rem 0.8rem; border: 2px dashed var(--ink); background: var(--white); font-size: 0.92rem; }

.site-title { white-space: nowrap; }
.fiche-nav a.fiche-nav__all { display: grid; place-items: center; text-align: center; background: var(--amber); font-weight: 700; }
.fiche-nav a.fiche-nav__all:hover { background: var(--amber); text-decoration: underline; }

/* Espace sous les listes (archives, thèmes) avant le pied de page */
main > .wrap:not(.page-body) { padding-bottom: 4rem; }
