/* ==========================================================================
   MATY — home.css
   Accueil : héros, pastilles catégories, carrousel éditorial, rails produits,
   grille de tuiles, services, engagements, texte SEO.
   Mesures : ref-theme/MEASUREMENTS.md §3-§9
   ========================================================================== */

/* ---------- Héros ---------- */
.maty-hero {
	position: relative;
	width: 100%;
	margin: 0 0 40px;
	background: var(--maty-black);
}

.maty-hero.swiper {
	overflow: hidden;
}

.maty-hero__slide {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1920 / 850;
	overflow: hidden;
	background: #111;
}

.maty-hero__media,
.maty-hero__media img {
	display: block;
	width: 100%;
	height: 100%;
}

.maty-hero__media {
	position: absolute;
	inset: 0;
}

.maty-hero__media img {
	object-fit: cover;
	object-position: center;
}

.maty-hero__overlay {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: min(960px, 100%);
	padding: 0 20px;
	text-align: center;
	transform: translateX(-50%);
	color: var(--maty-white);
}

.maty-hero__title {
	margin: 0;
	font-family: var(--maty-font-ui);
	font-size: 48px;
	font-weight: 700;
	line-height: normal;
	color: var(--maty-white);
	text-shadow: 1px 0 10px #000;
}

.maty-hero__subtitle {
	margin: 5px 0 30px;
	font-family: var(--maty-font-ui);
	font-size: 40px;
	font-weight: 400;
	line-height: normal;
	color: var(--maty-white);
	text-shadow: 1px 0 10px #000;
}

.maty-hero__subtitle p {
	margin: 0;
}

.maty-hero__cta {
	min-width: 152px;
	height: 45px;
	padding: 0 30px;
	border: 1px solid var(--maty-white);
	background: transparent;
	color: var(--maty-white);
	font-family: var(--maty-font-ui);
	font-size: 14px;
	font-weight: 700;
	line-height: 14px;
	text-transform: uppercase;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background var(--maty-speed), color var(--maty-speed);
}

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

.maty-hero .swiper-pagination {
	position: absolute;
	right: 0;
	bottom: 16px;
	left: 0;
	z-index: 3;
	text-align: center;
	line-height: 0;
}

.maty-hero .swiper-pagination-bullet {
	display: inline-block;
	width: 8px;
	height: 8px;
	margin: 0 4px;
	border: 1px solid var(--maty-white);
	border-radius: 50%;
	background: transparent;
	opacity: 1;
}

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

.maty-hero .swiper-button-prev,
.maty-hero .swiper-button-next {
	position: absolute;
	top: 50%;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	color: var(--maty-white);
	transform: translateY(-50%);
	opacity: .85;
	transition: opacity var(--maty-speed);
}

.maty-hero .swiper-button-prev::after,
.maty-hero .swiper-button-next::after {
	content: none;
}

.maty-hero .swiper-button-prev:hover,
.maty-hero .swiper-button-next:hover {
	opacity: 1;
}

.maty-hero .swiper-button-prev {
	left: 15px;
}

.maty-hero .swiper-button-next {
	right: 15px;
}

.maty-hero .swiper-button-prev .maty-icon,
.maty-hero .swiper-button-next .maty-icon {
	width: 30px;
	height: 30px;
	fill: currentColor;
}

/* ---------- Pastilles catégories (sous le héros) ---------- */
.maty-entries {
	margin: 0 0 80px;
	padding: 0 50px 1px;
}

.maty-entries__track {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 30px;
	height: 44px;
	overflow-x: auto;
	overflow-y: hidden;
	scrollbar-width: none;
	-ms-overflow-style: none;
	-webkit-overflow-scrolling: touch;
}

.maty-entries__track::-webkit-scrollbar {
	display: none;
}

.maty-entries__item {
	flex: 0 0 auto;
}

/* ---------- Bande éditoriale (#f2f2f2) ---------- */
.maty-band {
	padding: 50px 0 50px 50px;
	margin: 0 0 80px;
	background: var(--maty-bg);
}

.maty-band__inner {
	display: grid;
	grid-template-columns: 350px minmax(0, 1fr);
	column-gap: 100px;
	padding-right: 60px;
	align-items: start;
	min-height: 630px;
}

