/*
 * Sagamento — feuille de style principale.
 *
 * Toutes les couleurs, polices et dimensions viennent des variables --sg-*
 * générées par le Customizer (inc/dynamic-css.php). Les valeurs ci-dessous
 * ne sont que des secours si ces variables sont absentes.
 *
 * Sommaire
 *  1. Base et typographie
 *  2. Accessibilité
 *  3. Boutons et formulaires
 *  4. Conteneurs et grille de mise en page
 *  5. Barre supérieure
 *  6. En-tête, menus et recherche
 *  7. Menu mobile (tiroir)
 *  8. En-tête collant et transparent
 *  9. Bandeau de titre
 * 10. Listes d'articles
 * 11. Article et contenu
 * 12. Commentaires
 * 13. Widgets et barre latérale
 * 14. Pied de page
 * 15. Pagination, 404, retour en haut
 * 16. Mode sombre
 * 17. Classes WordPress et blocs
 * 18. Mobile et préférences de mouvement
 */

/* ======================================================================
   1. Base et typographie
   ====================================================================== */

:root {
	--sg-primary: #533ff6;
	--sg-primary-contrast: #fff;
	--sg-accent: #533ff6;
	--sg-accent-contrast: #fff;
	--sg-secondary: #0f172a;
	--sg-text: #334155;
	--sg-muted: #64748b;
	--sg-bg: #fff;
	--sg-surface: #f4f6fa;
	--sg-border: #e2e8f0;
	--sg-container: 1200px;
	--sg-gutter: 24px;
	--sg-radius: 12px;
	--sg-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
	--sg-transition: .2s ease;
}

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

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

body {
	margin: 0;
	background: var(--sg-bg);
	color: var(--sg-text);
	font-family: var(--sg-font-body, system-ui, sans-serif);
	font-size: var(--sg-fs, 17px);
	font-weight: var(--sg-body-weight, 400);
	line-height: var(--sg-lh, 1.7);
	letter-spacing: var(--sg-body-ls, normal);
	text-transform: var(--sg-body-tt, none);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

body.sg-no-scroll {
	overflow: hidden;
}

h1, h2, h3, h4, h5, h6 {
	margin: 1.6em 0 .6em;
	color: var(--sg-secondary);
	font-family: var(--sg-font-headings, inherit);
	font-weight: var(--sg-hw, 700);
	line-height: var(--sg-h-lh, 1.2);
	text-transform: var(--sg-htt, none);
	letter-spacing: var(--sg-h-ls, -.01em);
	overflow-wrap: break-word;
}

/* Réglages propres à chaque niveau (Typographie > H1…H6), sinon réglage commun des titres. */
h1 {
	font-family: var(--sg-h1-font, var(--sg-font-headings, inherit));
	font-size: var(--sg-h1, 2.6rem);
	font-weight: var(--sg-h1-weight, var(--sg-hw, 700));
	line-height: var(--sg-h1-lh, var(--sg-h-lh, 1.2));
	letter-spacing: var(--sg-h1-ls, var(--sg-h-ls, -.01em));
	text-transform: var(--sg-h1-tt, var(--sg-htt, none));
}

h2 {
	font-family: var(--sg-h2-font, var(--sg-font-headings, inherit));
	font-size: var(--sg-h2, 2rem);
	font-weight: var(--sg-h2-weight, var(--sg-hw, 700));
	line-height: var(--sg-h2-lh, var(--sg-h-lh, 1.2));
	letter-spacing: var(--sg-h2-ls, var(--sg-h-ls, -.01em));
	text-transform: var(--sg-h2-tt, var(--sg-htt, none));
}

h3 {
	font-family: var(--sg-h3-font, var(--sg-font-headings, inherit));
	font-size: var(--sg-h3, 1.6rem);
	font-weight: var(--sg-h3-weight, var(--sg-hw, 700));
	line-height: var(--sg-h3-lh, var(--sg-h-lh, 1.2));
	letter-spacing: var(--sg-h3-ls, var(--sg-h-ls, -.01em));
	text-transform: var(--sg-h3-tt, var(--sg-htt, none));
}

h4 {
	font-family: var(--sg-h4-font, var(--sg-font-headings, inherit));
	font-size: var(--sg-h4, 1.3rem);
	font-weight: var(--sg-h4-weight, var(--sg-hw, 700));
	line-height: var(--sg-h4-lh, var(--sg-h-lh, 1.2));
	letter-spacing: var(--sg-h4-ls, var(--sg-h-ls, -.01em));
	text-transform: var(--sg-h4-tt, var(--sg-htt, none));
}

h5 {
	font-family: var(--sg-h5-font, var(--sg-font-headings, inherit));
	font-size: var(--sg-h5, 1.1rem);
	font-weight: var(--sg-h5-weight, var(--sg-hw, 700));
	line-height: var(--sg-h5-lh, var(--sg-h-lh, 1.2));
	letter-spacing: var(--sg-h5-ls, var(--sg-h-ls, -.01em));
	text-transform: var(--sg-h5-tt, var(--sg-htt, none));
}

h6 {
	font-family: var(--sg-h6-font, var(--sg-font-headings, inherit));
	font-size: var(--sg-h6, 1rem);
	font-weight: var(--sg-h6-weight, var(--sg-hw, 700));
	line-height: var(--sg-h6-lh, var(--sg-h-lh, 1.2));
	letter-spacing: var(--sg-h6-ls, var(--sg-h-ls, -.01em));
	text-transform: var(--sg-h6-tt, var(--sg-htt, none));
}


p,
ul,
ol,
dl,
blockquote,
figure,
table,
pre {
	margin: 0 0 1.4em;
}

ul,
ol {
	padding-left: 1.4em;
}

li > ul,
li > ol {
	margin-bottom: 0;
}

a {
	color: var(--sg-primary);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
	transition: color var(--sg-transition);
}

a:hover {
	text-decoration-thickness: 2px;
}

img,
svg,
video,
iframe {
	max-width: 100%;
}

img,
video {
	height: auto;
}

img {
	vertical-align: middle;
}

hr {
	height: 1px;
	margin: 2.5em 0;
	border: 0;
	background: var(--sg-border);
}

blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: .4em 0 .4em 1.4em;
	border-left: 4px solid var(--sg-primary);
	color: var(--sg-secondary);
	font-size: 1.1em;
}

blockquote p:last-child {
	margin-bottom: 0;
}

blockquote cite {
	display: block;
	margin-top: .6em;
	color: var(--sg-muted);
	font-size: .85em;
	font-style: normal;
}

code,
kbd,
pre,
samp {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .9em;
}

code {
	padding: .15em .35em;
	border-radius: 4px;
	background: var(--sg-surface);
}

pre {
	overflow: auto;
	padding: 1.2em;
	border-radius: var(--sg-radius);
	background: var(--sg-surface);
}

pre code {
	padding: 0;
	background: none;
}

table {
	width: 100%;
	border-collapse: collapse;
}

th,
td {
	padding: .7em .9em;
	border-bottom: 1px solid var(--sg-border);
	text-align: left;
}

th {
	color: var(--sg-secondary);
	font-weight: 600;
}

/* ======================================================================
   2. Accessibilité
   ====================================================================== */

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	word-wrap: normal !important;
}

.skip-link:focus {
	position: fixed !important;
	top: 12px;
	left: 12px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 12px 20px;
	clip: auto;
	border-radius: 6px;
	background: var(--sg-bg);
	color: var(--sg-primary);
	box-shadow: var(--sg-shadow);
	font-weight: 600;
}

:focus-visible {
	outline: 2px solid var(--sg-primary);
	outline-offset: 2px;
}

/* ======================================================================
   3. Boutons et formulaires
   ====================================================================== */

