/* Base: the paper, type, browser surfaces, and the shared components every page and section uses. */

/* ---------- Paper and browser surfaces ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	background: var(--paper);
	color-scheme: light;
	scrollbar-color: var(--hairline-strong) var(--paper);
	scrollbar-width: thin;
	scroll-padding-top: calc(var(--header-tight) + var(--s-4));
	-webkit-tap-highlight-color: transparent;
}
/* No global scroll-behavior: smooth. It turns every programmatic scroll (ScrollTrigger's refresh included) into an
   animation, so pins measured mid-refresh land in the wrong place. In-page anchor jumps glide via motion.js instead. */
body {
	margin: 0;
	min-height: 100vh;
	font-family: var(--font-body);
	font-size: var(--text-base);
	font-weight: 400;
	line-height: var(--leading-body);
	color: var(--ink);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	caret-color: var(--accent);
	accent-color: var(--action);
	overflow-x: clip;
	display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; }
::selection { background: var(--action); color: var(--on-action); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 10px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: var(--line-control); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Sections and <main> take focus only as anchor targets (motion.js): they are not controls, so no ring. */
[tabindex="-1"]:focus-visible:not(a, button, input, select, textarea) { outline: none; }
img, svg, video, canvas, picture { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

a { color: inherit; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 0.22em; }
a:hover { text-decoration-color: currentColor; }
a, button, [role="button"], [role="tab"], label[for], select, summary { cursor: pointer; }
:disabled, [aria-disabled="true"] { cursor: not-allowed; }

h1, h2, h3, h4, h5 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: var(--leading-tight);
	letter-spacing: var(--tracking-display);
	text-wrap: balance;
	margin: 0;
}
h3, h4, h5 { line-height: var(--leading-snug); letter-spacing: var(--tracking-tight); }
p { margin: 0 0 var(--s-4); text-wrap: pretty; }
ul, ol { padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--hairline); margin: var(--s-6) 0; }
/* Figures: Rubik carries tabular figures (Nunito Sans has none), so every number that lines up is set in Rubik. */
.num, .price, .amount, table { font-variant-numeric: tabular-nums lining-nums; }
.num, .price, .amount { font-family: var(--font-display); }

input, select, textarea { font: inherit; color: inherit; }
::placeholder { color: var(--muted); opacity: 1; }

/* ---------- Utilities ---------- */
.visually-hidden, .sr-only, .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
	position: fixed; left: var(--gutter); top: var(--s-3); z-index: var(--z-skip);
	padding: var(--s-3) var(--s-4); border-radius: var(--r-pill);
	background: var(--ink); color: var(--on-ink); font-weight: 700; text-decoration: none;
	transform: translateY(-160%); transition: transform var(--dur-2) var(--ease-out);
}
.skip-link:focus-visible { transform: none; outline-offset: 3px; }
.container { width: min(100% - 2 * var(--gutter), var(--page-max)); margin-inline: auto; }
.nowrap { white-space: nowrap; }

/* ---------- Buttons ----------
 * .btn                  neutral: paper, ink text, hairline outline
 * .btn--accent          the one filled blue action of a view
 * .btn--ghost           outline in ink (on paper) or in white inside .on-dark / on photos (.btn--on-dark)
 * .btn--wa              blue, with the WhatsApp glyph (twomag_icon('whatsapp'))
 * .btn--ink             black filled
 * .btn--light           white filled (over photographs and ink)
 * .btn--icon            round 44 px icon button (add an aria-label)
 * sizes: .btn--sm (40), default (48), .btn--lg (56); .btn--block fills its row.
 */
