/*
Theme Name: Motorprog
Description: Thème sur mesure pour Motorprog – reprogrammation moteur, solutions AdBlue et conversion E85 dans le Morbihan. Compatible WooCommerce.
Author: Motorprog
Version: 1.0.0
Text Domain: motorprog
*/

:root {
	--ink: #14171b;
	--panel: #1b1f25;
	--line: #2a2f36;
	--red: #e43d26;
	--red-dark: #c4301b;
	--amber: #ffb020;
	--paper: #ffffff;
	--tint: #eef0f2;
	--text: #1d2126;
	--muted: #5b636d;
	--font: "Bahnschrift", "Segoe UI Variable Display", "Segoe UI", "SF Pro Display", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
	--wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--text);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--red-dark); }
a:hover { color: var(--red); }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mp-skip { position: absolute; left: -999px; top: 0; background: var(--amber); color: #000; padding: .6rem 1rem; z-index: 999; }
.mp-skip:focus { left: 0; }
.mp-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.mp-narrow { max-width: 820px; }
.mp-center { text-align: center; }

/* Boutons */
.mp-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: .8rem 1.4rem; font: inherit; font-weight: 700; text-decoration: none;
	border: 2px solid transparent; border-radius: 6px; cursor: pointer;
	transition: background-color .15s, color .15s, border-color .15s;
}
.mp-btn--lg { padding: 1rem 1.7rem; font-size: 1.05rem; }
.mp-btn--block { display: flex; width: 100%; }
.mp-btn--red { background: var(--red); color: #fff; }
.mp-btn--red:hover { background: var(--red-dark); color: #fff; }
.mp-btn--light { background: #fff; color: var(--ink); }
.mp-btn--light:hover { background: var(--tint); color: var(--ink); }
.mp-btn--outline { border-color: rgba(255,255,255,.55); color: #fff; }
.mp-btn--outline:hover { background: #fff; color: var(--ink); }
.mp-btn--ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.mp-btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.mp-btn--outline-dark { border-color: var(--ink); color: var(--ink); }
.mp-btn--outline-dark:hover { background: var(--ink); color: #fff; }

/* En-tête */
.mp-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: #fff; }
.mp-topbar { background: #0e1013; font-size: .85rem; color: #aab1ba; }
.mp-topbar__inner { display: flex; justify-content: space-between; gap: 1rem; padding-top: .35rem; padding-bottom: .35rem; }
.mp-topbar a { color: #fff; font-weight: 700; text-decoration: none; }
.mp-header__inner { display: flex; align-items: center; gap: 1.5rem; padding-top: .7rem; padding-bottom: .7rem; }
.mp-logo img, .custom-logo { display: block; width: auto; height: 46px; }
.mp-header.is-scrolled .mp-logo img { height: 40px; }
.mp-nav { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.mp-menu, .mp-footer__menu { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.mp-menu a { display: block; padding: .5rem .75rem; color: #e6e9ed; text-decoration: none; font-weight: 600; font-size: .98rem; border-radius: 4px; }
.mp-menu a:hover, .mp-menu .current-menu-item > a, .mp-menu .current_page_item > a { color: #fff; background: var(--panel); box-shadow: inset 0 -3px 0 var(--red); }
.mp-menu li { position: relative; }
.mp-menu .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 260px; list-style: none; margin: 0; padding: .4rem; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.mp-menu li:hover > .sub-menu, .mp-menu li:focus-within > .sub-menu { display: block; }
.mp-menu .sub-menu .sub-menu { left: calc(100% - 4px); top: -.45rem; }
.mp-menu .sub-menu li { width: 100%; }
.mp-menu .sub-menu .menu-item-has-children > a { padding-right: 1.6rem; }
.mp-menu .sub-menu .menu-item-has-children > a::after { content: "›"; position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); font-size: 1.2rem; line-height: 1; color: var(--red); }
.mp-cart { position: relative; display: inline-flex; color: #fff; padding: .4rem; }
.mp-cart__count { position: absolute; top: -4px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 700; line-height: 18px; text-align: center; }
.mp-cart__count[data-count="0"] { display: none; }
.mp-burger { display: none; margin-left: auto; width: 44px; height: 44px; background: none; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.mp-burger__bars, .mp-burger__bars::before, .mp-burger__bars::after { display: block; width: 20px; height: 2px; background: #fff; margin: 0 auto; position: relative; content: ""; }
.mp-burger__bars::before { position: absolute; top: -6px; left: 0; }
.mp-burger__bars::after { position: absolute; top: 6px; left: 0; }

/* Hero */
.mp-hero { background: var(--ink); color: #fff; padding: 4.5rem 0 5rem; overflow: hidden; }
.mp-hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.mp-hero h1 { color: #fff; }
.mp-lead { font-size: 1.2rem; color: #c9ced5; max-width: 34em; }
.mp-hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 1.2rem; }
.mp-hero__zone { color: #8f97a1; font-size: .95rem; margin: 0; }
.mp-cluster { position: relative; margin: 0; aspect-ratio: 1; max-width: 430px; justify-self: end; width: 100%; display: grid; place-items: center; }
.mp-cluster__arc { position: absolute; inset: 0; width: 100%; height: 100%; }
.mp-cluster__panel { position: relative; display: flex; gap: .9rem; align-items: center; background: #0b0d10; border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.3rem; max-width: 80%; color: var(--amber); box-shadow: 0 0 0 1px rgba(255,176,32,.25), 0 0 36px rgba(255,176,32,.12); }
.mp-cluster__icon { flex: none; }
.mp-cluster__title { margin: 0; font-weight: 700; font-size: 1.15rem; color: var(--amber); }
.mp-cluster__msg { margin: .1rem 0 0; font-size: .98rem; color: #ffd98a; }
.mp-cluster figcaption { position: absolute; left: 0; right: 0; bottom: -.5rem; text-align: center; font-size: .9rem; color: #8f97a1; }

/* Réassurance */
.mp-facts { background: var(--panel); color: #fff; border-top: 3px solid var(--red); }
.mp-facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding-top: 1.6rem; padding-bottom: 1.6rem; }
.mp-facts__grid--3 { grid-template-columns: repeat(3, 1fr); }
.mp-facts p { margin: 0; font-size: .95rem; color: #aab1ba; }
.mp-facts strong { display: block; color: #fff; font-size: 1.02rem; margin-bottom: .15rem; }

/* Sections */
.mp-section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
.mp-section--tint { background: var(--tint); }
.mp-section--dark { background: var(--ink); color: #e6e9ed; }
.mp-section--dark h2, .mp-section--dark h3 { color: #fff; }
.mp-head { max-width: 46rem; margin-bottom: 2.2rem; }
.mp-head p { color: var(--muted); font-size: 1.1rem; }
.mp-cards { display: grid; gap: 1.25rem; }
.mp-cards--3 { grid-template-columns: repeat(3, 1fr); }
.mp-card { background: #fff; border: 1px solid #dfe2e6; border-top: 4px solid var(--ink); border-radius: 4px; padding: 1.5rem; }
.mp-section--tint .mp-card { background: #fff; }
.mp-card p { color: var(--muted); }
.mp-card__price { color: var(--ink) !important; font-weight: 700; font-size: 1.25rem; margin-bottom: .4rem; }
.mp-card--link { border-top-color: var(--red); }
.mp-card--link a { font-weight: 700; }
.mp-split { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: start; }
.mp-split--zone { grid-template-columns: 1fr 1fr; align-items: center; }
.mp-steps { margin: 1.5rem 0 0; padding: 0; list-style: none; counter-reset: step; }
.mp-steps li { counter-increment: step; position: relative; padding: 0 0 1.1rem 3rem; color: #c9ced5; }
.mp-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2rem; height: 2rem; border-radius: 50%; background: var(--red); color: #fff; font-weight: 700; text-align: center; line-height: 2rem; }
.mp-steps strong { color: #fff; }
.mp-price { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1.6rem; }
.mp-price h3 { margin-bottom: 1rem; }
.mp-price dl { margin: 0 0 .8rem; }
.mp-price dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.mp-price dt { color: #c9ced5; }
.mp-price dd { margin: 0; font-weight: 700; color: #fff; font-size: 1.15rem; }
.mp-price__note { font-size: .85rem; color: #8f97a1; }
.mp-price__link { display: block; margin-top: .9rem; text-align: center; color: #c9ced5; }
.mp-towns { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.mp-towns li { background: #fff; border: 1px solid #d3d7dc; border-left: 4px solid var(--red); padding: .6rem 1rem; font-weight: 600; border-radius: 3px; }

/* FAQ */
.mp-faq details { background: #fff; border: 1px solid #dfe2e6; border-radius: 4px; margin-bottom: .6rem; }
.mp-faq summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 700; list-style: none; position: relative; padding-right: 3rem; }
.mp-faq summary::-webkit-details-marker { display: none; }
.mp-faq summary::after { content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--red); }
.mp-faq details[open] summary::after { content: "–"; }
.mp-faq details p { padding: 0 1.2rem 1.1rem; margin: 0; color: var(--muted); }

/* Bandeau CTA */
.mp-cta { background: var(--red); color: #fff; padding: 3rem 0; }
.mp-cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.mp-cta h2 { color: #fff; margin-bottom: .3rem; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.mp-cta p { margin: 0; color: #ffe3de; max-width: 40rem; }
.mp-cta__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Pages */
.mp-pagehead { background: var(--ink); color: #fff; padding: 2.6rem 0; border-bottom: 3px solid var(--red); }
.mp-pagehead h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.7rem); color: #fff; }
.mp-pagehead .woocommerce-breadcrumb { color: #8f97a1; font-size: .85rem; margin-bottom: .6rem; }
.mp-pagehead .woocommerce-breadcrumb a { color: #c9ced5; }
.mp-prose { max-width: var(--wrap); }
.mp-prose > * { max-width: 78ch; }
.mp-prose > .alignwide, .mp-prose > .alignfull, .mp-prose > table, .mp-prose > figure, .mp-prose > .wp-block-columns, .mp-prose > .wp-block-gallery, .mp-prose > div, .mp-prose > form, .mp-prose > .mpe85 { max-width: none; }
.mp-prose h2 { margin-top: 1.6em; }
.mp-prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; }
.mp-prose th, .mp-prose td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid #dfe2e6; }
.mp-prose tr:nth-child(even) td { background: #f6f7f8; }
.mp-prose td:last-child { font-weight: 700; white-space: nowrap; }
.mp-posts { display: grid; gap: 1.5rem; }
.mp-post h2 a { text-decoration: none; color: var(--ink); }

/* Formulaires (WPForms & co) */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="search"], select, textarea,
.wpforms-container .wpforms-field input, .wpforms-container .wpforms-field select, .wpforms-container .wpforms-field textarea {
	font: inherit; width: 100%; max-width: 100%; padding: .75rem .9rem; border: 1px solid #b9bfc7; border-radius: 6px; background: #fff; color: var(--text);
}
.wpforms-container .wpforms-field-label, label { font-weight: 600; }
.wpforms-container .wpforms-submit, button.button, .button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
	font: inherit; font-weight: 700; background: var(--red) !important; color: #fff !important; border: 0; border-radius: 6px; padding: .85rem 1.5rem; cursor: pointer; text-decoration: none;
}
.wpforms-container .wpforms-submit:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--red-dark) !important; }

/* WooCommerce */
.mp-woo .woocommerce ul.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.25rem; margin: 0; padding: 0; }
.mp-woo .woocommerce ul.products::before, .mp-woo .woocommerce ul.products::after { display: none; }
.mp-woo .woocommerce ul.products li.product { width: auto; margin: 0; float: none; background: #fff; border: 1px solid #dfe2e6; border-top: 4px solid var(--red); border-radius: 4px; padding: 1rem; display: flex; flex-direction: column; }
.mp-woo ul.products li.product a img { margin: 0 0 .8rem; }
.mp-woo ul.products li.product .woocommerce-loop-product__title { font-size: 1.02rem; padding: 0; }
.mp-woo ul.products li.product .price { color: var(--ink); font-weight: 700; margin-bottom: .8rem; }
.mp-woo ul.products li.product .button { margin-top: auto; text-align: center; }
.mp-woo div.product { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.mp-woo div.product .woocommerce-product-gallery, .mp-woo div.product div.images, .mp-woo div.product div.summary { width: 100% !important; float: none !important; margin: 0 !important; }
.mp-woo div.product .woocommerce-tabs, .mp-woo div.product .related, .mp-woo div.product .up-sells { grid-column: 1 / -1; }
.mp-woo div.product p.price, .mp-woo div.product span.price { color: var(--ink); font-size: 1.5rem; font-weight: 700; }
.mp-woo .woocommerce-tabs ul.tabs { padding: 0; margin: 0 0 1rem; display: flex; gap: .4rem; border-bottom: 1px solid #dfe2e6; list-style: none; }
.mp-woo .woocommerce-tabs ul.tabs li { background: none; border: 0; margin: 0; padding: 0; }
.mp-woo .woocommerce-tabs ul.tabs li a { display: block; padding: .7rem 1rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.mp-woo .woocommerce-tabs ul.tabs li.active a { color: var(--ink); box-shadow: inset 0 -3px 0 var(--red); }
.mp-woo .woocommerce-tabs ul.tabs::before, .mp-woo .woocommerce-tabs ul.tabs li::before, .mp-woo .woocommerce-tabs ul.tabs li::after { display: none; }
.mp-woo table.shop_table { border-collapse: collapse; width: 100%; border: 1px solid #dfe2e6; }
.mp-woo table.shop_table th, .mp-woo table.shop_table td { padding: .9rem; border-bottom: 1px solid #dfe2e6; text-align: left; }
.mp-woo .woocommerce-message, .mp-woo .woocommerce-info { border-top: 3px solid var(--red); background: var(--tint); padding: 1rem 1.2rem; list-style: none; }
.mp-woo .woocommerce-message::before, .mp-woo .woocommerce-info::before { display: none; }
.mp-woo .cart-collaterals .cart_totals { float: none; width: 100%; max-width: 480px; margin-left: auto; }
.mp-woo .wc-block-components-button:not(.is-link) { background: var(--red); color: #fff; border-radius: 6px; }
.mp-woo form.cart .variations td, .mp-woo form.cart .variations th { display: block; padding: .25rem 0; }

/* Pied de page */
.mp-footer { background: var(--ink); color: #aab1ba; margin-top: 0; }
.mp-footer a { color: #e6e9ed; }
.mp-footer__grid { display: grid; grid-template-columns: 1.3fr 1.1fr 1fr .8fr; gap: 2rem; padding-top: 3.2rem; padding-bottom: 2.4rem; }
.mp-footer__title { font-size: 1rem; color: #fff; margin-bottom: .8rem; }
.mp-footer__about { margin-top: 1rem; max-width: 24rem; }
.mp-social { display: flex; gap: 1rem; }
.mp-footer__menu { flex-direction: column; gap: .35rem; }
.mp-footer__legal { border-top: 1px solid var(--line); padding: 1.1rem 0; font-size: .88rem; }

/* Barre d'appel mobile */
.mp-callbar { display: none; }

/* Responsive */
@media (max-width: 960px) {
	.mp-hero__inner, .mp-split, .mp-split--zone { grid-template-columns: 1fr; }
	.mp-cluster { justify-self: center; max-width: 340px; margin-top: 1rem; }
	.mp-cards--3 { grid-template-columns: 1fr; }
	.mp-facts__grid { grid-template-columns: 1fr 1fr; }
	.mp-facts__grid--3 { grid-template-columns: 1fr; }
	.mp-footer__grid { grid-template-columns: 1fr 1fr; }
	.mp-woo div.product { grid-template-columns: 1fr; }

	.mp-burger { display: inline-block; }
	.mp-cart { margin-left: 0; }
	.mp-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 1rem 1.25rem 1.5rem; background: var(--ink); border-top: 1px solid var(--line); max-height: calc(100vh - 110px); overflow-y: auto; }
	.mp-nav.is-open { display: flex; }
	.mp-menu { flex-direction: column; gap: 0; }
	.mp-menu a { padding: .85rem .5rem; border-bottom: 1px solid var(--line); }
	.mp-menu .sub-menu { display: block; position: static; background: none; border: 0; padding: 0 0 0 1rem; }
	.mp-menu .sub-menu .menu-item-has-children > a::after { display: none; }
	.mp-menu .sub-menu .sub-menu { padding-left: 1rem; }
	.mp-nav__cta { margin-top: 1rem; }
	.mp-topbar span { display: none; }
	.mp-topbar__inner { justify-content: flex-end; }
}
@media (max-width: 640px) {
	.mp-section { padding-top: 3rem; padding-bottom: 3rem; }
	.mp-hero { padding: 2.5rem 0 3.5rem; }
	.mp-hero__actions .mp-btn { width: 100%; }
	.mp-facts__grid, .mp-footer__grid { grid-template-columns: 1fr; }
	.mp-cta__actions, .mp-cta__actions .mp-btn { width: 100%; }
	.mp-topbar { display: none; }
	.mp-footer { padding-bottom: 64px; }
	.mp-callbar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; box-shadow: 0 -4px 16px rgba(0,0,0,.25); }
	.mp-callbar a { padding: 1rem; text-align: center; font-weight: 700; text-decoration: none; color: #fff; }
	.mp-callbar__call { background: var(--ink); }
	.mp-callbar__quote { background: var(--red); }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