.sg-btn,
button:not(.sg-icon-btn):not(.sg-submenu-toggle):not(.search-submit):not([class*="components-"]),
input[type="submit"],
input[type="button"],
input[type="reset"],
.wp-block-button__link,
.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	padding: var(--sg-btn-py, 13px) var(--sg-btn-px, 26px);
	border: 2px solid var(--sg-accent, var(--sg-primary));
	border-radius: var(--sg-btn-radius, 8px);
	background: var(--sg-accent, var(--sg-primary));
	color: var(--sg-accent-contrast, var(--sg-primary-contrast));
	font-family: var(--sg-btn-font, inherit);
	font-size: var(--sg-btn-fs, .95em);
	font-weight: var(--sg-btn-weight, 600);
	line-height: var(--sg-btn-lh, 1.2);
	text-align: center;
	text-decoration: none;
	text-transform: var(--sg-btn-tt, none);
	letter-spacing: var(--sg-btn-ls, .01em);
	cursor: pointer;
	transition: filter var(--sg-transition), transform var(--sg-transition), background var(--sg-transition), color var(--sg-transition);
}

.sg-btn:hover,
button:not(.sg-icon-btn):not(.sg-submenu-toggle):not(.search-submit):not([class*="components-"]):hover,
input[type="submit"]:hover,
.wp-block-button__link:hover,
.wp-element-button:hover {
	filter: brightness(1.08);
	color: var(--sg-accent-contrast, var(--sg-primary-contrast));
	text-decoration: none;
}

.sg-btn:active,
input[type="submit"]:active {
	transform: translateY(1px);
}

/* Bouton secondaire (contour, couleur principale). */
.sg-btn-outline,
.is-style-outline > .wp-block-button__link,
.wp-block-button__link.is-style-outline {
	border-color: var(--sg-primary);
	background: transparent;
	color: var(--sg-primary);
}

.sg-btn-outline:hover,
.is-style-outline > .wp-block-button__link:hover {
	background: var(--sg-primary);
	color: var(--sg-primary-contrast);
	filter: none;
}

.sg-btn-block {
	width: 100%;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
select,
textarea {
	width: 100%;
	max-width: 100%;
	padding: 12px 14px;
	border: var(--sg-input-bw, 1px) solid var(--sg-border);
	border-radius: var(--sg-input-radius, 8px);
	background: var(--sg-bg);
	color: var(--sg-text);
	font-family: inherit;
	font-size: 1em;
	line-height: 1.4;
	transition: border-color var(--sg-transition), box-shadow var(--sg-transition);
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--sg-primary);
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--sg-primary) 20%, transparent);
}

textarea {
	min-height: 140px;
	resize: vertical;
}

label {
	display: inline-block;
	margin-bottom: .35em;
	color: var(--sg-secondary);
	font-weight: 500;
}

input[type="checkbox"],
input[type="radio"] {
	accent-color: var(--sg-primary);
}

::placeholder {
	color: var(--sg-muted);
	opacity: 1;
}

/* Formulaire de recherche. */
.search-form {
	position: relative;
	display: flex;
	max-width: 560px;
}

.search-form .search-field {
	padding-right: 52px;
}

.search-form .search-submit {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--sg-muted);
	cursor: pointer;
}

.search-form .search-submit:hover {
	color: var(--sg-primary);
}

/* ======================================================================
   4. Conteneurs et grille de mise en page
   ====================================================================== */

.container {
	width: 100%;
	max-width: calc(var(--sg-container) + 2 * var(--sg-gutter));
	margin-inline: auto;
	padding-inline: var(--sg-gutter);
}

#page {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	overflow-x: clip;
}

.site-content {
	flex: 1 0 auto;
}

.content-container {
	padding-block: var(--sg-spacing, 64px);
}

/* --sg-page-width : largeur propre à la page (réglages de la page), sinon largeur du thème. */
.sg-container-contained .content-container,
.sg-container-contained .site-content > .page-header > .container {
	width: 100%;
	max-width: calc(var(--sg-page-width, var(--sg-container)) + 2 * var(--sg-gutter));
	margin-inline: auto;
	padding-inline: var(--sg-gutter);
}

.sg-container-full .content-container {
	padding-inline: var(--sg-gutter);
}

.sg-container-stretched .content-container,
.sg-no-padding .content-container {
	padding-block: 0;
}

.content-area {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 56px;
}

.sg-sidebar-right .content-area {
	grid-template-columns: minmax(0, var(--sg-content-ratio, 70%)) minmax(0, 1fr);
}

.sg-sidebar-left .content-area {
	grid-template-columns: minmax(0, 1fr) minmax(0, var(--sg-content-ratio, 70%));
}

.sg-sidebar-left .content-area > .site-main {
	order: 2;
}

/* Colonne de lecture étroite pour les articles sans barre latérale. */
.sg-narrow .site-main {
	width: 100%;
	max-width: 760px;
	margin-inline: auto;
}

/* ======================================================================
   5. Barre supérieure
   ====================================================================== */

.sg-topbar {
	background: var(--sg-topbar-bg);
	color: var(--sg-topbar-text);
	font-size: .85em;
	line-height: 1.4;
}

.sg-topbar-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 24px;
	min-height: 40px;
	padding-block: 6px;
}

.sg-topbar a {
	color: inherit;
	text-decoration: none;
}

.sg-topbar a:hover {
	text-decoration: underline;
}

.sg-topbar-text p {
	margin: 0;
}

.sg-topbar-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ======================================================================
   6. En-tête, menus et recherche
   ====================================================================== */

.site-header {
	/* Logo : largeur et espaces de l'appareil courant (tablette / mobile : vides = valeur de l'appareil plus grand). */
	--sg-lw: var(--sg-logo-w, 180px);
	--sg-lpt: var(--sg-logo-pt, 0px);
	--sg-lpb: var(--sg-logo-pb, 0px);
	/* Décalage du bouton du menu mobile (Menu mobile : bouton > Position). */
	--sg-bxc: var(--sg-bx, 0px);
	--sg-byc: var(--sg-by, 0px);
	position: relative;
	z-index: 50;
	background: var(--sg-header-bg);
	color: var(--sg-header-text);
	transition: background var(--sg-transition), box-shadow var(--sg-transition), color var(--sg-transition);
}

.site-header.has-border {
	border-bottom: 1px solid var(--sg-border);
}

.header-inner {
	display: flex;
	align-items: center;
	gap: 32px;
	/* Espace au-dessus / en dessous du logo (En-tête), ajouté à la hauteur de l'en-tête. */
	min-height: calc(var(--sg-header-h, 84px) + var(--sg-lpt, 0px) + var(--sg-lpb, 0px));
	padding-top: var(--sg-lpt, 0px);
	padding-bottom: var(--sg-lpb, 0px);
}

.header-classic .primary-nav {
	margin-left: auto;
}

.header-split .header-inner,
.header-centered .header-inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
}

.header-split .header-actions,
.header-centered .header-right {
	justify-self: end;
}

.header-centered .site-branding {
	text-align: center;
}

.header-nav-row.has-line {
	border-top: 1px solid var(--sg-border);
}

.header-nav-row .primary-nav > .menu {
	justify-content: center;
}

/* Logo et nom du site. */
.site-branding {
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
}

.site-branding .custom-logo-link {
	display: block;
	line-height: 0;
}

.site-branding .custom-logo {
	width: auto;
	max-width: var(--sg-lw, 180px);
	max-height: calc(var(--sg-header-h, 84px) - 16px);
	object-fit: contain;
}

.sg-logo-alt {
	display: none;
}

.site-title {
	margin: 0;
	font-family: var(--sg-font-headings);
	font-size: 1.35em;
	font-weight: var(--sg-hw, 700);
	line-height: 1.2;
}

.site-title a {
	color: inherit;
	text-decoration: none;
}

.site-description {
	margin: 2px 0 0;
	opacity: .7;
	font-size: .8em;
	line-height: 1.3;
}

/* Menu principal (ordinateur). */
.primary-nav .menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-nav li {
	position: relative;
	display: flex;
	align-items: center;
}

/* Typographie du menu : Typographie > Menu. */
.primary-nav a {
	font-family: var(--sg-menu-font, inherit);
	font-size: var(--sg-menu-fs, .95em);
	font-weight: var(--sg-menu-weight, 500);
	line-height: var(--sg-menu-lh, inherit);
	letter-spacing: var(--sg-menu-ls, normal);
	text-transform: var(--sg-menu-tt, none);
}