.btn, .button, a.button, button.button, input.button, .wc-block-components-button {
	--btn-bg: var(--paper);
	--btn-fg: var(--ink);
	--btn-line: var(--hairline-strong);
	--btn-bg-hover: var(--paper);
	--btn-line-hover: var(--ink);
	--btn-bg-press: var(--mist);
	--btn-h: 48px;
	position: relative;
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
	min-height: var(--btn-h); padding: 0 1.5em;
	font-family: var(--font-body); font-weight: 700; font-size: var(--text-base); line-height: 1.1; letter-spacing: 0;
	color: var(--btn-fg); background: var(--btn-bg);
	border: 1.5px solid var(--btn-line); border-radius: var(--r-pill);
	text-decoration: none; text-align: center; white-space: nowrap;
	cursor: pointer; user-select: none; -webkit-user-select: none;
	transition:
		background-color var(--dur-1) var(--ease-out),
		border-color var(--dur-1) var(--ease-out),
		color var(--dur-1) var(--ease-out),
		box-shadow var(--dur-2) var(--ease-out),
		transform var(--dur-2) var(--ease-spring);
}
.btn .icon, .button .icon { width: 1.25em; height: 1.25em; }
@media (hover: hover) {
	.btn:hover, .button:hover { background: var(--btn-bg-hover); border-color: var(--btn-line-hover); }
}
.btn:active, .button:active { background: var(--btn-bg-press); transform: scale(0.97); transition-duration: var(--dur-1); }
.btn:focus-visible, .button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn--accent, .btn--wa, .button.alt, .single_add_to_cart_button, .checkout-button, #place_order, .btn--cable {
	--btn-bg: var(--action); --btn-fg: var(--on-action); --btn-line: var(--action);
	--btn-bg-hover: var(--action-hover); --btn-line-hover: var(--action-hover);
	--btn-bg-press: var(--action-press);
}
.btn--ghost { --btn-bg: transparent; --btn-line: var(--ink); --btn-bg-hover: var(--ink); --btn-fg: var(--ink); --btn-bg-press: #1F2125; }
@media (hover: hover) { .btn--ghost:hover { color: var(--on-ink); } }
.btn--ghost:active { color: var(--on-ink); }
.btn--ink { --btn-bg: var(--ink); --btn-fg: var(--on-ink); --btn-line: var(--ink); --btn-bg-hover: #23262B; --btn-line-hover: #23262B; --btn-bg-press: #33373E; }
.btn--light { --btn-bg: var(--paper); --btn-fg: var(--ink); --btn-line: var(--paper); --btn-bg-hover: var(--mist); --btn-line-hover: var(--mist); --btn-bg-press: var(--mist-2); box-shadow: var(--shadow-float); }
/* Ghost on photographs and on ink. */
.btn--on-dark, .on-dark .btn--ghost { --btn-fg: var(--on-ink); --btn-line: rgb(255 255 255 / 0.85); --btn-bg-hover: var(--paper); --btn-line-hover: var(--paper); --btn-bg-press: var(--mist); }
@media (hover: hover) { .btn--on-dark:hover, .on-dark .btn--ghost:hover { color: var(--ink); } }
.btn--wa .icon { width: 1.3em; height: 1.3em; }

.btn--sm, .btn--small { --btn-h: 40px; padding: 0 1.1em; font-size: var(--text-sm); }
.btn--lg { --btn-h: 56px; padding: 0 1.8em; font-size: var(--text-md); }
.btn--block, .btn--wide { display: flex; width: 100%; }
.btn--icon, .btn--square { --btn-h: 44px; width: var(--btn-h); padding: 0; flex: none; }
.btn--icon.btn--sm { --btn-h: 40px; }
.btn--icon.btn--lg { --btn-h: 52px; }
.btn--icon .icon { width: 22px; height: 22px; }

.btn[disabled], .btn[aria-disabled="true"], .button.disabled, .button:disabled, .button[disabled] {
	--btn-bg: var(--mist); --btn-fg: var(--muted); --btn-line: var(--hairline);
	--btn-bg-hover: var(--mist); --btn-line-hover: var(--hairline);
	box-shadow: none; cursor: not-allowed; transform: none;
}
/* Loading: the label stays in place (no width jump), a ring turns over it. */
.btn.is-loading, .button.loading, .btn.loading { color: transparent !important; pointer-events: none; }
.btn.is-loading > *, .button.loading > *, .btn.loading > * { visibility: hidden; }
.btn.is-loading::after, .button.loading::after, .btn.loading::after {
	content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
	border: 2px solid var(--btn-fg); border-right-color: transparent;
	animation: twomag-spin 0.7s linear infinite;
}
.button.added::before { content: none; }
.added_to_cart { display: none !important; }
@keyframes twomag-spin { to { transform: rotate(1turn); } }

/* ---------- Links ---------- */
.link { color: var(--action); font-weight: 700; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.25em; transition: text-decoration-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.link:hover { color: var(--action-hover); text-decoration-color: currentColor; }
/* "Tout voir" with an arrow that steps forward on hover. */
.link-arrow { display: inline-flex; align-items: center; gap: 0.4em; min-height: 44px; color: var(--action); font-weight: 700; text-decoration: none; white-space: nowrap; }
.link-arrow .icon { width: 1.1em; height: 1.1em; transition: transform var(--dur-2) var(--ease-out); }
.link-arrow:hover { color: var(--action-hover); }
.link-arrow:hover .icon { transform: translateX(4px); }
.on-dark .link-arrow, .link-arrow--light { color: var(--on-ink); }

/* ---------- Chips (filters, toggles) and pills (static tags) ---------- */
.chip {
	display: inline-flex; align-items: center; gap: 0.5em;
	min-height: 40px; padding: 0 1em;
	background: var(--mist); color: var(--ink); border: 1.5px solid transparent; border-radius: var(--r-pill);
	font-family: var(--font-body); font-weight: 700; font-size: var(--text-sm); line-height: 1; white-space: nowrap;
	text-decoration: none; cursor: pointer;
	transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-spring);
}
.chip .num { font-size: 0.86em; font-weight: 500; color: var(--muted); }
@media (hover: hover) { .chip:hover { background: var(--mist-2); } }
.chip:active { transform: scale(0.96); }
.chip.is-on, .chip[aria-pressed="true"], .chip[aria-current]:not([aria-current="false"]), .chip[aria-selected="true"] { background: var(--ink); color: var(--on-ink); }
.chip.is-on .num, .chip[aria-pressed="true"] .num, .chip[aria-current]:not([aria-current="false"]) .num { color: var(--on-ink-2); }
.chip--outline { background: var(--paper); border-color: var(--hairline-strong); }
@media (hover: hover) { .chip--outline:hover { background: var(--paper); border-color: var(--ink); } }
.chip--small { min-height: 36px; padding: 0 0.85em; font-size: 0.8125rem; }
.chip:disabled, .chip[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
/* Touch screens: chips and small buttons grow to 44 px targets (the pointer sizes stay compact on desktop). */
@media (pointer: coarse) {
	.chip, .chip--small { min-height: 44px; }
	.btn--sm, .btn--small, .btn--icon.btn--sm { --btn-h: 44px; }
}

.pill {
	display: inline-flex; align-items: center; gap: 0.45em;
	min-height: 30px; padding: 0 0.85em;
	border-radius: var(--r-pill); background: var(--paper); color: var(--ink);
	font-weight: 700; font-size: var(--text-sm); line-height: 1; white-space: nowrap;
}
.pill .icon { width: 1.1em; height: 1.1em; color: var(--accent); }
.pill--mist { background: var(--mist); }
.pill--line { background: transparent; border: 1px solid var(--hairline-strong); }
.pill--on-photo { background: rgb(0 0 0 / 0.42); color: var(--on-ink); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); }

/* ---------- Segmented control (Jour / Nuit, Vitrine / Vue pro) ----------
 * <div class="segmented" role="group" aria-label="…"><button class="segmented__opt" aria-pressed="true">Jour</button>…</div>
 */
.segmented { display: inline-flex; padding: 4px; gap: 2px; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--r-pill); box-shadow: 0 1px 2px rgb(16 24 40 / 0.04); }
.segmented--mist { background: var(--mist); border-color: transparent; box-shadow: none; }
.segmented__opt {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.45em;
	min-height: 40px; min-width: 44px; padding: 0 1.2em;
	border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2);
	font-family: var(--font-body); font-weight: 700; font-size: var(--text-sm); line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer;
	transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.segmented__opt .icon { width: 18px; height: 18px; }
@media (hover: hover) { .segmented__opt:hover { color: var(--ink); background: var(--mist); } .segmented--mist .segmented__opt:hover { background: var(--mist-2); } }
/* .segmented ancestor: the active option outranks ".segmented--mist .segmented__opt:hover", so it stays ink under the pointer. */
.segmented .segmented__opt[aria-pressed="true"], .segmented .segmented__opt[aria-checked="true"], .segmented .segmented__opt[aria-current]:not([aria-current="false"]), .segmented .segmented__opt.is-on { background: var(--ink); color: var(--on-ink); }
.segmented__opt:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- Tab pills ----------
 * <div class="tabs" role="tablist" aria-label="…"><button class="tabs__tab" role="tab" aria-selected="true" aria-controls="…" id="…">Caméras</button>…</div>
 * <div role="tabpanel" aria-labelledby="…">…</div>
 */
.tabs {
	display: flex; gap: var(--s-2); overflow-x: auto; overscroll-behavior-x: contain;
	scrollbar-width: none; scroll-snap-type: x proximity; padding: 2px; margin: -2px;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__tab {
	flex: none; scroll-snap-align: start;
	display: inline-flex; align-items: center; gap: 0.5em;
	min-height: 44px; padding: 0 1.15em;
	background: var(--paper); color: var(--ink); border: 1.5px solid var(--hairline-strong); border-radius: var(--r-pill);
	font-family: var(--font-body); font-weight: 700; font-size: var(--text-sm); line-height: 1; white-space: nowrap; cursor: pointer;
	transition: background-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.tabs__tab .num { font-weight: 500; color: var(--muted); }
@media (hover: hover) { .tabs__tab:hover { border-color: var(--ink); } }
.tabs__tab[aria-selected="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.tabs__tab[aria-selected="true"] .num { color: var(--on-ink-2); }
.tabs__tab:focus-visible { outline-offset: 2px; }
[role="tabpanel"][hidden] { display: none; }

/* ---------- Carousel prev / next (44 px) ----------
 * <button class="nav-btn" type="button" aria-label="Produits précédents"><?php echo twomag_icon('arrow-left'); ?></button>
 */
.nav-btns { display: inline-flex; gap: var(--s-2); }
.nav-btn {
	width: 44px; height: 44px; flex: none;
	display: inline-grid; place-items: center;
	border: 1.5px solid var(--hairline-strong); border-radius: 50%;
	background: var(--paper); color: var(--ink); cursor: pointer;
	transition: border-color var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-spring);
}
.nav-btn .icon { width: 20px; height: 20px; }
@media (hover: hover) { .nav-btn:hover { border-color: var(--ink); } }
.nav-btn:active { transform: scale(0.92); }
.nav-btn:disabled, .nav-btn[aria-disabled="true"] { opacity: 0.35; cursor: default; transform: none; border-color: var(--hairline-strong); }
.nav-btn--on-photo { border-color: transparent; box-shadow: var(--shadow-float); }
@media (hover: hover) { .nav-btn--on-photo:hover { border-color: transparent; background: var(--mist); } }
.nav-btn--on-photo:disabled { opacity: 0.5; }

/* ---------- Horizontal rail (carousels on phones, product rows) ----------
 * <ul class="rail" style="--rail-item: 260px">…</ul>; items snap; the rail bleeds to the screen edge inside a .container.
 */
.rail {
	--rail-item: 260px;
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-auto-flow: column; grid-auto-columns: var(--rail-item); gap: var(--s-4);
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; min-width: 0; }
.rail--bleed { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }

/* ---------- Sections ----------
 * <section class="section" aria-labelledby="x-title">
 *   <div class="section__head container"><h2 class="section__title" id="x-title">Le catalogue</h2><a class="link-arrow section__link" href="…">Tout voir <svg/></a></div>
 *   …
 * </section>
 */
.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.5); }
.section--mist { background: var(--mist); }
.section + .section { padding-top: 0; }
.section--mist + .section, .section + .section--mist { padding-top: var(--section-y); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-3) var(--s-5); flex-wrap: wrap; margin-bottom: var(--s-6); }
.section__title { font-size: var(--text-2xl); }
.section__lead { margin: var(--s-3) 0 0; max-width: 56ch; color: var(--ink-2); font-size: var(--text-md); }
.section__link { margin-bottom: -10px; }
.section__tools { display: flex; align-items: center; gap: var(--s-3); }
@media (max-width: 767px) { .section__head { margin-bottom: var(--s-5); } }

