/*
Theme Name:   6x6
Description:  Thème léger sur mesure pour 6x6.photo : photos carrées, galeries à facettes, double fond noir / gris. Le contenu (étiquettes, fiche de prise de vue, import) vient de l'extension « 6×6 — contenu ».
Version:      1.0.8
Requires at least: 6.6
Requires PHP: 8.1
Author:       VeryNet
Text Domain:  sixsix
License:      GPL-2.0-or-later
*/

/* ==========================================================================
   Double fond : mêmes variables, deux jeux de valeurs (attribut data-fond sur <html>)
   ========================================================================== */

:root,
html[data-fond="noir"] {
	--bg: #16150f;
	--ink: #ecebe6;
	--muted: #c9c7be;
	--faint: #9a988e;
	--line: #34322a;
	--panel: #0c0b08;
	--accent-text: #f4b41a;
	--chip-line: #4a4840;
	--chip-text: #d3d1c9;
	--logo-line: #3a382f;
	color-scheme: dark;
}

html[data-fond="gris"] {
	--bg: #e8e8e4;
	--ink: #16150f;
	--muted: #3d3c36;
	--faint: #5c5a52;
	--line: #c9c8c1;
	--panel: #f6f6f3;
	--accent-text: #7a4f00;
	--chip-line: #a9a8a0;
	--chip-text: #2a2a26;
	--logo-line: transparent;
	color-scheme: light;
}

:root {
	--accent: #f4b41a;
	--on-accent: #16150f;
	--f-titre: "Barlow Condensed", "Arial Narrow", sans-serif;
	--f-texte: "IBM Plex Sans", system-ui, sans-serif;
	--f-mono: "IBM Plex Mono", ui-monospace, monospace;
	--max: none; /* pleine largeur, comme instants.photo et maisongainsbourg.fr */
	--marge: clamp(20px, 3vw, 64px);
}

/* ==========================================================================
   Base
   ========================================================================== */

html { background: var(--bg); }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--f-texte);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
html.sx-transition body,
html.sx-transition .sx-entete { transition: background-color .2s, color .2s; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible,
button:focus-visible,
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
img { max-width: 100%; height: auto; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.sx-lien-evitement:focus {
	position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto;
	padding: 10px 16px; background: var(--accent); color: var(--on-accent);
}

.sx-conteneur,
.sx-main {
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 var(--marge);
	box-sizing: border-box;
}
.sx-main { padding-bottom: 48px; display: flex; flex-direction: column; gap: 88px; }
.sx-main--home { gap: 104px; }
.sx-main--galerie { gap: 64px; }
.sx-main > :first-child { margin-top: 40px; }
.sx-main > * { margin-block: 0; }
/* À propos : colonne centrée (page de lecture, pas une galerie) */
.sx-main--apropos > * { width: 100%; max-width: 1280px; margin-inline: auto; }
.sx-main--apropos .sx-regles, .sx-main--apropos .sx-appareils { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

/* Marquages mono */
.sx-mono {
	font-family: var(--f-mono);
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	font-variant-numeric: tabular-nums;
	color: var(--faint);
}
.sx-accent { color: var(--accent-text); }
.sx-lien-mono {
	font-family: var(--f-mono);
	font-size: 13px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--accent-text);
}

/* Titres */
.sx-h1 {
	margin: 0;
	font-family: var(--f-titre);
	font-weight: 700;
	font-size: clamp(52px, 6.4vw, 96px);
	line-height: .92;
	text-transform: uppercase;
	letter-spacing: -.005em;
	text-wrap: balance;
}
.sx-h1--galerie { font-size: clamp(56px, 8vw, 112px); line-height: .88; }
.sx-h1--article { font-size: clamp(40px, 4.4vw, 60px); line-height: .95; }
.sx-h1--page { font-size: clamp(48px, 6vw, 84px); }
.sx-h2 {
	margin: 0;
	font-family: var(--f-titre);
	font-weight: 600;
	font-size: 44px;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: .01em;
}
.sx-texte-sec { margin: 0; color: var(--muted); }

/* Boutons */
.sx-bouton,
.wp-block-button__link,
.wp-element-button,
.comment-form input[type="submit"] {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 22px;
	border: 1px solid var(--accent);
	border-radius: 0;
	background: var(--accent);
	color: var(--on-accent);
	font-family: var(--f-titre);
	font-weight: 600;
	font-size: 18px;
	letter-spacing: .06em;
	text-transform: uppercase;
	cursor: pointer;
	text-decoration: none;
}
.sx-bouton--secondaire,
.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--ink);
	border-color: var(--chip-line);
}
.sx-bouton:hover,
.wp-block-button__link:hover { text-decoration: none; filter: brightness(1.06); }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   En-tête collant
   ========================================================================== */