/* Menu mobile : Typographie > Menu mobile, sinon réglages du menu. */
.sg-drawer-nav a {
	font-family: var(--sg-drawer-font, var(--sg-menu-font, inherit));
	font-size: var(--sg-drawer-fs, var(--sg-menu-fs, .95em));
	font-weight: var(--sg-drawer-weight, var(--sg-menu-weight, 500));
	line-height: var(--sg-drawer-lh, var(--sg-menu-lh, inherit));
	letter-spacing: var(--sg-drawer-ls, var(--sg-menu-ls, normal));
	text-transform: var(--sg-drawer-tt, var(--sg-menu-tt, none));
}

.primary-nav a {
	display: block;
	padding: 10px 12px;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}

.primary-nav .menu > li > a {
	border-radius: 6px;
}

.primary-nav .menu > li > a:hover,
.primary-nav .menu > .current-menu-item > a,
.primary-nav .menu > .current-menu-ancestor > a,
.primary-nav .menu > .current_page_item > a {
	color: var(--sg-primary);
}

.sg-submenu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin-left: -8px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: none;
	color: inherit;
	cursor: pointer;
}

.sg-submenu-toggle .sg-icon {
	transition: transform var(--sg-transition);
}

li.is-open > .sg-submenu-toggle .sg-icon {
	transform: rotate(180deg);
}

/*
 * Sous-menus ordinateur (Réglages Sagamento > Sous-menus).
 * Couleurs vides : couleurs du site. Classes du <body> : sg-sub-align-*, sg-sub-fx-*, sg-sub-trigger-*,
 * sg-sub-shadow-*, sg-sub-hover-*, sg-sub-sep, sg-sub-accent, sg-sub-arrow.
 */
.primary-nav .sub-menu {
	--sg-sub-d: var(--sg-sub-dur, 200ms);
	position: absolute;
	top: calc(100% + var(--sg-sub-offset, 0px));
	left: 0;
	z-index: 60;
	min-width: var(--sg-sub-w, 230px);
	margin: 0;
	padding: var(--sg-sub-pad, 8px);
	list-style: none;
	border: var(--sg-sub-bw, 1px) solid var(--sg-sub-border, var(--sg-border));
	border-radius: var(--sg-sub-radius, 10px);
	background: var(--sg-sub-bg, var(--sg-bg));
	color: var(--sg-sub-text, var(--sg-text));
	box-shadow: var(--sg-shadow);
	text-align: var(--sg-sub-ta, left);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transform-origin: top center;
	/* Fermeture : après le délai, puis l'effet ; « visibility » bascule à la fin. */
	transition:
		opacity var(--sg-sub-d) ease var(--sg-sub-delay, 150ms),
		transform var(--sg-sub-d) ease var(--sg-sub-delay, 150ms),
		visibility 0s linear calc(var(--sg-sub-delay, 150ms) + var(--sg-sub-d));
}

/* Pont invisible au-dessus de la fenêtre : le survol ne se perd pas dans l'écart. */
.primary-nav .sub-menu::before {
	content: "";
	position: absolute;
	right: 0;
	bottom: 100%;
	left: 0;
	height: calc(var(--sg-sub-offset, 0px) + var(--sg-sub-bw, 1px));
}

.primary-nav .sub-menu .sub-menu {
	top: calc(-1 * (var(--sg-sub-pad, 8px) + var(--sg-sub-bw, 1px)));
	left: 100%;
}

.primary-nav .sub-menu .sub-menu::before {
	display: none;
}

/* Ouverture : survol (sauf mode « au clic »), clavier, ou clic sur la flèche. */
body:not(.sg-sub-trigger-click) .primary-nav li:hover > .sub-menu,
body:not(.sg-sub-trigger-click) .primary-nav li:focus-within > .sub-menu,
.primary-nav li.is-open > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

/* Position sous l'élément du menu (premier niveau). */
.sg-sub-align-center .primary-nav .menu > li > .sub-menu {
	left: 50%;
	translate: -50% 0;
}

.sg-sub-align-right .primary-nav .menu > li > .sub-menu {
	right: 0;
	left: auto;
}

/* Alignée à droite : les sous-menus suivants s'ouvrent vers la gauche. */
.sg-sub-align-right .primary-nav .sub-menu .sub-menu {
	right: 100%;
	left: auto;
}

/* Effets d'apparition (« fondu et montée » par défaut). */
.sg-sub-fx-fade .primary-nav .sub-menu {
	transform: none;
}

.sg-sub-fx-slide-down .primary-nav .sub-menu {
	transform: translateY(-12px);
}

.sg-sub-fx-zoom .primary-nav .sub-menu {
	transform: scale(.92);
}

/* Dépliage : animation à l'ouverture (sans découpe une fois terminée, pour les sous-menus suivants), fondu à la fermeture. */
.sg-sub-fx-unfold .primary-nav .sub-menu {
	transform: none;
}

body.sg-sub-fx-unfold:not(.sg-sub-trigger-click) .primary-nav li:hover > .sub-menu,
body.sg-sub-fx-unfold:not(.sg-sub-trigger-click) .primary-nav li:focus-within > .sub-menu,
.sg-sub-fx-unfold .primary-nav li.is-open > .sub-menu {
	animation: sg-sub-unfold var(--sg-sub-d) ease-out;
}

@keyframes sg-sub-unfold {
	from {
		clip-path: inset(-20px -60px 100% -60px);
	}

	to {
		clip-path: inset(-20px -60px -60px -60px);
	}
}

.sg-sub-fx-none .primary-nav .sub-menu {
	--sg-sub-d: 0s;
	transform: none;
}

/* Ombre. */
.sg-sub-shadow-none .primary-nav .sub-menu {
	box-shadow: none;
}

.sg-sub-shadow-light .primary-nav .sub-menu {
	box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
}

.sg-sub-shadow-strong .primary-nav .sub-menu {
	box-shadow: 0 4px 10px rgba(15, 23, 42, .08), 0 18px 48px rgba(15, 23, 42, .2);
}

/* Barre de couleur en haut. */
.sg-sub-accent .primary-nav .sub-menu {
	border-top: 3px solid var(--sg-primary);
}

/* Petite flèche vers le menu (premier niveau). */
.sg-sub-arrow .primary-nav .menu > li > .sub-menu::after {
	content: "";
	position: absolute;
	bottom: 100%;
	left: 22px;
	width: 12px;
	height: 12px;
	margin-bottom: calc(-6px + var(--sg-sub-bw, 1px) / 2);
	border-top: var(--sg-sub-bw, 1px) solid var(--sg-sub-border, var(--sg-border));
	border-left: var(--sg-sub-bw, 1px) solid var(--sg-sub-border, var(--sg-border));
	border-top-left-radius: 2px;
	background: var(--sg-sub-bg, var(--sg-bg));
	transform: rotate(45deg);
}

.sg-sub-arrow.sg-sub-align-center .primary-nav .menu > li > .sub-menu::after {
	left: 50%;
	margin-left: -6px;
}

.sg-sub-arrow.sg-sub-align-right .primary-nav .menu > li > .sub-menu::after {
	right: 22px;
	left: auto;
}

.sg-sub-arrow.sg-sub-accent .primary-nav .menu > li > .sub-menu::after {
	margin-bottom: -4.5px;
	border-color: var(--sg-primary);
	background: var(--sg-primary);
}

.primary-nav .sub-menu li {
	justify-content: space-between;
}

/* Séparateurs entre les liens. */
.sg-sub-sep .primary-nav .sub-menu > li + li {
	border-top: 1px solid var(--sg-sub-border, var(--sg-border));
}

.primary-nav .sub-menu a {
	flex: 1;
	padding: var(--sg-sub-item-py, 9px) var(--sg-sub-item-px, 12px);
	border-radius: var(--sg-sub-item-radius, 6px);
	color: inherit;
	white-space: normal;
	transition: background var(--sg-transition), color var(--sg-transition), transform var(--sg-transition), text-decoration-color var(--sg-transition);
}

