/* ==========================================================================
   MATY — base.css
   Jetons de design, polices auto-hébergées, reset, typographie, boutons.
   Référence mesurée : ref-theme/MEASUREMENTS.md
   ========================================================================== */

/* ---------- Polices auto-hébergées (aucun Google Fonts) ---------- */
@font-face {
	font-family: 'Roboto';
	src: url('../fonts/roboto-regular-webfont.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Roboto';
	src: url('../fonts/roboto-bold-webfont.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Roboto Condensed';
	src: url('../fonts/robotocondensed-regular-webfont.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Roboto Condensed';
	src: url('../fonts/robotocondensed-bold-webfont.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Montserrat';
	src: url('../fonts/montserrat-regular-webfont.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Montserrat';
	src: url('../fonts/montserrat-bold-webfont.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Jetons ---------- */
:root {
	--maty-accent: #ff352f;
	--maty-ink: #333;
	--maty-ink-strong: #222;
	--maty-body: #222;
	--maty-muted: #666;
	--maty-soft: #999;
	--maty-line: #e5e5e5;
	--maty-line-strong: #999;
	--maty-bg: #f2f2f2;
	--maty-white: #fff;
	--maty-black: #000;
	--maty-container: 1200px;
	--maty-side-pad: 50px;
	--maty-font: 'Montserrat', Arial, Helvetica, sans-serif;
	--maty-font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	--maty-font-ui: 'Roboto', Arial, Helvetica, sans-serif;
	--maty-header-h: 100px;
	--maty-hellobar-h: 50px;
	--maty-header-bar-h: 50px;
	--maty-drawer-w: 480px;
	--maty-radius-pill: 999px;
	--maty-shadow-header: 0 5px 5px rgba(0, 0, 0, .078);
	--maty-speed: .3s;
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

html.maty-scroll-locked,
body.maty-scroll-locked {
	overflow: hidden !important;
	touch-action: none;
}

/* Bandeau cookies local (mu-plugin wp-import) : on réserve la hauteur nécessaire
   pour qu'il ne recouvre jamais les pastilles catégories / le contenu utile. */
html.maty-consent-open body {
	padding-bottom: 104px;
}

@media (max-width: 768px) {
	html.maty-consent-open body {
		padding-bottom: 132px;
	}

	/* Bandeau cookies compact à 390 : il ne doit pas recouvrir les pastilles catégories. */
	body .maty-cookie-consent {
		padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
		font-size: 11px;
		line-height: 1.35;
		max-height: none;
	}

	body .maty-cookie-consent__inner {
		gap: 6px 12px;
	}

	body .maty-cookie-consent__actions {
		gap: 6px;
	}

	body .maty-cookie-consent__btn {
		padding: 7px 14px;
		font-size: 11px;
	}
}

body {
	margin: 0;
	background: var(--maty-white);
	color: var(--maty-body);
	font-family: var(--maty-font-body);
	font-size: 16px;
	line-height: 16px;
	letter-spacing: normal;
	overflow-x: hidden;
}

body.maty-admin-bar #main-header {
	top: 32px;
}

img,
picture,
svg,
video {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
	margin: 0;
}

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover,
a:focus-visible {
	text-decoration: none;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	border-radius: 0;
	text-align: inherit;
}

input,
select,
textarea {
	font: inherit;
	color: inherit;
}

:focus-visible {
	outline: 2px solid var(--maty-accent);
	outline-offset: 2px;
}

/* ---------- Utilitaires ---------- */
.screen-reader-text,
.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 16px;
	z-index: 100000;
	background: var(--maty-black);
	color: var(--maty-white);
	padding: 12px 20px;
	font-family: var(--maty-font-ui);
	font-size: 14px;
}

.skip-link:focus {
	top: 8px;
}

.maty-container {
	width: 100%;
	max-width: var(--maty-container);
	margin: 0 auto;
	padding: 0 15px;
}

.maty-ph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 60px;
	background: linear-gradient(135deg, #ededed 0%, #dedede 55%, #e9e9e9 100%);
	color: var(--maty-soft);
	font-family: var(--maty-font-ui);
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
}

/* ---------- Typographie de sections (référence : Roboto 25/700 upper) ---------- */
.maty-section-title {
	margin: 0 0 32px;
	font-family: var(--maty-font-ui);
	font-size: 25px;
	font-weight: 700;
	line-height: 30px;
	text-transform: uppercase;
	text-align: center;
	color: var(--maty-black);
}

/* ---------- Boutons ---------- */
.maty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 45px;
	padding: 0 30px;
	border: 1px solid var(--maty-ink);
	background: transparent;
	color: var(--maty-ink);
	font-family: var(--maty-font-ui);
	font-size: 14px;
	font-weight: 700;
	line-height: 14px;
	text-align: center;
	cursor: pointer;
	transition: background var(--maty-speed), color var(--maty-speed), border-color var(--maty-speed);
}

.maty-btn:hover,
.maty-btn:focus-visible {
	background: var(--maty-ink);
	color: var(--maty-white);
}

.maty-btn--white {
	border-color: var(--maty-white);
	color: var(--maty-white);
}

.maty-btn--white:hover,
.maty-btn--white:focus-visible {
	background: var(--maty-white);
	color: var(--maty-ink-strong);
}

.maty-btn--solid {
	background: var(--maty-ink);
	color: var(--maty-white);
}

.maty-btn--solid:hover,
.maty-btn--solid:focus-visible {
	background: transparent;
	color: var(--maty-ink);
}

.maty-btn--full {
	width: 100%;
}

/* ---------- Pastilles (chips) ---------- */
.maty-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 30px;
	border: 1px solid var(--maty-ink);
	border-radius: var(--maty-radius-pill);
	background: transparent;
	color: var(--maty-ink);
	font-family: var(--maty-font-ui);
	font-size: 14px;
	font-weight: 700;
	line-height: 14px;
	white-space: nowrap;
	transition: background var(--maty-speed), color var(--maty-speed);
}

.maty-chip:hover,
.maty-chip:focus-visible {
	background: var(--maty-ink);
	color: var(--maty-white);
}

/* ---------- Badge de remise ---------- */
.maty-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 100%;
	background: var(--maty-ink-strong);
	color: var(--maty-white);
	font-family: var(--maty-font-ui);
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
}

/* ---------- Icônes ---------- */
.maty-icon {
	display: inline-block;
	width: 1em;
	height: 1em;
	fill: currentColor;
	vertical-align: middle;
}

.maty-header__entry .maty-icon,
.maty-search__field .maty-icon {
	width: auto;
	height: auto;
}

/* ---------- Carte produit (structure partagée accueil / boutique) ---------- */
.maty-card {
	position: relative;
	display: block;
	width: 100%;
}

.maty-card__media {
	position: relative;
	display: block;
	width: 100%;
	overflow: hidden;
	background: var(--maty-white);
}

.maty-card__img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.maty-card__img--hover {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity .35s ease;
}

.maty-card:hover .maty-card__img--hover {
	opacity: 1;
}

.maty-card__link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.maty-card__info {
	display: block;
}

.maty-card__badge {
	position: absolute;
	left: 5px;
	bottom: -3px;
	z-index: 2;
}

.maty-card__fav {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	color: var(--maty-white);
	filter: drop-shadow(0 0 1px rgba(0, 0, 0, .45));
}

.maty-card__fav svg {
	width: 100%;
	height: 100%;
}

.maty-card__cat {
	margin: 16px 0 0;
	font-family: var(--maty-font-ui);
	font-size: 13px;
	line-height: 15px;
	color: var(--maty-muted);
	min-height: 20px;
}

.maty-card__brand {
	margin: 8px 0 0;
	font-family: var(--maty-font-ui);
	font-size: 14px;
	line-height: 16px;
	color: var(--maty-soft);
}

.maty-card__title {
	margin: 5px 0 0;
	font-family: var(--maty-font-ui);
	font-size: 14px;
	font-weight: 700;
	line-height: 16px;
	color: var(--maty-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.maty-card__prices {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	height: 40px;
	margin-top: 7px;
	font-family: var(--maty-font-ui);
}

.maty-card__now {
	order: 1;
	font-size: 15px;
	font-weight: 700;
	line-height: 16px;
	color: var(--maty-ink);
}

.maty-card__old {
	order: 2;
	font-size: 12px;
	line-height: 16px;
	color: var(--maty-muted);
	text-decoration: line-through;
}

/* Carte de liste boutique : espace bas de la référence (le rail d'accueil garde 409 px). */
.maty-card--plp {
	padding-bottom: 24px;
}

.maty-card__price-pending {
	font-family: var(--maty-font-ui);
	font-size: 13px;
	font-weight: 400;
	line-height: 16px;
	color: var(--maty-muted);
}

/* ---------- Swiper : neutralisation des styles par défaut ---------- */
.maty-slider .swiper-button-next,
.maty-slider .swiper-button-prev {
	display: none;
}

.maty-slider .swiper-pagination-bullet {
	background: transparent;
	border: 1px solid var(--maty-white);
	opacity: 1;
	width: 8px;
	height: 8px;
	margin: 0 4px;
}

.maty-slider .swiper-pagination-bullet-active {
	background: var(--maty-white);
}

/* ---------- Aperçu WordPress (admin) ---------- */
.admin-bar .maty-drawer,
.admin-bar .maty-search {
	padding-top: 32px;
}

@media (max-width: 1024px) {
	:root {
		--maty-side-pad: 10px;
	}
}

@media (max-width: 768px) {
	:root {
		--maty-header-h: 100px;
		--maty-drawer-w: 100%;
	}

	body {
		font-size: 14px;
		line-height: 18px;
	}

	.maty-section-title {
		font-size: 20px;
		line-height: 26px;
		margin-bottom: 24px;
	}
}
