/*
Theme Name:   Armurerie Pascal
Theme URI:    https://www.armurerie-pascal.com/
Description:  Thème enfant Kadence pour Armurerie Pascal (Paris, depuis 1936). Couleurs, typographies et gabarits issus du prototype (docs/reference/Armurerie-Pascal-Prototype.html).
Author:       Armurerie Pascal
Template:     kadence
Version:      0.2.0
Requires PHP: 8.2
Text Domain:  armurerie-pascal
License:      GPL-2.0-or-later
*/

/* =========================================================================
   Tokens (prototype). Kadence's palette is set to the same values by
   scripts/wp/seed.php so buttons, links and the editor follow them.
   ========================================================================= */
:root {
	--ap-paper: #EDEFEA;
	--ap-surface: #F9FAF7;
	--ap-ink: #161A19;
	--ap-muted: #59615D;
	--ap-line: #D2D7D0;
	--ap-loden: #3D5A45;
	--ap-loden-soft: #DDE6DE;
	--ap-blaze: #C4490B;
	--ap-blaze-ink: #FFFFFF;
	--ap-blaze-soft: #F6E1D4;
	--ap-hatch: #DCE1D9;
	--ap-ok: #2B7349;
	--ap-warn: #9A5400;
	--ap-hdr-bg: #000000;
	--ap-hdr-fg: #EDEFEA;

	--ap-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
	--ap-body: "IBM Plex Sans", system-ui, sans-serif;
	--ap-mono: "IBM Plex Mono", ui-monospace, monospace;
}

body {
	--global-body-font-family: var(--ap-body);
	--global-heading-font-family: var(--ap-display);
	--global-button-font-family: var(--ap-body);
	--global-content-width: 1200px;
	background: var(--ap-paper);
	color: var(--ap-ink);
	font-family: var(--ap-body);
	font-size: 15px;
	line-height: 1.55;
}

:focus-visible { outline: 2px solid var(--ap-blaze); outline-offset: 2px; }

h1, h2, h3,
.entry-title,
.product_title,
.woocommerce-loop-product__title {
	font-family: var(--ap-display);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: .005em;
	text-wrap: balance;
	color: var(--ap-ink);
}
h1, .entry-title, .product_title { font-size: clamp(36px, 5vw, 60px); }
h2 { font-size: clamp(28px, 3.4vw, 38px); }
h3 { font-size: 22px; font-weight: 600; }

.ap-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding-left: max(16px, env(safe-area-inset-left, 0px));
	padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.ap-eyebrow {
	font-family: var(--ap-mono);
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ap-muted);
	margin: 0;
}

/* Buttons (core button block + WooCommerce) */
.wp-block-button__link,
.wp-element-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.button {
	background: var(--ap-blaze);
	color: var(--ap-blaze-ink);
	border: 1px solid transparent;
	border-radius: 6px;
	padding: 12px 18px;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	box-shadow: none;
}
.wp-block-button__link:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.button:hover {
	background: var(--ap-blaze);
	color: var(--ap-blaze-ink);
	filter: brightness(1.06);
}
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button.is-style-outline > .wp-element-button,
.entry-content .wp-block-button.is-style-outline > .wp-block-button__link:not(.has-text-color) {
	background: transparent;
	color: var(--ap-ink);
	border: 1px solid var(--ap-line);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	border-color: var(--ap-ink);
	filter: none;
}

/* =========================================================================
   Header
   ========================================================================= */
.ap-header,
#masthead.ap-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--ap-hdr-bg);
	color: var(--ap-hdr-fg);
}
/* Kadence sets overflow:hidden then overflow:clip on #wrapper and overflow-x:hidden on body. A browser that
   doesn't know "clip" (older Safari) keeps "hidden", which stops the sticky header: fall back to visible. */
body { overflow-x: visible; overflow-x: clip; }
#wrapper { overflow: visible; overflow: clip; }
/* Logged in: stop below the WordPress admin bar (32 px, 46 px under 783 px wide). Same selector strength as
   "#masthead.ap-header" above, which otherwise wins and slides the header under the bar. */
.admin-bar .ap-header,
.admin-bar #masthead.ap-header { top: var(--wp-admin--admin-bar--height, 32px); }
/* No exception on phones: Kadence keeps the admin bar fixed at every width (position: fixed !important). */

.ap-hdr {
	display: flex;
	align-items: center;
	gap: 20px;
	padding-block: 12px;
}
.ap-logo { display: flex; flex: none; line-height: 1; }
.ap-logo img, .ap-logo .ap-logo-img { display: block; height: 48px; width: auto; max-width: 100%; }

.ap-search { flex: 1; min-width: 0; display: flex; margin: 0; }
.ap-search input[type="search"] {
	flex: 1;
	min-width: 0;
	border: 1px solid transparent;
	border-radius: 6px 0 0 6px;
	padding: 10px 12px;
	font: inherit;
	background: #FFFFFF;
	color: var(--ap-ink);
}
.ap-search button {
	border: 0;
	border-radius: 0 6px 6px 0;
	padding: 0 16px;
	background: var(--ap-blaze);
	color: var(--ap-blaze-ink);
	font-weight: 600;
	cursor: pointer;
}