/* ---------- Price ----------
 * <p class="price"><span class="num">828</span> MAD <small class="price__tax">TTC</small></p>  (or twomag_mad() inside .price)
 */
.price { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: var(--tracking-tight); line-height: 1; white-space: nowrap; color: var(--ink); }
.price__tax { font-family: var(--font-body); font-weight: 600; font-size: 0.62em; letter-spacing: 0.01em; color: var(--muted); }
.on-dark .price, .on-dark .price__tax { color: inherit; }

/* ---------- Breadcrumbs (template-parts/breadcrumbs.php) ----------
 * One quiet line above a product or a hall title: muted links, drawn chevrons, the current page unlinked. A long
 * product name ends in an ellipsis; on phones a product's trail stops at its category (the name is the H1 below).
 */
.crumbs { min-width: 0; font-size: var(--text-sm); font-weight: 700; color: var(--muted); }
.crumbs__list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; min-width: 0; }
.crumbs__item { display: inline-flex; align-items: center; flex: none; min-width: 0; white-space: nowrap; }
.crumbs__item:last-child { flex: 0 1 auto; }
.crumbs__item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.crumbs__sep { width: 14px; height: 14px; margin-inline: 6px; color: var(--hairline-strong); }
.crumbs a { display: inline-flex; align-items: center; min-height: 36px; color: inherit; text-decoration: none; transition: color var(--dur-1) var(--ease-out); }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink-2); font-weight: 600; }
@media (pointer: coarse) { .crumbs a { min-height: 44px; } }
@media (max-width: 767px) { .crumbs--product .crumbs__item:last-child { display: none; } }