.maty-band__title {
	margin: 0 0 22px;
	font-family: var(--maty-font-ui);
	font-size: 25px;
	font-weight: 700;
	line-height: 30px;
	text-transform: uppercase;
	color: var(--maty-black);
	text-align: left;
}

.maty-band__left {
	min-width: 0;
}

/* Carte éditoriale (350 × 460) avec effet de pile */
.maty-editorial {
	position: relative;
	display: block;
	width: 350px;
}

.maty-editorial::before,
.maty-editorial::after {
	content: '';
	position: absolute;
	top: 8px;
	right: -8px;
	bottom: 8px;
	left: 8px;
	background: var(--maty-white);
	box-shadow: 0 0 0 1px rgba(0, 0, 0, .04);
	z-index: 0;
}

.maty-editorial::after {
	top: 16px;
	right: -16px;
	left: 16px;
	opacity: .6;
	z-index: -1;
}

.maty-editorial__link {
	position: relative;
	z-index: 1;
	display: block;
	background: var(--maty-white);
}

.maty-editorial__media {
	display: block;
	width: 100%;
	height: 300px;
	overflow: hidden;
}

.maty-editorial__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.maty-editorial__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 160px;
	padding: 20px 10px 10px;
	text-align: center;
}

.maty-editorial__title {
	margin: 0;
	font-family: var(--maty-font-ui);
	font-size: 22px;
	font-weight: 700;
	line-height: 26px;
	color: var(--maty-black);
}

.maty-editorial__text {
	margin: 6px 0 0;
	font-family: var(--maty-font-ui);
	font-size: 14px;
	line-height: 18px;
	color: var(--maty-ink);
}

.maty-editorial__cta {
	margin-top: 14px;
	height: 45px;
	min-width: 152px;
}

/* Contrôles du carrousel sous la carte éditoriale */
.maty-band__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 30px;
	width: 350px;
}

.maty-band__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--maty-ink);
	border-radius: 50%;
	color: var(--maty-ink);
	transition: background var(--maty-speed), color var(--maty-speed);
}

.maty-band__nav:hover {
	background: var(--maty-ink);
	color: var(--maty-white);
}

