/*
Theme Name: Lamalattie
Theme URI: https://lamalattie.com
Author: Pierre Lamalattie
Description: Thème du site de Pierre Lamalattie — peintre, écrivain et critique d'art. Articles sur l'histoire de l'art et la nouvelle peinture figurative, peintures et livres.
Version: 1.0.1
Requires at least: 6.4
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lamalattie
*/

/* ==========================================================================
   Polices (auto-hébergées)
   ========================================================================== */
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 700; font-display: swap;
	src: url(assets/fonts/lora-latin.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 700; font-display: swap;
	src: url(assets/fonts/lora-latin-ext.woff2) format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400 700; font-display: swap;
	src: url(assets/fonts/lora-italic-latin.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400 700; font-display: swap;
	src: url(assets/fonts/lora-italic-latin-ext.woff2) format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400 700; font-display: swap;
	src: url(assets/fonts/montserrat-latin.woff2) format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400 700; font-display: swap;
	src: url(assets/fonts/montserrat-latin-ext.woff2) format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
	--lm-primary: #16303c;
	--lm-text: #6a7276;
	--lm-text-strong: #3f484c;
	--lm-secondary: #54595f;
	--lm-accent: #46a1d0;
	--lm-border: #e4e6e7;
	--lm-bg: #ffffff;
	--lm-bg-soft: #f6f6f4;
	--lm-serif: "Lora", Georgia, "Times New Roman", serif;
	--lm-sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
	--lm-container: 1200px;
	--lm-narrow: 760px;
	--lm-gutter: clamp(16px, 4vw, 40px);
	/* En-tête sticky : hauteur (mise à jour par theme.js) et décalage de la barre d'admin WP */
	--lm-header-h: 84px;
	--lm-sticky-top: 0px;
}
.admin-bar { --lm-sticky-top: 32px; }
@media (max-width: 782px) { .admin-bar { --lm-sticky-top: 46px; } }
@media (max-width: 600px) { .admin-bar { --lm-sticky-top: 0px; } }
/* Calculé sur body (et non :root) pour tenir compte de la classe admin-bar posée sur body */
body { --lm-header-bottom: calc(var(--lm-sticky-top) + var(--lm-header-h)); }

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--lm-bg);
	color: var(--lm-text);
	font-family: var(--lm-serif);
	font-size: 17px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--lm-primary); text-decoration: none; transition: color .2s; }
a:hover, a:focus { color: var(--lm-accent); }
h1, h2, h3, h4, h5, h6 { color: var(--lm-primary); font-family: var(--lm-serif); font-weight: 500; line-height: 1.3; margin: 1.6em 0 .6em; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.12rem; }
p, ul, ol, blockquote, figure, table { margin: 0 0 1.4em; }
hr { border: 0; border-top: 1px solid var(--lm-border); margin: 2.5em 0; }
blockquote {
	margin-left: 0; padding: .4em 0 .4em 1.4em;
	border-left: 3px solid var(--lm-accent);
	font-style: italic; color: var(--lm-text-strong);
}
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
	clip: auto !important; clip-path: none; height: auto; width: auto; display: block;
	top: 5px; left: 5px; z-index: 100000; padding: 12px 20px; background: #fff; color: var(--lm-primary);
}
.lm-container { width: 100%; max-width: var(--lm-container); margin: 0 auto; padding: 0 var(--lm-gutter); }
.lm-narrow { max-width: var(--lm-narrow); }
.lm-label {
	font-family: var(--lm-sans); font-size: .72rem; font-weight: 600;
	letter-spacing: .12em; text-transform: uppercase; color: var(--lm-primary);
}

/* ==========================================================================
   En-tête
   ========================================================================== */