/* Typographie des sous-menus : Typographie > Sous-menus, sinon réglages du menu. */
.primary-nav .sub-menu a {
	font-family: var(--sg-submenu-font, var(--sg-menu-font, inherit));
	font-size: var(--sg-submenu-fs, var(--sg-menu-fs, .95em));
	font-weight: var(--sg-submenu-weight, var(--sg-menu-weight, 500));
	line-height: var(--sg-submenu-lh, var(--sg-menu-lh, inherit));
	letter-spacing: var(--sg-submenu-ls, var(--sg-menu-ls, normal));
	text-transform: var(--sg-submenu-tt, var(--sg-menu-tt, none));
}

/* Sous-menus du menu mobile : Typographie > Sous-menus, sinon Menu mobile, sinon Menu. */
.sg-drawer-nav .sub-menu a {
	font-family: var(--sg-submenu-font, var(--sg-drawer-font, var(--sg-menu-font, inherit)));
	font-size: var(--sg-submenu-fs, var(--sg-drawer-fs, var(--sg-menu-fs, .95em)));
	font-weight: var(--sg-submenu-weight, var(--sg-drawer-weight, var(--sg-menu-weight, 500)));
	line-height: var(--sg-submenu-lh, var(--sg-drawer-lh, var(--sg-menu-lh, inherit)));
	letter-spacing: var(--sg-submenu-ls, var(--sg-drawer-ls, var(--sg-menu-ls, normal)));
	text-transform: var(--sg-submenu-tt, var(--sg-drawer-tt, var(--sg-menu-tt, none)));
}

/* Lien de la page en cours. */
.primary-nav .sub-menu .current-menu-item > a,
.primary-nav .sub-menu .current-menu-ancestor > a,
.primary-nav .sub-menu .current_page_item > a {
	color: var(--sg-sub-active, var(--sg-sub-hover-text, var(--sg-primary)));
}

/* Survol des liens : fond coloré (par défaut). */
.primary-nav .sub-menu a:hover,
.primary-nav .sub-menu a:focus-visible {
	background: var(--sg-sub-hover-bg, var(--sg-surface));
	color: var(--sg-sub-hover-text, var(--sg-primary));
}

/* Texte coloré seulement. */
.sg-sub-hover-color .primary-nav .sub-menu a:hover,
.sg-sub-hover-color .primary-nav .sub-menu a:focus-visible,
.sg-sub-hover-underline .primary-nav .sub-menu a:hover,
.sg-sub-hover-underline .primary-nav .sub-menu a:focus-visible,
.sg-sub-hover-shift .primary-nav .sub-menu a:hover,
.sg-sub-hover-shift .primary-nav .sub-menu a:focus-visible {
	background: none;
}

/* Soulignement. */
.sg-sub-hover-underline .primary-nav .sub-menu a {
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.sg-sub-hover-underline .primary-nav .sub-menu a:hover,
.sg-sub-hover-underline .primary-nav .sub-menu a:focus-visible {
	text-decoration-color: currentColor;
}

/* Décalage vers la droite. */
.sg-sub-hover-shift .primary-nav .sub-menu a:hover,
.sg-sub-hover-shift .primary-nav .sub-menu a:focus-visible {
	transform: translateX(5px);
}

.primary-nav .sub-menu .sg-submenu-toggle {
	margin: 0 4px 0 0;
	transform: rotate(-90deg);
}

.sg-sub-align-right .primary-nav .sub-menu .sg-submenu-toggle {
	transform: rotate(90deg);
}

/* Icônes et actions de l'en-tête. */
.header-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.sg-icon-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: background var(--sg-transition), color var(--sg-transition);
}

.sg-icon-btn:hover {
	background: color-mix(in srgb, currentColor 8%, transparent);
	color: inherit;
}

.sg-header-cta {
	margin-left: 10px;
	padding: 10px 20px;
	white-space: nowrap;
}

/* Bouton du menu mobile (« hamburger ») : Menu mobile : bouton. */
.sg-menu-toggle {
	display: none;
	gap: 8px;
	min-width: var(--sg-burger-size, 42px);
	width: auto;
	height: var(--sg-burger-size, 42px);
	padding: 0 calc((var(--sg-burger-size, 42px) - var(--sg-burger-w, 18px)) / 2);
	border-radius: 999px;
	background: var(--sg-burger-bg, none);
	color: var(--sg-burger-color, inherit);
	translate: var(--sg-bxc, 0px) var(--sg-byc, 0px);
}

/* Menu mobile sur tous les écrans : le menu de l'en-tête est remplacé par le bouton. */
.sg-mm-show-always .primary-nav,
.sg-mm-show-always .header-nav-row {
	display: none !important;
}

.sg-mm-show-always .sg-menu-toggle {
	display: inline-flex;
}

.sg-mm-show-always .header-actions {
	margin-left: auto;
}

.sg-mm-show-always .header-split .header-inner {
	display: flex;
}

.sg-menu-toggle:hover {
	background: var(--sg-burger-bg, color-mix(in srgb, currentColor 8%, transparent));
	color: var(--sg-burger-color, inherit);
	filter: brightness(.96);
}

.sg-burger-shape-rounded .sg-menu-toggle {
	border-radius: 8px;
}

.sg-burger-shape-square .sg-menu-toggle {
	border-radius: 0;
}

.sg-burger {
	display: flex;
	flex-direction: column;
	gap: var(--sg-burger-gap, 3px);
	width: var(--sg-burger-w, 18px);
}

.sg-burger > span {
	display: block;
	width: 100%;
	height: var(--sg-burger-t, 2px);
	background: currentColor;
	transition: width var(--sg-transition);
}

.sg-burger-round .sg-burger > span {
	border-radius: 99px;
}

.sg-burger-staggered .sg-burger > span:nth-child(2) {
	width: 75%;
}

.sg-burger-staggered .sg-burger > span:nth-child(3) {
	width: 50%;
}

.sg-burger-middle .sg-burger > span:nth-child(2) {
	width: 60%;
	margin-left: auto;
}

.sg-burger-two .sg-burger > span:nth-child(3) {
	display: none;
}

/* Au survol, les barres décalées s'alignent. */
.sg-menu-toggle:hover .sg-burger > span {
	width: 100%;
}

.sg-burger-label {
	font-size: .9em;
	font-weight: 600;
	line-height: 1;
}

.sg-cart-count {
	position: absolute;
	top: 3px;
	right: 1px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--sg-accent, var(--sg-primary));
	color: var(--sg-accent-contrast, var(--sg-primary-contrast));
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
}

.sg-cart-count.is-empty {
	display: none;
}

/* Panneau de recherche. */
.sg-search-panel {
	padding-block: 20px;
	border-top: 1px solid var(--sg-border);
	background: var(--sg-header-bg);
}

.sg-search-panel .search-form {
	max-width: none;
}

/* Bouton mode sombre : lune en mode clair, soleil en mode sombre. */
.sg-theme-toggle .sg-icon-sun {
	display: none;
}

/* ======================================================================
   7. Menu mobile (tiroir)
   ====================================================================== */

.sg-drawer {
	--sg-drawer-d: var(--sg-drawer-dur, 250ms);
	position: fixed;
	inset: 0;
	z-index: 1000;
}

.sg-drawer[hidden] {
	display: none;
}

.sg-drawer-backdrop {
	position: absolute;
	inset: 0;
	background: var(--sg-drawer-backdrop, rgba(2, 6, 23, .55));
	opacity: 0;
	transition: opacity var(--sg-drawer-d) ease;
}

.sg-mm-blur .sg-drawer-backdrop {
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

/* Tiroir depuis la droite (par défaut). */
.sg-drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	width: min(var(--sg-drawer-w, 380px), 88vw);
	overflow-y: auto;
	background: var(--sg-drawer-bg, var(--sg-bg));
	color: var(--sg-drawer-text, var(--sg-text));
	box-shadow: -10px 0 40px rgba(2, 6, 23, .2);
	transform: translateX(100%);
	transition: transform var(--sg-drawer-d) ease, opacity var(--sg-drawer-d) ease;
}