.maty-band__nav .maty-icon {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.maty-band__dots {
	display: flex;
	align-items: center;
	gap: 8px;
}

.maty-band__dots .swiper-pagination {
	position: static;
	display: flex;
	align-items: center;
	gap: 8px;
}

.maty-band__dots .swiper-pagination-bullet {
	width: 5px;
	height: 5px;
	margin: 0;
	border-radius: 50%;
	background: #ccc;
	opacity: 1;
}

.maty-band__dots .swiper-pagination-bullet-active {
	background: var(--maty-ink);
}

/* Colonne de droite */
.maty-band__right {
	min-width: 0;
}

.maty-band__head {
	text-align: center;
}

.maty-band__head-title {
	margin: 0 0 28px;
	font-family: var(--maty-font-ui);
	font-size: 22px;
	font-weight: 700;
	line-height: 26px;
	color: var(--maty-black);
}

.maty-band__head-row {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 16px;
	margin-bottom: 24px;
}

.maty-band__head-sub {
	margin: 0;
	font-family: var(--maty-font-ui);
	font-size: 25px;
	font-weight: 700;
	line-height: 30px;
	text-transform: uppercase;
	color: var(--maty-black);
}

.maty-band__see-all {
	font-family: var(--maty-font-ui);
	font-size: 14px;
	line-height: 17px;
	color: var(--maty-black);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Carrousel de cartes éditoriales */
.maty-cards {
	position: relative;
	overflow: hidden;
}

.maty-cards__track {
	align-items: flex-start;
}

.maty-card-tile {
	flex: 0 0 300px;
	width: 300px;
	margin-right: 40px;
	text-align: center;
}

.maty-card-tile__media {
	display: block;
	width: 300px;
	height: 300px;
	overflow: hidden;
}

.maty-card-tile__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.maty-card-tile:hover .maty-card-tile__img {
	transform: scale(1.03);
}

.maty-card-tile__title {
	margin: 20px 0 0;
	font-family: var(--maty-font-ui);
	font-size: 22px;
	font-weight: 700;
	line-height: 27px;
	color: var(--maty-black);
	white-space: normal;
}

.maty-cards .swiper-button-prev,
.maty-cards .swiper-button-next {
	position: absolute;
	top: 135px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	color: var(--maty-ink);
	background: rgba(255, 255, 255, .9);
	border-radius: 50%;
}

.maty-cards .swiper-button-prev::after,
.maty-cards .swiper-button-next::after {
	content: none;
}

.maty-cards .swiper-button-prev {
	left: -8px;
}

.maty-cards .swiper-button-next {
	right: 8px;
}

/* ---------- Rails produits ---------- */
.maty-rail {
	position: relative;
	padding: 50px 60px;
	margin: 0 0 80px;
}

.maty-rail .maty-section-title {
	/* 32px de marge + 10px de respiration avant le rail (référence : cartes à y = h2 + 42). */
	margin: 0 0 42px;
}

.maty-rail__viewport {
	position: relative;
	overflow: hidden;
}

.maty-rail__track {
	align-items: flex-start;
}

/* Swiper « auto » widths come from the slide element: without an explicit
   width each .swiper-slide falls back to 100% and only one giant card shows. */
.maty-rail__slide {
	flex: 0 0 350px;
	width: 350px;
}

.maty-rail .maty-card {
	flex: 0 0 350px;
	width: 350px;
	margin-right: 30px;
}

.maty-rail .maty-card__media {
	width: 350px;
	height: 350px;
}

.maty-rail .maty-card__img {
	width: 100%;
	height: 100%;
}

.maty-rail .maty-card__title {
	margin: 10px 0 0;
	font-size: 14px;
	font-weight: 400;
	line-height: 17px;
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	-webkit-line-clamp: 1;
}

.maty-rail .maty-card__prices {
	justify-content: flex-start;
	gap: 6px;
	height: 27px;
	margin-top: 5px;
}

.maty-rail .maty-card__now {
	font-size: 22px;
	font-weight: 700;
	line-height: 27px;
}

.maty-rail .maty-card__now sup {
	font-size: 16.5px;
	line-height: 0;
}

.maty-rail .maty-card__old {
	font-size: 14px;
	line-height: 17px;
	color: var(--maty-muted);
}

.maty-rail .maty-card__badge {
	width: 40px;
	height: 40px;
}

.maty-rail .swiper-button-prev,
.maty-rail .swiper-button-next {
	position: absolute;
	top: 287px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	color: var(--maty-ink);
}

.maty-rail .swiper-button-prev::after,
.maty-rail .swiper-button-next::after {
	content: none;
}

.maty-rail .swiper-button-prev {
	left: 15px;
}

.maty-rail .swiper-button-next {
	right: 15px;
}

.maty-rail .swiper-button-prev .maty-icon,
.maty-rail .swiper-button-next .maty-icon {
	width: 30px;
	height: 30px;
	fill: currentColor;
}

.maty-rail .swiper-button-disabled {
	opacity: .3;
}

/* ---------- Grille de tuiles (MONTRES) ---------- */
.maty-grid {
	display: grid;
	grid-template-columns: repeat(3, 400px);
	justify-content: center;
	gap: 50px;
	padding: 0 50px;
	margin: 0 0 80px;
}

.maty-grid__head {
	grid-column: 1 / -1;
	margin: 0;
}

.maty-grid__item {
	position: relative;
	display: block;
	width: 400px;
	height: 251px;
	overflow: hidden;
	background: var(--maty-bg);
}

.maty-grid__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.maty-grid__item:hover img {
	transform: scale(1.02);
}

.maty-grid__overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 22px;
	color: var(--maty-white);
	text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
	background: linear-gradient(180deg, rgba(0, 0, 0, .28) 0%, rgba(0, 0, 0, 0) 55%);
}

.maty-grid__label {
	font-family: var(--maty-font-ui);
	font-size: 22px;
	font-weight: 700;
	line-height: 26px;
}

.maty-grid__subtitle {
	font-family: var(--maty-font-ui);
	font-size: 14px;
	font-weight: 700;
	line-height: 17px;
}

/* Tuile "logos de marques" */
.maty-brands {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
	width: 400px;
	height: 251px;
	padding: 0;
	background: transparent;
}

.maty-brands__item {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--maty-line);
	background: var(--maty-white);
	font-family: var(--maty-font-ui);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .04em;
	color: var(--maty-ink);
	padding: 8px;
	text-align: center;
}