.ap-hdr-actions { display: flex; gap: 6px; align-items: center; }
.ap-icon-btn {
	display: inline-flex;
	align-items: center;
	border: 1px solid rgba(255, 255, 255, .18);
	color: var(--ap-hdr-fg);
	border-radius: 6px;
	padding: 8px 12px;
	font-size: 14px;
	white-space: nowrap;
	text-decoration: none;
}
.ap-icon-btn:hover { border-color: rgba(255, 255, 255, .5); color: var(--ap-hdr-fg); }
.ap-cart-count {
	display: inline-block;
	min-width: 20px;
	padding: 0 6px;
	margin-left: 6px;
	border-radius: 10px;
	background: var(--ap-blaze);
	color: var(--ap-blaze-ink);
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.ap-open-chip {
	font-family: var(--ap-mono);
	font-size: 11.5px;
	padding: 3px 8px;
	border-radius: 4px;
	white-space: nowrap;
	background: var(--ap-hatch);
	color: var(--ap-muted);
}
.ap-open-chip.is-on { background: var(--ap-loden-soft); color: var(--ap-loden); }

.ap-depts { border-top: 1px solid rgba(255, 255, 255, .12); }
.ap-depts-list {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	/* Keeps the hidden screen-reader labels inside the scrolling strip (else they widen the page). */
	position: relative;
}
.ap-depts-list::-webkit-scrollbar { display: none; }
.ap-depts-list a {
	display: block;
	padding: 11px 12px;
	color: var(--ap-hdr-fg);
	font-size: 14px;
	white-space: nowrap;
	text-decoration: none;
	opacity: .85;
	border-bottom: 2px solid transparent;
}
.ap-depts-list a:hover { opacity: 1; color: var(--ap-hdr-fg); }
.ap-depts-list .current-menu-item > a,
.ap-depts-list .current-product_cat-ancestor > a,
.ap-depts-list .current-menu-ancestor > a { opacity: 1; border-bottom-color: var(--ap-blaze); }

/* Department drop-down panels (inc/mega-menu.php) */
.ap-depts { position: relative; }
.ap-depts-list > li { display: flex; align-items: center; }
.ap-has-mega > a { padding-right: 4px; }
.ap-mega-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 32px;
	margin-right: 4px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ap-hdr-fg);
	opacity: .85;
	cursor: pointer;
}
.ap-mega-toggle::before {
	content: "";
	width: 6px;
	height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform .15s;
}
.ap-mega-toggle[aria-expanded="true"]::before { transform: translateY(2px) rotate(-135deg); }
.ap-mega-toggle:hover, .ap-mega-toggle[aria-expanded="true"] { opacity: 1; }
.ap-has-mega.is-open > a { opacity: 1; border-bottom-color: var(--ap-blaze); }