/* ---------- Text pages (page.php, index.php, single.php, 404.php) ---------- */
.room { width: min(100% - 2 * var(--gutter), var(--page-max)); margin-inline: auto; padding-top: var(--s-8); }
.room__title { font-size: var(--text-3xl); margin-bottom: var(--s-6); }
.room--text { max-width: 820px; }
.room--text .prose, .room--lost p { color: var(--ink-2); max-width: 68ch; font-size: var(--text-md); }
.prose h2 { font-size: var(--text-xl); margin: var(--s-7) 0 var(--s-4); color: var(--ink); }
.prose h3 { font-size: var(--text-lg); margin: var(--s-6) 0 var(--s-3); color: var(--ink); }
.prose a:where(:not(.btn, .button, .remove, .drawer__remove)) { color: var(--action); font-weight: 600; }
.prose li + li { margin-top: var(--s-2); }
.text-list, .hall-links { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: grid; gap: var(--s-2); }
.hall-links a {
	display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
	min-height: 64px; padding: var(--s-4) 0; border-bottom: 1px solid var(--hairline);
	font-family: var(--font-display); font-size: var(--text-xl); font-weight: 600; letter-spacing: var(--tracking-display); text-decoration: none;
	transition: color var(--dur-1) var(--ease-out);
}
.hall-links a .icon { color: var(--accent); transition: transform var(--dur-2) var(--ease-out); }
.hall-links a:hover { color: var(--action); }
.hall-links a:hover .icon { transform: translateX(6px); }

