/*
Theme Name: Malau Broc
Theme URI: https://malaubroc.fr
Author: EZ Comm
Description: Thème sur mesure pour Malau Broc : brocante, antiquités, débarras et ventes aux enchères. Compatible WooCommerce et TranslatePress.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: malaubroc
*/

/* ---------- Bases ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
img { max-width: 100%; height: auto; }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid var(--wp--preset--color--orange-fonce); outline-offset: 2px; }

/* ---------- Bandeau du haut ---------- */
.mb-topbar a { color: inherit; text-decoration: none; }

/* ---------- En-tête ---------- */
.mb-header { border-bottom: 1px solid var(--wp--preset--color--sable); }
.mb-logo a { text-decoration: none; }
.mb-logo .wp-block-site-title a { font-family: var(--wp--preset--font-family--shrikhand); color: var(--wp--preset--color--orange-logo); }
.mb-header .wp-block-navigation a:hover { color: var(--wp--preset--color--orange-fonce); }
.mb-header .trp-language-switcher, .mb-header .trp-shortcode-switcher__wrapper { font-weight: 800; }

/* ---------- Formes « taches » du flyer ---------- */
.mb-blobs { position: relative; overflow: hidden; isolation: isolate; }
.mb-blobs::before, .mb-blobs::after {
  content: ""; position: absolute; z-index: -1; background: var(--wp--preset--color--orange-clair);
}
.mb-blobs::before { width: 520px; height: 420px; left: -160px; top: -140px; border-radius: 58% 42% 55% 45% / 50% 60% 40% 50%; }
.mb-blobs::after { width: 640px; height: 460px; right: -220px; bottom: -260px; border-radius: 45% 55% 40% 60% / 55% 45% 55% 45%; }
.mb-blobs--brun::before, .mb-blobs--brun::after { background: var(--wp--preset--color--brun-moyen); }

/* ---------- Cartes ---------- */
.mb-card { transition: transform .2s ease, box-shadow .2s ease; }
.mb-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(58, 31, 15, .14); }
.mb-card a { text-decoration: none; }
.mb-card a::after { content: ""; position: absolute; inset: 0; }
.mb-card { position: relative; }

/* ---------- Boutons ---------- */
.wp-element-button, .wp-block-button__link { transition: filter .15s ease; }
.wp-element-button:hover, .wp-block-button__link:hover { filter: brightness(1.08); }

/* ---------- Pastilles (villes, étiquettes) ---------- */
.mb-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.mb-pills > p { margin: 0 !important; background: var(--wp--preset--color--creme); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 15px; }

/* ---------- Badge « En direct » ---------- */
.mb-live::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: currentColor; margin-right: 8px; vertical-align: middle; }

/* ---------- Boutique WooCommerce ---------- */
.wc-block-components-product-sale-badge, .onsale { display: none !important; }
.mb-sold-badge, .wc-block-components-product-stock-indicator--out-of-stock {
  font-family: var(--wp--preset--font-family--oswald); text-transform: uppercase; font-weight: 700;
}
.wc-block-components-product-stock-indicator--out-of-stock { color: var(--wp--preset--color--orange-fonce) !important; }
.wc-block-grid__product, .wc-block-product { background: var(--wp--preset--color--blanc); border-radius: 24px; overflow: hidden; padding-bottom: 18px; }
.wc-block-product .wc-block-components-product-image img, .wc-block-grid__product-image img { aspect-ratio: 1 / 1; object-fit: cover; }
.wc-block-product .wp-block-post-title, .wc-block-product .wc-block-components-product-price,
.wc-block-product .wp-block-woocommerce-product-price, .wc-block-product .wp-block-post-terms { padding-inline: 18px; }
.mb-prix-sur-demande { font-family: var(--wp--preset--font-family--oswald); font-weight: 600; }

/* ---------- Partenaires ---------- */
.mb-partner { min-height: 96px; border: 2px dashed var(--wp--preset--color--sable-fonce); border-radius: 20px; display: flex; align-items: center; justify-content: center; }
.mb-partner img { max-height: 64px; width: auto; filter: grayscale(1); opacity: .85; transition: all .2s; }
.mb-partner:hover img { filter: none; opacity: 1; }

/* ---------- Divers ---------- */
.mb-rotate { transform: rotate(-4deg); }
.mb-shadow { box-shadow: 0 6px 16px rgba(58, 31, 15, .18); }
@media (max-width: 781px) {
  .mb-hero-title { font-size: clamp(2.6rem, 11vw, 4.5rem) !important; }
}

/* ---------- Formulaire de contact (Contact Form 7) ---------- */
.wpcf7 label { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 15px; }
.wpcf7 p { margin: 0 0 14px; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 select, .wpcf7 textarea {
  width: 100%; box-sizing: border-box; min-height: 48px; border-radius: 14px; border: 2px solid var(--wp--preset--color--sable);
  padding: 10px 14px; font: inherit; font-weight: 400; background: var(--wp--preset--color--fond); color: var(--wp--preset--color--brun);
}
.wpcf7 input[type="submit"] {
  background: var(--wp--preset--color--brun); color: var(--wp--preset--color--creme); border: 0; border-radius: 999px;
  padding: 16px 28px; font-family: var(--wp--preset--font-family--oswald); font-weight: 600; font-size: 1.2rem; text-transform: uppercase; cursor: pointer;
}
.wpcf7 .wpcf7-acceptance label { flex-direction: row; font-weight: 400; }