.sx-entete-wrap {
	position: sticky;
	top: 0;
	z-index: 20;
}
.admin-bar .sx-entete-wrap { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .sx-entete-wrap { top: 0; } }
.sx-entete {
	background: var(--bg);
	border-bottom: 1px solid var(--line);
}
.sx-entete__in {
	max-width: var(--max);
	margin: 0 auto;
	padding: 14px var(--marge);
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}
.sx-logo { display: block; flex: none; line-height: 0; outline: 1px solid var(--logo-line); }
.sx-logo img { display: block; width: 52px; height: 52px; }
.sx-logo--pied img { width: 44px; height: 44px; }
.sx-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.sx-nav a {
	padding: 10px 14px;
	font-family: var(--f-titre);
	font-weight: 600;
	font-size: 19px;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.sx-nav a[aria-current] { color: var(--accent-text); }

/* Interrupteur de fond */
.sx-fond { display: flex; align-items: center; gap: 10px; }
.sx-fond__label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; color: var(--faint); }
.sx-fond__boutons { display: flex; border: 1px solid var(--chip-line); }
.sx-fond button,
.sx-segment button,
.sx-segment a {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 12px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--chip-text);
	cursor: pointer;
	font-family: var(--f-mono);
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-decoration: none;
}
.sx-fond button[aria-pressed="true"],
.sx-segment [aria-pressed="true"],
.sx-segment [aria-current] { background: var(--accent); color: var(--on-accent); }
.sx-fond__pastille { width: 12px; height: 12px; box-sizing: border-box; border: 1px solid var(--chip-line); }
.sx-fond__pastille--noir { background: #16150f; }
.sx-fond__pastille--gris { background: #e8e8e4; }
.sx-segment { display: flex; border: 1px solid var(--chip-line); }

@media (max-width: 640px) {
	.sx-entete__in { gap: 8px 12px; padding-block: 10px; }
	.sx-nav { order: 3; width: 100%; justify-content: space-between; }
	.sx-nav a { padding: 6px 4px; font-size: 18px; }
	.sx-fond__label { display: none; }
}

/* ==========================================================================
   Photos, marquage de film, dépoli
   ========================================================================== */

.sx-carre {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 0;
	box-shadow: none;
}
.sx-carre--vide { background: var(--panel); }
.sx-figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.sx-marquage {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	font-family: var(--f-mono);
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	font-variant-numeric: tabular-nums;
	color: var(--accent-text);
}
.sx-legende-mono {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	font-family: var(--f-mono);
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--faint);
}
.sx-depoli { position: relative; }
.sx-depoli::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(90deg, rgba(255, 255, 255, .5) 1px, transparent 1px),
		linear-gradient(0deg, rgba(255, 255, 255, .5) 1px, transparent 1px);
	background-size: 33.333% 33.333%;
	background-position: -1px -1px;
	pointer-events: none;
}
.sx-depoli::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 48px;
	height: 48px;
	margin: -24px 0 0 -24px;
	border: 1px solid rgba(255, 255, 255, .75);
	border-radius: 50%;
	pointer-events: none;
}

/* Grille de vignettes */
.sx-grille {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--case, 230px)), 1fr));
	gap: 20px 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sx-grille--galerie { --case: 340px; gap: 28px clamp(14px, 1.2vw, 24px); }
