/**
 * Maky Base — portail éditorial.
 *
 * Mise en page ouverte : les contenus se posent sur le fond de page, sans
 * panneau central ni cartes systématiques. Les couleurs, la typographie et
 * la largeur sont surchargées par le personnalisateur via des variables CSS.
 */

:root {
	--maky-accent-brand: #1e73be;
	--maky-accent: #1e73be;
	--maky-accent-hover: #155a96;
	--maky-accent-header: #1e73be;
	--maky-accent-footer: #1e73be;
	--maky-accent-surface: #1e73be;
	--maky-focus: #1e73be;
	--maky-focus-header: #1e73be;
	--maky-focus-footer: #1e73be;
	--maky-focus-surface: #1e73be;
	--maky-background: #ffffff;
	--maky-surface: #f7f8f9;
	--maky-text: #222222;
	--maky-muted: #575760;
	--maky-link: var(--maky-accent);
	--maky-link-hover: var(--maky-accent-hover);
	--maky-button-bg: var(--maky-accent);
	--maky-button-text: #ffffff;
	--maky-button-hover-bg: var(--maky-accent-hover);
	--maky-button-hover-text: #ffffff;
	--maky-header-bg: #ffffff;
	--maky-header-text: #222222;
	--maky-footer-bg: #ffffff;
	--maky-footer-text: #575760;
	--maky-border: #e3e6ea;
	--maky-font: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
	--maky-font-size: 17px;
	--maky-font-scale: 1;
	--maky-container: 1200px;
	--maky-columns: 3;
	--maky-sidebar-width: 320px;
	--maky-gutter: clamp(1rem, 3vw, 2rem);
	--maky-page-gutter: clamp(1rem, 4vw, 4rem);
	--maky-space: clamp(1.75rem, 4vw, 3rem);
	--maky-radius: 4px;
	--maky-text-scale: 1;
}

/* Paliers de la barre « Taille du texte ». Ils sont posés sur `<html>` par
   le script du thème ; les unités relatives suivent ensuite le niveau. */
html[data-maky-text-size="1"] {
	--maky-text-scale: 1.25;
}

html[data-maky-text-size="2"] {
	--maky-text-scale: 1.5;
}

html[data-maky-text-size="3"] {
	--maky-text-scale: 1.75;
}

html[data-maky-text-size="4"] {
	--maky-text-scale: 2;
}

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

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	font-size: calc(100% * var(--maky-text-scale));
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	background: var(--maky-background);
	color: var(--maky-text);
	font-family: var(--maky-font);
	font-size: calc(var(--maky-font-size) * var(--maky-text-scale));
	line-height: 1.65;
	overflow-wrap: anywhere;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img,
svg,
video,
canvas {
	display: block;
	max-width: 100%;
	height: auto;
}

