/* Mobile / tablet refinements. Loaded last; desktop (>1100px) is untouched. */

/* ---- Global safety nets (all sizes) ---- */
html, body { overflow-x: clip; max-width: 100%; }
img, svg, video, iframe { max-width: 100%; }
h1, h2, h3, h4, p, li, a, address { overflow-wrap: break-word; word-wrap: break-word; }
.btn { white-space: normal; text-align: center; }
body.nav-open { overflow: hidden; }

/* ---- Tablet & below (<=1100px) ---- */
@media (max-width: 1100px) {
	:root { --gutter: 5%; }
	.site-header__inner { padding: 0 5%; }
	/* closed off-canvas menu must not be focusable / scrollable */
	.primary-nav { visibility: hidden; transition: transform .25s, visibility 0s .25s; z-index: 99; -webkit-overflow-scrolling: touch; }
	.is-open .primary-nav { visibility: visible; transition: transform .25s; }
	.nav-menu > li > a { font-size: 18px; }
	.nav-menu > li.menu-item-has-children > a .icon-chevron { transition: transform .2s; }
	.nav-menu > li.is-open > a .icon-chevron { transform: rotate(180deg); }
	.sub-menu a { padding: 12px 8px; font-size: 16px; }
	.sub-menu::before { display: none; }

	.hero { min-height: max(520px, calc(100svh - var(--header-h))); }
	.hero__inner { padding: 90px 5%; }
	.hero__title-main { max-width: 100%; }

	.cta-band { padding: 110px 0 170px; }
	.slant { height: 110px; }

	.services__grid { gap: 40px 30px; }
	.service-card__body { padding: 32px 28px 38px; }
	.service-card h3 { font-size: 26px; max-width: none; margin-bottom: 20px; }
	.service-card__body p { margin-bottom: 30px; }

	.guarantees { padding: 100px 0; }
	.guarantee-card { padding: 60px 24px 66px; }

	.why__inner { justify-content: center; padding-right: 5%; padding-left: 5%; }
	.why__box { width: 100%; max-width: none; padding: 70px 40px; }
	.why__box h2 { margin-bottom: 40px; }
	.why__box h3 { margin: 40px 0 14px; }

	.zones { padding: 100px 0 120px; }
	.zones__inner { gap: 40px; }
	.zones__list, .zones__list--wide { gap: 26px 40px; }

	.site-footer__main { padding: 80px 0; }
	.site-footer__inner { grid-template-columns: 1fr 1fr; gap: 40px; }
	.site-footer__brand { grid-column: 1 / -1; }

	.page-hero__inner { padding: 80px 5% 70px; }
	.quote-form, .card { padding: 32px; }
}

