/*
 * DWG Galerie 1.1 — langage de galerie contemporaine : noir et blanc,
 * grotesque Archivo en capitales larges, grandes images, aucun ornement.
 * Les règles sont préfixées par « body » pour primer sur les styles de base de l'extension.
 */

:root {
	--dwg-encre: #000;
	--dwg-graphite: #6b6b6b;
	--dwg-filet: #e3e3e3;
	--dwg-mur: #f2f2f2;
	--dwg-nuit: #181818;
	--dwg-gouttiere: var(--wp--style--root--padding-left, clamp(1rem, 3vw, 2.5rem));
	--dwg-entete: 6rem;
	--dwg-barre-admin: var(--wp-admin--admin-bar--height, 0px);
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-synthesis: none; }
img { max-width: 100%; height: auto; }
::selection { background: #000; color: #fff; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid #000;
	outline-offset: 3px;
}
a { text-decoration-thickness: 1px; text-underline-offset: .22em; }

/* Titres : capitales larges. */
body :is(h1, h2, h3, .wp-block-site-title, .wp-block-post-title) { font-stretch: 125%; }
body .wp-block-post-title a { text-decoration: none; }

/* Petits intitulés de section (comme une ligne d'index). */
body :is(.dwg-selection__titre, .dwg-journal__titre, .dwg-fiche__liees h2, .dwg-presentation h2, .dwg-pied__titre, .dwg-liens__titre, .dwg-titre-discret) {
	margin: 0;
	font-size: .8125rem !important;
	font-weight: 600;
	font-stretch: 100%;
	letter-spacing: .03em;
	line-height: 1.3;
	text-transform: uppercase;
}

/* Liens d'action précédés d'une flèche. */
body .dwg-lien--fleche,
body .dwg-selection__suite,
body .dwg-presentation p:last-child a,
body .dwg-suite a {
	display: inline-flex;
	align-items: center;
	gap: .55em;
	min-height: 2.75rem;
	color: #000;
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .03em;
	text-transform: uppercase;
	text-decoration: none;
}
body .dwg-lien--fleche::before,
body .dwg-selection__suite::before,
body .dwg-presentation p:last-child a::before { content: "→"; font-weight: 400; }
body :is(.dwg-lien--fleche, .dwg-selection__suite, .dwg-presentation p:last-child a):hover { text-decoration: underline; text-underline-offset: .35em; }

