/*
Theme Name: Marsan
Theme URI: https://www.piecesmarsan.com/
Description: Thème sur mesure pour Pièces d'autos Marsan — reproduction du site Duda avec les mêmes URLs et le même contenu.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: marsan
License: Proprietary
*/

:root {
	--green: #5c9546;
	--green-dark: #4b7d38;
	--ink: #2d2e32;
	--ink-soft: #55606a;
	--grey-bg: #f2f2f2;
	--line: #e6e6e6;
	--font-head: 'Rubik', system-ui, sans-serif;
	--font-body: 'Noto Sans', system-ui, sans-serif;
	--gutter: 6.5vw;
	--header-h: 98px;
	--shadow: 0 4px 22px rgba(0, 0, 0, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--ink-soft); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); margin: 0 0 .5em; line-height: 1.2; }
p { margin: 0 0 1em; }
address { font-style: normal; }
hr { border: 0; }

.container { width: 100%; max-width: 1650px; margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--ink); color: #fff; padding: 10px 16px; }
.skip-link:focus { left: 10px; top: 10px; }
.underline { text-decoration: underline; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 600; border-radius: 4px; transition: background .2s; white-space: nowrap; }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-dark); color: #fff; }
.btn--sm { font-size: 13px; padding: 10px 24px; font-weight: 500; }
.btn--phone { font-size: 24px; padding: 0 38px; height: 63px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #f8f8f8; height: var(--header-h); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 2px 14px rgba(0,0,0,.08); }
.site-header__inner { display: flex; align-items: center; height: 100%; gap: 40px; padding: 0 4.1%; }
.site-logo img { width: 224px; height: auto; }
.primary-nav { flex: 1; padding-left: 40px; }
.nav-menu, .nav-menu ul { list-style: none; margin: 0; padding: 0; }
.nav-menu { display: flex; gap: 50px; }
.nav-menu > li { position: relative; }
.nav-menu > li > a { display: flex; align-items: center; gap: 10px; font-family: var(--font-body); font-size: 20px; letter-spacing: .5px; color: var(--ink); padding: 8px 0 6px; border-bottom: 2px solid transparent; }
.nav-menu > li.current-menu-item > a, .nav-menu > li > a:hover { border-bottom-color: var(--green); color: var(--ink); }
.icon-chevron { width: 12px; height: 12px; }
.sub-menu { position: absolute; top: calc(100% + 20px); left: -20px; min-width: 300px; background: #fff; box-shadow: var(--shadow); padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s; }
.sub-menu::before { content: ''; position: absolute; top: -20px; left: 0; right: 0; height: 20px; }
.nav-menu > li:hover > .sub-menu, .nav-menu > li:focus-within > .sub-menu, .nav-menu > li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sub-menu a { display: block; padding: 10px 22px; color: var(--ink); font-size: 16px; }
.sub-menu a:hover, .sub-menu .current-menu-item a { color: var(--green); background: var(--grey-bg); }
.site-header__actions { display: flex; align-items: center; gap: 38px; }
.lang-switch { position: relative; }
.lang-switch__toggle { background: none; border: 0; cursor: pointer; font: 700 15px var(--font-body); text-transform: uppercase; color: var(--ink); display: flex; align-items: center; gap: 6px; padding: 6px 0; }
.lang-switch__list { position: absolute; right: -10px; top: 100%; list-style: none; margin: 0; padding: 6px 0; background: #fff; box-shadow: var(--shadow); display: none; }
.lang-switch.is-open .lang-switch__list { display: block; }
.lang-switch__list a { display: block; padding: 6px 16px; font: 700 15px var(--font-body); text-transform: uppercase; color: var(--ink); }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: max(640px, calc(100vh - var(--header-h))); display: flex; align-items: center; overflow: hidden; color: #fff; background: #2d2e32; }
.hero__slides, .hero__slide { position: absolute; inset: 0; }
.hero__slide { background-size: cover; background-position: 50% 50%; opacity: 0; transition: opacity .75s ease-in-out; }
.hero__slide.is-active { opacity: 1; }
.hero__slides::after { content: ''; position: absolute; inset: 0; background: rgba(45, 46, 50, .7); }
.hero__inner { position: relative; padding: 120px 6.5%; width: 100%; }
.hero__kicker { font-family: var(--font-body); font-weight: 500; text-transform: uppercase; letter-spacing: .1em; font-size: 22px; margin-bottom: 26px; color: #fff; }
.hero__title { color: #fff; font-size: clamp(40px, 5.6vw, 92px); line-height: 1.24; margin: 0 0 40px; }
.hero__title-main { font-weight: 700; display: inline-block; max-width: 820px; }
.hero__title-light { font-weight: 300; }
.hero__rule { width: 313px; max-width: 60%; height: 2px; background: #fff; margin: 0 0 34px; }
.hero__since { font-family: var(--font-head); font-weight: 700; font-size: clamp(26px, 2.4vw, 44px); margin: 0; color: #fff; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; padding: 165px 0 230px; background: #eee url('assets/images/texture-pieces.webp') center / cover no-repeat; }
.cta-band::before { content: ''; position: absolute; inset: 0; background: rgba(242, 242, 242, .93); }
.cta-band .container { position: relative; }
.cta-band__title { font-family: var(--font-head); font-size: clamp(26px, 2.6vw, 48px); line-height: 1.1; color: var(--ink); max-width: 1000px; margin-bottom: 18px; }
.cta-band__title strong { font-weight: 700; }
.cta-band__text { font-size: clamp(17px, 1.3vw, 24px); color: var(--ink); margin-bottom: 30px; }
.slant { position: absolute; left: 0; right: 0; bottom: 0; height: 160px; pointer-events: none; }
.slant::before { content: ''; position: absolute; inset: 0; background: var(--green); clip-path: polygon(0 84%, 100% 0, 100% 100%, 0 100%); }
.slant::after { content: ''; position: absolute; inset: 0; background: #fff; clip-path: polygon(0 100%, 100% 58%, 100% 100%); }

/* ---------- Shared ---------- */
.badge { display: inline-block; color: var(--green); width: 64px; height: 64px; margin-bottom: 18px; }
.badge svg { width: 100%; height: 100%; }
.split-title { font-size: clamp(28px, 2.6vw, 48px); line-height: 1.22; }
.split-title strong { font-weight: 700; display: block; }
.split-title span { font-weight: 300; display: block; }
.split-title.inline strong, .split-title.inline span { display: inline; }
.section-title { text-align: center; font-size: clamp(28px, 2.4vw, 42px); font-weight: 700; margin-bottom: 85px; }
.section-title::after { content: ''; display: block; width: 130px; height: 2px; background: #999; margin: 28px auto 0; }

/* ---------- Intro ---------- */
.intro { padding: 160px 0 190px; }
.intro__inner { display: grid; grid-template-columns: 47.5% 1fr; gap: 9%; align-items: center; }
.intro__media img { width: 100%; aspect-ratio: 710 / 520; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow); }
.intro__content p { max-width: 640px; }
.intro__content a { text-decoration: none; }
.intro__content a.underline { text-decoration: underline; }

/* ---------- Services ---------- */
.services { padding: 160px 0 200px; background: var(--grey-bg); }
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 70px 64px; }
.service-card { background: #fff; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.service-card > img { width: 100%; aspect-ratio: 470 / 340; object-fit: cover; }
.service-card__body { padding: 40px 40px 46px; display: flex; flex-direction: column; flex: 1; }
.service-card h3 { font-size: 30px; font-weight: 500; line-height: 1.3; margin-bottom: 30px; max-width: 330px; color: var(--green); }
.service-card__body p { flex: 1; margin-bottom: 40px; }
.service-card__body p a { color: inherit; }
.service-card .more { font-weight: 700; color: var(--ink); font-size: 15px; }
.service-card .more:hover { color: var(--green); }

/* ---------- Guarantees ---------- */
.guarantees { padding: 150px 0 160px; }
.guarantees__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.guarantee-card { background: #fff; border-radius: 6px; box-shadow: var(--shadow); text-align: center; padding: 70px 30px 80px; }
.guarantee-card p { margin-bottom: 26px; font-size: 18px; }
.guarantee-card h3 { color: var(--green); font-size: clamp(22px, 2.1vw, 40px); font-weight: 700; margin: 0; line-height: 1.2; }
.guarantee-card h3.dark { color: var(--ink); }

/* ---------- Why ---------- */
.why { background: #2d2e32 center / cover no-repeat; }
.why__inner { display: flex; justify-content: flex-end; }
.why__box { width: 47%; background: var(--green); color: #fff; padding: 110px 70px 120px; }
.why__box .badge { color: #fff; }
.why__box h2 { color: #fff; font-size: clamp(28px, 2.4vw, 42px); font-weight: 700; margin-bottom: 60px; }
.why__box h3 { color: #fff; font-size: clamp(20px, 1.6vw, 30px); font-weight: 500; margin: 50px 0 18px; }
.why__box p { color: #fff; max-width: 520px; }
.why__box a { color: #fff; }

/* ---------- Zones ---------- */
.zones { padding: 140px 0 170px; background: var(--grey-bg); }
.zones__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 50px 100px; align-items: center; }
.zones__content p { max-width: 620px; }
.zones__media img { width: 100%; border-radius: 6px; box-shadow: var(--shadow); }
.zones__list { grid-column: 1 / -1; list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 40px 100px; }
.zones__list li { display: flex; align-items: center; gap: 24px; font-size: clamp(18px, 1.25vw, 24px); color: var(--ink); }
.zones__list .pin { width: 44px; height: 44px; color: var(--green); flex: none; }
.zones__list .pin svg { width: 100%; height: 100%; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; }
.site-footer__main { background: #f2f2f2; padding: 60px 0 70px; }
.site-footer__inner { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 60px; }
.site-footer__brand img { width: 300px; }
.footer-label { font: 700 16px var(--font-head); text-transform: uppercase; color: var(--ink); margin: 0 0 8px; }
.site-footer__col p, .site-footer__col address { margin-bottom: 26px; }
.site-footer__col a { color: var(--ink-soft); }
.site-footer__col a:hover { color: var(--green); }
.social { display: flex; gap: 14px; }
.social a { color: var(--green); width: 24px; height: 24px; display: inline-block; }
.social svg { width: 100%; height: 100%; }
.site-footer__bottom { background: var(--ink); color: #fff; font-size: 14px; }
.site-footer__bottom-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; padding-bottom: 18px; }
.site-footer__bottom p { margin: 0; }
.site-footer__legal { display: flex; align-items: center; gap: 28px; }
.site-footer__legal a { color: #fff; }
.site-footer__legal img { width: 100px; height: auto; }

/* ---------- Generic pages ---------- */
.site-main:not(.home) { padding: 90px 0; }
.entry { max-width: 1000px; }
.entry-title { font-size: 42px; }

/* ---------- Responsive ---------- */
@media (max-width: 1400px) {
	.nav-menu { gap: 32px; }
	.nav-menu > li > a { font-size: 18px; }
	.btn--phone { font-size: 20px; padding: 0 26px; height: 54px; }
	.primary-nav { padding-left: 10px; }
	.services__grid { gap: 50px 40px; }
	.service-card__body { padding: 32px 30px 36px; }
	.service-card h3 { font-size: 24px; }
}
@media (max-width: 1100px) {
	:root { --header-h: 80px; }
	.site-header__inner { gap: 16px; }
	.site-logo img { width: 190px; }
	.nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; margin-left: 4px; }
	.nav-toggle span { display: block; height: 2px; background: var(--ink); transition: .2s; }
	.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
	.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
	.site-header__actions { margin-left: auto; gap: 18px; }
	.primary-nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: #fff; padding: 20px var(--gutter); overflow-y: auto; transform: translateX(100%); transition: transform .25s; }
	.is-open .primary-nav { transform: none; }
	.nav-menu { flex-direction: column; gap: 0; }
	.nav-menu > li > a { padding: 16px 0; border-bottom: 1px solid var(--line); justify-content: space-between; }
	.sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; padding: 0 0 0 14px; min-width: 0; }
	.is-open > .sub-menu { display: block; }
	.services__grid { grid-template-columns: repeat(2, 1fr); }
	.intro__inner, .zones__inner { grid-template-columns: 1fr; }
	.why__box { width: 100%; max-width: 640px; }
	.why { padding: 70px 0; }
}
@media (max-width: 767px) {
	.btn--phone { font-size: 15px; padding: 0 14px; height: 42px; }
	.site-logo img { width: 150px; }
	.intro, .services, .guarantees, .zones { padding: 70px 0; }
	.cta-band { padding: 80px 0 130px; }
	.slant { height: 80px; }
	.hero__kicker { font-size: 15px; }
	.services__grid, .guarantees__grid, .zones__list { grid-template-columns: 1fr; gap: 30px; }
	.section-title { margin-bottom: 45px; }
	.why__box { padding: 60px 30px; }
	.site-footer__inner { grid-template-columns: 1fr; gap: 30px; }
	.site-footer__bottom-inner { flex-direction: column; gap: 10px; text-align: center; }
	.zones__list li { gap: 16px; }
}
@media (max-width: 420px) {
	.lang-switch { display: none; }
	.site-logo img { width: 128px; }
}