.sx-grille--apercu { --case: 300px; gap: clamp(14px, 1.2vw, 24px); }
/* Planche contact : 4 de front (8 photos = 2 rangées pleines), 2 sur mobile */
.sx-planche .sx-grille { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px clamp(14px, 1.2vw, 24px); }
@media (max-width: 900px) { .sx-planche .sx-grille { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Aperçu de galerie de la home : 6 photos = 2 rangées de 3 */
#galeries .sx-grille--apercu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { #galeries .sx-grille--apercu { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sx-carte { display: flex; flex-direction: column; gap: 8px; }
.sx-carte:hover { text-decoration: none; }
.sx-carte:hover .sx-carte__titre { text-decoration: underline; text-underline-offset: 4px; }
.sx-carte__ligne { display: flex; gap: 10px; align-items: baseline; }
.sx-carte__num { font-family: var(--f-mono); font-size: 11px; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.sx-carte__titre { font-size: 14px; line-height: 1.35; color: var(--muted); }
.sx-carte__meta {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-family: var(--f-mono);
	font-size: 11px;
	letter-spacing: .1em;
	text-transform: uppercase;
	font-variant-numeric: tabular-nums;
	color: var(--accent-text);
}
.sx-carte__meta--neutre { color: var(--faint); }
.sx-carte[aria-current] img { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Planche contact */
.sx-planche { background: var(--panel); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.sx-planche__bandeau {
	display: flex;
	justify-content: space-between;
	font-family: var(--f-mono);
	font-size: 11px;
	letter-spacing: .14em;
	color: var(--accent-text);
}

/* En-têtes de section */
.sx-section { display: flex; flex-direction: column; gap: 24px; }
.sx-section__tete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }

/* ==========================================================================
   Home : hero
   ========================================================================== */

.sx-hero {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(32px, 5vw, 72px);
	align-items: center;
	margin-top: 56px !important;
}
.sx-hero__photo { flex: 1 1 480px; max-width: 820px; }
.sx-hero__texte { flex: 1 1 380px; display: flex; flex-direction: column; gap: 28px; }
.sx-hero__texte > * { margin: 0; }
.sx-hero__texte p:not(.sx-mono):not(.sx-surtitre) { max-width: 34em; font-size: 18px; line-height: 1.6; color: var(--muted); }
.sx-surtitre { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }

/* ==========================================================================
   Galerie à facettes
   ========================================================================== */

.sx-galerie-tete { display: flex; flex-direction: column; gap: 28px; }
.sx-ariane { display: flex; flex-wrap: wrap; gap: 10px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.sx-ariane [aria-current] { color: var(--accent-text); }
.sx-galerie-tete__corps { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; }
.sx-galerie-tete__corps .sx-h1 { flex: 1 1 420px; }
.sx-galerie-tete__intro { flex: 1 1 380px; max-width: 600px; display: flex; flex-direction: column; gap: 16px; }
.sx-galerie-tete__intro p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--muted); }
.sx-compteurs { display: flex; flex-wrap: wrap; gap: 8px 24px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; color: var(--accent-text); font-variant-numeric: tabular-nums; text-transform: uppercase; }

.sx-galerie { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 24px; }
.sx-facettes { flex: 1 1 240px; max-width: 300px; display: flex; flex-direction: column; gap: 26px; }
.sx-facette { display: flex; flex-direction: column; gap: 10px; }
.sx-facette__label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; color: var(--faint); }
.sx-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sx-tag {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 12px;
	box-sizing: border-box;
	border: 1px solid var(--chip-line);
	color: var(--chip-text);
	font-family: var(--f-texte);
	font-size: 14px;
	line-height: 1.2;
}
.sx-tag:hover { text-decoration: none; border-color: var(--ink); }
.sx-tag[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sx-tag__n { margin-left: 6px; font-family: var(--f-mono); font-size: 11px; opacity: .7; }
.sx-facette details > summary {
	list-style: none;
	cursor: pointer;
	margin-top: 10px;
	font-family: var(--f-mono);
	font-size: 12px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--accent-text);
}
.sx-facette details > summary::-webkit-details-marker { display: none; }
.sx-facette details[open] > summary { display: none; }
.sx-facette details .sx-tags { margin-top: 0; }

.sx-galerie__resultats { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.sx-galerie__barre { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.sx-galerie__plus { align-self: center; margin-top: 12px; }
.sx-vide { padding: 32px; border: 1px dashed var(--chip-line); color: var(--muted); }

/* ==========================================================================
   Blog
   ========================================================================== */

.sx-blog { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.sx-blog__intro { flex: 1 1 240px; max-width: 300px; display: flex; flex-direction: column; gap: 14px; }
.sx-blog__intro p { margin: 0; font-size: 16px; color: var(--muted); }
.sx-blog__liste { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.sx-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.sx-ligne:hover { text-decoration: none; }
.sx-ligne:hover .sx-ligne__titre { text-decoration: underline; text-underline-offset: 4px; }
.sx-ligne img, .sx-ligne .sx-carre { width: 96px; height: 96px; flex: none; }
.sx-ligne__corps { flex: 1 1 280px; display: flex; flex-direction: column; gap: 6px; }
.sx-ligne__cat { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.sx-ligne__titre { font-family: var(--f-titre); font-weight: 500; font-size: 28px; line-height: 1.1; }
.sx-ligne__date { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; }
.sx-ligne__lire { font-family: var(--f-mono); font-size: 13px; color: var(--faint); }
/* Page blog : deux colonnes d’articles sur grand écran */
@media (min-width: 1200px) {
	.sx-blog__liste--2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 3vw, 56px); align-items: stretch; }
	.sx-blog__liste--2col > li { display: flex; }
	.sx-blog__liste--2col .sx-ligne { flex: 1; flex-wrap: nowrap; }
	.sx-blog__liste--2col .sx-ligne__corps { flex: 1 1 auto; min-width: 0; }
	.sx-blog__liste--2col .sx-vide { grid-column: 1 / -1; }
}
.sx-pagination { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 13px; }
.sx-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; padding: 0 10px; box-sizing: border-box; border: 1px solid var(--chip-line); }
.sx-pagination .current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sx-pagination .dots { border: 0; }

/* Encart À propos (home) */
.sx-encart { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; border: 1px solid var(--line); padding: 32px; }
.sx-encart img, .sx-encart .sx-carre { width: 120px; height: 120px; flex: none; }
.sx-encart__texte { flex: 1 1 400px; display: flex; flex-direction: column; gap: 10px; }
.sx-encart__texte h2 { font-size: 32px; }
.sx-encart__texte p { margin: 0; color: var(--muted); }

/* ==========================================================================
   Article
   ========================================================================== */

.sx-article { display: flex; flex-direction: column; gap: 28px; }
.sx-article__corps { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: flex-start; }
.sx-article__photo { flex: 3 1 480px; max-width: 960px; }
.sx-article__texte { flex: 2 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.sx-article__texte > * { margin: 0; }
.sx-article__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.sx-article__meta a { color: var(--accent-text); }

.sx-prose { max-width: 34em; font-size: 18px; line-height: 1.7; }
.sx-prose > * { margin: 0 0 18px; }
.sx-prose > :last-child { margin-bottom: 0; }
.sx-prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.sx-prose h2, .sx-prose h3 { font-family: var(--f-titre); font-weight: 600; text-transform: uppercase; line-height: 1.1; margin-top: 32px; }
.sx-prose h2 { font-size: 32px; }
.sx-prose h3 { font-size: 24px; }
.sx-prose--page { max-width: 40em; font-size: 17px; }
.sx-prose { overflow-wrap: break-word; }
.sx-prose blockquote { margin: 0 0 18px; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.sx-prose blockquote > :last-child { margin-bottom: 0; }
.sx-prose h3 em { font-style: normal; }
.sx-presentation .sx-prose h3 { margin-top: 0; font-weight: 500; font-size: 28px; line-height: 1.15; text-transform: none; }

.sx-fiche {
	margin: 0;
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 10px 20px;
	padding: 18px 20px;
	background: var(--panel);
	font-family: var(--f-mono);
	font-size: 13px;
	letter-spacing: .04em;
}
.sx-fiche dt { color: var(--faint); text-transform: uppercase; }
.sx-fiche dd { margin: 0; font-variant-numeric: tabular-nums; }
.sx-fiche a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--chip-line); }

.sx-etiquettes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sx-etiquettes .sx-tag { min-height: 34px; }

.sx-precsuiv { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.sx-precsuiv a { display: flex; flex-direction: column; gap: 4px; max-width: 48%; }
.sx-precsuiv a:last-child { align-items: flex-end; text-align: right; margin-left: auto; }
.sx-precsuiv__label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; color: var(--faint); }
.sx-precsuiv__titre { font-family: var(--f-titre); font-weight: 500; font-size: 24px; line-height: 1.1; }

/* Commentaires (blocs natifs) */
.sx-commentaires { padding: 24px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 24px; }
.sx-commentaires .wp-block-comments-title { margin: 0; font-family: var(--f-titre); font-weight: 600; font-size: 26px; text-transform: uppercase; }
.sx-commentaires .wp-block-comment-template { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 20px; }
.sx-commentaires .wp-block-comment-template ol { list-style: none; padding-left: 24px; border-left: 1px solid var(--line); margin-top: 16px; }
.sx-commentaires .wp-block-comment-author-name { font-weight: 600; }
.sx-commentaires .wp-block-comment-date { font-family: var(--f-mono); font-size: 12px; color: var(--faint); }
.sx-commentaires .comment-reply-title { font-family: var(--f-titre); font-weight: 600; font-size: 24px; text-transform: uppercase; margin: 0 0 12px; }
.sx-commentaires input[type="text"],
.sx-commentaires input[type="email"],
.sx-commentaires input[type="url"],
.sx-commentaires textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid var(--chip-line);
	border-radius: 0;
	background: var(--panel);
	color: var(--ink);
	font: inherit;
}
.sx-commentaires label { display: block; font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.sx-commentaires .comment-form-cookies-consent label { display: inline; text-transform: none; letter-spacing: 0; font-family: var(--f-texte); font-size: 14px; }

/* ==========================================================================
   Pages : à propos, mentions
   ========================================================================== */

.sx-page-tete { display: flex; flex-direction: column; gap: 16px; margin-top: 56px !important; }
.sx-presentation { display: flex; flex-wrap: wrap; gap: clamp(32px, 5vw, 64px); align-items: flex-start; margin-top: 56px !important; }
.sx-presentation__photo { flex: 2 1 340px; max-width: 640px; }
.sx-presentation__texte { flex: 3 1 420px; display: flex; flex-direction: column; gap: 24px; }
.sx-presentation__texte > * { margin: 0; }

.sx-regles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.sx-regle { display: flex; flex-direction: column; gap: 12px; padding: 24px; border-top: 3px solid var(--accent); background: var(--panel); }
.sx-regle__titre { font-family: var(--f-titre); font-weight: 600; font-size: 26px; line-height: 1.1; text-transform: uppercase; }
.sx-regle__texte { font-size: 15px; line-height: 1.6; color: var(--muted); }

.sx-appareils { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.sx-appareil { display: flex; flex-direction: column; gap: 10px; }
.sx-appareil:hover { text-decoration: none; }
.sx-appareil__ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sx-appareil__nom { font-family: var(--f-titre); font-weight: 600; font-size: 26px; text-transform: uppercase; }
.sx-appareil__n { font-family: var(--f-mono); font-size: 13px; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.sx-appareil__note { font-size: 14px; line-height: 1.5; color: var(--muted); }

.sx-sites { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 24px; }
.sx-sites .sx-h2 { flex: 1 1 240px; max-width: 300px; }
.sx-sites__liste { flex: 999 1 480px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.sx-site { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); }
.sx-site:hover { text-decoration: none; border-color: var(--chip-line); }
.sx-site span:last-child { font-size: 15px; line-height: 1.5; color: var(--muted); }

.sx-sommaire-page { display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 24px; }
.sx-sommaire { flex: 1 1 220px; max-width: 280px; position: sticky; top: 104px; display: flex; flex-direction: column; gap: 4px; font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.sx-sommaire a { padding: 8px 0; border-bottom: 1px solid var(--line); }
.sx-sommaire-page .sx-prose { flex: 999 1 520px; min-width: 0; }
.sx-prose h2[id] { scroll-margin-top: 110px; }

/* ==========================================================================
   Pied de page
   ========================================================================== */

.sx-pied {
	max-width: var(--max);
	margin: 0 auto;
	padding: 24px var(--marge) 40px;
	box-sizing: border-box;
}
.sx-pied__in {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
	font-size: 14px;
	color: var(--muted);
}
.sx-pied__marque { display: flex; gap: 16px; align-items: center; }
.sx-pied__marque a:not(.sx-logo) { text-decoration: underline; text-underline-offset: 3px; }
.sx-pied nav { display: flex; flex-wrap: wrap; gap: 20px; }

/* 404, recherche */
.sx-404 { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; margin-top: 56px !important; }
.sx-recherche { display: flex; gap: 8px; max-width: 520px; width: 100%; }
.sx-recherche input[type="search"] { flex: 1; min-height: 44px; padding: 0 12px; border: 1px solid var(--chip-line); background: var(--panel); color: var(--ink); font: inherit; border-radius: 0; }

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 640px) {
	body { font-size: 16px; }
	.sx-main { gap: 56px; padding-bottom: 32px; }
	.sx-main--home { gap: 64px; }
	.sx-main--galerie { gap: 40px; }
	.sx-main > :first-child,
	.sx-hero, .sx-presentation, .sx-page-tete, .sx-404 { margin-top: 24px !important; }

	/* En-tête : logo un peu plus petit, menu sur sa propre ligne */
	.sx-logo img { width: 44px; height: 44px; }
	.sx-fond button { min-height: 36px; padding: 0 10px; font-size: 11px; }
	.sx-nav a { font-size: 17px; }

	/* Titres */
	.sx-h1 { font-size: clamp(40px, 12vw, 52px); }
	.sx-h1--galerie { font-size: clamp(44px, 13vw, 56px); }
	.sx-h1--article { font-size: clamp(32px, 9vw, 40px); text-wrap: pretty; }
	.sx-h1--page { font-size: clamp(38px, 11vw, 48px); }
	.sx-h2 { font-size: 34px; }
	.sx-hero { gap: 28px; }
	.sx-hero__texte { gap: 20px; }
	.sx-hero__texte p:not(.sx-surtitre) { font-size: 17px; }
	.sx-galerie-tete, .sx-article { gap: 20px; }
	.sx-galerie-tete__corps { gap: 20px; }

	/* Planche contact, galerie */
	.sx-planche { padding: 12px; }
	.sx-galerie { gap: 28px; padding-top: 20px; }
	.sx-facettes { max-width: none; flex-basis: 100%; gap: 20px; }
	.sx-galerie__barre { gap: 12px; }
	.sx-segment a { min-height: 36px; padding: 0 10px; font-size: 11px; }

	/* Blog : vignette à gauche, titre à côté */
	.sx-blog { gap: 24px; }
	.sx-ligne { flex-wrap: nowrap; gap: 16px; padding: 16px 0; align-items: flex-start; }
	.sx-ligne img, .sx-ligne .sx-carre { width: 80px; height: 80px; }
	.sx-ligne__corps { flex: 1 1 auto; min-width: 0; }
	.sx-ligne__titre { font-size: 22px; }
	.sx-ligne__lire { display: none; }

	/* Article */
	.sx-article__corps { gap: 24px; }
	.sx-prose { font-size: 17px; }
	.sx-fiche { grid-template-columns: 1fr; gap: 2px; padding: 14px 16px; }
	.sx-fiche dd { margin-bottom: 10px; }
	.sx-fiche dd:last-child { margin-bottom: 0; }
	.sx-precsuiv { flex-direction: column; }
	.sx-precsuiv a { max-width: none; }
	.sx-precsuiv a:last-child { margin-left: 0; }
	.sx-commentaires { padding: 16px; }

	/* Encarts, pages */
	.sx-encart { padding: 20px; gap: 20px; }
	.sx-presentation__texte { gap: 18px; }
	.sx-regle { padding: 20px; }
	.sx-sites { gap: 20px; }
	.sx-sommaire { position: static; max-width: none; }
	.sx-sommaire-page { gap: 32px; }

	/* Pied */
	.sx-pied { padding-bottom: 28px; }
	.sx-pied__in { gap: 16px; }
	.sx-pied__marque { align-items: flex-start; }
	.sx-pied nav { gap: 10px 16px; }
}