.sg-drawer.is-open .sg-drawer-backdrop {
	opacity: 1;
}

.sg-drawer.is-open .sg-drawer-panel {
	opacity: 1;
	transform: none;
}

/* Tiroir depuis la gauche. */
.sg-mm-fx-left .sg-drawer-panel {
	right: auto;
	left: 0;
	box-shadow: 10px 0 40px rgba(2, 6, 23, .2);
	transform: translateX(-100%);
}

/* Rideau depuis le haut : toute la largeur, hauteur du contenu. */
.sg-mm-fx-top .sg-drawer-panel {
	bottom: auto;
	left: 0;
	width: 100%;
	max-height: 100%;
	box-shadow: 0 10px 40px rgba(2, 6, 23, .2);
	transform: translateY(-100%);
}

/* Plein écran en fondu. */
.sg-mm-fx-full .sg-drawer-panel {
	left: 0;
	width: 100%;
	box-shadow: none;
	opacity: 0;
	transform: scale(1.03);
}

/* Panneau sur tout l'écran, quel que soit l'effet. */
.sg-mm-cover .sg-drawer-panel {
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	max-height: none;
	box-shadow: none;
}

/* Sur grand écran, liens et pied du panneau dans une colonne centrée. */
.sg-mm-cover .sg-drawer-nav,
.sg-mm-cover .sg-drawer-foot {
	box-sizing: border-box;
	width: 100%;
	max-width: 680px;
	margin-inline: auto;
}

.sg-mm-cover .sg-drawer-foot .search-form {
	max-width: none;
}

.admin-bar .sg-drawer-panel {
	top: var(--wp-admin--admin-bar--height, 0);
}

.sg-drawer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 72px;
	padding: 14px 16px 14px 24px;
	color: var(--sg-drawer-text, var(--sg-secondary));
}

.sg-mm-head-line .sg-drawer-head {
	border-bottom: 1px solid var(--sg-drawer-border, var(--sg-border));
}

/* Sans logo : la croix se place de son côté. */
.sg-drawer-head > .sg-drawer-close:only-child {
	margin-left: auto;
}

.sg-close-left .sg-drawer-head {
	flex-direction: row-reverse;
	padding: 14px 24px 14px 16px;
}

.sg-close-left .sg-drawer-head > .sg-drawer-close:only-child {
	margin-right: auto;
	margin-left: 0;
}

.sg-drawer-head .custom-logo {
	max-height: 48px;
}

/* Croix de fermeture : Menu mobile : panneau. */
.sg-drawer-close {
	width: calc(var(--sg-close-size, 24px) + 18px);
	height: calc(var(--sg-close-size, 24px) + 18px);
	flex-shrink: 0;
	background: var(--sg-close-bg, none);
	color: var(--sg-close-color, inherit);
}

.sg-drawer-close:hover {
	background: var(--sg-close-bg, color-mix(in srgb, currentColor 8%, transparent));
	color: var(--sg-close-color, inherit);
	filter: brightness(.96);
}

.sg-drawer-close svg {
	width: var(--sg-close-size, 24px);
	height: var(--sg-close-size, 24px);
	stroke-width: var(--sg-close-t, 2);
	transition: transform var(--sg-transition);
}

.sg-drawer-close:hover svg {
	transform: rotate(90deg);
}

.sg-close-shape-rounded .sg-drawer-close {
	border-radius: 8px;
}

.sg-close-shape-square .sg-drawer-close {
	border-radius: 0;
}

.sg-drawer-nav {
	flex: 1;
	padding: 12px 12px 24px;
}

.sg-drawer-nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sg-drawer-nav li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}

/* Séparateurs entre les liens. */
.sg-mm-sep .sg-drawer-nav .menu > li + li {
	border-top: 1px solid var(--sg-drawer-border, var(--sg-border));
}

.sg-drawer-nav a {
	flex: 1;
	padding: var(--sg-drawer-item-py, 12px) 12px;
	border-radius: 8px;
	color: var(--sg-drawer-text, var(--sg-secondary));
	text-decoration: none;
	transition: background var(--sg-transition), color var(--sg-transition);
}

.sg-drawer-nav a:hover,
.sg-drawer-nav a:focus-visible {
	background: var(--sg-drawer-hover-bg, var(--sg-surface));
	color: var(--sg-drawer-hover-text, var(--sg-primary));
}

.sg-drawer-nav .current-menu-item > a,
.sg-drawer-nav .current_page_item > a {
	background: var(--sg-drawer-active-bg, var(--sg-drawer-hover-bg, var(--sg-surface)));
	color: var(--sg-drawer-active, var(--sg-drawer-hover-text, var(--sg-primary)));
}

.sg-drawer-nav .sg-submenu-toggle {
	width: 44px;
	height: 44px;
	margin: 0;
	color: var(--sg-drawer-text, var(--sg-secondary));
}

.sg-mm-align-center .sg-drawer-nav {
	text-align: center;
}

.sg-mm-align-center .sg-drawer-nav .menu-item-has-children > a {
	padding-left: 56px;
}

.sg-mm-align-center .sg-drawer-nav .sub-menu {
	padding-left: 0;
	border-left: 0;
	margin-left: 0;
}

.sg-drawer-nav .sub-menu {
	display: none;
	flex-basis: 100%;
	padding-left: 14px;
	border-left: 2px solid var(--sg-drawer-border, var(--sg-border));
	margin-left: 12px;
}

.sg-drawer-nav li.is-open > .sub-menu {
	display: block;
}

.sg-drawer-foot {
	display: grid;
	gap: 16px;
	padding: 20px 24px 32px;
}

.sg-drawer-foot .sg-header-cta {
	margin-left: 0;
}

.sg-mm-foot-line .sg-drawer-foot {
	border-top: 1px solid var(--sg-drawer-border, var(--sg-border));
}

/* ======================================================================
   8. En-tête collant et transparent
   ====================================================================== */

/*
 * Le conteneur est « transparent » pour la mise en page (display: contents),
 * ce qui permet à l'en-tête collant de rester visible sur toute la page.
 * En mode transparent, il devient un bloc : l'en-tête se place alors
 * juste sous la barre supérieure.
 */
.sg-header-wrap {
	display: contents;
}

.sg-transparent-header .sg-header-wrap {
	position: relative;
	z-index: 50;
	display: block;
}

.sg-sticky-header .site-header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0);
	/* Fond semi-transparent : léger flou du contenu qui passe dessous. Sans effet si le fond est opaque. */
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
}

.sg-sticky-header .site-header.is-scrolled {
	box-shadow: 0 6px 24px rgba(15, 23, 42, .08);
}

.sg-transparent-header .site-header {
	position: absolute;
	top: auto; /* Reste sous la barre supérieure, même si l'en-tête collant est actif. */
	right: 0;
	left: 0;
	border-bottom-color: rgba(255, 255, 255, .18);
	background: transparent;
	color: #fff;
}

.sg-transparent-header .header-nav-row {
	border-top-color: rgba(255, 255, 255, .18);
}

.sg-transparent-header .site-header .primary-nav .menu > li > a:hover,
.sg-transparent-header .site-header .primary-nav .menu > .current-menu-item > a {
	color: #fff;
	opacity: .8;
}

.sg-transparent-header .site-branding:has(.sg-logo-alt) .sg-logo-main {
	display: none;
}

.sg-transparent-header .sg-logo-alt {
	display: block;
}

/* Transparent + collant : l'en-tête devient opaque et fixe au défilement. */
.sg-transparent-header.sg-sticky-header .site-header.is-scrolled {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0);
	background: var(--sg-header-bg);
	color: var(--sg-header-text);
	animation: sg-slide-down .3s ease;
}

.sg-transparent-header.sg-sticky-header .site-header.is-scrolled .primary-nav .menu > li > a:hover,
.sg-transparent-header.sg-sticky-header .site-header.is-scrolled .primary-nav .menu > .current-menu-item > a,
.sg-transparent-header.sg-sticky-header .site-header.is-scrolled .primary-nav .menu > .current-menu-ancestor > a {
	color: var(--sg-primary);
	opacity: 1;
}

