/*
 * Blocs des modules : offre par lot, produit compagnon, promo du moment,
 * précommande, contact et contribution.
 *
 * Une seule feuille, enfilée une fois (handle « hmb-blocs »), à la place des
 * <style> que ces six modules imprimaient dans le corps de la page avec des
 * couleurs en dur : la palette du thème (jetons --hm-*) fait désormais foi et
 * toute évolution de celle-ci est suivie automatiquement.
 */

/* Offre par lot ----------------------------------------------------------- */
.hmb-lot { display: flex; align-items: center; gap: 10px; margin: 12px 0; padding: 12px 16px; border-radius: var(--hm-radius-sm, 12px); background: var(--hm-peach, #fbe3d0); color: var(--hm-brown, #3f2f25); font-weight: 700; }
.hmb-lot .hm-icon, .hmb-lot svg { color: var(--hm-caramel-dark, #a96f44); flex: none; }
.hmb-lot--ok { background: var(--hm-sage-bg, #eaf2eb); color: var(--hm-sage, #2f7a3c); }
.hmb-lot--product { display: inline-flex; }
.hmb-lot-wrap:empty { display: none; }

/* Produit compagnon et renvoi vers le magazine ---------------------------- */
.hmb-article { display: flex; flex-direction: column; gap: 4px; max-width: 860px; margin: 0 0 32px; padding: 18px 22px; border-left: 4px solid var(--hm-peach-strong, #f3c9a6); background: var(--hm-surface, #fff); border-radius: 0 14px 14px 0; }
.hmb-article__eyebrow { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 800; color: var(--hm-caramel-dark, #a96f44); }
.hmb-article__link { font-family: var(--hm-font-title, "Fraunces", Georgia, serif); font-size: 1.25rem; color: var(--hm-brown, #3f2f25); }
.hmb-article__site { font-size: 0.8rem; color: var(--hm-muted, #8a7a6b); }
.hmb-sugg { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; margin: 14px 0; padding: 12px; border: 1px solid var(--hm-border, #eadfd3); border-radius: 14px; background: var(--hm-surface, #fff); }
.hmb-sugg img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.hmb-sugg__body { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.hmb-sugg__title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--hm-caramel-dark, #a96f44); font-weight: 700; }
.hmb-sugg__name { color: var(--hm-brown, #3f2f25); font-weight: 700; font-size: 0.92rem; }
.hmb-sugg__price { font-size: 0.9rem; color: var(--hm-brown-soft, #6b5a4b); }

/* Compte à rebours : socle commun, la teinte du fond dépend du bloc porteur -- */
.hmb-countdown { display: flex; gap: 10px; margin: 12px 0; }
.hmb-countdown span { display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 8px 6px; border-radius: var(--hm-radius-sm, 12px); }
.hmb-countdown b { font-size: 1.5rem; line-height: 1; }
.hmb-countdown small { opacity: 0.7; font-size: 0.7rem; }


/* Promo du moment --------------------------------------------------------- */
/* Carte compacte, centrée dans la page, sur fond pêche pour qu'on la voie (retours de Simon du 13/09 :
   « trop gros » puis « pas centré, on ne voit pas assez »). */
/* La gouttière sur la section, pas sur la carte : la carte est un .hm-container, son fond pêche
   allait de bord à bord sur mobile et ses arrondis se cognaient au bord de l'écran (14/09). */
.hmb-promo { padding: 32px var(--hm-gutter, 20px); }
.hmb-promo .hmb-promo__inner { display: grid; grid-template-columns: 1fr; width: auto; gap: 16px; justify-items: center; text-align: center; max-width: 720px; margin: 0 auto; background: var(--hm-peach, #fbe3d0); color: var(--hm-brown, #3f2f25); border: 2px solid var(--hm-peach-strong, #f3c9a6); border-radius: 20px; padding: 22px; box-shadow: 0 14px 34px -18px rgba(63, 47, 37, 0.35); }
.hmb-promo__inner .hm-eyebrow { color: var(--hm-rasp, #c94f5c); margin: 0 0 6px; font-weight: 700; }
.hmb-promo__media { width: 150px; }
.hmb-promo__media img { border-radius: 12px; width: 100%; height: auto; display: block; box-shadow: 0 10px 24px -12px rgba(63, 47, 37, 0.5); }
.hmb-promo__body { display: flex; flex-direction: column; align-items: center; }
.hmb-promo__name { margin: 0 0 8px; font-size: 1.35rem; color: inherit; }
.hmb-promo__name a { color: inherit; }
.hmb-promo__price { font-size: 1.25rem; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 0; }
.hmb-promo__price del { opacity: 0.55; font-weight: 400; }
.hmb-promo__price ins { text-decoration: none; color: var(--hm-rasp, #c94f5c); }
.hmb-promo__text { color: var(--hm-brown, #3f2f25); opacity: 0.8; font-size: 0.95rem; margin: 6px 0 12px; }
.hmb-promo .hmb-countdown { gap: 8px; margin: 10px 0; justify-content: center; }
.hmb-promo .hmb-countdown span { min-width: 52px; padding: 6px 4px; background: #fff; border: 1px solid var(--hm-peach-strong, #f3c9a6); }
.hmb-promo .hmb-countdown b { font-size: 1.2rem; }
@media (min-width: 700px) {
	.hmb-promo .hmb-promo__inner { grid-template-columns: 200px 1fr; gap: 28px; padding: 26px 32px; text-align: left; justify-items: start; }
	.hmb-promo__media { width: 200px; }
	.hmb-promo__body { align-items: flex-start; }
	.hmb-promo__price, .hmb-promo .hmb-countdown { justify-content: flex-start; }
}

/* Précommande ------------------------------------------------------------- */
.hmb-pre-note { margin: 12px 0; padding: 12px 16px; border-radius: var(--hm-radius-sm, 12px); background: var(--hm-peach, #fbe3d0); color: var(--hm-brown, #3f2f25); font-size: 0.92rem; }
.hmb-pre { display: grid; gap: 24px; align-items: start; margin: 24px 0; }
.hmb-pre__media img { border-radius: 16px; width: 100%; }
.hmb-pre__name { font-family: inherit; font-size: 1.1rem; margin: 0 0 6px; }
.hmb-pre__price { font-size: 1.4rem; font-weight: 700; }
.hmb-pre__price del { opacity: 0.5; font-weight: 400; }
.hmb-pre__price ins { text-decoration: none; color: var(--hm-rasp, #c94f5c); }
.hmb-pre__bar { height: 12px; border-radius: 6px; background: var(--hm-surface-2, #f6efe6); overflow: hidden; }
.hmb-pre__bar span { display: block; height: 100%; background: var(--hm-sage, #7a9e7e); }
.hmb-pre__progress p { margin: 6px 0 12px; font-size: 0.95rem; }
.hmb-pre__ship { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.hmb-pre .hmb-countdown span { background: var(--hm-peach, #fbe3d0); }
.hmb-pre .hmb-countdown b { font-size: 1.4rem; }
.hmb-pre--vide { margin: 24px 0; padding: 28px; border-radius: var(--hm-radius, 18px); background: var(--hm-peach, #fbe3d0); }
.hmb-pre--vide h2 { margin-top: 0; }
.hmb-pre--vide .hm-newsletter { margin-top: 12px; }
@media (min-width: 900px) {
	.hmb-pre { grid-template-columns: 1fr 1fr; gap: 48px; }
	/* Le bloc de repli « aucune campagne en cours » n'a qu'un seul enfant (.hmb-pre__body) :
	   avec les deux colonnes de .hmb-pre il tombait dans la première et laissait 57 % de la
	   carte vide à droite, le texte replié sur 288 px. Une seule colonne, pleine largeur. */
	.hmb-pre--vide { grid-template-columns: minmax(0, 1fr); }
}

/* Contact ----------------------------------------------------------------- */
.hmb-contact__grid { display: grid; gap: 0 16px; }
.hmb-contact label { display: block; margin-bottom: 4px; }
.hmb-contact__msg.is-ok { color: var(--hm-sage, #2f7a3c); font-weight: 700; }
.hmb-contact__msg.is-error { color: var(--hm-rasp, #c94f5c); font-weight: 700; }
@media (min-width: 700px) {
	.hmb-contact__grid { grid-template-columns: 1fr 1fr; }
}

/* Contribution ------------------------------------------------------------ */
/* Sélecteur renforcé : WooCommerce impose « font-weight: 700 » sur table.shop_table th (0,2,2),
   ce que l'ancien style en ligne battait. Une simple classe ne suffit pas. */
.hmb-contrib th, .woocommerce table.shop_table tr.hmb-contrib th { font-weight: 600; color: var(--hm-caramel-dark, #a96f44); }
.hmb-contrib th > span { display: inline-flex; align-items: center; gap: 8px; }
.hmb-contrib__line { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--hm-caramel-dark, #a96f44); font-weight: 600; }
.hmb-contrib__strip { margin: 18px 0 0; padding: 12px 18px; border-radius: var(--hm-radius-sm, 12px); background: var(--hm-sage-bg, #eaf2eb); color: var(--hm-sage, #2f7a3c); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