figure {
	margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 0.55em;
	color: var(--maky-text);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

h1 {
	font-size: calc(clamp(1.85rem, 3.2vw, 2.5rem) * var(--maky-font-scale));
}

h2 {
	font-size: calc(clamp(1.4rem, 2.3vw, 1.8rem) * var(--maky-font-scale));
}

h3 {
	font-size: calc(clamp(1.18rem, 1.8vw, 1.4rem) * var(--maky-font-scale));
}

h4 {
	font-size: calc(1.05rem * var(--maky-font-scale));
}

p {
	margin: 0 0 1em;
}

a {
	color: var(--maky-link);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

a:hover,
a:focus {
	color: var(--maky-link-hover);
}

ul,
ol {
	margin: 0 0 1em;
	padding-left: 1.3em;
}

li + li {
	margin-top: 0.3em;
}

blockquote {
	margin: 1.75em 0;
	padding: 0.1em 0 0.1em 1.25em;
	border-left: 3px solid var(--maky-accent);
	color: var(--maky-muted);
	font-style: italic;
}

code,
kbd,
pre {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.9em;
}

code {
	padding: 0.15em 0.35em;
	border-radius: 3px;
	background: var(--maky-surface);
}

pre {
	overflow-x: auto;
	margin: 0 0 1.5em;
	padding: 1rem;
	border-radius: var(--maky-radius);
	background: #1f2937;
	color: #f9fafb;
}

pre code {
	padding: 0;
	background: transparent;
	color: inherit;
}

hr {
	margin: 2rem 0;
	border: 0;
	border-top: 1px solid var(--maky-border);
}

table {
	width: 100%;
	margin: 0 0 1.5em;
	border-collapse: collapse;
}

th,
td {
	padding: 0.65rem 0.75rem;
	border-bottom: 1px solid var(--maky-border);
	text-align: left;
	vertical-align: top;
}

th {
	border-bottom-width: 2px;
	font-weight: 700;
}

/* Accessibilité ------------------------------------------------------- */

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

.screen-reader-text:focus {
	z-index: 100000;
	top: 0.75rem;
	left: 0.75rem;
	display: block;
	width: auto;
	height: auto;
	padding: 0.65rem 0.9rem;
	clip: auto;
	clip-path: none;
	border-radius: var(--maky-radius);
	background: var(--maky-background);
	box-shadow: 0 6px 20px rgba(17, 24, 39, 0.15);
	color: var(--maky-text);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	white-space: normal;
}

.skip-link {
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 100001;
	display: inline-block;
	padding: 0.65rem 0.9rem;
	border-radius: var(--maky-radius);
	background: var(--maky-background);
	box-shadow: 0 6px 20px rgba(17, 24, 39, 0.2);
	color: var(--maky-text);
	font-weight: 600;
	text-decoration: none;
	transform: translateY(calc(-100% - 1.5rem));
}

.skip-link:focus,
.skip-link:focus-visible {
	transform: translateY(0);
	outline: 3px solid var(--maky-focus);
	outline-offset: 2px;
}

/* Le contour de focus est un élément d'interface : il doit atteindre 3:1
   avec le fond réel de la zone. Les variantes sont calculées en PHP. */
:focus-visible {
	outline: 3px solid var(--maky-focus);
	outline-offset: 3px;
}

.site-header :focus-visible {
	outline-color: var(--maky-focus-header);
}

.site-footer :focus-visible {
	outline-color: var(--maky-focus-footer);
}

.main-navigation .sub-menu :focus-visible,
.maky-widget :focus-visible,
.widget :focus-visible {
	outline-color: var(--maky-focus-surface);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Structure ----------------------------------------------------------- */

.container {
	width: 100%;
	max-width: none;
	margin-inline: auto;
	padding-inline: var(--maky-page-gutter);
}

.site-main {
	flex: 1 0 auto;
	/* Le haut du contenu est commun à tous les gabarits : accueil portail,
	   accueil classique, pages et articles. Il ne se cumule pas avec la
	   marge du premier bloc. */
	padding-block: 24px var(--maky-space);
}

.site-main > :first-child {
	margin-top: 0;
}

.site-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "content";
	gap: var(--maky-space);
	align-items: start;
}

body.has-sidebar .site-layout {
	grid-template-columns: minmax(0, 1fr) var(--maky-sidebar-width);
	grid-template-areas: "content sidebar";
}

body.has-sidebar.sidebar-left .site-layout {
	grid-template-columns: var(--maky-sidebar-width) minmax(0, 1fr);
	grid-template-areas: "sidebar content";
}

/* Une zone latérale active dont les widgets ne rendent rien ne doit ni être
   affichée ni réserver une piste. Le gabarit omet alors l'aside. */
body.has-sidebar .site-layout:not(:has(> .sidebar)) {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "content";
}

.site-content {
	grid-area: content;
	min-width: 0;
}

.sidebar {
	grid-area: sidebar;
}

/* En-tête ------------------------------------------------------------- */

.site-header {
	position: relative;
	z-index: 100;
	border-bottom: 1px solid var(--maky-border);
	background: var(--maky-header-bg);
	color: var(--maky-header-text);
}

body.maky-header-sticky .site-header {
	position: sticky;
	top: 0;
}

body.admin-bar.maky-header-sticky .site-header {
	top: 32px;
}

/* Taille du texte : bouton compact aA et panneau dans l'en-tête. */

.site-header > .site-header__inner > .header-textsize {
	position: relative;
	flex: 0 0 auto;
	align-self: center;
	order: 4;
}

.maky-textsize {
	color: var(--maky-header-text);
}

.maky-textsize__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	background: transparent;
	color: var(--maky-header-text);
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.maky-textsize__toggle:hover,
.maky-textsize__toggle:focus,
.maky-textsize__toggle[aria-expanded="true"] {
	border-color: var(--maky-accent-header);
	color: var(--maky-accent-header);
}

.maky-textsize__aa {
	display: block;
	text-transform: none;
	transform: translateY(0.05em);
}

.maky-textsize__panel {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	z-index: 120;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	box-sizing: border-box;
	width: min(19rem, calc(100vw - 2rem));
	max-height: min(30rem, calc(100dvh - 6rem));
	padding: 0.85rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	background: var(--maky-background);
	color: var(--maky-text);
	box-shadow: 0 14px 32px rgba(17, 24, 39, 0.16);
}

.maky-textsize__panel[hidden] {
	display: none;
}

.maky-textsize__label {
	margin: 0;
	color: var(--maky-text);
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.maky-textsize__controls {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.maky-textsize__button {
	display: inline-flex;
	flex: 1 1 auto;
	align-items: center;
	justify-content: center;
	min-width: 2.75em;
	min-height: 2.75em;
	padding: 0.25em 0.5em;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	background: var(--maky-background);
	color: var(--maky-text);
	font-family: inherit;
	font-size: 1em;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.maky-textsize__button:hover,
.maky-textsize__button:focus {
	border-color: var(--maky-accent-header);
	color: var(--maky-accent-header);
}

.maky-textsize__button[aria-disabled="true"] {
	border-style: dashed;
	color: var(--maky-muted);
	cursor: not-allowed;
}

.maky-textsize__button[aria-disabled="true"]:hover {
	border-color: var(--maky-border);
	color: var(--maky-muted);
}

.maky-textsize__value {
	color: var(--maky-muted);
	font-size: 0.82rem;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	text-align: right;
	white-space: nowrap;
}

.site-header__inner {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
	min-height: 68px;
	padding-block: 0.5rem;
}

.site-branding {
	flex: 0 0 auto;
	min-width: 0;
	line-height: 1.15;
}

.site-branding .custom-logo {
	width: auto;
	max-width: 150px;
	max-height: 44px;
}

.site-title {
	margin: 0;
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.site-title a {
	color: var(--maky-header-text);
	text-decoration: none;
}

.site-title a:hover,
.site-title a:focus {
	color: var(--maky-accent-header);
}

.site-description {
	margin: 0.15rem 0 0;
	color: var(--maky-muted);
	font-size: 0.78rem;
}

.header-panel {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	gap: 1.25rem;
	min-width: 0;
}

.main-navigation {
	min-width: 0;
}

.main-navigation ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.15rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.main-navigation li {
	position: relative;
	margin: 0;
}

.main-navigation a {
	display: block;
	padding: 0.45rem 0.5rem;
	color: var(--maky-header-text);
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a {
	color: var(--maky-accent-header);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.main-navigation .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 20;
	display: none;
	flex-direction: column;
	align-items: stretch;
	min-width: 220px;
	margin-top: 0;
	padding: 0.65rem 0 0.4rem;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	background: var(--maky-background);
	box-shadow: 0 12px 28px rgba(17, 24, 39, 0.1);
}

.main-navigation .sub-menu .sub-menu {
	top: 0;
	left: 100%;
	margin-top: 0;
	margin-left: 0;
	padding: 0.4rem 0 0.4rem 0.25rem;
}

.main-navigation li:hover > .sub-menu {
	display: flex;
}

html:not(.maky-js) .main-navigation li:focus-within > .sub-menu {
	display: flex;
}

.main-navigation .sub-menu a {
	padding: 0.5rem 0.9rem;
	white-space: normal;
}

.main-navigation .sub-menu a:hover,
.main-navigation .sub-menu a:focus {
	background: var(--maky-surface);
	text-decoration: none;
}

.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	background: transparent;
	color: var(--maky-header-text);
	cursor: pointer;
}

.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
	display: block;
	width: 18px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle__bars {
	position: relative;
}

.menu-toggle__bars::before,
.menu-toggle__bars::after {
	position: absolute;
	left: 0;
	content: "";
}

.menu-toggle__bars::before {
	top: -5px;
}

.menu-toggle__bars::after {
	top: 5px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars {
	background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before {
	transform: translateY(5px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after {
	transform: translateY(-5px) rotate(-45deg);
}

.menu-toggle:hover,
.menu-toggle:focus,
.menu-toggle:focus-visible {
	border-color: var(--maky-accent-header);
	background: transparent;
	color: var(--maky-accent-header);
}

/* Recherche dans l'en-tête */

.header-search {
	flex: 0 1 160px;
	margin-left: auto;
}

.header-search .search-form {
	position: relative;
	display: flex;
	max-width: none;
	gap: 0;
}

.header-search .search-field {
	min-height: 38px;
	padding: 0.4rem 2.4rem 0.4rem 0.7rem;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	background: var(--maky-background);
	font-size: 0.875rem;
}

.header-search .search-submit {
	position: absolute;
	top: 1px;
	right: 1px;
	bottom: 1px;
	width: 36px;
	height: auto;
	padding: 0;
	border: 0;
	border-radius: 0 var(--maky-radius) var(--maky-radius) 0;
	background: transparent;
	color: var(--maky-muted);
	font-size: 0;
}

.header-search .search-submit::before {
	content: "";
	display: block;
	width: 12px;
	height: 12px;
	margin: auto;
	border: 2px solid currentColor;
	border-radius: 50%;
	box-shadow: 6px 6px 0 -4px currentColor;
}

.header-search .search-submit:hover,
.header-search .search-submit:focus {
	background: var(--maky-surface);
	color: var(--maky-accent-header);
}

/* Panier */

.maky-cart-link {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	gap: 0.4rem;
	order: 3;
	padding: 0.42rem 0.65rem;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	color: var(--maky-header-text);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
}

.maky-cart-link:hover,
.maky-cart-link:focus {
	border-color: var(--maky-accent-header);
	color: var(--maky-accent-header);
}

/* Actions de l'en-tête ------------------------------------------------ */

.header-actions {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-left: auto;
}

.maky-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 0.75rem;
	border: 1px solid transparent;
	border-radius: var(--maky-radius);
	font-size: 0.84rem;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.maky-action--primary {
	border-color: var(--maky-action-primary-bg, var(--maky-button-bg));
	background: var(--maky-action-primary-bg, var(--maky-button-bg));
	color: var(--maky-action-primary-text, var(--maky-button-text));
}

.maky-action--primary:hover,
.maky-action--primary:focus {
	border-color: var(--maky-action-primary-hover-bg, var(--maky-button-hover-bg));
	background: var(--maky-action-primary-hover-bg, var(--maky-button-hover-bg));
	color: var(--maky-action-primary-text, var(--maky-button-hover-text));
	text-decoration: none;
}

.maky-action--secondary {
	border-color: currentColor;
	background: var(--maky-action-secondary-bg, var(--maky-background));
	color: var(--maky-action-secondary-text, var(--maky-accent-header));
}

.maky-action--secondary:hover,
.maky-action--secondary:focus {
	background: var(--maky-action-secondary-hover-bg, var(--maky-surface));
	color: var(--maky-action-secondary-text, var(--maky-accent-header));
	text-decoration: none;
}

/* Navigation secondaire ----------------------------------------------- */

.site-subnav {
	border-bottom: 1px solid var(--maky-border);
	background: var(--maky-header-bg);
	color: var(--maky-header-text);
}

.site-subnav .container {
	display: flex;
	align-items: center;
	min-height: 42px;
}

.site-subnav .menu {
	flex-wrap: wrap;
	gap: 0;
	padding-block: 0.15rem;
}

.site-subnav .menu > li > a {
	padding: 0.55rem 0.7rem;
	color: var(--maky-muted);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.site-subnav .menu > li > a:hover,
.site-subnav .menu > li > a:focus,
.site-subnav .current-menu-item > a,
.site-subnav .current-menu-ancestor > a,
.site-subnav .current-menu-parent > a {
	color: var(--maky-accent-header);
	text-decoration: none;
}

.site-subnav .sub-menu a {
	color: var(--maky-text);
	font-size: 0.9rem;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
}

.site-subnav .sub-menu a:hover,
.site-subnav .sub-menu a:focus {
	color: var(--maky-accent-header);
}

/* Boutons de sous-menu (clavier et toucher) --------------------------- */

.main-navigation .menu-item-has-children {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}

.main-navigation .menu-item-has-children > a {
	flex: 1 1 auto;
}

.main-navigation .menu-item-has-children > .sub-menu {
	flex: 1 0 100%;
}

.submenu-toggle {
	position: static;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	margin: 0 0.1rem 0 -0.15rem;
	padding: 0;
	border: 0;
	border-radius: var(--maky-radius);
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.submenu-toggle:hover,
.submenu-toggle:focus,
.submenu-toggle[aria-expanded="true"] {
	background: var(--maky-surface);
	color: var(--maky-accent-header);
}

.submenu-toggle__icon {
	display: block;
	width: 6px;
	height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translate(-1px, -1px);
	transition: transform 0.2s ease;
}

.submenu-toggle[aria-expanded="true"] .submenu-toggle__icon {
	transform: rotate(-135deg) translate(-1px, -1px);
}

.main-navigation li.is-open > .sub-menu {
	display: flex;
}

.maky-cart-link__icon {
	flex: 0 0 auto;
}

.maky-cart-link__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.35rem;
	height: 1.35rem;
	padding: 0 0.3rem;
	border-radius: 999px;
	background: var(--maky-button-bg);
	color: var(--maky-button-text);
	font-size: 0.72rem;
	line-height: 1;
}

.maky-cart-link__label {
	display: none;
}

@media (min-width: 901px) {
	.site-header .header-panel {
		display: contents;
	}

	.site-header .site-branding {
		order: 1;
	}

	.site-header .main-navigation {
		order: 2;
		margin-right: auto;
	}

	.site-header .header-search {
		order: 3;
		margin-left: 0;
	}

	.site-header .maky-cart-link {
		order: 4;
	}

	.site-header .header-actions {
		order: 5;
		margin-left: 0;
	}
}

/* Publicités ---------------------------------------------------------- */

/* L'emplacement reste dans le flux, avec toute sa largeur, pour que le
   fournisseur puisse le mesurer et y créer la création. Tant qu'aucune
   création visible n'est rendue, il ne réserve ni hauteur, ni marge, ni
   interligne. La classe is-ad-filled est posée par navigation.js dès
   qu'une création visible existe, y compris après un chargement différé. */
.ad-slot {
	max-width: 100%;
	margin-block: 0;
	padding: 0;
	overflow: hidden;
	text-align: center;
}

.ad-slot.is-ad-filled {
	margin-block: var(--maky-space);
}

.ad-slot--ad-after-header.is-ad-filled {
	margin-block: 1.5rem;
}

.ad-slot--ad-home.is-ad-filled {
	margin-block: 2.5rem;
}

.ad-slot__label {
	display: none;
	margin-bottom: 0.5rem;
	color: var(--maky-muted);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-align: center;
	text-transform: uppercase;
}

.ad-slot.is-ad-filled .ad-slot__label,
.ad-slot:has(.ad-slot__placeholder) .ad-slot__label {
	display: block;
}

.ad-slot img,
.ad-slot video {
	max-width: 100%;
	margin-inline: auto;
	height: auto;
}

/* Les dimensions fournies par Ad Inserter / GPT restent la référence :
   aucune hauteur imposée à l'iframe ou à l'élément d'annonce. */
.ad-slot iframe,
.ad-slot ins {
	max-width: 100%;
	margin-inline: auto;
}

/* Évite la ligne de base d'une iframe vide, sans toucher à sa hauteur
   fournie par le format publicitaire. */
.ad-slot iframe {
	display: block;
}

.ad-slot__placeholder {
	margin: 0;
	padding: 1rem;
	border: 1px dashed var(--maky-border);
	border-radius: var(--maky-radius);
	color: var(--maky-muted);
	font-size: 0.85rem;
	text-align: center;
}

.sidebar .ad-slot.is-ad-filled {
	margin-block: 1.5rem;
}

/* Sections du portail -------------------------------------------------- */

.portal-section {
	margin-top: var(--maky-space);
	padding-top: 1.25rem;
	border-top: 1px solid var(--maky-border);
}

.portal-section:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.portal-section__header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-bottom: 1.5rem;
}

.portal-section__title {
	margin: 0;
	font-size: calc(1.25rem * var(--maky-font-scale));
	letter-spacing: 0.01em;
}

.portal-section__title a {
	color: var(--maky-text);
	text-decoration: none;
}

.portal-section__title a:hover,
.portal-section__title a:focus {
	color: var(--maky-accent);
}

.portal-section__more {
	color: var(--maky-muted);
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}

.portal-section__more:hover,
.portal-section__more:focus {
	color: var(--maky-accent);
	text-decoration: underline;
}

.portal-kicker {
	display: inline-block;
	margin-bottom: 0.4rem;
	color: var(--maky-accent);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-decoration: none;
	text-transform: uppercase;
}

.portal-kicker:hover,
.portal-kicker:focus {
	color: var(--maky-accent-hover);
	text-decoration: underline;
}

.portal-meta {
	color: var(--maky-muted);
	font-size: 0.82rem;
}

.portal-meta a {
	color: inherit;
}

/* À la une */

.portal-featured {
	display: grid;
	grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
	gap: var(--maky-space);
	align-items: start;
}

.portal-lead__media {
	display: block;
}

/* Les couvertures éditoriales gardent leur hauteur naturelle, sans cadre
   de ratio fixe ni fond visible autour du visuel. */
.portal-lead__media img {
	width: 100%;
}

.portal-lead__body {
	padding-top: 1rem;
}

.portal-lead__title {
	margin-bottom: 0.5rem;
	font-size: calc(clamp(1.5rem, 2.6vw, 2.05rem) * var(--maky-font-scale));
	line-height: 1.18;
}

.portal-lead__title a {
	color: var(--maky-text);
	text-decoration: none;
}

.portal-lead__title a:hover,
.portal-lead__title a:focus {
	color: var(--maky-accent);
}

.portal-lead__excerpt {
	margin-top: 0.6rem;
	color: var(--maky-muted);
	font-size: 0.98rem;
}

.portal-lead__excerpt p {
	margin-bottom: 0.6em;
}

.portal-secondary {
	min-width: 0;
}

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

.portal-list__item {
	display: flex;
	align-items: flex-start;
	gap: 0.9rem;
	margin: 0;
	padding: 0.85rem 0;
	border-bottom: 1px solid var(--maky-border);
}

.portal-list__item:first-child {
	padding-top: 0;
}

.portal-list__item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.portal-list__thumb {
	flex: 0 0 84px;
	display: block;
}

.portal-list__thumb img {
	width: 84px;
}

.portal-list__body {
	min-width: 0;
}

.portal-list__title {
	margin: 0 0 0.2rem;
	font-size: calc(0.98rem * var(--maky-font-scale));
	line-height: 1.35;
}

.portal-list__title a {
	color: var(--maky-text);
	text-decoration: none;
}

.portal-list__title a:hover,
.portal-list__title a:focus {
	color: var(--maky-accent);
}

.portal-list__date,
.portal-item__date {
	color: var(--maky-muted);
	font-size: 0.78rem;
}

/* Grilles éditoriales */

.portal-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
	gap: 2rem 1.75rem;
}

.portal-grid--archive {
	grid-template-columns: repeat(var(--maky-columns), minmax(0, 1fr));
}

.portal-grid--compact {
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
}

.portal-item {
	min-width: 0;
}

.portal-item__media {
	display: block;
	margin-bottom: 0.7rem;
}

.portal-item__media img {
	width: 100%;
}

.portal-item__title {
	margin: 0 0 0.3rem;
	font-size: calc(1.02rem * var(--maky-font-scale));
	line-height: 1.4;
}

.portal-item__title a {
	color: var(--maky-text);
	text-decoration: none;
}

.portal-item__title a:hover,
.portal-item__title a:focus {
	color: var(--maky-accent);
}

.portal-item .entry-card__excerpt {
	margin-top: 0.45rem;
	color: var(--maky-muted);
	font-size: 0.92rem;
}

.portal-item .entry-card__excerpt p {
	margin: 0;
}

.portal-more {
	display: inline-block;
	margin-top: 0.5rem;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}

.portal-more:hover,
.portal-more:focus {
	text-decoration: underline;
}

/* Catégories de l'accueil */

.portal-categories .portal-section + .portal-section {
	margin-top: var(--maky-space);
}

/* Composition d'accueil par widgets ---------------------------------- */

/* Le contenu et la composition ne prennent une marge de séparation que
   lorsqu'ils se suivent réellement. La première zone reste ainsi à 24 px
   sous la navigation, même si un hook vide précède la composition. */
.portal-page-content,
.portal-widgets {
	margin-top: 0;
}

.portal-page-content + .portal-widgets,
.portal-widgets + .portal-page-content {
	margin-top: var(--maky-space);
}

/* Un contenu de page vide ne doit pas conserver de marge avant l'ouverture
   composée de widgets. Les blocs utilisateur présents ne sont pas modifiés. */
.portal-page-content:not(:has(.entry-content > *)) {
	margin-block: 0;
}

.portal-page-content:not(:has(.entry-content > *)) > .entry {
	margin-bottom: 0;
}

.portal-page-content:not(:has(.entry-content > *)) + .portal-widgets {
	margin-top: 0;
}

.portal-zone--opening {
	margin-bottom: var(--maky-space);
}

.portal-widgets__body {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
	gap: var(--maky-space);
	align-items: start;
}

.portal-widgets__body.is-main-empty,
.portal-widgets__body.is-rail-empty {
	grid-template-columns: minmax(0, 1fr);
}

.portal-widgets__main,
.portal-widgets__rail {
	min-width: 0;
}

.portal-widgets__rail {
	font-size: 0.94rem;
}

.portal-zone--below {
	margin-top: var(--maky-space);
}

.portal-zone--below > .widget + .widget,
.portal-widgets__main > .widget + .widget {
	margin-top: var(--maky-space);
}

.portal-widgets__rail > .widget + .widget {
	margin-top: 2rem;
}

/* Article portail ----------------------------------------------------- */

/* En-têtes de widgets */

/* Traitement commun aux titres qui remplissent la fonction de titre de
   widget : titre natif d'une zone, titre d'un widget éditorial du portail
   ou premier titre d'un widget construit avec des blocs. Les titres
   éditoriaux des pages et articles ne sont pas concernés. */
.maky-widget__title,
.widget > .widget-title,
.widget > .maky-widget__title,
.widget_block > :is(h2, h3, h4).wp-block-heading:first-child {
	margin: 0;
	color: inherit;
	font-size: calc(1.2rem * var(--maky-font-scale));
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.01em;
}

.maky-widget__header {
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--maky-border);
}

/* Sans l'en-tête du portail, le titre porte lui-même la ligne de
   séparation et la respiration basse. */
.widget > .widget-title,
.widget > .maky-widget__title,
.widget_block > :is(h2, h3, h4).wp-block-heading:first-child {
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--maky-border);
}

.maky-widget__description {
	margin-bottom: 1rem;
	overflow-wrap: anywhere;
}

.widget .maky-widget__description > :is(p, ul, ol) {
	margin: 0 0 0.75em;
}

.widget .maky-widget__description :is(ul, ol) {
	padding-inline-start: 1.25em;
}

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

.maky-kicker {
	display: inline-block;
	margin-bottom: 0.35rem;
	color: var(--maky-accent);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-decoration: none;
	text-transform: uppercase;
}

.maky-kicker:hover,
.maky-kicker:focus {
	color: var(--maky-accent-hover);
	text-decoration: underline;
}

.maky-meta,
.maky-article__date,
.maky-news__date,
.maky-pick__date {
	color: var(--maky-muted);
	font-size: 0.78rem;
}

.maky-more {
	display: inline-block;
	margin-top: 0.6rem;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none;
}

.maky-more:hover,
.maky-more:focus {
	text-decoration: underline;
}

/* Une principale */

/* Image et texte : l'image reçoit la part la plus large. Les deux colonnes
   s'empilent d'elles-mêmes dès que la largeur disponible ne permet plus de
   garantir une largeur lisible à chacune. */
.maky-lead {
	display: flex;
	flex-wrap: wrap;
	gap: var(--maky-space);
	align-items: center;
}

.maky-lead--no-media {
	display: block;
}

.maky-lead__media {
	flex: 1.6 1 24rem;
	min-width: 0;
	display: block;
}

.maky-lead__body {
	flex: 1 1 18rem;
	min-width: 0;
}

.maky-lead__media img {
	width: 100%;
}

.maky-lead__title {
	margin: 0 0 0.5rem;
	font-size: calc(clamp(1.7rem, 3vw, 2.4rem) * var(--maky-font-scale));
	line-height: 1.14;
}

.maky-lead__title a {
	color: var(--maky-text);
	text-decoration: none;
}

.maky-lead__title a:hover,
.maky-lead__title a:focus {
	color: var(--maky-accent);
}

.maky-lead__excerpt {
	margin: 0.7rem 0 0;
	color: var(--maky-muted);
	font-size: 1rem;
}

/* Articles */

.maky-articles {
	display: grid;
	gap: 1.75rem;
}

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

.maky-articles--grid-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.maky-articles--grid-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.maky-articles--list {
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
}

.maky-article {
	min-width: 0;
}

.maky-article__media {
	display: block;
	margin-bottom: 0.65rem;
}

.maky-article__media img {
	width: 100%;
}

.maky-article__title {
	margin: 0 0 0.25rem;
	font-size: calc(1.02rem * var(--maky-font-scale));
	line-height: 1.4;
}

.maky-article__title a {
	color: var(--maky-text);
	text-decoration: none;
}

.maky-article__title a:hover,
.maky-article__title a:focus {
	color: var(--maky-accent);
}

.maky-article__excerpt {
	margin: 0.4rem 0 0;
	color: var(--maky-muted);
	font-size: 0.9rem;
}

.maky-articles--list .maky-article {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--maky-border);
}

.maky-articles--list .maky-article:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.maky-articles--list .maky-article__media {
	flex: 0 0 110px;
	margin-bottom: 0;
}

.maky-articles--list .maky-article__body {
	min-width: 0;
}

/* Fil de publications */

.maky-news {
	margin: 0;
	padding: 0;
	list-style: none;
}

.maky-news__item {
	display: flex;
	align-items: flex-start;
	gap: 0.8rem;
	margin: 0;
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--maky-border);
}

.maky-news__item:first-child {
	padding-top: 0;
}

.maky-news__item:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.maky-news__media {
	flex: 0 0 84px;
	display: block;
}

.maky-news__media img {
	width: 84px;
}

.maky-news__body {
	min-width: 0;
}

.maky-news__title {
	margin: 0 0 0.15rem;
	font-size: calc(0.95rem * var(--maky-font-scale));
	line-height: 1.35;
}

.maky-news__title a {
	color: var(--maky-text);
	text-decoration: none;
}

.maky-news__title a:hover,
.maky-news__title a:focus {
	color: var(--maky-accent);
}

/* Sélection éditoriale */

.maky-picks {
	display: flex;
	gap: 1.25rem;
	overflow-x: auto;
	padding-bottom: 0.5rem;
	scroll-snap-type: x proximity;
}

.maky-pick {
	flex: 1 0 220px;
	max-width: 320px;
	min-width: 0;
	scroll-snap-align: start;
}

.maky-pick__media {
	display: block;
	margin-bottom: 0.55rem;
}

.maky-pick__media img {
	width: 100%;
}

.maky-pick__title {
	margin: 0 0 0.2rem;
	font-size: calc(0.98rem * var(--maky-font-scale));
	line-height: 1.38;
}

.maky-pick__title a {
	color: var(--maky-text);
	text-decoration: none;
}

.maky-pick__title a:hover,
.maky-pick__title a:focus {
	color: var(--maky-accent);
}

/* Le contour intérieur reste visible dans les sélections défilantes, où
   l'ombre extérieure peut être rognée. Aucun changement de dimensions. */

:is(.portal-lead, .portal-list__item, .portal-item, .maky-lead, .maky-article, .maky-news__item, .maky-pick):focus-within {
	border-radius: var(--maky-radius);
	outline: 2px solid var(--maky-accent);
	outline-offset: -2px;
	box-shadow: 0 2px 8px rgb(0 0 0 / 14%);
}

@media (hover: hover) {
	:is(.portal-lead, .portal-list__item, .portal-item, .maky-lead, .maky-article, .maky-news__item, .maky-pick):hover {
		border-radius: var(--maky-radius);
		outline: 2px solid var(--maky-accent);
		outline-offset: -2px;
		box-shadow: 0 2px 8px rgb(0 0 0 / 14%);
	}
}

/* Shorts */

.maky-shorts {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	padding-bottom: 0.5rem;
	scroll-snap-type: x proximity;
}

.maky-short {
	flex: 0 0 180px;
	min-width: 0;
	scroll-snap-align: start;
}

.maky-short__button {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--maky-text);
	text-align: left;
	cursor: pointer;
}

.maky-short__frame {
	position: relative;
	display: block;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: var(--maky-radius);
	background: #111827;
}

.maky-short__frame img,
.maky-short__frame iframe,
.maky-short__frame video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.maky-short__fallback {
	position: absolute;
	inset: 0;
	background: linear-gradient(155deg, var(--maky-accent-brand), #0f172a);
}

.maky-short__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 48px;
	height: 48px;
	margin: -24px 0 0 -24px;
	border-radius: 50%;
	background: rgba(17, 24, 39, 0.62);
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.maky-short__play::before {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	margin: -8px 0 0 -5px;
	border-top: 8px solid transparent;
	border-bottom: 8px solid transparent;
	border-left: 13px solid #ffffff;
	content: "";
}

.maky-short__duration {
	position: absolute;
	right: 0.45rem;
	bottom: 0.45rem;
	padding: 0.1rem 0.35rem;
	border-radius: 3px;
	background: rgba(17, 24, 39, 0.75);
	color: #ffffff;
	font-size: 0.7rem;
	font-weight: 600;
}

.maky-short__caption {
	display: block;
	margin-top: 0.5rem;
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.35;
}

/* Mise en avant libre */

.maky-promo {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: center;
}

.maky-promo--no-media {
	display: block;
}

.maky-promo__media {
	flex: 1.5 1 22rem;
	min-width: 0;
	display: block;
	overflow: hidden;
	border-radius: var(--maky-radius);
	background: var(--maky-surface);
}

.maky-promo__body {
	flex: 1 1 17rem;
	min-width: 0;
}

.maky-promo__media img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.maky-promo__title {
	margin: 0 0 0.5rem;
	font-size: calc(1.35rem * var(--maky-font-scale));
}

.maky-promo__text {
	margin: 0 0 0.9rem;
	color: var(--maky-muted);
}

/* Article et page ----------------------------------------------------- */

.entry {
	min-width: 0;
}

/* Un titre de page vide (accueil classique sans page de publications
   définie) ne doit pas conserver les marges du titre ni décaler le premier
   contenu. */
.page-title:empty {
	display: none;
}

.entry-header {
	margin-bottom: 1.5rem;
}

.entry-title {
	margin: 0;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	margin-top: 0.65rem;
	color: var(--maky-muted);
	font-size: 0.84rem;
}

.entry-meta a {
	color: inherit;
}

.entry-content {
	color: var(--maky-text);
}

/* Contain editorial and classic WordPress floats without changing grid tracks
   or clipping full-width blocks. */
.entry-content,
.entry-summary,
.archive-description,
.comment-content,
.widget {
	display: flow-root;
}

.site-main,
.portal-grid > *,
.footer-widgets > *,
.portal-widgets__main,
.portal-widgets__rail,
.entry-content .wp-block-column {
	min-width: 0;
}

/* Le contenu des articles utilise toute la largeur utile, comme l'image
   mise en avant, du premier au dernier bloc. Aucune limite de lecture ne
   réduit les paragraphes, les titres, les listes ou les compositions. */
.single-post .entry-content {
	max-width: none;
}

.entry-content > * + * {
	margin-top: 1.2em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: 1.6em;
	margin-bottom: 0.45em;
}

.entry-content img,
.entry-content .wp-block-image img {
	border-radius: var(--maky-radius);
}

.entry-content .wp-block-columns {
	gap: clamp(1.5rem, 4vw, 3rem);
}

.entry-content .wp-block-button__link {
	padding: 0.7rem 1.1rem;
	border-radius: var(--maky-radius);
	background: var(--maky-button-bg);
	color: var(--maky-button-text);
	font-weight: 600;
	text-decoration: none;
}

.entry-content .wp-block-button__link:hover,
.entry-content .wp-block-button__link:focus {
	background: var(--maky-button-hover-bg);
	color: var(--maky-button-hover-text);
}

.entry--portal-home > .entry-content > h1:first-child {
	/* Le titre utilise la même largeur disponible que le contenu qui suit.
	   La police et le retour naturel à la ligne restent inchangés. */
	font-size: calc(clamp(2rem, 4vw, 2.9rem) * var(--maky-font-scale));
}

.entry--portal-home {
	margin-bottom: var(--maky-space);
}

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

.post-thumbnail {
	display: block;
	margin-bottom: 1.75rem;
}

.post-thumbnail img {
	width: 100%;
}

.entry-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.5rem;
	margin-top: 2rem;
	padding-top: 1.1rem;
	border-top: 1px solid var(--maky-border);
	color: var(--maky-muted);
	font-size: 0.84rem;
}

.entry-footer a {
	color: var(--maky-muted);
}

.entry-footer a:hover,
.entry-footer a:focus {
	color: var(--maky-accent);
}

.edit-link {
	margin-left: auto;
}

.page-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin-top: 1.5rem;
	font-size: 0.9rem;
}

.page-links a,
.page-links > span:not(.page-links-title) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2rem;
	height: 2rem;
	padding: 0 0.4rem;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	text-decoration: none;
}

.page-links > span:not(.page-links-title) {
	border-color: var(--maky-button-bg);
	background: var(--maky-button-bg);
	color: var(--maky-button-text);
}

/* Pagination ---------------------------------------------------------- */

.navigation.pagination {
	margin-top: var(--maky-space);
}

.navigation.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
}

.navigation.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.3rem;
	height: 2.3rem;
	padding: 0 0.6rem;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	color: var(--maky-text);
	font-size: 0.88rem;
	font-weight: 600;
	text-decoration: none;
}