/* Boutons. */
body .dwg-bouton {
	border-radius: 0;
	border-color: #000;
	background: #000;
	color: #fff;
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}
body .dwg-bouton:hover { background: #333; border-color: #333; }
body .dwg-bouton--secondaire { background: transparent; color: #000; }
body .dwg-bouton--secondaire:hover { background: #000; color: #fff; }

/* ---------- En-tête ---------- */
body .dwg-entete {
	position: sticky;
	top: var(--dwg-barre-admin);
	z-index: 40;
	min-height: var(--dwg-entete);
	padding-left: var(--wp--style--root--padding-left) !important;
	padding-right: var(--wp--style--root--padding-right) !important;
	background: rgba(255, 255, 255, .94);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	gap: 1.5rem;
}
body .dwg-entete .wp-block-site-title { white-space: nowrap; letter-spacing: .01em; }
body .dwg-entete .wp-block-site-title a { color: #000; }
body .dwg-menu .wp-block-navigation-item__content { display: inline-flex; align-items: center; min-height: 2.75rem; color: #000; }
body .dwg-menu .wp-block-navigation-item__content:hover,
body .dwg-menu [aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .45em; }
body .dwg-entete__nav { gap: 1.75rem; }
body .dwg-panier { font-size: .8125rem; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; color: #000; }
body .dwg-menu .wp-block-navigation__responsive-container-open,
body .dwg-menu .wp-block-navigation__responsive-container-close { min-width: 2.75rem; min-height: 2.75rem; justify-content: center; }
/* Menu ouvert : le flou de l'en-tête retiré, sinon le menu plein écran reste enfermé dans l'en-tête. */
html.has-modal-open body .dwg-entete,
body .dwg-entete:has(.is-menu-open) { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; }
body .dwg-menu .wp-block-navigation__responsive-container.is-menu-open { padding: 1.25rem var(--dwg-gouttiere); background: #fff; }
body .dwg-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
body .dwg-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { align-items: flex-start !important; }
body .dwg-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 3.5rem; align-items: flex-start; }
/* Tablette : menu ☰ comme sur téléphone (les liens en ligne n'y tiennent pas, surtout en allemand). */
@media (min-width: 600px) and (max-width: 63.99em) {
	body .dwg-menu .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	body .dwg-menu .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
body .dwg-menu .is-menu-open .wp-block-navigation-item__content { font-size: 2rem; font-weight: 600; font-stretch: 125%; line-height: 1.15; }
body .dwg-entete--commande .dwg-entete__retour { margin: 0; font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }

/* ---------- Mise en page générale ---------- */
body .dwg-principal { padding-top: clamp(1rem, 3vw, 2.5rem); }
body .dwg-principal--accueil { padding-top: 0; }
body .dwg-titre-page { margin-top: 0; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
body .dwg-chapeau { font-size: var(--wp--preset--font-size--chapeau); line-height: 1.45; font-weight: 400; }
body .dwg-chapeau--galerie { max-width: 44rem; margin-left: 0 !important; margin-bottom: clamp(2rem, 4vw, 3rem) !important; color: var(--dwg-graphite); }
body .dwg-a-completer { padding: .75rem 1rem; border-left: 3px solid #a4161a; background: var(--dwg-mur); font-size: .9375rem; }
body .dwg-suite { margin-top: 3rem; }

/* ---------- Accueil : premier écran avec portrait ---------- */
body .dwg-une { margin-block: 0 !important; }
body .dwg-une--portrait {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	padding: 0;
	background: var(--dwg-fond-uni, var(--dwg-mur));
	color: #000;
}
body .dwg-une--portrait .dwg-une__panneau { padding: clamp(2rem, 6vw, 3rem) var(--dwg-gouttiere) clamp(1.5rem, 5vw, 2.5rem); }
body .dwg-une--portrait .dwg-une__portrait { margin: 0; }
body .dwg-une--portrait .dwg-une__portrait img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 78svh;
	object-fit: cover;
	object-position: 50% 15%;
}
body .dwg-une__nom {
	margin: 0;
	font-family: var(--wp--preset--font-family--signature);
	font-style: normal;
	font-size: clamp(2.5rem, 1.2rem + 5.6vw, 6.25rem);
	font-weight: 600;
	font-stretch: 125%;
	line-height: .92;
	letter-spacing: -.005em;
	text-transform: uppercase;
	text-wrap: balance;
	color: #000;
}
body .dwg-une__accroche {
	margin: 1.25rem 0 1rem;
	font-family: var(--wp--preset--font-family--texte);
	font-size: clamp(1rem, .95rem + .3vw, 1.2rem);
	line-height: 1.45;
	color: #000;
}
body .dwg-une__liens { display: flex; flex-wrap: wrap; gap: 0 1.75rem; margin: 0; }

@media (min-width: 60em) {
	body .dwg-une--portrait {
		grid-template-columns: minmax(0, 1fr) auto;
		background: var(--dwg-fond, var(--dwg-mur));
		min-height: 34rem;
	}
	body .dwg-une--portrait .dwg-une__panneau { align-self: end; padding-bottom: clamp(2.5rem, 5vw, 4.5rem); }
	body .dwg-une--portrait .dwg-une__portrait { height: calc(100svh - var(--dwg-entete) - var(--dwg-barre-admin)); min-height: 34rem; max-height: 64rem; }
	body .dwg-une--portrait .dwg-une__portrait img {
		width: auto;
		height: 100%;
		max-height: none;
		object-fit: contain;
		/* Fondu du bord gauche de la photo dans son propre fond (aucun texte sur la photo). */
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 5rem);
		mask-image: linear-gradient(to right, transparent 0, #000 5rem);
	}
}
@media (max-width: 59.99em) {
	/* Petit écran : le portrait ouvre la page, le nom et les liens viennent juste dessous. */
	body .dwg-une--portrait { background: #fff; }
	body .dwg-une--portrait .dwg-une__portrait { order: -1; }
	body .dwg-une--portrait .dwg-une__portrait img {
		max-height: min(64svh, 46rem);
		object-position: 50% 8%;
	}
	body .dwg-une--portrait .dwg-une__panneau { padding-top: clamp(1.5rem, 5vw, 2.25rem); }
	body .dwg-entete { gap: .75rem; }
	body .dwg-entete .wp-block-site-title { font-size: .8125rem; }
	body .dwg-entete__nav { gap: .5rem; }
	body .dwg-panier { font-size: .75rem; }
}

/* Variante « une œuvre » (choisie dans le bloc). */
body .dwg-une--oeuvre { padding-inline: 0; }
body .dwg-une--oeuvre .dwg-une__legende cite { font-style: normal; font-weight: 600; font-stretch: 125%; text-transform: uppercase; font-size: 1rem; }
body .dwg-une--oeuvre .dwg-une__accroche { font-size: 1.25rem; }

/* ---------- Rangée d'œuvres (accueil) ---------- */
body .dwg-selection { margin-block: clamp(3rem, 7vw, 5.5rem); }
body .dwg-selection__entete {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .25rem 2.5rem;
	margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
	padding-bottom: .5rem;
	border-bottom: 1px solid var(--dwg-filet);
}
body .dwg-selection__suite { margin: 0 !important; }
body .dwg-defile__fleches { display: flex; gap: .25rem; margin-left: auto; }
body .dwg-defile__fleches[hidden] { display: none; }
body .dwg-defile__fleche {
	display: inline-grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	background: none;
	color: #000;
	font-size: 1.35rem;
	cursor: pointer;
}
body .dwg-defile__fleche:disabled { color: #c4c4c4; cursor: default; }
body .dwg-cimaise--rangee {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: clamp(1.5rem, 3vw, 2.5rem);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding: 0 0 .5rem;
}
body .dwg-cimaise--rangee::-webkit-scrollbar { display: none; }
body .dwg-cimaise--rangee .dwg-carte {
	flex: 0 0 auto;
	width: min-content;
	min-width: 0;
	max-width: none;
	scroll-snap-align: start;
}
body .dwg-cimaise--rangee .dwg-carte__image { width: auto; max-width: none; height: clamp(15rem, 30vw, 27rem); }

/* ---------- Grille des œuvres (galerie, œuvres liées) ---------- */
body .dwg-galerie .dwg-cimaise,
body .dwg-fiche__liees .dwg-cimaise {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 3.5rem 2.5rem;
	align-items: start;
}
body .dwg-galerie .dwg-carte,
body .dwg-fiche__liees .dwg-carte { width: auto; min-width: 0; }
body .dwg-galerie .dwg-carte[hidden] { display: none; }
@media (min-width: 40em) {
	body .dwg-galerie .dwg-cimaise,
	body .dwg-fiche__liees .dwg-cimaise { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4.5rem clamp(1.5rem, 3vw, 2.5rem); }
	body .dwg-galerie .dwg-carte__cadre,
	body .dwg-fiche__liees .dwg-carte__cadre { display: flex; align-items: flex-end; aspect-ratio: 1 / 1; }
	body .dwg-galerie .dwg-carte__image,
	body .dwg-fiche__liees .dwg-carte__image { width: auto; height: auto; max-width: 100%; max-height: 100%; }
}
@media (min-width: 64em) {
	body .dwg-galerie .dwg-cimaise,
	body .dwg-fiche__liees .dwg-cimaise { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Cartel des cartes. */
body .dwg-carte__lien { color: #000; }
body .dwg-carte__titre {
	margin-top: 1rem;
	font-family: var(--wp--preset--font-family--signature);
	font-style: normal;
	font-size: clamp(1.05rem, .95rem + .45vw, 1.45rem);
	font-weight: 600;
	font-stretch: 125%;
	line-height: 1.12;
	text-transform: uppercase;
}
body .dwg-carte__lien:hover .dwg-carte__titre { text-decoration: none; }
body .dwg-carte__lien:hover .dwg-carte__image { opacity: .92; }
body .dwg-carte__cartel { margin-top: .4rem; font-size: .875rem; color: var(--dwg-graphite); }
body .dwg-carte__statut { margin-top: .25rem; font-size: .875rem; font-weight: 500; }

/* Filtres. */
body .dwg-filtres { gap: .25rem 3rem; margin-bottom: .75rem; border-bottom-color: var(--dwg-filet); }
body .dwg-filtres__groupe { gap: 0 1.5rem; }
body .dwg-filtre { font-size: .8125rem; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; color: var(--dwg-graphite); }
body .dwg-filtre[aria-pressed="true"] { color: #000; text-underline-offset: .55em; }
body .dwg-galerie__compte { font-size: .8125rem; text-transform: uppercase; letter-spacing: .03em; }

/* ---------- Fiche d'œuvre ---------- */
body .dwg-fiche__retour { font-size: .75rem; font-weight: 500; letter-spacing: .03em; text-transform: uppercase; }
body .dwg-fiche__retour a { color: #000; text-decoration: none; }
body .dwg-fiche__retour a:hover { text-decoration: underline; }
body .dwg-fiche__titre {
	font-family: var(--wp--preset--font-family--signature);
	font-style: normal;
	font-weight: 600;
	font-stretch: 125%;
	font-size: clamp(1.9rem, 1.3rem + 2.2vw, 3.1rem);
	line-height: 1;
	text-transform: uppercase;
}
body .dwg-fiche__artiste { margin: .75rem 0 2rem; font-size: .8125rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: #000; }
body .dwg-fiche__cartel dt { font-size: .875rem; }
body .dwg-fiche__cartel > div { border-top-color: var(--dwg-filet); }
body .dwg-fiche__cartel > div:last-child { border-bottom-color: var(--dwg-filet); }
body .dwg-fiche__prix { font-size: 1.5rem; font-weight: 500; }
body .dwg-fiche__prix--demande { font-size: 1rem; }
body .dwg-fiche__description { font-family: var(--wp--preset--font-family--texte); font-size: 1.0625rem; line-height: 1.6; }
body .dwg-fiche summary { font-size: .8125rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
body .dwg-fiche__question,
body .dwg-fiche__pratique details { border-color: var(--dwg-filet); }
body .dwg-fiche__agrandir { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; text-decoration: none; }
body .dwg-fiche__agrandir::before { content: "+"; margin-right: .5em; font-weight: 400; }
body .dwg-fiche__liees { border-top: 0; padding-top: 0; }
body .dwg-fiche__liees h2 { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); padding-bottom: .5rem; border-bottom: 1px solid var(--dwg-filet); }
body .dwg-visionneuse__titre cite { font-style: normal; font-weight: 600; font-stretch: 125%; text-transform: uppercase; font-size: 1rem; }
body .dwg-statut--a_confirmer { color: var(--dwg-graphite); }

/* ---------- Présentation de l'artiste (accueil) ---------- */
body .dwg-presentation { margin-block: clamp(3rem, 8vw, 6rem) !important; padding-top: 0; border-top: 0; }
body .dwg-presentation h2 { padding-bottom: .5rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem) !important; border-bottom: 1px solid var(--dwg-filet); }
body .dwg-presentation .dwg-chapeau { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); line-height: 1.35; font-weight: 400; max-width: 46rem; }

/* ---------- Page L'artiste ---------- */
body .dwg-portrait img { width: 100%; height: auto; }
body .dwg-artiste { gap: clamp(2rem, 5vw, 5rem) !important; }
body .dwg-artiste h2 { font-size: 1.35rem; margin-top: 2.5rem; }
body .dwg-artiste h2:first-child { margin-top: 0; }
body .dwg-artiste > .wp-block-column:last-child > * { max-width: 40rem; }
@media (min-width: 782px) { body .dwg-artiste .dwg-portrait { position: sticky; top: calc(var(--dwg-entete) + var(--dwg-barre-admin) + 1rem); } }
body .dwg-citation { margin: 2.25rem 0; }
body .dwg-citation p { font-size: 1.5rem; font-weight: 500; line-height: 1.3; }
body .dwg-citation cite { font-style: normal; font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--dwg-graphite); }

/* ---------- Journal ---------- */
body .dwg-liste-articles { display: grid; gap: 0; }
body .dwg-article-resume { padding-block: 1.75rem; border-top: 1px solid var(--dwg-filet); }
body .dwg-article-resume .wp-block-post-title { margin: 0 0 .5rem; font-size: 1.5rem; }
body .dwg-journal__article > a { font-family: var(--wp--preset--font-family--signature); font-size: 1.15rem; font-weight: 600; font-stretch: 125%; text-transform: uppercase; }

/* ---------- Pied de page ---------- */
body .dwg-pied { background: var(--dwg-nuit) !important; color: #fff; font-size: .875rem; }
body .dwg-pied a { color: #fff; }
body .dwg-pied .wp-block-site-title a { color: #fff; }
body .dwg-pied .wp-block-site-title { font-size: 1.25rem; }
body :is(.dwg-pied__titre, .dwg-pied .dwg-liens__titre) { margin: 0 0 1rem; color: #9a9a9a; }
body .dwg-pied p { margin-block: 0 .5rem; }
body .dwg-pied .has-graphite-color { color: #9a9a9a !important; }
body .dwg-pied .dwg-liens li { margin-bottom: .45rem; }

/* ---------- Panier, commande, confirmation ---------- */
body .dwg-principal--boutique .wc-block-components-button:not(.is-link),
body .dwg-principal--boutique .wc-block-cart__submit-button,
body .dwg-principal--boutique .wc-block-components-checkout-place-order-button {
	min-height: 3.25rem;
	border-radius: 0;
	background: #000;
	color: #fff;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}
body .dwg-principal--boutique .wc-block-components-text-input input,
body .dwg-principal--boutique .wc-block-components-combobox .components-combobox-control input,
body .dwg-principal--boutique .wc-blocks-components-select__select,
body .dwg-principal--boutique .wc-block-components-textarea { border-radius: 0 !important; border-color: #8a8a8a !important; }
body .dwg-principal--boutique .wc-block-components-product-name { font-weight: 600; font-stretch: 125%; text-transform: uppercase; text-decoration: none; }
body .dwg-principal--boutique .wc-block-cart-item__image img { width: 100%; height: auto; object-fit: contain; }
body .dwg-principal--boutique .wc-block-components-quantity-selector { display: none; }
body .dwg-note-livraison { padding: .85rem 1rem; background: var(--dwg-mur); font-size: .9375rem; }

/* Champs de formulaire. */
body .dwg-champ input,
body .dwg-champ select,
body .dwg-champ textarea { border-radius: 0; border-color: #8a8a8a; }
body .dwg-champ label { font-size: .8125rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