.sg-transparent-header.sg-sticky-header .site-header.is-scrolled .sg-logo-main {
	display: block;
}

.sg-transparent-header.sg-sticky-header .site-header.is-scrolled .site-branding:has(.sg-logo-alt) .sg-logo-alt {
	display: none;
}

@keyframes sg-slide-down {
	from { transform: translateY(-100%); }
	to { transform: none; }
}

/* Le contenu démarre sous l'en-tête transparent. */
.sg-transparent-header:not(.sg-no-padding):not(.sg-container-stretched) .site-content > .content-container:first-child {
	padding-top: calc(var(--sg-spacing, 64px) + var(--sg-header-h, 84px));
}

.sg-transparent-header .site-content > .page-header {
	padding-top: calc(var(--sg-header-h, 84px) + 56px);
}

/* Sous un en-tête transparent, le bandeau de titre est toujours sur fond foncé. */
.sg-transparent-header .site-content > .page-header {
	padding-bottom: 56px;
	background: var(--sg-secondary);
	color: #fff;
}

.sg-transparent-header .site-content > .page-header .page-title,
.sg-transparent-header .site-content > .page-header .archive-description {
	color: #fff;
}

/* ======================================================================
   9. Bandeau de titre (pages, archives, recherche)
   ====================================================================== */

.page-header {
	padding-top: var(--sg-spacing, 64px);
}

.page-header + .content-container {
	padding-top: 40px;
}

.page-header.has-bg {
	padding-block: 56px;
	background: var(--sg-surface);
}

.page-header.has-bg + .content-container {
	padding-top: var(--sg-spacing, 64px);
}

.page-title {
	margin: 0;
}

.archive-description {
	max-width: 760px;
	margin-top: 12px;
	color: var(--sg-muted);
}

.archive-description p:last-child {
	margin-bottom: 0;
}

/* ======================================================================
   10. Listes d'articles
   ====================================================================== */

.posts-grid {
	display: grid;
	gap: 40px 32px;
}

.posts-layout-grid {
	grid-template-columns: repeat(var(--sg-cols, 3), minmax(0, 1fr));
}

.posts-layout-list,
.posts-layout-wide {
	grid-template-columns: minmax(0, 1fr);
	gap: 48px;
}

.post-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.post-card-thumb {
	display: block;
	aspect-ratio: var(--sg-ratio, 16/10);
	overflow: hidden;
	margin-bottom: 20px;
	border-radius: var(--sg-radius);
	background: var(--sg-surface);
}

.post-card-thumb[style*="auto"] {
	aspect-ratio: auto;
}

.post-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.post-card:hover .post-card-thumb img {
	transform: scale(1.03);
}

.posts-layout-list .post-card {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	align-items: center;
	gap: 32px;
}

.posts-layout-list .post-card-thumb {
	margin-bottom: 0;
}

.posts-layout-list .post-card:not(.has-post-thumbnail) {
	display: block;
}

.post-card-title {
	margin: 0 0 8px;
	font-size: var(--sg-h4);
}

.posts-layout-wide .post-card-title {
	font-size: var(--sg-h2);
}

.post-card-title a {
	color: inherit;
	text-decoration: none;
}

.post-card-title a:hover {
	color: var(--sg-primary);
}

.post-card-excerpt {
	margin-top: 12px;
}

.post-card-excerpt p {
	margin: 0;
}

.read-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	font-size: .92em;
	font-weight: 600;
	text-decoration: none;
}

.read-more .sg-icon {
	transition: transform var(--sg-transition);
}

.read-more:hover .sg-icon {
	transform: translateX(3px);
}

.entry-category {
	display: inline-block;
	margin-bottom: 8px;
	color: var(--sg-primary);
	font-size: .75em;
	font-weight: 700;
	letter-spacing: .08em;
	text-decoration: none;
	text-transform: uppercase;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	color: var(--sg-muted);
	font-size: .85em;
}

.entry-meta a {
	color: inherit;
	text-decoration: none;
}

.entry-meta a:hover {
	color: var(--sg-primary);
}

.meta-readtime {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.sticky .post-card-title::before {
	content: "★ ";
	color: var(--sg-primary);
}

/* ======================================================================
   11. Article et contenu
   ====================================================================== */

.entry-header {
	margin-bottom: 32px;
}

.entry-title {
	margin: 0 0 14px;
}

.entry-thumbnail {
	margin: 0 0 40px;
}

.entry-thumbnail img {
	width: 100%;
	border-radius: var(--sg-radius);
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.entry-content > *:first-child {
	margin-top: 0;
}

.entry-content > *:last-child {
	margin-bottom: 0;
}

.entry-content h2,
.entry-content h3 {
	scroll-margin-top: calc(var(--sg-header-h, 84px) + 20px);
}

.entry-footer {
	margin-top: 40px;
}

.entry-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.entry-tags a {
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--sg-surface);
	color: var(--sg-text);
	font-size: .85em;
	text-decoration: none;
}

.entry-tags a:hover {
	background: var(--sg-primary);
	color: var(--sg-primary-contrast);
}

.page-links {
	clear: both;
	margin-top: 32px;
	font-weight: 600;
}

/* Encadré auteur. */
.author-box {
	display: flex;
	gap: 20px;
	margin-top: 48px;
	padding: 28px;
	border-radius: var(--sg-radius);
	background: var(--sg-surface);
}

.author-box .avatar {
	flex-shrink: 0;
	border-radius: 50%;
}

.author-name {
	margin: 0 0 4px;
	color: var(--sg-secondary);
	font-weight: 700;
}

.author-bio {
	margin: 0 0 8px;
	font-size: .95em;
}

.author-link {
	font-size: .9em;
	font-weight: 600;
	text-decoration: none;
}

/* Article précédent / suivant. */
.post-navigation {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--sg-border);
}

.post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.post-navigation .nav-next {
	grid-column: 2;
	text-align: right;
}

.post-navigation a {
	display: block;
	text-decoration: none;
}

.post-navigation .nav-label {
	display: block;
	margin-bottom: 4px;
	color: var(--sg-muted);
	font-size: .8em;
	text-transform: uppercase;
	letter-spacing: .06em;
}

.post-navigation .nav-title {
	color: var(--sg-secondary);
	font-family: var(--sg-font-headings);
	font-weight: 600;
	line-height: 1.35;
}

.post-navigation a:hover .nav-title {
	color: var(--sg-primary);
}

/* Articles liés. */
.related-posts {
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid var(--sg-border);
}

.related-title {
	margin: 0 0 28px;
	font-size: var(--sg-h3);
}

.related-posts .post-card-title {
	font-size: var(--sg-h5);
}

/* ======================================================================
   12. Commentaires
   ====================================================================== */

.comments-area {
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid var(--sg-border);
}

.comments-title,
.comment-reply-title {
	margin-top: 0;
	font-size: var(--sg-h3);
}

.comment-list,
.comment-list .children {
	margin: 0 0 40px;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin: 0 0 0 32px;
}

.comment-body {
	margin-bottom: 24px;
	padding: 20px 24px;
	border-radius: var(--sg-radius);
	background: var(--sg-surface);
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
	font-size: .85em;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--sg-secondary);
}

.comment-author .avatar {
	border-radius: 50%;
}

.comment-author .says {
	display: none;
}

.comment-metadata a {
	color: var(--sg-muted);
	text-decoration: none;
}

.reply a {
	font-size: .85em;
	font-weight: 600;
	text-decoration: none;
}

.comment-form p {
	margin-bottom: 1em;
}

.comment-form label {
	display: block;
}

.comment-form-cookies-consent label {
	display: inline;
	font-weight: 400;
}

/* ======================================================================
   13. Widgets et barre latérale
   ====================================================================== */

.widget {
	margin-bottom: 40px;
	font-size: .95em;
}

.widget:last-child {
	margin-bottom: 0;
}