.navigation.pagination .page-numbers.current,
.navigation.pagination .page-numbers:hover,
.navigation.pagination .page-numbers:focus {
	border-color: var(--maky-button-bg);
	background: var(--maky-button-bg);
	color: var(--maky-button-text);
}

.navigation.post-navigation {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--maky-border);
}

.navigation.post-navigation .nav-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.navigation.post-navigation .nav-links > :only-child {
	grid-column: 1 / -1;
}

.navigation.post-navigation a {
	display: block;
	color: var(--maky-text);
}

.navigation.post-navigation .nav-next a {
	text-align: end;
}

.navigation.post-navigation a:hover,
.navigation.post-navigation a:focus-visible {
	color: var(--maky-accent);
}

.navigation.post-navigation .nav-subtitle {
	display: block;
	margin-bottom: 0.2rem;
	color: var(--maky-muted);
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.navigation.post-navigation .nav-title {
	font-weight: 600;
}

/* Formulaires --------------------------------------------------------- */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
	width: 100%;
	padding: 0.65rem 0.8rem;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	background: var(--maky-background);
	color: var(--maky-text);
	font: inherit;
	line-height: 1.4;
}

textarea {
	min-height: 8rem;
	resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
	width: auto;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--maky-accent);
}

/* Le contour clavier reste visible sur les champs, y compris lorsque la
   bordure est déjà colorée par l'accent. */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 3px solid var(--maky-focus);
	outline-offset: 2px;
}