.site-header {
	position: sticky; top: var(--lm-sticky-top); z-index: 50;
	background: #fff; border-bottom: 1px solid var(--lm-border);
	transition: background .25s, box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: 0 2px 16px rgba(22,48,60,.08); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.site-title {
	margin: 0; font-family: var(--lm-sans); font-weight: 600;
	font-size: clamp(1rem, 1.8vw, 1.35rem); letter-spacing: .1em; text-transform: uppercase; line-height: 1.2;
}
.site-title a { color: var(--lm-primary); }
.site-header--overlay {
	position: fixed; top: var(--lm-sticky-top); left: 0; right: 0;
	background: linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,0)); border-bottom: 0;
}
.site-header--overlay:not(.is-scrolled) .site-title a,
.site-header--overlay:not(.is-scrolled) .main-nav > ul > li > a { color: #fff; }
.site-header--overlay:not(.is-scrolled) .main-nav > ul > li > a:hover { color: rgba(255,255,255,.75); }
.site-header--overlay:not(.is-scrolled) .nav-toggle span { background: #fff; }
/* Accueil : une fois le visuel dépassé, l'en-tête redevient opaque */
.site-header--overlay.is-scrolled { background: #fff; border-bottom: 1px solid var(--lm-border); }

.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; gap: 8px 36px; flex-wrap: wrap; }
.main-nav li { position: relative; }
.main-nav a { display: block; font-family: var(--lm-sans); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--lm-text); padding: 8px 0; }
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current_page_parent > a { color: var(--lm-primary); }
.main-nav .sub-menu {
	position: absolute; top: 100%; left: -18px; min-width: 220px;
	background: #fff; box-shadow: 0 10px 30px rgba(22,48,60,.12); padding: 10px 18px;
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .2s;
}
.main-nav .sub-menu a { color: var(--lm-text); padding: 6px 0; }
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-nav .menu-item-has-children > a::after { content: ""; display: inline-block; margin-left: 7px; border: 4px solid transparent; border-top-color: currentColor; vertical-align: 1px; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--lm-primary); margin: 5px 0; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.main-nav {
		position: absolute; top: 100%; left: 0; right: 0; background: #fff;
		box-shadow: 0 12px 24px rgba(22,48,60,.12); display: none; padding: 10px var(--lm-gutter) 20px;
	}
	.nav-open .main-nav { display: block; }
	.main-nav > ul { flex-direction: column; gap: 0; }
	.main-nav > ul > li > a,
	.site-header--overlay:not(.is-scrolled) .main-nav > ul > li > a { color: var(--lm-primary); border-bottom: 1px solid var(--lm-border); }
	.main-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 0 16px; }
	.main-nav .menu-item-has-children > a::after { display: none; }
}

/* ==========================================================================
   Accueil
   ========================================================================== */
.hero {
	position: relative; min-height: min(92vh, 980px);
	background: #1b2328 center / cover no-repeat;
	display: flex; align-items: flex-end;
}
.hero__content { position: relative; color: #fff; padding-bottom: clamp(32px, 8vh, 80px); }
.hero__content p { max-width: 560px; font-size: 1.1rem; margin: 0; text-shadow: 0 1px 12px rgba(0,0,0,.4); }
.home-intro { padding-block: clamp(48px, 8vw, 96px); }
.home-intro__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.home-intro h2 { margin-top: 0; font-family: var(--lm-sans); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 1.15rem; }
@media (max-width: 800px) { .home-intro__grid { grid-template-columns: 1fr; } }
.home-intro + .home-blog { padding-top: 0; }

/* ==========================================================================
   Bandeaux de page
   ========================================================================== */
.page-banner {
	position: relative; min-height: 34vh;
	background: var(--lm-primary) top center / cover no-repeat;
}
.page-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.25), rgba(0,0,0,0) 60%); }
.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--lm-border); margin-bottom: clamp(32px, 5vw, 56px); }
.page-head h1 { margin: .2em 0 .3em; }
.page-head__desc { max-width: 720px; margin: 0; }
.page-head__sub { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 18px; }
.page-head__sub a { font-family: var(--lm-sans); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }

/* Barre "Le Blog" + navigation article */
.blog-bar { position: sticky; top: var(--lm-header-bottom); z-index: 40; background: #fff; border-bottom: 1px solid var(--lm-border); }
.blog-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.blog-bar__title { margin: 0; font-family: var(--lm-sans); font-size: .9rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.blog-bar__nav { display: flex; gap: 20px; font-family: var(--lm-sans); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.blog-bar__nav a { color: var(--lm-text); }
.blog-bar__nav a:hover { color: var(--lm-primary); }
.search-form { display: flex; align-items: center; border: 1px solid var(--lm-border); border-radius: 999px; overflow: hidden; background: #fff; }
.search-form input[type="search"] { border: 0; padding: 7px 14px; font: inherit; font-size: .9rem; color: var(--lm-text-strong); width: 200px; outline: none; background: transparent; }
.search-form button { border: 0; background: none; padding: 0 12px; cursor: pointer; color: var(--lm-primary); display: flex; }
@media (max-width: 640px) {
	.blog-bar { position: static; }
	.blog-bar .search-form { display: none; }
	.name-index__letters { top: var(--lm-header-bottom); }
	.name-index__group { scroll-margin-top: calc(var(--lm-header-bottom) + 74px); }
}

/* ==========================================================================
   Article
   ========================================================================== */
.single-layout {
	display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2.2fr);
	gap: clamp(32px, 6vw, 80px); padding: clamp(40px, 6vw, 72px) 0;
}
.post-aside { font-size: .95rem; }
.post-aside__inner { position: sticky; top: calc(var(--lm-header-bottom) + 90px); }
.post-aside__author { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.post-aside__author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.post-aside__author strong { display: block; color: var(--lm-primary); font-weight: 500; }
.post-aside__block { border-top: 1px solid var(--lm-border); padding: 16px 0; }
.post-aside__block .lm-label { display: block; margin-bottom: 6px; }
.post-aside__terms { margin: 0; padding: 0; list-style: none; }
.post-aside__terms li { display: inline; }
.post-aside__terms li:not(:last-child)::after { content: ", "; }
.post-aside__tags { max-height: 360px; overflow: auto; }

.entry-title { margin-top: 0; }
.entry-meta { font-family: var(--lm-sans); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 28px; }
.entry-content { color: var(--lm-text-strong); }
.entry-content > *:first-child { margin-top: 0; }
.entry-content a { text-decoration: underline; text-decoration-color: rgba(70,161,208,.4); text-underline-offset: 3px; }
.entry-content img { display: block; margin: 0 auto; }
.entry-content figure { margin: 2em 0; }
.entry-content figcaption, .wp-caption-text, .wp-element-caption {
	font-size: .85rem; color: var(--lm-text); text-align: center; font-style: italic; margin-top: .6em; line-height: 1.5;
}
.entry-content .alignleft { float: left; margin: .3em 1.6em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.6em; max-width: 50%; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.entry-content .wp-block-image.aligncenter img, .entry-content .wp-block-image .aligncenter img { margin: 0 auto; }
.entry-content::after { content: ""; display: table; clear: both; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content td, .entry-content th { border: 1px solid var(--lm-border); padding: 8px 12px; }
.wp-block-gallery, .gallery { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-gallery figure, .gallery .gallery-item { flex: 1 1 200px; margin: 0; }

@media (max-width: 860px) {
	.single-layout { grid-template-columns: 1fr; }
	.post-aside { order: 2; }
	.post-aside__inner { position: static; }
	.entry-content .alignleft, .entry-content .alignright { float: none; max-width: 100%; margin: 1.5em auto; }
}

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; border-top: 1px solid var(--lm-border); padding-top: 28px; margin-top: 48px; }
.post-nav a { display: block; }
.post-nav span { display: block; }
.post-nav__next { text-align: right; }

/* ==========================================================================
   Grilles d'articles
   ========================================================================== */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 32px; margin-bottom: 56px; }
@media (max-width: 980px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; }
.card__thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--lm-bg-soft); margin-bottom: 18px; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card__thumb img { transform: scale(1.04); }
.card__thumb--empty { display: flex; align-items: center; justify-content: center; font-family: var(--lm-sans); color: var(--lm-text); letter-spacing: .2em; font-size: .7rem; text-transform: uppercase; }
.card__title { font-size: 1.2rem; margin: 0 0 .5em; }
.card__title a { color: var(--lm-primary); }
.card__title a:hover { color: var(--lm-accent); }
.card__excerpt { font-size: .95rem; margin: 0 0 .8em; }
.card__date { font-family: var(--lm-sans); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--lm-text); margin-top: auto; }

.suggestions { background: var(--lm-bg-soft); padding: clamp(48px, 7vw, 80px) 0 24px; }
.suggestions h2 { margin-top: 0; text-align: center; font-family: var(--lm-sans); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: 1rem; margin-bottom: 40px; }

/* Pagination */
.pagination { margin: 0 0 72px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px;
	border: 1px solid var(--lm-border); font-family: var(--lm-sans); font-size: .85rem; color: var(--lm-text);
}
.pagination .page-numbers.current { background: var(--lm-primary); border-color: var(--lm-primary); color: #fff; }
.pagination .page-numbers.dots { border: 0; }
.pagination a.page-numbers:hover { border-color: var(--lm-primary); color: var(--lm-primary); }

/* Filtres catégories */
.cat-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: -12px 0 44px; padding: 0; list-style: none; }
.cat-filter a {
	display: inline-block; padding: 6px 14px; border: 1px solid var(--lm-border); border-radius: 999px;
	font-family: var(--lm-sans); font-size: .75rem; letter-spacing: .04em; color: var(--lm-text);
}
.cat-filter a:hover, .cat-filter .is-current a { border-color: var(--lm-primary); color: var(--lm-primary); }
.cat-filter .is-current a { background: var(--lm-primary); color: #fff; }

/* Index des noms (tags) */
.name-index__letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 40px; padding: 0; list-style: none; position: sticky; top: calc(var(--lm-header-bottom) + 56px); background: #fff; padding: 10px 0; z-index: 5; }
.name-index__letters a { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--lm-border); font-family: var(--lm-sans); font-size: .8rem; }
.name-index__group { margin-bottom: 36px; scroll-margin-top: calc(var(--lm-header-bottom) + 130px); }
.name-index__group h2 { font-family: var(--lm-sans); font-size: 1.1rem; font-weight: 600; border-bottom: 1px solid var(--lm-border); padding-bottom: 6px; }
.name-index__list { columns: 3 220px; column-gap: 32px; margin: 0; padding: 0; list-style: none; }
.name-index__list li { break-inside: avoid; padding: 2px 0; }
.name-index__list small { color: #9aa1a4; }

/* ==========================================================================
   Peintures
   ========================================================================== */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 14px; padding: 0; list-style: none; font-family: var(--lm-sans); font-size: .75rem; letter-spacing: .04em; }
.breadcrumb li:not(:last-child)::after { content: "›"; margin: 0 10px; color: #b9bec1; }
.breadcrumb a { color: var(--lm-text); }
.breadcrumb a:hover { color: var(--lm-primary); }
.breadcrumb [aria-current] { color: #9aa1a4; }
main > .breadcrumb { padding-top: clamp(24px, 4vw, 40px); }
.page-head__subtitle { margin: 0; font-style: italic; color: var(--lm-text); }

.lm-button {
	display: inline-block; padding: 10px 22px; border: 1px solid var(--lm-primary);
	font-family: var(--lm-sans); font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
	color: var(--lm-primary); transition: background .2s, color .2s;
}
.lm-button:hover, .lm-button:focus { background: var(--lm-primary); color: #fff; }

.section-divider { display: flex; align-items: center; gap: 18px; margin: 0 0 28px; font-family: var(--lm-sans); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.section-divider::before, .section-divider::after { content: ""; flex: 1; border-top: 1px solid var(--lm-border); }

/* Mise en page : textes pour approfondir à gauche */
.paintings-layout { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 3fr); gap: clamp(32px, 6vw, 80px); padding-bottom: clamp(48px, 7vw, 88px); }
.paintings-layout--bottom { border-top: 1px solid var(--lm-border); padding-top: clamp(40px, 6vw, 64px); }
.paintings-layout__aside { font-size: .92rem; }
@media (max-width: 860px) {
	.paintings-layout { grid-template-columns: 1fr; }
	.paintings-layout__aside { order: 2; }
}
.painting-texts { position: sticky; top: calc(var(--lm-header-bottom) + 24px); scroll-margin-top: calc(var(--lm-header-bottom) + 24px); }
.painting-texts__title { display: block; margin: 0 0 12px; }
.painting-texts ul { margin: 0; padding: 0; list-style: none; }
.painting-texts li { border-top: 1px solid var(--lm-border); }
.painting-texts a { display: block; padding: 12px 0; line-height: 1.4; color: var(--lm-primary); }
.painting-texts a:hover span { color: var(--lm-accent); }
.painting-texts small { display: block; margin-top: 3px; font-style: italic; color: #9aa1a4; }
.painting-texts .is-current a { font-weight: 600; }

/* Liste des galeries (/peintures/) */
.gallery-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; padding: 0 0 48px; margin-bottom: 48px; border-bottom: 1px solid var(--lm-border); }
.gallery-row:last-child { border-bottom: 0; margin-bottom: 0; }
.gallery-row__title { margin: 0 0 .3em; }
.gallery-row__subtitle { margin: 0 0 1em; color: var(--lm-accent); }
.gallery-row__excerpt { font-size: .95rem; }
.gallery-row__thumbs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; align-self: start; }
.gallery-row__thumbs a { display: block; aspect-ratio: 1; overflow: hidden; background: var(--lm-bg-soft); }
.gallery-row__thumbs img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-row__thumbs a:hover img { transform: scale(1.04); }
@media (max-width: 980px) { .gallery-row { grid-template-columns: 1fr; } }

/* Grille d'une galerie : proportions des tableaux respectées */
.painting-grid { columns: 3 280px; column-gap: 24px; margin: 0 0 clamp(48px, 7vw, 80px); padding: 0; list-style: none; }
.painting-grid__item { break-inside: avoid; margin-bottom: 24px; }
.painting-grid__item a { display: block; position: relative; overflow: hidden; background: var(--lm-bg-soft); }
.painting-grid__item img { display: block; width: 100%; transition: transform .5s ease; }
.painting-grid__title {
	position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px;
	background: linear-gradient(to top, rgba(22,48,60,.85), rgba(22,48,60,0));
	color: #fff; font-size: .92rem; line-height: 1.4; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s;
}
.painting-grid__item a:hover img { transform: scale(1.03); }
.painting-grid__item a:hover .painting-grid__title,
.painting-grid__item a:focus .painting-grid__title { opacity: 1; transform: none; }
@media (hover: none) {
	.painting-grid__title { position: static; opacity: 1; transform: none; background: none; color: var(--lm-primary); padding: 10px 0 0; }
	.painting-grid__item a { background: none; }
}

.gallery-text__title { margin-top: 0; }

/* Peinture seule */
.painting__layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; padding: 8px 0 clamp(40px, 6vw, 64px); }
.painting__image { margin: 0; text-align: center; background: var(--lm-bg-soft); }
.painting__image a { display: block; cursor: zoom-in; }
.painting__image img { display: block; margin: 0 auto; max-height: 82vh; width: auto; }
.painting__info { position: sticky; top: calc(var(--lm-header-bottom) + 24px); }
.painting__title { margin: 0 0 .5em; font-size: clamp(1.35rem, 2.2vw, 1.8rem); }
.painting__title-en { font-style: italic; margin: 0 0 1.4em; }
.painting__meta { margin: 0 0 1.6em; padding: 16px 0 0; border-top: 1px solid var(--lm-border); font-family: var(--lm-sans); font-size: .85rem; line-height: 1.6; }
.painting__meta dd { margin: 0 0 10px; }
.painting__meta [lang="en"] { color: #9aa1a4; }
.painting__nav { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 16px 0; border-top: 1px solid var(--lm-border); border-bottom: 1px solid var(--lm-border); font-family: var(--lm-sans); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.painting__more { display: inline-block; margin-top: 18px; color: var(--lm-accent); }
@media (max-width: 900px) {
	.painting__layout { grid-template-columns: 1fr; }
	.painting__info { position: static; }
}
.painting__details { padding-bottom: clamp(40px, 6vw, 64px); }
.details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.details-grid a { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--lm-bg-soft); cursor: zoom-in; }
.details-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.details-grid a:hover img { transform: scale(1.04); }

/* Version anglaise */
.text-english { margin-top: 3.5em; scroll-margin-top: calc(var(--lm-header-bottom) + 24px); }
.text-english__title { margin-top: 0; }
#version-francaise { scroll-margin-top: calc(var(--lm-header-bottom) + 24px); }

/* ==========================================================================
   Livres
   ========================================================================== */
.book__description { margin: 0 0 .6em; font-style: italic; font-size: 1.05rem; color: var(--lm-text-strong); }
.book__edition { margin: 0 0 1.4em; color: var(--lm-accent); }
.book-cover--empty {
	display: flex; align-items: center; justify-content: center; aspect-ratio: 2 / 3; padding: 20px;
	background: var(--lm-bg-soft); border: 1px solid var(--lm-border);
	font-style: italic; text-align: center; line-height: 1.4; color: var(--lm-primary);
}

/* Liste */
.book-list { padding-bottom: clamp(48px, 7vw, 88px); }
.book-row { display: grid; grid-template-columns: minmax(140px, 240px) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: start; padding: 0 0 48px; margin-bottom: 48px; border-bottom: 1px solid var(--lm-border); }
.book-row:last-child { border-bottom: 0; margin-bottom: 0; }
.book-row__cover { display: block; overflow: hidden; box-shadow: 0 6px 20px rgba(22, 48, 60, .12); }
.book-row__cover img { display: block; width: 100%; transition: transform .5s ease; }
.book-row__cover:hover img { transform: scale(1.03); }
.book-row__title { margin: 0 0 .3em; }
.book-row__excerpt { font-size: .95rem; }
.book-row__excerpt > :last-child { margin-bottom: 0; }
.book-row__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin: 1.4em 0 0; }
@media (max-width: 640px) {
	.book-row { grid-template-columns: 1fr; }
	.book-row__cover { max-width: 220px; margin: 0 auto; }
	.book-row__title, .book-row .book__description, .book-row .book__edition { text-align: center; }
	.book-row__actions { justify-content: center; }
}

/* Fiche */
.book { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr); gap: clamp(32px, 6vw, 80px); align-items: start; padding: 8px 0 clamp(48px, 7vw, 88px); }
.book__cover { position: sticky; top: calc(var(--lm-header-bottom) + 24px); margin: 0; }
.book__cover a { display: block; cursor: zoom-in; }
.book__cover img { display: block; width: 100%; box-shadow: 0 8px 28px rgba(22, 48, 60, .15); }
.book__head { margin-bottom: 2em; padding-bottom: 1.8em; border-bottom: 1px solid var(--lm-border); }
.book__title { margin: 0 0 .4em; }
.book__body { max-width: var(--lm-narrow); }
.book__lead { font-size: 1.15rem; line-height: 1.7; color: var(--lm-text-strong); }
.book__lead > :last-child { margin-bottom: 1.6em; }
@media (max-width: 760px) {
	.book { grid-template-columns: 1fr; }
	.book__cover { position: static; max-width: 280px; margin: 0 auto; }
	.book__head { text-align: center; }
}

/* ==========================================================================
   À propos : biographie et presse
   ========================================================================== */
.entry-content .page-anchors { margin: 2em 0; padding: 14px 0; border-top: 1px solid var(--lm-border); border-bottom: 1px solid var(--lm-border); font-family: var(--lm-sans); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.entry-content .page-anchors a { text-decoration: none; }
.entry-content [id] { scroll-margin-top: calc(var(--lm-header-bottom) + 24px); }

.entry-content .bio-photo { margin: 0; }
.entry-content .timeline { margin: 0; padding: 0; list-style: none; font-size: .92rem; line-height: 1.5; }
.entry-content .timeline li { position: relative; padding: 7px 0 7px 4.6em; border-bottom: 1px solid var(--lm-border); }
.entry-content .timeline li:last-child { border-bottom: 0; }
/* l'année, premier élément de chaque ligne, est sortie du flux : le texte garde son retrait même sur plusieurs lignes */
.entry-content .timeline li > strong:first-child { position: absolute; left: 0; top: 7px; line-height: 1.38rem; font-family: var(--lm-sans); font-size: .82rem; font-weight: 600; color: var(--lm-accent); }

.entry-content .about-links { padding: 0; list-style: none; font-size: 1.2rem; }
.entry-content .about-links li { padding: 10px 0; border-bottom: 1px solid var(--lm-border); }
.entry-content .about-links a { text-decoration: none; }

.press-list { margin: 0 0 3.5em; }
/* les blocs Groupe d'un thème classique ajoutent un conteneur intérieur : c'est lui qui porte la mise en page */
.press-list > .wp-block-group__inner-container { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.press-item { padding: 22px 22px 20px; border: 1px solid var(--lm-border); background: var(--lm-bg); transition: border-color .2s, box-shadow .2s; }
.press-item > .wp-block-group__inner-container { display: flex; flex-direction: column; height: 100%; }
.entry-content .press-list > .wp-block-group__inner-container > .press-item { margin: 0; }
.press-item:hover { border-color: #cfd4d6; box-shadow: 0 6px 18px rgba(22, 48, 60, .07); }
.entry-content .press-item__logo { display: flex; align-items: center; height: 52px; margin: 0 0 18px; }
.entry-content .press-item__logo img { margin: 0; max-height: 52px; max-width: 70%; width: auto; object-fit: contain; object-position: left center; }
.entry-content .press-item__title { margin: 0 0 .6em; font-size: 1.02rem; line-height: 1.45; color: var(--lm-primary); }
.entry-content .press-item__title a { text-decoration: none; }
.entry-content .press-item__title a:hover { text-decoration: underline; }
.entry-content .press-item__meta { margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--lm-border); font-family: var(--lm-sans); font-size: .72rem; line-height: 1.55; letter-spacing: .03em; color: var(--lm-text); }
@media (max-width: 980px) { .press-list > .wp-block-group__inner-container { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .press-list > .wp-block-group__inner-container { grid-template-columns: 1fr; } }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-form-wrap { max-width: 640px; margin-bottom: clamp(48px, 7vw, 88px); }
.contact-form[hidden] { display: none; }
.contact-form__row { margin: 0 0 22px; }
.contact-form label { display: block; margin-bottom: 8px; font-family: var(--lm-sans); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--lm-primary); }
.contact-form__optional { margin-left: 8px; font-weight: 400; letter-spacing: .04em; text-transform: none; color: #9aa1a4; }
.contact-form input, .contact-form textarea {
	display: block; width: 100%; padding: 12px 14px; border: 1px solid var(--lm-border); border-radius: 0; background: #fff;
	font: inherit; font-size: 1rem; line-height: 1.5; color: var(--lm-text-strong); transition: border-color .2s, box-shadow .2s;
}
.contact-form textarea { resize: vertical; min-height: 180px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--lm-accent); box-shadow: 0 0 0 3px rgba(70,161,208,.15); }
.contact-form .is-invalid { border-color: #b4423a; }
.contact-form__error { display: block; margin-top: 6px; font-size: .88rem; color: #b4423a; }
.contact-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form__actions { margin: 28px 0 0; }
.contact-form .lm-button { background: none; cursor: pointer; }
.contact-notice { margin: 0 0 28px; padding: 16px 20px; border: 1px solid; font-size: .95rem; }
.contact-notice p { margin: 0 0 .4em; }
.contact-notice p:last-child { margin: 0; }
.contact-notice--success { border-color: #bfdcc6; background: #f1f8f3; color: #2f5d3a; }
.contact-notice--success a { font-family: var(--lm-sans); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.contact-notice--error { border-color: #e6c3c0; background: #fbf1f0; color: #8a3a33; }
/* ==========================================================================
   Pied de page
   ========================================================================== */
.site-footer { border-top: 1px solid var(--lm-border); padding: clamp(48px, 7vw, 88px) 0 32px; font-size: .95rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.site-footer__brand .site-title { margin-bottom: 18px; }
.site-footer h2 { margin: 0 0 16px; font-family: var(--lm-sans); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; line-height: 1.4; }
.site-footer a { color: var(--lm-text); }
.site-footer a:hover { color: var(--lm-primary); }
.site-footer__social { display: flex; gap: 18px; margin-top: 24px; }
.site-footer__social a { display: inline-flex; align-items: center; gap: 8px; }
.site-footer__bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--lm-border); font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* Divers */
.no-results { padding: 40px 0 80px; }
.error-404 { padding: 80px 0; text-align: center; }
.error-404 .search-form { max-width: 360px; margin: 24px auto 0; }
.error-404 .search-form input[type="search"] { width: 100%; }
.comments-area { margin-top: 56px; }

/* ==========================================================================
   Restauration (visible uniquement des éditeurs connectés)
   ========================================================================== */
.lm-lost-image {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
	min-height: 180px; margin: 2em 0; padding: 24px;
	border: 2px dashed #d9a33a; border-radius: 6px; background: #fdf8ec;
	text-align: center; font-family: var(--lm-sans); font-size: .82rem; color: #6b5420;
}
.lm-lost-image--banner { min-height: 0; margin: 0 0 28px; padding: 14px 18px; }
.lm-lost-image--file { min-height: 0; padding: 16px 20px; }
.lm-lost-image__badge { font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #9a6b0c; }
.lm-lost-image__file { word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; }
.lm-lost-image figcaption { font-family: var(--lm-serif); font-size: .9rem; color: #5a4a26; margin: 0; }
.lm-lost-image__actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.lm-lost-image__actions a { color: #9a6b0c; text-decoration: underline; }
.lm-lost-image small { color: #a08a5a; font-size: .7rem; }