.widget-title {
	margin: 0 0 16px;
	font-size: 1.05em;
	letter-spacing: .01em;
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget li {
	padding: 6px 0;
}

.widget li a {
	text-decoration: none;
}

.widget-area .widget li {
	border-bottom: 1px solid var(--sg-border);
}

.widget-area .widget li:last-child {
	border-bottom: 0;
}

.widget-area .widget a {
	color: var(--sg-text);
}

.widget-area .widget a:hover {
	color: var(--sg-primary);
}

/* ======================================================================
   14. Pied de page
   ====================================================================== */

.site-footer {
	background: var(--sg-footer-bg);
	color: var(--sg-footer-text);
	/* Typographie > Pied de page. */
	font-family: var(--sg-footer-font, inherit);
	font-size: var(--sg-footer-fs, .93em);
	font-weight: var(--sg-footer-weight, inherit);
	line-height: var(--sg-footer-lh, inherit);
	letter-spacing: var(--sg-footer-ls, normal);
	text-transform: var(--sg-footer-tt, none);
}

.site-footer a {
	color: inherit;
	text-decoration: none;
}

.site-footer a:hover {
	text-decoration: underline;
}

.site-footer .widget-title,
.site-footer h1,
.site-footer h2,
.site-footer h3,
.site-footer h4 {
	color: inherit;
	filter: brightness(1.4);
}

.footer-widgets {
	padding-block: 64px 48px;
}

.footer-grid {
	display: grid;
	grid-template-columns: repeat(var(--sg-cols, 4), minmax(0, 1fr));
	gap: 40px;
}

.footer-bottom {
	background: var(--sg-footer-bottom-bg, transparent);
	color: var(--sg-footer-bottom-text, inherit);
}

/* Filet de séparation seulement sous les colonnes de widgets, et pas si la barre a son propre fond. */
.footer-widgets + .footer-bottom {
	border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.footer-bottom-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 32px;
	padding-block: 24px;
	/* Typographie > Pied de page — barre du bas (vide : reprend le pied de page, taille 90 %). */
	font-family: var(--sg-footer-bottom-font, inherit);
	font-size: var(--sg-footer-bottom-fs, .9em);
	font-weight: var(--sg-footer-bottom-weight, inherit);
	line-height: var(--sg-footer-bottom-lh, inherit);
	letter-spacing: var(--sg-footer-bottom-ls, inherit);
	text-transform: var(--sg-footer-bottom-tt, inherit);
}

.footer-bottom--reverse .footer-bottom-inner {
	flex-direction: row-reverse;
}

.footer-bottom--center .footer-bottom-inner {
	flex-direction: column;
	justify-content: center;
	text-align: center;
}

.site-info p {
	margin: 0;
}

.footer-bottom-end {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 32px;
}

.footer-bottom--center .footer-bottom-end {
	flex-direction: column;
	justify-content: center;
}

/* Zone de widgets « Pied de page — barre du bas » : widgets côte à côte, sans marges. */
.footer-bottom-widgets {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 24px;
}

.footer-bottom-widgets .widget {
	margin: 0;
	padding: 0;
	border: 0;
}

.footer-bottom-widgets .widget > :last-child,
.footer-bottom-widgets p {
	margin-bottom: 0;
}

.footer-bottom-widgets p {
	margin-top: 0;
}

.footer-bottom-widgets ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-bottom-widgets img {
	display: block;
	max-height: 40px;
	width: auto;
}

.footer-bottom-widgets .wp-block-social-links {
	margin: 0;
}

.footer-bottom--center .footer-bottom-widgets,
.footer-bottom--center .footer-nav ul,
.footer-bottom--center .footer-bottom-widgets ul {
	justify-content: center;
}

.footer-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ======================================================================
   15. Pagination, 404, retour en haut
   ====================================================================== */

.pagination {
	margin-top: 56px;
}

.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: 44px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--sg-border);
	border-radius: 8px;
	color: var(--sg-text);
	font-weight: 600;
	text-decoration: none;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
	border-color: var(--sg-primary);
	background: var(--sg-primary);
	color: var(--sg-primary-contrast);
}

.pagination .page-numbers.dots {
	border: 0;
	background: none;
	color: var(--sg-muted);
}

.error-404,
.no-results {
	max-width: 640px;
	margin: 0 auto;
	text-align: center;
}

.error-404 .search-form,
.no-results .search-form {
	margin: 24px auto 32px;
}

.error-code {
	margin: 0;
	color: var(--sg-primary);
	font-family: var(--sg-font-headings);
	font-size: clamp(80px, 18vw, 160px);
	font-weight: 800;
	line-height: 1;
	opacity: .9;
}

.sg-scrolltop {
	position: fixed;
	bottom: 24px;
	z-index: 90;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--sg-top-bg, var(--sg-primary));
	color: var(--sg-top-fg, var(--sg-primary-contrast));
	box-shadow: var(--sg-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity var(--sg-transition), transform var(--sg-transition), visibility var(--sg-transition);
}

/* Couleurs : Réglages Sagamento > Retour en haut. */
.sg-scrolltop:hover,
.sg-scrolltop:focus-visible {
	background: var(--sg-top-bg-hover, var(--sg-top-bg, var(--sg-primary)));
	color: var(--sg-top-fg-hover, var(--sg-top-fg, var(--sg-primary-contrast)));
	filter: var(--sg-top-hover-filter, brightness(1.1));
}

.sg-scrolltop.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.sg-scrolltop-right {
	right: 24px;
}

.sg-scrolltop-left {
	left: 24px;
}

/* Écran de chargement. */
.sg-loader {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--sg-loader-bg, var(--sg-bg));
	transition: opacity .45s ease, visibility .45s ease;
}

.sg-loader.is-done {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.sg-loader[hidden] {
	display: none;
}

.sg-loading body {
	overflow: hidden;
}

.sg-loader-image {
	width: var(--sg-loader-size, 120px);
	max-width: 80vw;
	height: auto;
	max-height: 80vh;
	object-fit: contain;
}

.sg-loader-spinner {
	display: block;
	width: min(var(--sg-loader-size, 120px), 80vw);
	aspect-ratio: 1;
	border: max(3px, calc(var(--sg-loader-size, 120px) / 14)) solid color-mix(in srgb, var(--sg-primary) 18%, transparent);
	border-top-color: var(--sg-primary);
	border-radius: 50%;
	animation: sg-loader-spin .9s linear infinite;
}

.sg-loader-pulse .sg-loader-image {
	animation: sg-loader-pulse 1.4s ease-in-out infinite;
}

.sg-loader-spin .sg-loader-image {
	animation: sg-loader-spin 1.4s linear infinite;
}

.sg-loader-bounce .sg-loader-image {
	animation: sg-loader-bounce 1s ease-in-out infinite;
}

@keyframes sg-loader-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: .55; transform: scale(.92); }
}

@keyframes sg-loader-spin {
	to { transform: rotate(360deg); }
}

@keyframes sg-loader-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-18%); }
}

/* Page « site en travaux ». */
.sg-maint {
	display: grid;
	place-items: center;
	min-height: 100vh;
	min-height: 100dvh;
	padding: 48px var(--sg-gutter);
	background: var(--sg-maint-bg, var(--sg-bg));
	color: var(--sg-maint-fg, var(--sg-text));
	text-align: center;
}

.admin-bar .sg-maint {
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}

.sg-maint-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 680px;
	margin: 0 auto;
}

.sg-maint-image {
	display: block;
	width: var(--sg-maint-img, 160px);
	max-width: 90vw;
	height: auto;
	margin: 0 auto 36px; /* Centrée horizontalement. */
	object-fit: contain;
}

.sg-maint-title {
	margin: 0 0 16px;
	color: var(--sg-maint-title, var(--sg-secondary));
}

.sg-maint-text {
	font-size: 1.1em;
}

.sg-maint-text > :last-child {
	margin-bottom: 0;
}

.sg-maint-text a {
	color: inherit;
}

/* ======================================================================
   16. Mode sombre
   ====================================================================== */

/* Choix explicite (bouton). */
[data-theme="dark"] .sg-theme-toggle .sg-icon-moon {
	display: none;
}

[data-theme="dark"] .sg-theme-toggle .sg-icon-sun {
	display: inline;
}