button,
.button,
input[type="submit"],
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.65rem 1.05rem;
	border: 1px solid transparent;
	border-radius: var(--maky-radius);
	background: var(--maky-button-bg);
	color: var(--maky-button-text);
	font: inherit;
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

button:hover,
button:focus,
.button:hover,
.button:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus {
	background: var(--maky-button-hover-bg);
	color: var(--maky-button-hover-text);
}

.search-form {
	display: flex;
	gap: 0.5rem;
	width: 100%;
	max-width: 540px;
}

.search-form .search-field {
	flex: 1;
	min-width: 0;
}

.search-form .search-submit {
	flex: 0 0 auto;
}

/* Champs obligatoires, champs invalides et messages d'erreur.
   L'état ne repose jamais sur la seule couleur : bordure épaisse, texte
   « Erreur : » visible et message explicitement rédigé. */
.required,
.wpcf7-required {
	color: #8a1f1f;
	font-weight: 700;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"],
.woocommerce-invalid input.input-text,
.woocommerce-invalid select,
.woocommerce-invalid textarea {
	border-color: #b32d2e;
	border-width: 2px;
}

input[aria-invalid="true"]:focus-visible,
select[aria-invalid="true"]:focus-visible,
textarea[aria-invalid="true"]:focus-visible {
	outline-color: #b32d2e;
}

.wpcf7-not-valid-tip {
	display: block;
	margin-top: 0.35rem;
	color: #8a1f1f;
	font-size: 0.86rem;
	font-weight: 600;
}

.wpcf7-not-valid-tip::before {
	content: "Erreur : ";
}

.wpcf7-form .wpcf7-response-output {
	margin: 1rem 0 0;
	padding: 0.8rem 1rem;
	border: 2px solid var(--maky-border);
	border-left-width: 6px;
	background: var(--maky-surface);
	color: var(--maky-text);
}

.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.failed .wpcf7-response-output {
	border-color: #b32d2e;
}

.wpcf7-form.sent .wpcf7-response-output {
	border-color: #1a7f37;
}

.woocommerce .woocommerce-error {
	border-left: 6px solid #b32d2e;
}

/* Colonne latérale ---------------------------------------------------- */

.sidebar {
	min-width: 0;
	font-size: 0.92rem;
}

/* Les widgets restent dans la largeur de la colonne, même avec un titre
   long, une image ou un tableau : aucune piste ne s'élargit. */
.sidebar > *,
.sidebar .widget,
.sidebar .widget > * {
	max-width: 100%;
	min-width: 0;
}

.sidebar img,
.sidebar iframe,
.sidebar video,
.sidebar table {
	max-width: 100%;
}

/* Les widgets des autres zones (accueil portail, pied de page) gardent la
   largeur de leur colonne, y compris lorsqu'une création publicitaire fixe
   survit à une réduction de fenêtre. */
.widget iframe,
.widget video,
.widget table,
.entry-content iframe,
.entry-content video,
.entry-content table {
	max-width: 100%;
}

/* États de stock WooCommerce : couleur suffisamment contrastée sur le fond
   de page, sans dépendre uniquement de la teinte verte ou rouge. */
.woocommerce div.product p.stock.in-stock {
	color: #2f6b1d;
}

.woocommerce div.product p.stock.out-of-stock {
	color: #8a1f11;
}

body.has-sidebar .sidebar {
	padding-left: 1.75rem;
	border-left: 1px solid var(--maky-border);
}

body.has-sidebar.sidebar-left .sidebar {
	padding-left: 0;
	padding-right: 1.75rem;
	border-left: 0;
	border-right: 1px solid var(--maky-border);
}

.widget {
	margin-bottom: 2rem;
}

.widget-title {
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--maky-border);
	color: inherit;
	font-size: calc(1.2rem * var(--maky-font-scale));
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.01em;
}

.widget ul {
	margin: 0;
	padding-left: 1.1em;
}

.widget a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.widget a:hover,
.widget a:focus {
	text-decoration-thickness: 2px;
}

/* Commentaires -------------------------------------------------------- */

.comments-area {
	max-width: 820px;
	margin: 2.5rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--maky-border);
}

.comments-title {
	font-size: calc(1.2rem * var(--maky-font-scale));
}

.comment-list {
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin-top: 0.75rem;
	padding-left: 1.25rem;
	list-style: none;
}

.comment-body {
	padding: 1rem 0;
	border-bottom: 1px solid var(--maky-border);
}

.comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.75rem;
	margin-bottom: 0.4rem;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
}

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

.comment-metadata {
	color: var(--maky-muted);
	font-size: 0.78rem;
}

.comment-content {
	font-size: 0.94rem;
}

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

.reply {
	font-size: 0.82rem;
}

.comment-form label {
	display: block;
	margin-bottom: 0.3rem;
	font-size: 0.88rem;
	font-weight: 600;
}

.comment-form .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
}

.comment-form .comment-form-cookies-consent label {
	margin: 0;
	font-weight: 400;
}

.comment-form .form-submit {
	margin-bottom: 0;
}

/* 404 et aucun résultat ----------------------------------------------- */

.error-404,
.no-results {
	max-width: 640px;
	margin-inline: auto;
	padding-block: 2rem;
	text-align: center;
}

.error-404__code {
	margin: 0;
	color: var(--maky-border);
	font-size: clamp(5rem, 16vw, 8rem);
	font-weight: 800;
	line-height: 0.8;
	letter-spacing: -0.05em;
}

.error-404 .search-form,
.no-results .search-form {
	margin: 1.5rem auto;
}

.error-404 .button {
	margin-top: 0.5rem;
}

.archive-description {
	margin-top: 0.6rem;
	color: var(--maky-muted);
}

.search-query {
	color: var(--maky-accent);
}

/* Pied de page -------------------------------------------------------- */

.site-footer {
	margin-top: auto;
	padding-block: 2.5rem 1.5rem;
	border-top: 1px solid var(--maky-border);
	background: var(--maky-footer-bg);
	color: var(--maky-footer-text);
	font-size: 1rem;
	line-height: 1.6;
}

/* Le fond et le contenu du pied de page occupent la largeur utile du site.
   Les pages de contenu gardent leur propre largeur. */