/* ---------- Sections de services (onglets + tuiles) ---------- */
.maty-subsections {
	padding: 0 50px;
	margin: 0 0 80px;
}

.maty-subsections__tabs {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 50px;
	margin: 0 0 50px;
}

.maty-subsections__tab {
	font-family: var(--maty-font-ui);
	font-size: 25px;
	font-weight: 700;
	line-height: 30px;
	text-transform: uppercase;
	color: var(--maty-muted);
	text-decoration: none;
	white-space: nowrap;
}

.maty-subsections__tab.is-active,
.maty-subsections__tab:hover {
	color: var(--maty-black);
	text-decoration: underline;
	text-underline-offset: 6px;
}

.maty-subsections__panel {
	display: none;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px;
	grid-auto-rows: 337px;
}

.maty-subsections__panel.is-active {
	display: grid;
}

.maty-service {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
}

.maty-service__media {
	display: block;
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
	overflow: hidden;
	background: var(--maty-bg);
}

.maty-service__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}

.maty-service:hover .maty-service__media img {
	transform: scale(1.02);
}

.maty-service__label {
	display: block;
	margin-top: 14px;
	font-family: var(--maty-font-ui);
	font-size: 22px;
	font-weight: 700;
	line-height: 27px;
	color: var(--maty-black);
}

/* ---------- Engagements / partenaires ---------- */
.maty-partners {
	padding: 0 50px;
	margin: 0 0 80px;
	text-align: center;
	min-height: 391px;
}

.maty-partners__grid {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	flex-wrap: wrap;
	gap: 60px;
	margin-top: 40px;
}

.maty-partners__item {
	width: 180px;
	text-align: center;
}

.maty-partners__media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 180px;
	height: 180px;
	margin: 0 auto;
	border-radius: 50%;
	background: var(--maty-bg);
	overflow: hidden;
}

.maty-partners__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.maty-partners__media .maty-icon {
	width: 90px;
	height: 90px;
	fill: var(--maty-ink);
}

.maty-partners__label {
	display: block;
	margin-top: 16px;
	font-family: var(--maty-font-ui);
	font-size: 14px;
	font-weight: 700;
	line-height: 17px;
	color: var(--maty-black);
}

.maty-partners__cta {
	margin-top: 40px;
}

/* ---------- Texte SEO ---------- */
.maty-seo {
	margin: 0 90px 40px;
	padding: 0 30px;
}

.maty-seo p {
	margin: 0 0 12px;
	font-family: var(--maty-font-ui);
	font-size: 14px;
	font-weight: 400;
	line-height: 17px;
	color: var(--maty-black);
}

.maty-seo strong {
	font-weight: 700;
}

/* ---------- Bloc newsletter de l'accueil ---------- */
.maty-home-newsletter {
	padding: 0 50px;
	margin: 0 0 80px;
}

.maty-home-newsletter__inner {
	max-width: 640px;
	margin: 0 auto;
	padding: 40px 30px;
	background: var(--maty-bg);
	text-align: center;
}

/* ---------- Bannière simple (pleine largeur) ---------- */
.maty-banner {
	display: block;
	margin: 0 0 80px;
}

.maty-banner__media {
	display: block;
	width: 100%;
	aspect-ratio: 1920 / 500;
	overflow: hidden;
	background: var(--maty-bg);
}

.maty-banner__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
	.maty-band__inner {
		grid-template-columns: 300px minmax(0, 1fr);
		column-gap: 40px;
		padding-right: 20px;
	}

	.maty-editorial,
	.maty-editorial__link {
		width: 300px;
	}

	.maty-editorial__media {
		height: 260px;
	}

	.maty-band__controls {
		width: 300px;
	}

	.maty-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 30px;
	}

	.maty-grid__item,
	.maty-brands {
		width: 100%;
	}
}