.ap-mega {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	background: var(--ap-surface);
	color: var(--ap-ink);
	border-bottom: 1px solid var(--ap-line);
	box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
	padding: 24px 0 18px;
	max-height: calc(100vh - 140px);
	overflow-y: auto;
}
.ap-mega[hidden] { display: none; }
.ap-mega-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px 32px; }
.ap-mega-col { display: grid; gap: 10px; align-content: start; }
.ap-mega-img-link { display: block; width: 132px; }
.ap-mega-img {
	display: block;
	width: 132px;
	height: 100px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid var(--ap-line);
	background: #1D2120;
}
.ap-mega-img--empty { background: repeating-linear-gradient(135deg, var(--ap-hatch) 0 10px, transparent 10px 20px), var(--ap-surface); }
.ap-mega-title {
	justify-self: start;
	font-family: var(--ap-display);
	font-weight: 800;
	font-size: 22px;
	line-height: 1.1;
	color: var(--ap-ink);
	text-decoration: none;
	padding-bottom: 8px;
	background: linear-gradient(var(--ap-blaze), var(--ap-blaze)) left bottom / 64px 2px no-repeat;
}
.ap-mega-title:hover { color: var(--ap-blaze); }
.ap-mega-links { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.ap-mega-links a { color: var(--ap-ink); text-decoration: none; }
.ap-mega-links a:hover { color: var(--ap-blaze); text-decoration: underline; text-underline-offset: 3px; }
.ap-mega-all { margin: 20px 0 0; padding-top: 12px; border-top: 1px solid var(--ap-line); font-size: 14px; }
.ap-mega-all a { color: var(--ap-ink); font-weight: 600; text-underline-offset: 3px; }
@media (max-width: 760px) {
	.ap-mega { padding: 16px 0; max-height: calc(100vh - 170px); }
	.ap-mega-grid { grid-template-columns: 1fr; gap: 18px; }
	.ap-mega-img-link { display: none; }
}

@media (max-width: 1000px) { .ap-hide-md { display: none !important; } }
@media (max-width: 760px) {
	.ap-hdr { flex-wrap: wrap; gap: 10px; }
	.ap-logo img, .ap-logo .ap-logo-img { height: 38px; }
	.ap-search { order: 3; flex-basis: 100%; }
	.ap-hdr-actions { margin-left: auto; }
	.ap-hide-sm { display: none !important; }
}

/* =========================================================================
   Footer
   ========================================================================= */
.ap-footer {
	border-top: 1px solid var(--ap-line);
	padding-block: 28px;
	color: var(--ap-muted);
	font-size: 13.5px;
	line-height: 1.7;
	background: var(--ap-paper);
}
.ap-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.ap-footer b { color: var(--ap-ink); font-weight: 600; }
.ap-footer a { color: inherit; }
.ap-footer a:hover { color: var(--ap-ink); }
.ap-footer-links { list-style: none; margin: 0; padding: 0; }
.ap-footer-legal { margin-top: 20px; font-family: var(--ap-mono); font-size: 12px; }
@media (max-width: 760px) { .ap-footer-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   Kadence page frame
   ========================================================================= */
.site, .content-bg, body.content-style-unboxed .site { background: var(--ap-paper); }
.content-area { margin-top: 28px; margin-bottom: 64px; }
.entry-hero .entry-header { min-height: 0; padding-block: 28px 8px; }
.entry-hero-container-inner { background: transparent; }
.entry-content-wrap { padding: 0; }
body.content-style-boxed .entry.single-entry,
.content-style-boxed .content-bg { background: transparent; box-shadow: none; }

.woocommerce-breadcrumb, .kadence-breadcrumbs, .product-title .kadence-breadcrumbs {
	font-size: 13px;
	color: var(--ap-muted);
}
.woocommerce-breadcrumb a, .kadence-breadcrumbs a { color: inherit; text-underline-offset: 2px; }

a { color: inherit; }
.entry-content a:not(.wp-element-button):not(.button) { text-underline-offset: 3px; }

/* =========================================================================
   Badges, legal box, cards
   ========================================================================= */
.ap-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ap-badge, .ap-legal-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: var(--ap-mono);
	font-size: 11.5px;
	font-weight: 500;
	padding: 2px 7px;
	border-radius: 4px;
	border: 1px solid currentColor;
	white-space: nowrap;
	line-height: 1.5;
}
.ap-badge--c { color: var(--ap-loden); }
.ap-badge--b { color: var(--ap-blaze); }
.ap-badge--d { color: var(--ap-ink); }
.ap-badge--libre { color: var(--ap-muted); }
.ap-badge--occ { color: var(--ap-warn); }

.ap-legal {
	border: 1px solid var(--ap-loden);
	background: var(--ap-loden-soft);
	border-radius: 10px;
	padding: 16px;
	display: grid;
	gap: 8px;
	margin: 16px 0;
}
.ap-legal--b { border-color: var(--ap-blaze); background: var(--ap-blaze-soft); }
.ap-legal h3 { font-family: var(--ap-body); font-size: 15px; font-weight: 600; margin: 0; line-height: 1.4; }
.ap-legal ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; }
.ap-legal small { color: var(--ap-muted); font-size: 13px; }

/* Prices */
.price, .woocommerce-Price-amount { font-variant-numeric: tabular-nums; }
.woocommerce .price, .woocommerce div.product p.price, .woocommerce div.product span.price {
	color: var(--ap-ink);
	font-weight: 600;
}
.woocommerce .price del { color: var(--ap-muted); font-weight: 400; font-size: .88em; opacity: 1; margin-right: 6px; }
.woocommerce .price ins { text-decoration: none; }
.woocommerce span.onsale { display: none; } /* the struck-through price already says it */

/* Product grid (shop, categories, [products]) */
.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 16px;
}
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product,
.woocommerce ul.products li.product.entry {
	position: relative;
	width: auto;
	margin: 0;
	float: none;
	background: var(--ap-surface);
	border: 1px solid var(--ap-line);
	border-radius: 10px;
	padding: 12px;
	box-shadow: none;
	transition: border-color .15s;
	display: flex;
	flex-direction: column;
}
.woocommerce ul.products li.product:hover { border-color: var(--ap-ink); }
.woocommerce ul.products li.product a img { border: 0; margin: 0; border-radius: 0; }
.woocommerce ul.products li.product .woocommerce-loop-image-link {
	display: block;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
	margin: 0 0 10px;
	background: repeating-linear-gradient(135deg, var(--ap-hatch) 0 10px, transparent 10px 20px), var(--ap-surface);
	border: 1px solid var(--ap-line);
	overflow: hidden;
}
.woocommerce ul.products li.product .product-details { padding: 0; background: transparent; display: flex; flex-direction: column; flex: 1; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--ap-body);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	padding: 0;
	margin: 0;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title a { text-decoration: none; color: var(--ap-ink); }