/* A page built with Elementor (page.php, the landing pages): the whole width is Elementor's, its sections lay themselves out. */
.page-canvas { width: 100%; }

/* The blog (index.php: the posts page, post archives, other searches): one article per row, its picture beside the text. */
.journal__intro { margin-bottom: var(--s-6); }
.journal__list { list-style: none; margin: 0; padding: 0; }
.journal__item { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4) var(--s-6); align-items: start; padding: var(--s-6) 0; border-top: 1px solid var(--hairline); }
.journal__item:last-child { border-bottom: 1px solid var(--hairline); }
.journal__item.has-thumb { grid-template-columns: 220px minmax(0, 1fr); }
.journal__thumb { display: block; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; background: var(--mist); }
.journal__thumb img { width: 100%; height: 100%; object-fit: cover; }
.journal__date { margin: 0 0 var(--s-2); font-size: var(--text-sm); font-weight: 700; color: var(--muted); }
.journal__title { font-size: var(--text-xl); }
.journal__title a { text-decoration: none; transition: color var(--dur-1) var(--ease-out); }
.journal__title a:hover { color: var(--action); }
.journal__excerpt { margin: var(--s-3) 0 0; max-width: 68ch; color: var(--ink-2); }
@media (max-width: 599px) { .journal__item.has-thumb { grid-template-columns: minmax(0, 1fr); } }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-top: var(--s-7); }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 var(--s-3); border: 1.5px solid var(--hairline-strong); border-radius: var(--r-pill); font-family: var(--font-display); text-decoration: none; }
.pagination a.page-numbers:hover { border-color: var(--ink); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.pagination .page-numbers.dots { border-color: transparent; }
.pagination .page-numbers .icon { width: 18px; height: 18px; }

/* An article (single.php): title, date, its picture, the text in the reading measure, then the way back to the blog. */
.journal-post__date { margin: calc(-1 * var(--s-4)) 0 var(--s-6); font-size: var(--text-sm); font-weight: 700; color: var(--muted); }
.journal-post__image { margin: 0 0 var(--s-7); border-radius: var(--r-lg); overflow: hidden; background: var(--mist); }
.journal-post__image img { width: 100%; }
.journal-post .prose figure { margin: var(--s-6) 0; }
.journal-post .prose img { border-radius: var(--r-md); }
.journal-post__back { margin: var(--s-8) 0 0; padding-top: var(--s-4); border-top: 1px solid var(--hairline); }
.journal-post__back a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; font-weight: 700; color: var(--action); text-decoration: none; transition: color var(--dur-1) var(--ease-out); }
.journal-post__back a:hover { color: var(--action-hover); }
.journal-post__back .icon { width: 18px; height: 18px; transition: transform var(--dur-2) var(--ease-out); }
.journal-post__back a:hover .icon { transform: translateX(-3px); }