.site-footer > .container {
	max-width: none;
	padding-inline: var(--maky-page-gutter);
}

.footer-widget-area {
	min-width: 0;
}

.footer-widget-area .button,
.footer-widget-area .wp-block-button__link {
	max-width: 100%;
	white-space: normal;
	text-align: center;
	color: var(--maky-button-text);
	text-decoration: none;
}

.footer-widget-area .button:hover,
.footer-widget-area .button:focus,
.footer-widget-area .wp-block-button__link:hover,
.footer-widget-area .wp-block-button__link:focus {
	background: var(--maky-button-hover-bg);
	color: var(--maky-button-hover-text);
	text-decoration: none;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
	gap: 2rem;
	margin-bottom: 2rem;
}

.footer-widgets--1 {
	grid-template-columns: 1fr;
}

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

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

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

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

.footer-widget-area :is(.widget-title, .maky-widget__title) {
	color: var(--maky-footer-text);
}

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

.footer-widget-area a:hover,
.footer-widget-area a:focus {
	color: var(--maky-accent-footer);
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--maky-border);
}

.site-footer__credits {
	margin: 0;
}

.site-footer__credit {
	margin: 0 0 0 auto;
	text-align: right;
}

.footer-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 1.1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.footer-navigation li + li {
	margin-top: 0;
}

.footer-navigation a {
	color: var(--maky-footer-text);
	text-decoration: none;
}

.footer-navigation a:hover,
.footer-navigation a:focus {
	color: var(--maky-accent-footer);
	text-decoration: underline;
}

/* WordPress : alignements et légendes --------------------------------- */

.alignleft {
	float: left;
	margin: 0.25rem 1.5rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0.25rem 0 1rem 1.5rem;
}

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

.alignwide {
	width: 100%;
	margin-inline: auto;
}

.alignfull {
	width: 100%;
	max-width: 100%;
	margin-inline: 0;
}

/* Full-bleed blocks can reclaim the page gutters only when the containing
   column spans the whole page. Inside a sidebar layout or a nested block,
   a full-width block must stay within its column. */
:is(.site-layout:not(:has(> .sidebar)) > .site-content, .portal-page-content) > .entry > .entry-content > .alignfull {
	width: calc(100% + 2 * var(--maky-page-gutter));
	max-width: none;
	margin-inline: calc(-1 * var(--maky-page-gutter));
}

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

.wp-caption-text,
.gallery-caption,
.wp-block-image figcaption {
	margin-top: 0.4rem;
	color: var(--maky-muted);
	font-size: 0.82rem;
	text-align: center;
}

.sticky .portal-item__title::before {
	color: var(--maky-accent);
	content: "★ ";
}

.bypostauthor > .comment-body .comment-author {
	color: var(--maky-accent);
}

/* WooCommerce --------------------------------------------------------- */

.woocommerce .woocommerce-breadcrumb {
	margin-bottom: 1.5rem;
	color: var(--maky-muted);
	font-size: 0.84rem;
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
	margin-bottom: 1.5rem;
}

.woocommerce .woocommerce-ordering select {
	width: auto;
	min-width: 200px;
}

.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
	gap: 2rem 1.75rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
	display: none;
}

.woocommerce ul.products li.product {
	display: flex;
	flex-direction: column;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 0 0.75rem;
	float: none !important;
	text-align: left;
}

.woocommerce ul.products li.product a img {
	width: 100%;
	margin: 0 0 0.75rem;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: var(--maky-radius);
	transition: opacity 0.25s ease;
}

.woocommerce ul.products li.product:hover a img {
	opacity: 0.9;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	padding: 0;
	color: var(--maky-text);
	font-size: calc(1rem * var(--maky-font-scale));
	line-height: 1.4;
}

.woocommerce ul.products li.product .price {
	margin: 0.2rem 0 0.6rem;
	color: var(--maky-accent);
	font-size: 1rem;
	font-weight: 700;
}

.woocommerce ul.products li.product .button {
	margin-top: auto;
	align-self: flex-start;
}

.woocommerce span.onsale {
	top: 0.5rem;
	left: 0.5rem;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0.3rem;
	border-radius: 999px;
	background: var(--maky-button-bg);
	color: var(--maky-button-text);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.1;
}

.woocommerce div.product div.images img {
	border-radius: var(--maky-radius);
}

.woocommerce div.product .product_title {
	font-size: calc(clamp(1.5rem, 3vw, 2rem) * var(--maky-font-scale));
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--maky-accent);
	font-size: 1.35rem;
	font-weight: 700;
}

.woocommerce div.product form.cart {
	margin: 1.5rem 0;
}

.woocommerce .quantity .qty {
	width: 4.5rem;
}

.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #place_order {
	padding: 0.65rem 1.05rem;
	border-radius: var(--maky-radius);
	background: var(--maky-button-bg);
	color: var(--maky-button-text);
	font-weight: 600;
	line-height: 1.3;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #place_order:hover,
.woocommerce #respond input#submit:focus,
.woocommerce a.button:focus,
.woocommerce button.button:focus,
.woocommerce input.button:focus,
.woocommerce #place_order:focus {
	background: var(--maky-button-hover-bg);
	color: var(--maky-button-hover-text);
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
	background: var(--maky-text);
	color: var(--maky-background);
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
	background: var(--maky-button-hover-bg);
	color: var(--maky-button-hover-text);
}

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error {
	margin-bottom: 1.5rem;
	padding: 1rem 1rem 1rem 2.75rem;
	border-top: 2px solid var(--maky-accent);
	background: var(--maky-surface);
	color: var(--maky-text);
}

.woocommerce .woocommerce-error {
	border-top-color: #b32d2e;
}

.woocommerce table.shop_table {
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	padding: 0.65rem 0.8rem;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	background: var(--maky-background);
	font: inherit;
}

.woocommerce form .form-row label {
	font-size: 0.88rem;
}

.woocommerce nav.woocommerce-pagination {
	margin-top: 2rem;
}

.woocommerce nav.woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	border: 0;
}

.woocommerce nav.woocommerce-pagination ul li {
	border: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.3rem;
	height: 2.3rem;
	padding: 0 0.6rem;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	color: var(--maky-text);
	font-weight: 600;
	text-decoration: none;
}

.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li a:focus {
	border-color: var(--maky-button-bg);
	background: var(--maky-button-bg);
	color: var(--maky-button-text);
}

.woocommerce .star-rating span::before,
.woocommerce p.stars a::before {
	color: #e0a800;
}

.woocommerce .woocommerce-tabs ul.tabs {
	padding: 0;
	border-bottom: 1px solid var(--maky-border);
}

.woocommerce .woocommerce-tabs ul.tabs li {
	margin: 0 0.25rem 0 0;
	border: 1px solid var(--maky-border);
	border-bottom: 0;
	border-radius: var(--maky-radius) var(--maky-radius) 0 0;
	background: var(--maky-surface);
}

.woocommerce .woocommerce-tabs ul.tabs li.active {
	background: var(--maky-background);
}

.woocommerce .woocommerce-tabs .panel {
	padding-top: 1.5rem;
}

.woocommerce .related.products > h2,
.woocommerce .upsells.products > h2 {
	margin-top: 2.5rem;
	font-size: calc(1.3rem * var(--maky-font-scale));
}

.woocommerce .woocommerce-customer-details address {
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
}

/* Tablettes ----------------------------------------------------------- */

@media (max-width: 1100px) {
	body.has-sidebar .site-layout {
		grid-template-columns: minmax(0, 1fr) 280px;
	}

	body.has-sidebar.sidebar-left .site-layout {
		grid-template-columns: 280px minmax(0, 1fr);
	}

	.portal-featured {
		gap: 2rem;
	}

	.header-search {
		flex-basis: 180px;
	}

	.maky-action {
		padding: 0.5rem 0.7rem;
		font-size: 0.82rem;
	}
}