[data-theme="dark"] .site-branding:has(.sg-logo-alt) .sg-logo-main {
	display: none;
}

[data-theme="dark"] .sg-logo-alt {
	display: block;
}

[data-theme="dark"] {
	--sg-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
}

/* Préférence de l'appareil (mode automatique). */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .sg-theme-toggle .sg-icon-moon {
		display: none;
	}

	:root:not([data-theme="light"]) .sg-theme-toggle .sg-icon-sun {
		display: inline;
	}

	:root:not([data-theme="light"]) .site-branding:has(.sg-logo-alt) .sg-logo-main {
		display: none;
	}

	:root:not([data-theme="light"]) .sg-logo-alt {
		display: block;
	}

	:root:not([data-theme="light"]) {
		--sg-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
	}
}

/* ======================================================================
   17. Classes WordPress et blocs
   ====================================================================== */

.alignleft {
	float: left;
	margin: .3em 1.6em 1em 0;
}

.alignright {
	float: right;
	margin: .3em 0 1em 1.6em;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.wp-caption,
figure {
	max-width: 100%;
}

.wp-caption-text,
figcaption,
.wp-element-caption {
	margin-top: .6em;
	color: var(--sg-muted);
	font-size: .85em;
	text-align: center;
}

.gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }

.bypostauthor > .comment-body {
	border-left: 3px solid var(--sg-primary);
}

/* Blocs larges et pleine largeur (sans barre latérale). */
@media (min-width: 1100px) {
	.sg-sidebar-none .entry-content > .alignwide {
		width: auto;
		max-width: none;
		margin-inline: -80px;
	}

	.sg-narrow .entry-content > .alignwide {
		margin-inline: -160px;
	}
}

.sg-sidebar-none .entry-content > .alignfull,
.sg-sidebar-none .site-main > .alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-inline: calc(50% - 50vw);
}

/* Le texte des blocs pleine largeur reste aligné sur le conteneur du site. */
.wp-block-cover.alignfull > .wp-block-cover__inner-container {
	width: 100%;
	max-width: calc(var(--sg-container) + 2 * var(--sg-gutter));
	margin-inline: auto;
	padding-inline: var(--sg-gutter);
}

.sg-container-stretched .entry-content > .alignfull {
	margin-inline: 0;
	width: 100%;
}

.wp-block-image img {
	border-radius: inherit;
}

.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--sg-border);
}

.wp-block-quote.is-style-large {
	border-left: 0;
	padding-left: 0;
}

.wp-block-pullquote {
	border-block: 3px solid var(--sg-primary);
}

.wp-block-search__button {
	margin-left: 8px;
}

.has-sg-primary-color { color: var(--sg-primary) !important; }
.has-sg-accent-color { color: var(--sg-accent) !important; }
.has-sg-accent-background-color { background-color: var(--sg-accent) !important; color: var(--sg-accent-contrast); }
.has-sg-secondary-color { color: var(--sg-secondary) !important; }
.has-sg-text-color { color: var(--sg-text) !important; }
.has-sg-muted-color { color: var(--sg-muted) !important; }
.has-sg-surface-color { color: var(--sg-surface) !important; }
.has-sg-bg-color { color: var(--sg-bg) !important; }
.has-sg-primary-background-color { background-color: var(--sg-primary) !important; }
.has-sg-secondary-background-color { background-color: var(--sg-secondary) !important; }
.has-sg-text-background-color { background-color: var(--sg-text) !important; }
.has-sg-muted-background-color { background-color: var(--sg-muted) !important; }
.has-sg-surface-background-color { background-color: var(--sg-surface) !important; }
.has-sg-bg-background-color { background-color: var(--sg-bg) !important; }

/* ======================================================================
   18. Mobile et préférences de mouvement
   ====================================================================== */

@media (max-width: 1100px) {
	.posts-layout-grid {
		grid-template-columns: repeat(min(var(--sg-cols, 3), 3), minmax(0, 1fr));
	}
}

/* Tablette (même seuil que la typographie) : logo et espaces autour du logo. */
@media (max-width: 1024px) {
	.site-header {
		--sg-lw: var(--sg-logo-w-t, var(--sg-logo-w, 180px));
		--sg-lpt: var(--sg-logo-pt-t, var(--sg-logo-pt, 0px));
		--sg-lpb: var(--sg-logo-pb-t, var(--sg-logo-pb, 0px));
		--sg-bxc: var(--sg-bx-t, var(--sg-bx, 0px));
		--sg-byc: var(--sg-by-t, var(--sg-by, 0px));
	}

	.site-branding .custom-logo {
		max-height: var(--sg-logo-mh-t, calc(var(--sg-header-h, 84px) - 16px));
	}
}

@media (max-width: 960px) {
	:root {
		--sg-gutter: 20px;
	}

	.content-container {
		padding-block: min(var(--sg-spacing, 64px), 48px);
	}

	.page-header.has-bg {
		padding-block: 40px;
	}

	.header-inner,
	.header-split .header-inner {
		display: flex;
		gap: 12px;
		min-height: calc(min(var(--sg-header-h, 84px), 72px) + var(--sg-lpt, 0px) + var(--sg-lpb, 0px));
	}

	.header-centered .header-inner {
		grid-template-columns: 1fr auto 1fr;
		gap: 12px;
	}

	.site-branding .custom-logo {
		max-height: var(--sg-logo-mh-t, 52px);
	}

	.primary-nav,
	.header-nav-row,
	.sg-hide-mobile {
		display: none !important;
	}

	.header-actions {
		margin-left: auto;
	}

	.sg-menu-toggle {
		display: inline-flex;
	}

	.sg-transparent-header .site-content > .page-header {
		padding-top: calc(72px + 40px);
	}

	.sg-transparent-header:not(.sg-no-padding):not(.sg-container-stretched) .site-content > .content-container:first-child {
		padding-top: calc(48px + 72px);
	}

	.content-area,
	.sg-sidebar-right .content-area,
	.sg-sidebar-left .content-area {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
	}

	.sg-sidebar-left .content-area > .site-main {
		order: 0;
	}

	.posts-layout-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.site-header {
		--sg-lw: var(--sg-logo-w-m, var(--sg-logo-w-t, var(--sg-logo-w, 180px)));
		--sg-lpt: var(--sg-logo-pt-m, var(--sg-logo-pt-t, var(--sg-logo-pt, 0px)));
		--sg-lpb: var(--sg-logo-pb-m, var(--sg-logo-pb-t, var(--sg-logo-pb, 0px)));
		--sg-bxc: var(--sg-bx-m, var(--sg-bx-t, var(--sg-bx, 0px)));
		--sg-byc: var(--sg-by-m, var(--sg-by-t, var(--sg-by, 0px)));
	}

	.site-branding .custom-logo {
		max-height: var(--sg-logo-mh-m, var(--sg-logo-mh-t, 52px));
	}

	.posts-layout-grid,
	.footer-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.posts-layout-list .post-card {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
	}

	.post-navigation .nav-links {
		grid-template-columns: 1fr;
	}

	.post-navigation .nav-next {
		grid-column: 1;
	}

	.author-box {
		flex-direction: column;
	}

	.footer-bottom-inner,
	.footer-bottom-end {
		flex-direction: column;
		align-items: flex-start;
	}

	.footer-bottom--reverse .footer-bottom-inner {
		flex-direction: column-reverse;
	}

	.footer-bottom--center .footer-bottom-inner,
	.footer-bottom--center .footer-bottom-end {
		align-items: center;
	}

	.alignleft,
	.alignright {
		float: none;
		margin: 0 0 1.4em;
	}

	.comment-list .children {
		margin-left: 12px;
	}

	.sg-scrolltop {
		bottom: 16px;
	}

	.sg-scrolltop-right { right: 16px; }
	.sg-scrolltop-left { left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}

@media print {
	.site-header,
	.sg-topbar,
	.site-footer,
	.widget-area,
	.sg-scrolltop,
	.sg-drawer,
	.post-navigation,
	.comments-area {
		display: none !important;
	}
}