/* A WooCommerce amount never breaks ("1 782 MAD": WooCommerce's thousands separator is a plain space). */
.woocommerce-Price-amount { white-space: nowrap; }

/* WooCommerce notices (every page: added to cart, errors, info). */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message:focus, .woocommerce-info:focus, .woocommerce-error:focus, .woocommerce-notices-wrapper:focus { outline: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error {
	list-style: none; margin: 0 0 var(--s-5); padding: var(--s-4) var(--s-5);
	background: var(--mist); border-radius: var(--r-sm); color: var(--ink);
	display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; justify-content: space-between;
}
.woocommerce-message { background: var(--ok-soft); }
.woocommerce-error { background: var(--danger-soft); color: var(--danger); }
.woocommerce-error li { margin: 0; }
.woocommerce-message .button, .woocommerce-info .button { --btn-h: 40px; order: 2; }

/* Content the shop still has to provide, flagged in place. */
.todo { margin: var(--s-4) 0; padding: var(--s-4) var(--s-5); border: 1.5px dashed var(--accent); border-radius: var(--r-sm); color: var(--action-press); background: var(--accent-soft); }
.todo p { margin: 0; }

/* ---------- Reveal utility (assets/js/motion.js) ----------
 * data-reveal on an element: it rises into place once when it scrolls into view.
 * data-reveal="fade" fades only; data-reveal-group on a parent staggers its [data-reveal] children.
 * Elements already on screen when the page loads are never hidden; without JS everything is visible.
 */
.reveal-on [data-reveal].is-pending { opacity: 0; transform: translate3d(0, 28px, 0); }
.reveal-on [data-reveal="fade"].is-pending { transform: none; }
.reveal-on [data-reveal="scale"].is-pending { transform: scale(0.96); }
.reveal-on [data-reveal].is-revealed {
	opacity: 1; transform: none;
	transition: opacity var(--dur-4) var(--ease-out-expo), transform var(--dur-4) var(--ease-out-expo);
	transition-delay: calc(var(--reveal-i, 0) * 70ms);
}

@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; transition-delay: 0ms !important; }
	.reveal-on [data-reveal].is-pending { opacity: 1; transform: none; }
}