@media (max-width: 1024px) {
	.portal-grid--archive {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.footer-widgets--4,
	.footer-widgets--5 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.portal-widgets__body {
		grid-template-columns: minmax(0, 1fr);
	}

	.portal-widgets__rail {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
		gap: 1.5rem;
		align-items: start;
	}

	.portal-widgets__rail > .widget + .widget {
		margin-top: 0;
	}

	.maky-articles--grid-3,
	.maky-articles--grid-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Mobile et tablette -------------------------------------------------- */

@media (max-width: 900px) {
	body.admin-bar.maky-header-sticky .site-header {
		top: 46px;
	}

	.site-header__inner {
		min-height: 60px;
	}

	.site-branding {
		order: 1;
		margin-right: auto;
	}

	.menu-toggle {
		display: inline-flex;
		order: 2;
	}

	.maky-cart-link {
		order: 1;
	}

	.header-panel {
		display: none;
		order: 4;
		flex: 1 0 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding-top: 0.75rem;
		border-top: 1px solid var(--maky-border);
	}

	.header-panel.is-open {
		display: flex;
	}

	.main-navigation ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.main-navigation li + li {
		margin-top: 0;
	}

	.main-navigation a {
		padding: 0.75rem 0.25rem;
		border-bottom: 1px solid var(--maky-border);
		font-size: 1rem;
	}

	.main-navigation .sub-menu {
		position: static;
		display: block;
		min-width: 0;
		margin: 0;
		padding: 0 0 0 1rem;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	.main-navigation .sub-menu a {
		padding: 0.65rem 0.25rem;
	}

	.main-navigation .sub-menu a:hover,
	.main-navigation .sub-menu a:focus {
		background: transparent;
	}

	.header-search {
		flex: 0 0 auto;
		margin: 0.75rem 0 0;
	}

	.header-search .search-field {
		min-height: 42px;
	}

	.header-search .search-submit {
	}

	.header-actions {
		flex: 1 0 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
		margin: 0.75rem 0 0;
	}

	.maky-action {
		width: 100%;
		padding: 0.7rem 1rem;
		font-size: 0.92rem;
	}

	.site-subnav .container {
		display: block;
		min-height: 0;
	}

	.site-subnav .menu {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 0;
		padding-block: 0.15rem;
	}

	.site-subnav .menu > li > a {
		padding: 0.5rem 0.55rem;
		border-bottom: 0;
		font-size: 0.74rem;
		white-space: nowrap;
	}

	.site-subnav .menu-item-has-children > a {
		padding-right: 1.8rem;
	}

	.site-subnav .submenu-toggle {
		width: 24px;
		height: 24px;
	}

	.site-subnav .sub-menu,
	.site-subnav .sub-menu .sub-menu {
		position: static;
		display: none;
		min-width: 0;
		margin: 0 0 0.35rem;
		padding: 0 0 0 0.75rem;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	.site-subnav .sub-menu .sub-menu {
		margin-left: 0.75rem;
	}

	.site-subnav .menu-item.is-open > .sub-menu {
		display: block;
	}

	.site-subnav li:hover > .sub-menu,
	.site-subnav li:focus-within > .sub-menu {
		display: none;
	}

	.site-subnav li.is-open:hover > .sub-menu,
	.site-subnav li.is-open:focus-within > .sub-menu {
		display: block;
	}

	html:not(.maky-js) .site-subnav .sub-menu {
		display: block;
	}

	.site-subnav .sub-menu a {
		padding: 0.5rem 0.25rem;
		color: var(--maky-header-text);
		font-size: 0.88rem;
	}

	.site-subnav .sub-menu a:hover,
	.site-subnav .sub-menu a:focus {
		background: transparent;
		color: var(--maky-accent-header);
	}

	.portal-featured {
		grid-template-columns: minmax(0, 1fr);
	}

	.portal-secondary {
		margin-top: 0.5rem;
	}

	.maky-lead,
	.maky-promo {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.25rem;
	}

	.portal-widgets__rail {
		grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	}

	.portal-list__item:first-child {
		padding-top: 0.85rem;
		border-top: 1px solid var(--maky-border);
	}

	body.has-sidebar .site-layout,
	body.has-sidebar.sidebar-left .site-layout {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"content"
			"sidebar";
	}

	body.has-sidebar .sidebar,
	body.has-sidebar.sidebar-left .sidebar {
		padding: 1.75rem 0 0;
		border: 0;
		border-top: 1px solid var(--maky-border);
	}

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

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

	.navigation.post-navigation .nav-next a {
		text-align: start;
	}

	.woocommerce div.product div.images,
	.woocommerce div.product div.summary {
		width: 100%;
		float: none;
	}
}

@media (max-width: 720px) {
	.portal-grid--archive,
	.portal-grid--compact,
	.woocommerce ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.footer-widgets--2,
	.footer-widgets--3,
	.footer-widgets--4,
	.footer-widgets--5 {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Petits mobiles ------------------------------------------------------ */

@media (max-width: 560px) {
	body {
		font-size: calc((var(--maky-font-size) - 1px) * var(--maky-text-scale));
	}

	.site-branding .custom-logo {
		max-width: 120px;
		max-height: 38px;
	}

	.maky-cart-link__label {
		display: none;
	}

	.portal-grid,
	.portal-grid--archive,
	.portal-grid--compact,
	.woocommerce ul.products {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.75rem;
	}

	.maky-articles--grid-2,
	.maky-articles--grid-3,
	.maky-articles--grid-4 {
		grid-template-columns: minmax(0, 1fr);
	}

	.maky-short {
		flex-basis: 150px;
	}

	.maky-pick {
		flex-basis: 200px;
	}

	.portal-widgets__rail {
		grid-template-columns: minmax(0, 1fr);
	}

	.site-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
	}

	.site-footer__credit {
		margin-left: 0;
		text-align: left;
	}

	.search-form {
		flex-direction: column;
	}

	.search-form .search-submit {
		width: 100%;
	}

	.alignleft,
	.alignright {
		float: none;
		margin: 0 0 1rem;
	}

	.navigation.pagination .page-numbers {
		min-width: 2.1rem;
		height: 2.1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

/* =====================================================================
   En-tête pleine largeur — priorité de présentation
   ===================================================================== */

.site-header {
	border-bottom: 0;
}

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

.header-inner {
	width: 100%;
	max-width: none;
	margin: 0;
	padding-inline: var(--maky-page-gutter);
}

.site-header > .site-header__inner {
	display: flex;
	align-items: center;
	gap: 1rem;
	min-height: 0;
	padding-block: 12px;
}

.site-header .site-branding {
	order: 1;
}

.site-header .header-panel .main-navigation {
	order: 2;
}

.site-header .maky-header-ad {
	order: 3;
}

.site-header .header-panel .header-actions-area {
	order: 5;
}

.site-header .menu-toggle {
	order: 6;
}

.site-header .site-branding {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
}

.site-header .header-panel {
	display: contents;
}

.site-header .header-panel .main-navigation {
	flex: 0 1 auto;
	min-width: 0;
	max-width: min(42vw, 640px);
	margin: 0;
}

.site-header .header-panel .main-navigation ul {
	flex-wrap: wrap;
	justify-content: center;
}

.site-header .header-panel .main-navigation li {
	min-width: 0;
}

.site-header .header-panel .main-navigation a {
	white-space: normal;
	text-align: center;
}

.site-header .header-panel .header-actions-area {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
}

.site-header .header-actions-area .header-search {
	position: relative;
	flex: 0 0 auto;
	width: auto;
	margin: 0;
	order: 0;
}

.site-header .header-actions-area .maky-cart-link {
	order: 1;
	flex: 0 0 auto;
}

.site-header .header-actions-area .header-actions {
	order: 2;
	flex: 0 0 auto;
	flex-wrap: nowrap;
	margin: 0;
}

.site-header .header-search__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	background: transparent;
	color: var(--maky-header-text);
	cursor: pointer;
}

.site-header .header-search__toggle:hover,
.site-header .header-search__toggle:focus,
.site-header .header-search__toggle[aria-expanded="true"] {
	border-color: var(--maky-accent-header);
	color: var(--maky-accent-header);
}

.site-header .header-search__panel {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	z-index: 60;
	display: none;
	width: min(320px, calc(100vw - 2rem));
	padding: 0.75rem;
	border: 1px solid var(--maky-border);
	border-radius: var(--maky-radius);
	background: var(--maky-background);
	box-shadow: 0 14px 32px rgba(17, 24, 39, 0.14);
}

.site-header .header-search.is-open .header-search__panel {
	display: block;
}

.site-header .header-search__panel .search-form {
	width: 100%;
	max-width: none;
}

.site-header .header-search__panel .search-field {
	min-height: 40px;
}

.site-header .header-search__panel .search-submit {
}

.site-header .menu-toggle {
	display: none;
	flex: 0 0 auto;
	margin-left: auto;
}

/* Seconde ligne : rubriques, pleine largeur */

.site-header .site-subnav-bar {
	width: 100%;
	border-top: 1px solid var(--maky-border);
	border-bottom: 1px solid var(--maky-border);
	background: var(--maky-header-bg);
}

.site-header .site-subnav__inner {
	display: flex;
	align-items: center;
	min-height: 42px;
	padding-block: 0.15rem;
}

.site-header .site-subnav {
	width: 100%;
	border-bottom: 0;
	background: transparent;
}

.site-header .site-subnav .menu {
	justify-content: center;
	padding-block: 0;
}

.site-header .site-subnav .menu > li {
	min-width: 0;
}

.site-header .site-subnav .menu > li > a {
	max-width: 100%;
	text-align: center;
	white-space: normal;
}

/* Bascule mobile avant chevauchement logo / menu / actions */

@media (max-width: 1399px) {
	.site-header > .site-header__inner {
		display: flex;
		flex-wrap: wrap;
		min-height: 0;
		gap: 0.75rem;
	}

	.site-header .site-branding {
		flex: 1 1 auto;
	}

	.site-header .menu-toggle {
		display: inline-flex;
		flex: 0 0 auto;
		order: 3;
		margin-left: auto;
	}

	.site-header .maky-header-ad {
		order: 2;
	}

	.site-header .header-panel {
		display: none;
		flex: 1 0 100%;
		order: 4;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
		padding-top: 0.75rem;
		border-top: 1px solid var(--maky-border);
	}

	.site-header .header-panel.is-open {
		display: flex;
	}

	.site-header .header-panel .main-navigation {
		order: 1;
		max-width: none;
		width: 100%;
	}

	.site-header .header-panel .header-actions-area {
		order: 2;
	}

	.site-header .header-panel .main-navigation ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.site-header .header-panel .main-navigation li + li {
		margin-top: 0;
	}

	.site-header .header-panel .main-navigation a {
		padding: 0.75rem 0.25rem;
		border-bottom: 1px solid var(--maky-border);
		font-size: 1rem;
	}

	.site-header .header-panel .main-navigation .sub-menu {
		position: static;
		display: none;
		min-width: 0;
		margin: 0;
		padding: 0 0 0 1rem;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	.site-header .header-panel .main-navigation .sub-menu a {
		padding: 0.65rem 0.25rem;
	}

	.site-header .header-panel .main-navigation .submenu-toggle {
		display: inline-flex;
	}

	.site-header .header-actions-area {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		width: 100%;
		gap: 0.5rem;
		padding-top: 0.75rem;
		border-top: 1px solid var(--maky-border);
	}

	.site-header .header-actions-area .header-search {
		flex: 0 0 auto;
		width: 100%;
		margin: 0;
	}

	.site-header .header-actions-area .header-search .search-field {
		min-height: 42px;
	}

	.site-header .header-actions-area .header-search .search-submit {
	}

	.site-header .header-search__toggle {
		display: none;
	}

	.site-header .header-actions-area .header-search__panel {
		position: static;
		display: block;
		width: 100%;
		padding: 0;
		border: 0;
		background: transparent;
		box-shadow: none;
	}

	.site-header .header-actions-area .maky-cart-link {
		width: 100%;
		justify-content: center;
	}

	.site-header .header-actions-area .header-actions {
		width: 100%;
		flex-direction: column;
		gap: 0.5rem;
	}

	.site-header .header-actions-area .maky-action {
		width: 100%;
		justify-content: center;
	}

	.site-header .site-subnav__inner {
		display: block;
		min-height: 0;
	}

	.site-header .site-subnav .menu {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: center;
		gap: 0;
		padding-block: 0.15rem;
	}

	.site-header .site-subnav .menu > li > a {
		padding: 0.5rem 0.55rem;
		border-bottom: 0;
		font-size: 0.74rem;
		overflow-wrap: anywhere;
		text-align: center;
		white-space: normal;
	}

	.site-header .site-subnav .menu-item-has-children > a {
		padding-right: 1.8rem;
	}

	.site-header .site-subnav .submenu-toggle {
		width: 24px;
		height: 24px;
	}

	.site-header .site-subnav .sub-menu,
	.site-header .site-subnav .sub-menu .sub-menu {
		position: static;
		display: none;
		min-width: 0;
		margin: 0 0 0.35rem;
		padding: 0 0 0 0.75rem;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	.site-header .site-subnav .menu-item.is-open > .sub-menu {
		display: block;
	}

	.site-header .site-subnav li:hover > .sub-menu,
	.site-header .site-subnav li:focus-within > .sub-menu {
		display: none;
	}

	.site-header .site-subnav li.is-open:hover > .sub-menu,
	.site-header .site-subnav li.is-open:focus-within > .sub-menu {
		display: block;
	}

	.site-header .site-subnav .sub-menu a {
		padding: 0.5rem 0.25rem;
		color: var(--maky-header-text);
		font-size: 0.88rem;
	}
}

/* =====================================================================
   En-tête : logo réglable, publicité de première ligne, espace contenu
   ===================================================================== */

.site-header .site-branding .custom-logo {
	width: auto;
	max-width: min(260px, 40vw);
	max-height: var(--maky-logo-height, 44px);
	height: auto;
}

@media (max-width: 1399px) {
	.site-header .site-branding .custom-logo {
		max-width: min(200px, 45vw);
		max-height: min(var(--maky-logo-height, 44px), 64px);
	}
}

@media (max-width: 560px) {
	.site-header .site-branding .custom-logo {
		max-width: min(160px, 50vw);
		max-height: min(var(--maky-logo-height, 44px), 48px);
	}
}

/* Première ligne avec publicité facultative.
   L'emplacement est un enfant direct de la première ligne. Il reste dans
   cette ligne quand la place le permet, sinon il passe sur une ligne
   centrée entre la première ligne et le menu secondaire. */

.site-header.has-header-ad > .site-header__inner {
	/* L'espacement vertical de la ligne publicitaire est porté par
	   l'emplacement lui-même quand une création est servie. Ainsi, un
	   emplacement vide reste large et mesurable sans créer de vide. */
	gap: 0 1.25rem;
}

.site-header.has-header-ad .maky-header-ad {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-width: 0;
	max-width: 100%;
	line-height: 0;
}

/* L'emplacement reste mesurable au chargement même avant le remplissage.
   Il n'est jamais masqué par le thème : le fournisseur choisit le format,
   et Ad Inserter / GPT décide seul s'il y a une création à afficher. */

.site-header.has-header-ad .maky-header-ad .widget {
	margin: 0;
}

/* L'emplacement garde toute sa largeur au chargement, même sans création.
   L'espace vertical n'apparaît qu'une fois une création réellement servie. */
.site-header.has-header-ad .maky-header-ad.is-ad-filled {
	padding-block: 0.625rem;
}

/* Le thème ne fixe ni largeur ni hauteur de la création : les attributs
   dimensionnels fournis par Ad Inserter / GPT restent la référence.
   La largeur de l'emplacement reste bornée pour éviter un débordement
   horizontal lorsqu'une création fixe survit à une réduction de fenêtre. */

.site-header .maky-header-ad,
.site-header .maky-header-ad > .widget,
.site-header .maky-header-ad .widget > div,
.site-header .maky-header-ad iframe,
.site-header .maky-header-ad img {
	max-width: 100%;
}

.site-header .maky-header-ad iframe,
.site-header .maky-header-ad img {
	display: block;
}

/* Sous 1400 px, la publicité reste visible entre l'en-tête compact et les
   rubriques, sans ouvrir le panneau de navigation. */

@media (max-width: 1399px) {
	.site-header.has-header-ad > .site-header__inner {
		flex-wrap: wrap;
	}

	.site-header.has-header-ad .site-branding {
		flex: 1 1 auto;
	}

	.site-header.has-header-ad .maky-header-ad {
		order: 5;
		flex: 1 0 100%;
		width: 100%;
		max-width: 100%;
		margin-inline: 0;
		overflow: hidden;
	}

	.site-header.has-header-ad .header-panel {
		order: 6;
	}

	.site-header.has-header-ad .header-panel .main-navigation,
	.site-header.has-header-ad .header-actions-area {
		flex: none;
	}
}

/* =====================================================================
   En-tête : logo, navigation souple, colonne utilitaire
   ===================================================================== */

@media (min-width: 1400px) {
	.site-header > .site-header__inner,
	.site-header.has-header-ad > .site-header__inner {
		display: grid;
		/* Logo, navigation souple, taille du texte, commandes. Aucune
		   colonne symétrique ni largeur réservée à une publicité ou à des
		   actions absentes. */
		grid-template-columns: auto minmax(0, 1fr) auto auto;
		grid-template-rows: auto;
		align-items: center;
		gap: 0 1rem;
		min-height: 0;
		padding-block: 12px;
	}

	.site-header .site-branding {
		grid-column: 1;
		justify-self: start;
		flex: none;
		min-width: 0;
		margin: 0;
		order: 0;
	}

	.site-header .header-panel {
		display: contents;
	}

	.site-header .header-panel .main-navigation,
	.site-header.has-header-ad .header-panel .main-navigation {
		grid-column: 2;
		justify-self: stretch;
		flex: none;
		width: 100%;
		min-width: 0;
		max-width: none;
		margin: 0;
		order: 0;
	}

	.site-header .header-panel .main-navigation ul {
		flex-wrap: nowrap;
		justify-content: center;
		width: max-content;
		max-width: none;
		margin-inline: auto;
		transform: translateX(var(--maky-nav-shift, 0px));
	}

	.site-header .header-panel .main-navigation a {
		white-space: nowrap;
		text-align: center;
	}

	.site-header > .site-header__inner > .header-textsize {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
		align-self: center;
		order: 0;
	}

	.site-header .header-right {
		grid-column: 4;
		grid-row: 1;
		justify-self: end;
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: 0.75rem;
		min-width: 0;
		width: auto;
	}

	.site-header .header-right .header-actions-area,
	.site-header.has-header-ad .header-right .header-actions-area {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		flex-wrap: wrap;
		gap: 0.5rem;
		flex: 0 1 auto;
		width: auto;
		min-width: 0;
		order: 2;
	}

	/* Par défaut, la publicité occupe une ligne centrée sous la première
	   ligne. La classe header-ad-inline, posée après mesure, la replace
	   dans la première ligne dès que la largeur cumulée du logo, du menu,
	   de la création et des actions le permet. Vide, elle ne crée ni
	   hauteur ni interligne. */

	.site-header.has-header-ad .maky-header-ad {
		grid-column: 1 / -1;
		grid-row: 2;
		justify-self: center;
		align-self: center;
		width: 100%;
		max-width: 100%;
		order: 0;
	}

	.site-header.has-header-ad.header-ad-inline > .site-header__inner {
		/* Logo, menu souple, publicité, taille du texte, commandes. */
		grid-template-columns: auto minmax(0, 1fr) auto auto auto;
		grid-template-rows: auto;
	}

	.site-header.has-header-ad.header-ad-inline .maky-header-ad {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
		width: auto;
		max-width: min(728px, 100%);
		padding-block: 0;
	}

	.site-header.has-header-ad.header-ad-inline > .site-header__inner > .header-textsize {
		grid-column: 4;
		grid-row: 1;
	}

	.site-header.has-header-ad.header-ad-inline .header-right {
		grid-column: 5;
		grid-row: 1;
	}

	.site-header .menu-toggle {
		display: none;
		grid-column: 3;
	}
}

@media (max-width: 1399px) {
	.site-header .header-right {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		order: 2;
		gap: 0.75rem;
		width: 100%;
	}

	.site-header .header-right .header-actions-area,
	.site-header.has-header-ad .header-right .header-actions-area {
		width: 100%;
		flex-direction: column;
		align-items: stretch;
	}
}

/* =====================================================================
   Colonne utilitaire : recherche au-dessus, panier en dessous
   ===================================================================== */

@media (min-width: 1400px) {
	.site-header .header-right .header-actions-area {
		align-items: center;
		flex-wrap: nowrap;
		gap: 0.75rem;
	}

	.site-header .header-utility {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		justify-content: center;
		gap: 4px;
		flex: 0 0 3.5rem;
		width: 3.5rem;
		order: 2;
	}

	.site-header .header-utility .header-search {
		position: relative;
		flex: 0 0 auto;
		width: 100%;
		margin: 0;
		order: 0;
	}

	.site-header .header-utility .header-search__toggle {
		width: 100%;
		min-height: 2rem;
	}

	.site-header .header-utility .maky-cart-link {
		width: 100%;
		min-width: 0;
		min-height: 2rem;
		padding: 0 0.25rem;
		justify-content: center;
		order: 0;
	}

	.site-header .header-utility .maky-cart-link__icon {
		width: 16px;
		height: 16px;
	}

	.site-header .header-utility .maky-cart-link__count {
		min-width: 1.2rem;
		height: 1.2rem;
		font-size: 0.68rem;
	}

	.site-header .header-utility .header-search__panel {
		top: calc(100% + 0.35rem);
	}

	.site-header .header-actions-wrap {
		order: 1;
		flex: 0 0 auto;
	}

	.site-header .header-actions {
		display: flex;
		flex-wrap: nowrap;
		gap: 0.5rem;
		margin: 0;
	}

	.site-header .header-actions .maky-action {
		flex: 1 1 0;
		min-width: 0;
		text-align: center;
	}
}

@media (max-width: 1399px) {
	.site-header .header-utility {
		display: flex;
		flex-direction: row;
		align-items: stretch;
		justify-content: flex-end;
		order: 1;
		gap: 0.5rem;
		width: 100%;
	}

	.site-header .header-utility .header-search {
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
	}

	.site-header .header-utility .header-search__toggle {
		display: none;
	}

	.site-header .header-utility .header-search__panel {
		position: static;
		display: block;
		width: 100%;
		padding: 0;
		border: 0;
		background: transparent;
		box-shadow: none;
	}

	.site-header .header-utility .search-form {
		flex-direction: row;
		width: 100%;
	}

	.site-header .header-utility .search-field {
		min-height: 42px;
	}

	.site-header .header-utility .search-submit {
		width: 36px;
	}

	.site-header .header-utility .maky-cart-link {
		flex: 0 0 auto;
		width: auto;
		min-width: 3.5rem;
		min-height: 2.625rem;
		justify-content: center;
	}

	.site-header .header-actions-wrap {
		order: 2;
		width: 100%;
	}
}

/* =====================================================================
   Panneau mobile : hauteur utile, défilement interne et accordéons
   ---------------------------------------------------------------------
   Le panneau reste dans le flux de l'en-tête. Sa hauteur maximale est
   calculée par navigation.js à partir de sa position réelle, ce qui tient
   compte de la barre d'administration WordPress et de la première ligne.
   ===================================================================== */

@media (max-width: 1399px) {
	/* Le verrou ne porte que sur <html>. Appliquer overflow:hidden à
	   <body> en fait le conteneur de défilement : position:sticky de
	   l'en-tête est alors neutralisée et celui-ci sort de l'écran avec le
	   menu ouvert, page verrouillée. Le défilement de la page reste bloqué
	   par <html>, y compris avec un en-tête sticky. */
	html.maky-menu-open {
		overflow: hidden;
	}

	.site-header .header-panel.is-open {
		display: flex;
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		min-height: 0;
		/* Valeur de repli avant la mesure JavaScript. */
		max-height: calc(100dvh - 6rem);
		padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		scrollbar-gutter: stable;
		scroll-padding-block: 0.75rem;
		touch-action: pan-y;
	}

	.site-header .header-panel.is-open > .main-navigation,
	.site-header .header-panel.is-open > .header-right {
		flex-shrink: 0;
		min-width: 0;
		max-width: 100%;
	}

	.site-header .header-panel .main-navigation,
	.site-header .header-panel .main-navigation ul,
	.site-header .header-panel .main-navigation li {
		max-width: 100%;
		box-sizing: border-box;
	}

	.site-header .header-panel .main-navigation a {
		min-width: 0;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	/* Lien parent cliquable et flèche distincte, sur la même ligne. */
	.site-header .header-panel .main-navigation .menu-item-has-children {
		align-items: stretch;
	}

	.site-header .header-panel .main-navigation .menu-item-has-children > a {
		flex: 1 1 auto;
	}

	.site-header .header-panel .main-navigation .menu-item-has-children > .submenu-toggle {
		display: inline-flex;
		flex: 0 0 44px;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: auto;
		min-height: 44px;
		margin: 0;
		padding: 0;
		border: 0;
		border-bottom: 1px solid var(--maky-border);
		border-radius: 0;
		background: transparent;
		color: var(--maky-header-text);
	}

	.site-header .header-panel .main-navigation .submenu-toggle:hover,
	.site-header .header-panel .main-navigation .submenu-toggle:focus,
	.site-header .header-panel .main-navigation .submenu-toggle[aria-expanded="true"] {
		background: var(--maky-surface);
		color: var(--maky-accent-header);
	}

	.site-header .header-panel .main-navigation .submenu-toggle:focus-visible {
		outline: 3px solid var(--maky-focus-header);
		outline-offset: -2px;
	}

	/* Accordéon dans le flux : le sous-menu pousse les éléments suivants. */
	.site-header .header-panel .main-navigation .sub-menu {
		position: static;
		display: none;
		flex: 1 0 100%;
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		margin: 0;
		padding: 0 0 0 0.75rem;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	.site-header .header-panel .main-navigation .menu-item.is-open > .sub-menu {
		display: block;
	}

	/* Le survol ne doit pas court-circuiter l'accordéon tactile. */
	.site-header .header-panel .main-navigation li:hover > .sub-menu,
	.site-header .header-panel .main-navigation li:focus-within > .sub-menu {
		display: none;
	}

	.site-header .header-panel .main-navigation li.is-open:hover > .sub-menu,
	.site-header .header-panel .main-navigation li.is-open:focus-within > .sub-menu {
		display: block;
	}

	.site-header .header-panel .main-navigation .sub-menu a {
		padding-inline: 0.5rem;
	}

	/* Sans JavaScript, tous les sous-menus restent consultables. */
	html:not(.maky-js) .site-header .header-panel .main-navigation .sub-menu {
		display: block;
	}
}

/* =====================================================================
   Panier accessible depuis la première ligne mobile — 1.6.3
   ---------------------------------------------------------------------
   Sous 1400 px, le lien panier existant est déplacé par navigation.js
   dans le conteneur de première ligne, à côté du bouton de menu. Le
   conteneur n'est rendu que si le panier est actif et WooCommerce
   présent ; sinon il ne réserve ni icône ni espace.
   ===================================================================== */

.site-header .header-mobile-cart {
	display: none;
}

@media (max-width: 1399px) {
	.site-header > .site-header__inner > .header-mobile-cart {
		display: contents;
	}

	/* Le logo peut se réduire pour garder panier et menu sur la même
	   ligne, même à 320 px et avec une publicité d'en-tête. */
	.site-header .site-branding,
	.site-header.has-header-ad .site-branding {
		flex: 1 1 0;
	}

	.site-header.has-header-ad > .site-header__inner {
		column-gap: 0.75rem;
	}

	.site-header .site-title,
	.site-header .site-description {
		overflow-wrap: anywhere;
	}

	.site-header .header-mobile-cart .maky-cart-link {
		order: 2;
		flex: 0 0 auto;
		width: auto;
		min-width: 44px;
		height: 44px;
		padding: 0 0.4rem;
		justify-content: center;
		gap: 0.3rem;
	}

	.site-header .header-mobile-cart .maky-cart-link__count {
		min-width: 1.35rem;
		height: 1.35rem;
	}

	.site-header .header-mobile-cart .maky-cart-link__label {
		display: none;
	}

	.site-header .menu-toggle {
		order: 3;
		width: 44px;
		height: 44px;
	}
}

@media (min-width: 1400px) {
	.site-header .header-mobile-cart {
		display: none;
	}
}

@media (max-width: 560px) {
	/* Le logo reste proportionné dans la place restante, sans chevaucher
	   le panier ni le bouton de menu. */
	.site-header .site-branding .custom-logo {
		max-width: min(160px, 50vw, 100%);
	}
}

/* =====================================================================
   En-tête compact au-delà de 1400 px — 1.6.4
   ---------------------------------------------------------------------
   Si les liens ne tiennent réellement plus entre le logo et les
   commandes, le header reprend la navigation adaptée (hamburger) au lieu
   de comprimer le menu sur plusieurs lignes. Aucun lien n'est masqué :
   tous restent dans le panneau, avec les accordéons et le défilement.
   ===================================================================== */

@media (min-width: 1400px) {
	.site-header.maky-nav-compact > .site-header__inner {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 0.75rem;
		min-height: 0;
		padding-block: 12px;
	}

	.site-header.maky-nav-compact .site-branding {
		flex: 1 1 auto;
		min-width: 0;
		margin: 0;
		order: 1;
	}

	.site-header.maky-nav-compact .header-mobile-cart {
		display: contents;
	}

	.site-header.maky-nav-compact .header-mobile-cart .maky-cart-link {
		order: 2;
		flex: 0 0 auto;
		width: auto;
		min-width: 44px;
		height: 44px;
		padding: 0 0.4rem;
		justify-content: center;
		gap: 0.3rem;
	}

	.site-header.maky-nav-compact .header-mobile-cart .maky-cart-link__label {
		display: none;
	}

	.site-header.maky-nav-compact .menu-toggle {
		display: inline-flex;
		order: 3;
		flex: 0 0 auto;
		width: 44px;
		height: 44px;
		margin-left: 0;
	}

	.site-header.maky-nav-compact .maky-header-ad,
	.site-header.maky-nav-compact.has-header-ad .maky-header-ad {
		order: 5;
		flex: 1 0 100%;
		grid-column: auto;
		grid-row: auto;
		width: 100%;
		max-width: 100%;
		margin-inline: 0;
		overflow: hidden;
	}

	.site-header.maky-nav-compact .header-panel {
		display: none;
		flex: 1 0 100%;
		order: 6;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		width: 100%;
		padding-top: 0.75rem;
		border-top: 1px solid var(--maky-border);
	}

	.site-header.maky-nav-compact .header-panel.is-open {
		display: flex;
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		min-height: 0;
		max-height: calc(100dvh - 6rem);
		padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		scrollbar-gutter: stable;
		scroll-padding-block: 0.75rem;
		touch-action: pan-y;
	}

	.site-header.maky-nav-compact .header-panel .main-navigation {
		order: 1;
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}

	.site-header.maky-nav-compact .header-panel .main-navigation ul {
		flex-direction: column;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 0;
		width: 100%;
		max-width: 100%;
		transform: none;
	}

	.site-header.maky-nav-compact .header-panel .main-navigation li {
		width: 100%;
		max-width: 100%;
	}

	.site-header.maky-nav-compact .header-panel .main-navigation a {
		padding: 0.75rem 0.25rem;
		border-bottom: 1px solid var(--maky-border);
		font-size: 1rem;
		text-align: left;
		white-space: normal;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.site-header.maky-nav-compact .header-panel .main-navigation .menu-item-has-children {
		align-items: stretch;
	}

	.site-header.maky-nav-compact .header-panel .main-navigation .menu-item-has-children > a {
		flex: 1 1 auto;
	}

	.site-header.maky-nav-compact .header-panel .main-navigation .menu-item-has-children > .submenu-toggle {
		display: inline-flex;
		flex: 0 0 44px;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: auto;
		min-height: 44px;
		margin: 0;
		padding: 0;
		border: 0;
		border-bottom: 1px solid var(--maky-border);
		border-radius: 0;
		background: transparent;
		color: var(--maky-header-text);
	}

	.site-header.maky-nav-compact .header-panel .main-navigation .sub-menu {
		position: static;
		display: none;
		flex: 1 0 100%;
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		margin: 0;
		padding: 0 0 0 0.75rem;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	.site-header.maky-nav-compact .header-panel .main-navigation .menu-item.is-open > .sub-menu {
		display: block;
	}

	.site-header.maky-nav-compact .header-panel .main-navigation li:hover > .sub-menu,
	.site-header.maky-nav-compact .header-panel .main-navigation li:focus-within > .sub-menu {
		display: none;
	}

	.site-header.maky-nav-compact .header-panel .main-navigation li.is-open:hover > .sub-menu,
	.site-header.maky-nav-compact .header-panel .main-navigation li.is-open:focus-within > .sub-menu {
		display: block;
	}

	.site-header.maky-nav-compact .header-right {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		order: 2;
		gap: 0.75rem;
		width: 100%;
	}

	.site-header.maky-nav-compact .header-actions-area {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		width: 100%;
		gap: 0.5rem;
		padding-top: 0.75rem;
		border-top: 1px solid var(--maky-border);
	}

	.site-header.maky-nav-compact .header-utility {
		display: flex;
		flex-direction: row;
		align-items: stretch;
		justify-content: flex-end;
		width: 100%;
		gap: 0.5rem;
	}

	.site-header.maky-nav-compact .header-utility .header-search {
		flex: 1 1 auto;
		width: auto;
		min-width: 0;
		margin: 0;
	}

	.site-header.maky-nav-compact .header-search__toggle {
		display: none;
	}

	.site-header.maky-nav-compact .header-search__panel {
		position: static;
		display: block;
		width: 100%;
		padding: 0;
		border: 0;
		background: transparent;
		box-shadow: none;
	}

	.site-header.maky-nav-compact .header-utility .search-form {
		flex-direction: row;
		width: 100%;
	}

	.site-header.maky-nav-compact .header-utility .search-field {
		min-height: 42px;
	}

	.site-header.maky-nav-compact .header-utility .search-submit {
		width: 36px;
	}

	.site-header.maky-nav-compact .header-actions-wrap {
		order: 2;
		width: 100%;
	}

	.site-header.maky-nav-compact .header-actions {
		width: 100%;
		flex-direction: column;
		gap: 0.5rem;
		margin: 0;
	}

	.site-header.maky-nav-compact .maky-action {
		width: 100%;
		justify-content: center;
	}
}

/* =====================================================================
   Sous-menus desktop : survol continu et empilement — 1.6.6
   ---------------------------------------------------------------------
   Le menu principal est mesuré et décalé par transform : son <ul> crée
   donc un contexte d'empilement. On élève le bloc de navigation lui-même
   au-dessus de la barre de rubriques, sans masquer son débordement. Le
   panneau commence sans marge sous le parent : son espace visuel est
   obtenu par le padding interne, ce qui rend le passage du pointeur
   continu jusqu'aux liens.
   ===================================================================== */

@media (min-width: 1400px) {
	.site-header:not(.maky-nav-compact) .header-panel .main-navigation {
		position: relative;
		z-index: 3;
	}

	.site-header:not(.maky-nav-compact) .header-panel .main-navigation .sub-menu {
		z-index: 30;
	}

	.site-header .site-subnav-bar {
		position: relative;
		z-index: 1;
	}
}

.site-header > .site-header__inner > .header-mobile-actions {
	display: none;
}

@media (max-width: 1399px) {
	/* Actions de l'en-tête : le même bloc est déplacé par navigation.js.
	   Une seule occurrence existe : aucun bouton n'est dupliqué. */
	.site-header > .site-header__inner > .header-mobile-actions {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		flex: 0 0 auto;
		order: 2;
		min-width: 0;
		max-width: 100%;
	}

	.site-header > .site-header__inner > .header-mobile-actions:empty {
		display: none;
	}

	.site-header > .site-header__inner > .header-mobile-actions.is-row {
		flex: 1 0 100%;
		order: 4;
		justify-content: stretch;
	}

	.site-header > .site-header__inner > .header-mobile-actions .header-actions {
		display: flex;
		flex: 0 1 auto;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-end;
		gap: 0.5rem;
		max-width: 100%;
		margin: 0;
	}

	.site-header > .site-header__inner > .header-mobile-actions.is-row .header-actions {
		flex: 1 1 100%;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: stretch;
		justify-content: stretch;
	}

	.site-header > .site-header__inner > .header-mobile-actions .maky-action {
		flex: 0 1 auto;
		min-width: 0;
		max-width: 100%;
		white-space: normal;
		overflow-wrap: anywhere;
		text-align: center;
	}

	.site-header > .site-header__inner > .header-mobile-actions.is-row .maky-action {
		flex: 1 1 12rem;
		width: auto;
	}

	.site-header > .site-header__inner > .header-panel {
		order: 5;
	}

	.site-header .site-subnav .menu > li > a {
		white-space: normal;
		overflow-wrap: anywhere;
	}

	.site-header .header-panel .header-actions-area:not(:has(.header-search, .maky-cart-link, .header-actions)) {
		display: none;
	}


}

@media (min-width: 1400px) {
	.site-header > .site-header__inner > .header-mobile-actions {
		display: none;
	}

}

/* =====================================================================
   Taille du texte : position dans l'en-tête
   ---------------------------------------------------------------------
   Le bouton aA est placé après la recherche sur ordinateur (colonne
   dédiée, juste avant les commandes) et juste avant le bouton de menu sur
   les largeurs compactes. Aucune ligne supplémentaire n'est réservée.
   ===================================================================== */

@media (max-width: 1399px) {
	.site-header > .site-header__inner > .header-textsize {
		order: 3;
		margin-left: 0;
	}

	.site-header .menu-toggle {
		order: 4;
		margin-left: 0;
	}

	.site-header:not(.has-header-ad) .header-panel {
		order: 5;
	}

	.site-header .maky-textsize__toggle {
		width: 44px;
		height: 44px;
	}

	.site-header .maky-textsize__panel {
		right: 0;
	}
}

@media (min-width: 1400px) {
	.site-header.maky-nav-compact > .site-header__inner > .header-textsize {
		order: 4;
		margin-left: 0;
	}
}