.woocommerce ul.products li.product .woocommerce-loop-product__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.ap-spec { font-family: var(--ap-mono); font-size: 12.5px; color: var(--ap-muted); margin-top: 2px; }
.woocommerce ul.products li.product .price { margin: 10px 0 0; font-size: 15px; }
.ap-avail { font-size: 12.5px; color: var(--ap-ok); margin-top: 2px; }
.woocommerce ul.products li.product .product-action-wrap { position: relative; z-index: 1; margin-top: auto; padding-top: 10px; }
.woocommerce ul.products li.product .button { padding: 8px 12px; font-size: 14px; }
.woocommerce ul.products li.product .entry-content-wrap { padding: 0; }

/* Single product */
.woocommerce div.product .summary { display: flex; flex-direction: column; gap: 4px; }
.woocommerce div.product .summary > p,
.woocommerce div.product .summary .woocommerce-product-details__short-description p { margin: 0 0 8px; }
.woocommerce div.product .summary .ap-legal { margin: 8px 0 12px; }
.ap-brand { font-family: var(--ap-mono); font-size: 13px; color: var(--ap-muted); letter-spacing: .06em; text-transform: uppercase; }
.woocommerce div.product .product_title { font-size: clamp(34px, 4vw, 46px); margin: 2px 0 8px; }
.woocommerce div.product p.price { font-size: 30px; }
.woocommerce div.product p.price del { font-size: 18px; }
.woocommerce div.product .stock.in-stock { color: var(--ap-ok); font-size: 14px; }
.woocommerce div.product div.images img,
.woocommerce div.product div.images .woocommerce-product-gallery__image--placeholder {
	border-radius: 8px;
	border: 1px solid var(--ap-line);
	background: repeating-linear-gradient(135deg, var(--ap-hatch) 0 10px, transparent 10px 20px), var(--ap-surface);
}
.woocommerce div.product .product_meta { font-size: 13px; color: var(--ap-muted); border-top: 1px solid var(--ap-line); padding-top: 12px; margin-top: 12px; }
.woocommerce div.product form.cart .qty { border-radius: 6px; border: 1px solid var(--ap-line); }
.woocommerce table.shop_attributes { border: 0; font-size: 14px; }
.woocommerce table.shop_attributes th,
.woocommerce table.shop_attributes td {
	background: transparent !important;
	border: 0;
	border-bottom: 1px solid var(--ap-line);
	padding: 9px 0;
	text-align: left;
	font-style: normal;
}
.woocommerce table.shop_attributes th { font-weight: 500; color: var(--ap-muted); width: 40%; }
.woocommerce table.shop_attributes td { font-family: var(--ap-mono); }
.woocommerce table.shop_attributes td p { margin: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { background: transparent; border-color: var(--ap-line); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { border-bottom-color: var(--ap-blaze); }

/* =========================================================================
   Content patterns (home, Atelier). Classes set on core blocks.
   ========================================================================= */
/* Classic themes get an extra .wp-block-group__inner-container inside groups:
   make it transparent so the grid rules below apply to the real children. */
[class*="ap-"] > .wp-block-group__inner-container { display: contents; }
:is(.ap-dept, .ap-step, .ap-service, .ap-shopband, .ap-mapcard, .ap-reassure) :is(p, h2, h3, figure, .wp-block-table, .wp-block-buttons) { margin-block: 0; }

.ap-section { margin-top: 56px !important; }
.ap-section > h2, .ap-section-head { margin-bottom: 18px; }

.ap-hero { gap: 32px; align-items: stretch !important; margin-top: 12px; }
.ap-hero .wp-block-column:first-child { display: grid; gap: 18px; align-content: center; }
.ap-hero h1 { margin: 0; font-size: clamp(40px, 6vw, 68px); }
.ap-since { display: flex; align-items: baseline; gap: 12px; margin: 0; }
.ap-since strong { font-family: var(--ap-display); font-weight: 800; font-size: 22px; color: var(--ap-blaze); }
.ap-lead { font-size: 18px; max-width: 46ch; color: var(--ap-muted); margin: 0; }
.ap-photo { margin: 0; position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--ap-line); background: #1D2120; height: 100%; min-height: 320px; }
.ap-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.ap-photo figcaption {
	position: absolute; left: 10px; bottom: 10px; margin: 0;
	font-family: var(--ap-mono); font-size: 11.5px; color: #EDEFEA;
	background: rgba(0, 0, 0, .6); padding: 4px 8px; border-radius: 4px;
}
.ap-ph {
	display: flex; align-items: center; justify-content: center;
	min-height: 300px; height: 100%;
	border-radius: 8px; border: 1px solid var(--ap-line);
	background: repeating-linear-gradient(135deg, var(--ap-hatch) 0 10px, transparent 10px 20px), var(--ap-surface);
}
.ap-ph p { font-family: var(--ap-mono); font-size: 11.5px; color: var(--ap-muted); background: var(--ap-surface); padding: 4px 8px; border-radius: 4px; margin: 0; }

/* Departments */
.ap-depts-grid { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ap-dept {
	position: relative;
	background: var(--ap-surface);
	border: 1px solid var(--ap-line);
	border-radius: 10px;
	padding: 18px;
	display: grid;
	gap: 6px;
	align-content: start;
	margin: 0 !important;
}
.ap-dept:hover { border-color: var(--ap-ink); }
.ap-dept > * { margin: 0 !important; }
.ap-dept .ap-dept-t { font-family: var(--ap-display); font-weight: 800; font-size: 26px; line-height: 1.1; }
.ap-dept .ap-dept-t a { text-decoration: none; color: inherit; }
.ap-dept .ap-dept-t a::after { content: ""; position: absolute; inset: 0; }
.ap-dept p:not(.ap-dept-t) { color: var(--ap-muted); font-size: 14px; }
.ap-dept.is-lead { background: var(--ap-loden); border-color: var(--ap-loden); color: var(--ap-surface); }
.ap-dept.is-lead p:not(.ap-dept-t) { color: inherit; opacity: .85; }

/* Reassurance band */
.ap-reassure { display: grid !important; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--ap-line); gap: 0; }
.ap-reassure > .wp-block-group { padding: 18px 16px; display: grid; gap: 4px; margin: 0 !important; }
.ap-reassure > .wp-block-group + .wp-block-group { border-left: 1px solid var(--ap-line); }
.ap-reassure p { margin: 0; }
.ap-reassure p:last-child { color: var(--ap-muted); font-size: 14px; }

/* Steps */
.ap-howto { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: ap-step; }
.ap-howto.is-four { grid-template-columns: repeat(4, 1fr); }
.ap-step {
	background: var(--ap-surface);
	border: 1px solid var(--ap-line);
	border-radius: 10px;
	padding: 18px;
	display: grid;
	gap: 8px;
	align-content: start;
	counter-increment: ap-step;
	margin: 0 !important;
}
.ap-step::before { content: "Étape " counter(ap-step); font-family: var(--ap-mono); font-size: 12px; color: var(--ap-blaze); letter-spacing: .06em; text-transform: uppercase; }
.ap-step > * { margin: 0 !important; }

/* Shop band (address + hours) */
.ap-shopband { display: grid !important; grid-template-columns: 1fr 1fr; gap: 24px; background: var(--ap-surface); border: 1px solid var(--ap-line); border-radius: 12px; padding: 24px; }
.ap-shopband > * { margin: 0 !important; }
.ap-shopband .wp-block-group { display: grid; gap: 12px; align-content: start; }
.ap-shopband .wp-block-group > * { margin: 0; }
.ap-note { font-size: 13.5px; color: var(--ap-muted); }
.ap-hours table { border: 0; font-variant-numeric: tabular-nums; }
.ap-hours td { border: 0; padding: 2px 16px 2px 0; }

/* Atelier services */
.ap-services { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ap-service { border-top: 2px solid var(--ap-ink); padding-top: 12px; display: grid; gap: 4px; align-content: start; margin: 0 !important; }
.ap-service > * { margin: 0 !important; }
.ap-service p { color: var(--ap-muted); font-size: 14px; }
.ap-service p:first-child { color: var(--ap-ink); font-weight: 600; font-size: 15px; }
.ap-service .ap-price { color: var(--ap-ink); font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 6px !important; }
.ap-mapcard { display: grid !important; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 20px; border: 1px solid var(--ap-line); border-radius: 8px; background: var(--ap-surface); }
.ap-mapcard > * { margin: 0 !important; }

@media (max-width: 1000px) {
	.ap-howto.is-four { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
	.ap-depts-grid { grid-template-columns: repeat(2, 1fr); }
	.ap-reassure { grid-template-columns: 1fr 1fr; }
	.ap-reassure > .wp-block-group:nth-child(3) { border-left: 0; }
	.ap-reassure > .wp-block-group:nth-child(n+3) { border-top: 1px solid var(--ap-line); }
	.ap-howto { grid-template-columns: 1fr; }
	.ap-shopband { grid-template-columns: 1fr; }
	.ap-photo { min-height: 240px; aspect-ratio: 4 / 3; }
}
@media (max-width: 600px) {
	.ap-dept { padding: 14px; }
	.ap-dept .ap-dept-t { font-size: 22px; }
	.ap-howto.is-four { grid-template-columns: 1fr; }
	.ap-mapcard { grid-template-columns: 1fr; }
}

/* =========================================================================
   Wider layout on large screens (uses the side space)
   ========================================================================= */
html, body { overflow-x: clip; }
@media (min-width: 1440px) {
	body { --global-content-width: 1360px; }
	.ap-wrap { max-width: 1360px; }
}

/* Full-bleed sections inside the page content */
.ap-full {
	width: auto;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	max-width: none !important;
}

/* =========================================================================
   Department panels: layouts (groups / tiles / list), products column
   ========================================================================= */
.ap-mega-layout { display: grid; gap: 32px; }
.ap-mega-layout.has-products { grid-template-columns: minmax(0, 1fr) 360px; }
.ap-mega-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.ap-mega-tile {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 151 / 96;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid var(--ap-line);
	background: #1D2120;
	transition: transform .15s, box-shadow .15s;
}
.ap-mega-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-mega-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .18); }
.ap-mega-tile.is-text { background: var(--ap-ink); color: var(--ap-paper); font-family: var(--ap-display); font-weight: 800; font-size: 20px; text-decoration: none; }
.ap-mega-col--list .ap-mega-links { margin-top: 10px; }
.ap-mega-links.is-2col { display: block; columns: 2; column-gap: 48px; }
.ap-mega-links.is-2col li { break-inside: avoid; margin-bottom: 4px; }
.ap-mega-products { display: grid; gap: 12px; align-content: start; }
.ap-mega-product {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 12px;
	align-items: center;
	padding: 8px;
	border: 1px solid var(--ap-line);
	border-radius: 8px;
	background: #FFFFFF;
	text-decoration: none;
	color: var(--ap-ink);
}
.ap-mega-product:hover { border-color: var(--ap-ink); }
.ap-mega-product__img img { width: 96px; height: 72px; object-fit: contain; display: block; }
.ap-mega-product__body { display: grid; gap: 2px; font-size: 13px; }
.ap-mega-product__cat { color: var(--ap-muted); font-family: var(--ap-mono); font-size: 11.5px; }
.ap-mega-product__name { font-weight: 600; line-height: 1.25; }
.ap-mega-product__price del { color: var(--ap-muted); margin-right: 4px; }
.ap-mega-product__price ins { text-decoration: none; color: var(--ap-blaze); font-weight: 600; }
@media (max-width: 1000px) {
	.ap-mega-layout.has-products { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
	.ap-mega-tiles { grid-template-columns: repeat(2, 1fr); }
	.ap-mega-links.is-2col { columns: 1; }
	.ap-mega-products { display: none; }
}

/* "Nos occasions !" button at the end of the menu */
.ap-depts-list .ap-menu-pill { margin-left: auto; padding-left: 12px; }
.ap-depts-list .ap-menu-pill > a {
	margin-block: 6px;
	padding: 6px 14px;
	border-radius: 8px;
	background: var(--ap-blaze);
	color: var(--ap-blaze-ink);
	font-weight: 600;
	opacity: 1;
	border-bottom: 0;
}
.ap-depts-list .ap-menu-pill > a:hover { filter: brightness(1.08); color: var(--ap-blaze-ink); }

/* =========================================================================
   Brands: "Nos marques" page and home strip
   ========================================================================= */
.ap-brands-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 12px; }
.ap-brands-tools input {
	flex: 1;
	max-width: 420px;
	padding: 10px 12px;
	border: 1px solid var(--ap-line);
	border-radius: 6px;
	font: inherit;
	background: #FFFFFF;
}
.ap-brands-index {
	position: sticky;
	top: 130px;
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	gap: 2px;
	padding: 8px 0;
	margin-bottom: 8px;
	background: var(--ap-paper);
	border-bottom: 1px solid var(--ap-line);
}
.admin-bar .ap-brands-index { top: 162px; }
.ap-brands-index a {
	min-width: 30px;
	padding: 4px 6px;
	text-align: center;
	font-family: var(--ap-mono);
	font-size: 13px;
	text-decoration: none;
	border-radius: 4px;
}
.ap-brands-index a:hover { background: var(--ap-ink); color: var(--ap-paper); }
.ap-brands-group { scroll-margin-top: 190px; margin-top: 24px; }
.ap-brands-group h2 { font-size: 28px; margin: 0 0 12px; border-bottom: 2px solid var(--ap-blaze); display: inline-block; padding-right: 12px; }
.ap-brands-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.ap-brand-tile {
	display: grid;
	grid-template-rows: 96px auto auto;
	gap: 6px;
	justify-items: center;
	text-align: center;
	padding: 14px 10px 12px;
	background: #FFFFFF;
	border: 1px solid var(--ap-line);
	border-radius: 10px;
	text-decoration: none;
	color: var(--ap-ink);
	transition: border-color .15s, transform .15s;
}
.ap-brand-tile:hover { border-color: var(--ap-ink); transform: translateY(-2px); }
.ap-brand-tile__logo { display: flex; align-items: center; justify-content: center; width: 100%; height: 96px; }
.ap-brand-tile__logo img { max-width: 100%; max-height: 96px; width: auto; height: auto; object-fit: contain; }
.ap-brand-tile__logo.is-text { font-family: var(--ap-display); font-weight: 800; font-size: 24px; line-height: 1.05; color: var(--ap-ink); }
.ap-brand-tile__name { font-weight: 600; font-size: 14px; }
.ap-brand-tile__logo.is-text + .ap-brand-tile__name { display: none; }
.ap-brand-tile__count { font-family: var(--ap-mono); font-size: 11.5px; color: var(--ap-muted); }
.ap-brand-tile[hidden], .ap-brands-group[hidden] { display: none; }

.ap-brands-band { background: var(--ap-surface); border-block: 1px solid var(--ap-line); padding: 18px 0 22px; }
.ap-brands-band__head { max-width: 1360px; margin: 0 auto 12px !important; padding: 0 16px; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.ap-brands-band__head strong { font-family: var(--ap-display); font-size: 24px; }
.ap-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
/* Duration set per brand count by [ap_brands_marquee] (--ap-marquee-duration), so the speed stays readable. */
.ap-marquee__track { display: flex; width: max-content; animation: ap-marquee var(--ap-marquee-duration, 600s) linear infinite; }
.ap-marquee:hover .ap-marquee__track, .ap-marquee:focus-within .ap-marquee__track { animation-play-state: paused; }
.ap-marquee__list { display: flex; gap: 12px; padding-right: 12px; }
.ap-marquee__item {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 64px;
	min-width: 140px;
	padding: 0 18px;
	border: 1px solid var(--ap-line);
	border-radius: 8px;
	background: #FFFFFF;
	text-decoration: none;
	color: var(--ap-ink);
	white-space: nowrap;
}
.ap-marquee__item img { max-height: 44px; width: auto; }
.ap-marquee__item.is-text { font-family: var(--ap-display); font-weight: 800; font-size: 20px; }
.ap-marquee__item:hover { border-color: var(--ap-ink); }
@keyframes ap-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.ap-marquee { overflow-x: auto; }
	.ap-marquee__track { animation: none; }
}

/* =========================================================================
   Home: rotating band (carousel) and product strips (rails)
   ========================================================================= */
.ap-carousel { position: relative; display: grid !important; margin-top: 0 !important; }
body:has(.ap-carousel:first-child) .content-area { margin-top: 0; }
.ap-carousel > .wp-block-group__inner-container { display: contents; }
.ap-slide {
	grid-area: 1 / 1;
	display: flex !important;
	align-items: center;
	min-height: 440px;
	padding: 40px 0 64px;
	margin: 0 !important;
	transition: opacity .5s ease, visibility .5s;
}
.ap-carousel.is-ready .ap-slide:not(.is-active),
.ap-carousel:not(.is-ready) .ap-slide ~ .ap-slide { opacity: 0; visibility: hidden; }
.ap-carousel:not(.is-ready) .ap-slide { transition: none; }
.ap-slide > .wp-block-columns, .ap-slide > .wp-block-group__inner-container > .wp-block-columns {
	width: 100%;
	max-width: 1360px;
	margin: 0 auto !important;
	padding: 0 16px;
}
.ap-slide.is-paper { background: var(--ap-paper); }
.ap-slide.is-loden { background: var(--ap-loden); color: #F2F5F1; }
.ap-slide.is-ink { background: var(--ap-ink); color: var(--ap-paper); }
.ap-slide.is-blaze { background: var(--ap-blaze); color: #FFFFFF; }
.ap-slide:is(.is-loden, .is-ink, .is-blaze) :is(h2, .ap-eyebrow) { color: inherit; }
.ap-slide:is(.is-loden, .is-ink, .is-blaze) .ap-eyebrow { opacity: .8; }
.ap-slide h2 { font-size: clamp(34px, 4.6vw, 56px); margin: 8px 0 12px; max-width: 18ch; }
.ap-slide p { max-width: 52ch; font-size: 17px; }
.ap-slide-cols { align-items: center !important; gap: 32px; }
.ap-slide:is(.is-loden, .is-ink) .wp-block-button__link { background: var(--ap-blaze); }
.ap-slide.is-blaze .wp-block-button__link { background: var(--ap-ink); color: #FFFFFF; }
.ap-slide-stat { display: grid; gap: 4px; justify-items: start; font-size: 16px !important; opacity: .95; }
.ap-slide-stat strong { font-family: var(--ap-display); font-weight: 800; font-size: clamp(48px, 7vw, 96px); line-height: .95; }
.ap-carousel .ap-hero { margin-top: 0; }

.ap-carousel__controls {
	position: absolute;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, .55);
	color: #FFFFFF;
	z-index: 2;
}
.ap-carousel__controls button {
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
	padding: 4px 6px;
	font-size: 14px;
	line-height: 1;
}
.ap-carousel__dot {
	width: 10px;
	height: 10px;
	padding: 0 !important;
	border-radius: 50%;
	border: 1.5px solid #FFFFFF !important;
}
.ap-carousel__dot[aria-current="true"] { background: #FFFFFF !important; }
@media (max-width: 900px) {
	.ap-slide { min-height: 0; padding: 28px 0 72px; }
	.ap-slide-stat strong { font-size: 48px; }
}

.ap-rail { position: relative; }
.ap-rail ul.products {
	grid-auto-flow: column;
	grid-template-columns: none !important;
	grid-auto-columns: minmax(220px, 260px);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	padding-bottom: 8px;
}
.ap-rail ul.products li.product { scroll-snap-align: start; }
.ap-rail__nav { position: absolute; top: 0; right: 0; display: flex; gap: 6px; }
.ap-rail__nav button {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--ap-line);
	background: #FFFFFF;
	color: var(--ap-ink);
	font-size: 18px;
	cursor: pointer;
}
.ap-rail__nav button:hover { border-color: var(--ap-ink); }
.ap-rail__nav button:disabled { opacity: .35; cursor: default; }

/* -------------------------------------------------------------------------
 * Product filter bar (pascal-catalogue)
 * ---------------------------------------------------------------------- */
.ap-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px 14px;
	margin: 0 0 18px;
	padding: 14px 16px;
	background: var(--ap-surface);
	border: 1px solid var(--ap-line);
	border-radius: 10px;
	width: 100%;
}
.ap-filters__title {
	font-family: var(--ap-display);
	font-weight: 700;
	font-size: 18px;
	text-transform: uppercase;
	letter-spacing: .02em;
	align-self: center;
	margin-right: 4px;
}
.ap-filter { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.ap-filter > span:first-child {
	font-size: 12px;
	font-weight: 600;
	color: var(--ap-muted);
	text-transform: uppercase;
	letter-spacing: .04em;
}
.ap-filter select,
.ap-filter input[type="number"] {
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--ap-line);
	border-radius: 6px;
	background: #FFFFFF;
	color: var(--ap-ink);
	font: inherit;
	font-size: 14px;
	min-width: 0;
}
.ap-filter select { max-width: 220px; }
.ap-filter__range { display: flex; align-items: center; gap: 6px; }
.ap-filter__range input[type="number"] { width: 84px; }
.ap-filter-check {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 38px;
	margin: 0;
	font-size: 14px;
	cursor: pointer;
}
.ap-filter-check input { accent-color: var(--ap-blaze); width: 16px; height: 16px; }
.ap-filters__go {
	height: 38px;
	padding: 0 16px;
	border: 0;
	border-radius: 6px;
	background: var(--ap-ink);
	color: #FFFFFF;
	font-weight: 600;
	cursor: pointer;
}
.ap-filters__reset { align-self: center; font-size: 14px; color: var(--ap-blaze); }
@media (max-width: 600px) {
	.ap-filters { padding: 12px; }
	.ap-filters__title { width: 100%; }
	.ap-filter { flex: 1 1 calc(50% - 7px); }
	.ap-filter select { max-width: none; width: 100%; }
	.ap-filter--price { flex-basis: 100%; }
	.ap-filter--price { min-width: 0; }
	.ap-filter__range input[type="number"] { flex: 1 1 0; width: 0; }
}
/* "Nous contacter" page */
.ap-contact { display: grid !important; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.ap-contact > * { margin: 0 !important; }
.ap-contact__info { display: grid; gap: 14px; align-content: start; background: var(--ap-surface); border: 1px solid var(--ap-line); border-radius: 12px; padding: 24px; }
.ap-contact__info > * { margin: 0 !important; }
.ap-contact__info h2 { font-size: 22px; }
.ap-contact__tel a { font-size: 22px; font-weight: 600; color: var(--ap-ink); text-decoration: none; font-variant-numeric: tabular-nums; }
.ap-contact__tel a:hover { color: var(--ap-blaze); }
.ap-map { display: grid; gap: 8px; }
.ap-map__frame { position: relative; border: 1px solid var(--ap-line); border-radius: 8px; overflow: hidden; background: var(--ap-hatch); aspect-ratio: 16 / 7; min-height: 280px; }
.ap-map__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ap-map__placeholder { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 16px; text-align: center; }
.ap-map__placeholder > * { margin: 0; }
.ap-map__links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; font-size: 14px; }
.ap-map__links span { color: var(--ap-muted); }
.ap-form { display: grid; gap: 12px; max-width: 760px; }
.ap-form > p, .ap-form__row > p { margin: 0; display: grid; gap: 4px; }
.ap-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ap-form label { font-weight: 500; font-size: 14px; }
.ap-form input, .ap-form select, .ap-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--ap-line); border-radius: 6px; background: #fff; font: inherit; color: var(--ap-ink); }
.ap-form input:focus, .ap-form select:focus, .ap-form textarea:focus { outline: 2px solid var(--ap-loden); outline-offset: 1px; border-color: var(--ap-loden); }
.ap-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ap-form__msg { padding: 12px 14px; border-radius: 6px; font-weight: 500; }
.ap-form__msg.is-ok { background: var(--ap-loden-soft); color: var(--ap-ok); }
.ap-form__msg.is-err { background: var(--ap-blaze-soft); color: var(--ap-warn); }
.ap-contact .ap-photo { min-width: 0; }
@media (max-width: 900px) {
	.ap-contact { grid-template-columns: 1fr; }
	/* A min-height with an aspect-ratio would force the width past the screen. */
	.ap-contact .ap-photo { min-height: 0; width: 100%; aspect-ratio: 4 / 3; height: auto; }
	.ap-map__frame { aspect-ratio: 4 / 3; min-height: 0; }
}
@media (max-width: 600px) {
	.ap-form__row { grid-template-columns: 1fr; }
}