/* ---- Large phones (<=767px) ---- */
@media (max-width: 767px) {
	:root { --header-h: 70px; --gutter: 6%; }
	body { font-size: 16px; }
	.site-header__inner { padding: 0 4%; gap: 10px; }
	.site-logo img { width: 140px; }
	.site-header__actions { gap: 12px; }
	.btn--phone { font-size: 14px; padding: 0 14px; height: 40px; }
	.lang-switch__toggle, .lang-switch__list a { font-size: 14px; }
	.nav-toggle { width: 42px; height: 42px; margin-left: 0; }
	.nav-menu > li > a { font-size: 17px; }

	.hero { min-height: 520px; align-items: flex-end; }
	.hero__inner { padding: 70px 6% 60px; }
	.hero__kicker { font-size: 14px; letter-spacing: .08em; margin-bottom: 16px; }
	.hero__title { font-size: clamp(34px, 10.5vw, 48px); margin-bottom: 26px; }
	.hero__rule { margin-bottom: 22px; }
	.hero__since { font-size: 22px; }

	.cta-band { padding: 70px 0 120px; }
	.cta-band__title { font-size: clamp(24px, 7vw, 32px); }
	.cta-band__text { font-size: 17px; margin-bottom: 24px; }
	.slant { height: 70px; }

	.badge { width: 54px; height: 54px; margin-bottom: 14px; }
	.split-title, .sec-title { font-size: clamp(26px, 7.4vw, 34px); }
	.section-title { font-size: clamp(26px, 7.4vw, 34px); margin-bottom: 36px; }
	.section-title::after, .sec-title.center::after { margin-top: 20px; width: 100px; }

	.intro, .services, .guarantees { padding: 60px 0; }
	.intro__inner { gap: 30px; }
	.intro__media img { aspect-ratio: 4 / 3; }

	.services__grid { grid-template-columns: 1fr; gap: 30px; }
	.service-card__body { padding: 28px 24px 32px; min-height: 0; }
	.service-card h3 { font-size: 24px; margin-bottom: 14px; }
	.service-card__body p { font-size: 16px; margin-bottom: 22px; }

	.guarantees__grid { grid-template-columns: 1fr; gap: 24px; }
	.guarantee-card { padding: 44px 20px 50px; }
	.guarantee-card p { font-size: 17px; margin-bottom: 16px; }
	.guarantee-card h3 { font-size: 24px; }

	.why { padding: 0; }
	.why__inner { padding: 0; }
	.why__box { padding: 56px 6%; }
	.why__box h2 { font-size: 30px; margin-bottom: 30px; }
	.why__box h3 { font-size: 21px; margin: 30px 0 10px; }
	.why__box p { font-size: 16px; }

	.zones { padding: 60px 0 70px; }
	.zones__inner { grid-template-columns: 1fr; gap: 30px; }
	.zones__list, .zones__list--wide { grid-template-columns: 1fr; gap: 18px; margin-top: 20px; }
	.zones__list li { font-size: 17px; gap: 14px; }
	.zones__list .pin { width: 36px; height: 36px; }

	.site-footer__main { padding: 50px 0; }
	.site-footer__inner { grid-template-columns: 1fr; gap: 26px; }
	.site-footer__brand img { width: 220px; }
	.site-footer__col p, .site-footer__col address { margin-bottom: 20px; }
	.site-footer__bottom-inner { flex-direction: column; gap: 12px; text-align: center; }
	.site-footer__legal { flex-direction: column; gap: 12px; }

	/* Inner pages */
	.page-hero__inner { padding: 60px 6% 50px; }
	.page-hero__title { font-size: clamp(32px, 9.5vw, 44px); margin-bottom: 22px; }
	.page-hero .hero__rule { width: 140px; }
	.sec { padding: 50px 0; }
	.two-col { gap: 28px; }
	.two-col img { border-radius: 8px; }
	.cards { gap: 22px; }
	.card { padding: 26px 22px; }
	.card svg { width: 38px; height: 38px; }
	.checks, .card .checks { grid-template-columns: 1fr !important; gap: 14px; margin-top: 24px; }
	.faq-list summary { padding: 16px 4px; gap: 14px; font-size: 17px; }
	.faq-list details p { padding: 0 4px 18px; }
	.quote-form { padding: 26px 20px; border-radius: 8px; }
	.quote-form h2 { font-size: 24px; }
	.quote-form button { float: none; width: 100%; }
	.sell-band { padding: 50px 0; }
	.sell-form { padding: 28px 20px; border-radius: 8px; }
	.sell-form button { justify-self: stretch; width: 100%; }
	.sell-form input[type=file] { max-width: 100%; font-size: 14px; }
	.map-wrap iframe { height: 260px; }
	.site-main:not(.home):not(.inner) { padding: 50px 0; }
	.entry-title { font-size: 30px; }
}

/* ---- Small phones (<=420px) ---- */
@media (max-width: 420px) {
	.site-header__inner { gap: 6px; }
	.site-logo img { width: 112px; }
	.site-header__actions { gap: 8px; }
	.btn--phone { font-size: 13px; padding: 0 10px; height: 38px; }
	/* keep the FR/EN switch reachable on phones (style.css hides it here) */
	.lang-switch { display: block; }
	.lang-switch__toggle { font-size: 13px; gap: 3px; }
	.nav-toggle { width: 38px; height: 38px; }
	.hero { min-height: 480px; }
	.hero__title { font-size: clamp(30px, 10vw, 40px); }
	.why__box h2 { font-size: 27px; }
	.zones__list li { font-size: 16px; }
}

/* ---- Very small (<=340px) ---- */
@media (max-width: 340px) {
	.site-logo img { width: 96px; }
	.btn--phone { font-size: 12px; padding: 0 8px; }
}

/* ---- Touch: let the submenu open via tap only ---- */
@media (hover: none) and (min-width: 1101px) {
	.nav-menu > li:hover > .sub-menu { opacity: 0; visibility: hidden; }
	.nav-menu > li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.hero__slide, .primary-nav { transition: none; }
}

/* Tall FAQ photo: keep it short when the columns stack */
@media (max-width: 1100px) { .two-col img[src*="faq-moteur"] { max-height: 380px !important; width: 100%; } }
@media (max-width: 767px) { .two-col img[src*="faq-moteur"] { max-height: 260px !important; } }

/* Intro (home): stack image + text on tablets/phones (fidelity.css fixed the columns at 48%/1fr) */
@media (max-width: 900px) {
	.intro__inner { grid-template-columns: 1fr !important; gap: 30px !important; }
	.intro__media, .intro__text { width: 100%; max-width: 100%; }
	.intro__media img { width: 100%; height: auto; }
}

/* Phones: lighter 960px background images (variable set in inc/perf.php / main.js) */
@media (max-width: 767px) {
	[style*="--bg-sm"] { background-image: var(--bg-sm) !important; }
}