@media (max-width: 1024px) {
	.maty-band {
		padding: 40px 20px;
	}

	.maty-band__inner {
		grid-template-columns: 1fr;
		row-gap: 40px;
		padding-right: 0;
	}

	.maty-band__title {
		text-align: center;
	}

	.maty-editorial {
		margin: 0 auto;
	}

	.maty-band__controls {
		width: 100%;
		margin-top: 24px;
	}

	.maty-rail {
		padding: 40px 20px;
	}

	.maty-rail .maty-card {
		flex-basis: 300px;
		width: 300px;
	}

	.maty-rail .maty-card__media {
		width: 300px;
		height: 300px;
	}

	.maty-rail .swiper-button-prev,
	.maty-rail .swiper-button-next {
		top: 240px;
	}

	.maty-subsections {
		padding: 0 20px;
	}

	.maty-subsections__tab {
		font-size: 20px;
		line-height: 24px;
	}

	.maty-subsections__tabs {
		gap: 24px;
		margin-bottom: 30px;
	}

	.maty-subsections__panel {
		grid-template-columns: 1fr 1fr;
		gap: 20px;
	}

	.maty-partners {
		padding: 0 20px;
	}

	.maty-partners__grid {
		gap: 30px;
	}

	.maty-seo {
		margin: 0 20px 30px;
		padding: 0;
	}
}

@media (max-width: 768px) {
	.maty-hero {
		margin-bottom: 30px;
	}

	.maty-hero__slide {
		aspect-ratio: 600 / 895;
	}

	.maty-hero__overlay {
		justify-content: flex-end;
		padding-bottom: 70px;
	}

	.maty-hero__title {
		font-size: 30px;
		line-height: 36px;
	}

	.maty-hero__subtitle {
		font-size: 22px;
		line-height: 27px;
		margin: 5px 0 20px;
	}

	.maty-hero .swiper-button-prev,
	.maty-hero .swiper-button-next {
		width: 24px;
		height: 24px;
	}

	.maty-entries {
		padding: 0 10px;
		margin-bottom: 80px;
	}

	.maty-entries__track {
		justify-content: flex-start;
		gap: 30px;
	}

	.maty-band {
		padding: 40px 10px;
		margin-bottom: 80px;
	}

	.maty-band__title {
		font-size: 20px;
		line-height: 26px;
	}

	.maty-band__head-title {
		font-size: 18px;
		line-height: 24px;
		margin-bottom: 18px;
	}

	.maty-band__head-sub {
		font-size: 20px;
		line-height: 26px;
	}

	.maty-editorial,
	.maty-editorial__link {
		width: 100%;
		max-width: 350px;
	}

	.maty-card-tile {
		flex-basis: 270px;
		width: 270px;
		margin-right: 20px;
	}

	.maty-card-tile__media {
		width: 270px;
		height: 270px;
	}

	.maty-card-tile__title {
		font-size: 18px;
		line-height: 22px;
	}

	.maty-cards .swiper-button-prev,
	.maty-cards .swiper-button-next {
		top: 121px;
	}

	.maty-rail {
		padding: 40px 10px;
	}

	.maty-rail__viewport {
		padding: 0 0;
	}

	.maty-rail .maty-card {
		flex-basis: 270px;
		width: 270px;
		margin-right: 20px;
	}

	.maty-rail__slide {
		flex: 0 0 270px;
		width: 270px;
	}

	.maty-rail .maty-card__media {
		width: 270px;
		height: 270px;
	}

	.maty-rail .swiper-button-prev,
	.maty-rail .swiper-button-next {
		display: none;
	}

	.maty-grid {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 0 10px;
	}

	.maty-grid__item,
	.maty-brands {
		width: 100%;
		height: 220px;
	}

	.maty-subsections {
		padding: 0 10px;
	}

	.maty-subsections__tabs {
		gap: 18px;
	}

	.maty-subsections__tab {
		font-size: 16px;
		line-height: 20px;
	}

	.maty-subsections__panel {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.maty-service__label {
		font-size: 18px;
		line-height: 22px;
	}

	.maty-partners {
		padding: 0 10px;
	}

	.maty-partners__grid {
		gap: 20px;
	}

	.maty-partners__item,
	.maty-partners__media {
		width: 130px;
	}

	.maty-partners__media {
		height: 130px;
	}

	.maty-seo {
		margin: 0 10px 24px;
		padding: 0;
	}

	.maty-home-newsletter {
		padding: 0 10px;
	}
}

/* Visuels des tuiles services (référence /images/homepage/…) */
.maty-service__media .maty-service__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
