/* ============= Typo ============= */
body {
  font-family:'Roboto',system-ui,-apple-system,'Segoe UI',sans-serif;
  font-size:16px; line-height:1.6; color:#0F172A;
}
h1,h2,h3 {
  font-family:'Montserrat',sans-serif;
  font-weight:600; color:#0F172A;
}
h1 { font-size:34px; font-weight:700; }
h2 { font-size:26px; }
h3 { font-size:22px; }

/* ============= Variables globales (une seule source de vérité) ============= */
:root{
  --mma-red:#D32F2F;
  --mma-red-dark:#B71C1C;
  --mma-blue:#2F80ED;
  --mma-blue-dark:#1E5DBE;
  --mma-blue-border:#1d5db8;
}

/* ============= Flow vertical ============= */
.entry-content > * + * { margin-block-start:1.25rem; }
.entry-content h2 { margin-top:2.2rem; margin-bottom:.8rem; }
.entry-content h3 { margin-top:1.8rem; margin-bottom:.6rem; }
.entry-content ul,
.entry-content ol,
.entry-content .wp-block-image,
.entry-content .wp-block-embed { margin-block:1.2rem; }

/* Groupes */
.wp-block-group.has-background {
  padding:clamp(16px,3.5vw,32px);
  border-radius:8px;
}
.section--tight{--flow-space:.9rem}
.section--tight.wp-block-group.has-background{padding:clamp(10px,2.5vw,20px)}
.section--flush{padding:0!important}

/* Full-bleed sur mobile */
@media (max-width:768px){
  .entry-content > .full-bleed {
    margin-left:calc(50% - 50vw);
    margin-right:calc(50% - 50vw);
    width:100vw; max-width:100vw;
  }
}

/* ============= Boutons (global WP) ============= */
.button,
.wp-block-button__link {
  background: var(--mma-blue);
  color:#fff;
  border:1px solid var(--mma-blue-border);
  border-radius:6px;
  padding:.6em 1.2em;
  font-weight:600;
  text-decoration:none;
  transition:background .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.button:hover,
.wp-block-button__link:hover {
  background: var(--mma-blue-dark);
  color:#fff;
}
.button:focus,
.wp-block-button__link:focus {
  outline:none;
  box-shadow:0 0 0 3px rgba(47,128,237,.2);
}

/* ============= Beacon BMS ============= */
.site-header .inside-header{display:flex;align-items:center}
#site-navigation.bms-nav-push{margin-left:auto!important}
.bms-lamp-link{display:inline-flex;align-items:center;gap:.65rem;text-decoration:none;white-space:nowrap}
.bms-dot{
  width:12px;height:12px;border-radius:50%;
  background:var(--mma-red);
  box-shadow:0 0 0 0 rgba(211,47,47,.55);
  animation:bmsPulse 1.2s ease-in-out infinite;
}
.bms-text{font:600 13px/1 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:#111;display:inline!important}
@keyframes bmsPulse{
  0%{transform:scale(1);box-shadow:0 0 0 0 rgba(211,47,47,.55)}
  50%{transform:scale(1.25);box-shadow:0 0 0 6px rgba(211,47,47,0)}
  100%{transform:scale(1);box-shadow:0 0 0 0 rgba(211,47,47,0)}
}
@media (min-width:1024px){ .bms-dot{width:14px;height:14px} }
@media (prefers-reduced-motion:reduce){ .bms-dot{animation:none} }
#bms-lamp-link{
  padding:.4rem .65rem;
  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:9999px;
  box-shadow:0 2px 8px rgba(0,0,0,.08);
}
/* Espacement logo ↔︎ beacon */
#bms-lamp-link { margin-left: clamp(16px, 2.5vw, 32px) !important; }
.bms-lamp-link { gap: clamp(6px, 1vw, 12px); white-space: nowrap; }

/* Compactage mobile */
@media (max-width: 480px){
  #bms-lamp-link{ padding:.35rem .5rem; }
  .bms-text{ font-size:12px; }
}
@media (max-width: 360px){
  .bms-text{ display:none; }
}

/* ==================== Cards BMS & Vigilance ==================== */
.mma-card {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e7e7ea;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  margin: 1.25rem 0;
}

/* Barre colorée sur le côté gauche */
.mma-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: var(--mma-blue);
}
.mma-card--bms::before { background: var(--mma-red); }
.mma-card--vigilance::before { background: var(--mma-blue); }

/* Contenu interne */
.mma-card__inner { padding: 1.1rem 1.1rem 1.2rem 1.25rem; }
.mma-card h2, .mma-card h3 { margin: .2rem 0 .8rem; line-height: 1.25; }
.mma-card p { margin: .45rem 0; }
.mma-card ul { margin: .4rem 0 .6rem 1.1rem; }
.mma-card .meta, .mma-card em, .mma-card small { color: #6b7280; }

/* Responsive */
@media(max-width:640px){ .mma-card__inner{ padding:.95rem } }

/* ==================== Centrer les images mises en avant ==================== */
.featured-image { text-align: center; }
.featured-image img { display: inline-block; }

/* ==================== WooCommerce — Harmonisation couleurs ==================== */

/* Prix (liste + fiche produit) */
.woocommerce div.product p.price,
.woocommerce div.product span.price,
.woocommerce ul.products li.product .price {
  color: var(--mma-red);
  font-weight: 600;
}

/* Badge promo */
.woocommerce span.onsale{
  background: var(--mma-red);
  color:#fff;
  border-radius: 9999px;
  min-width: 2.2em; min-height: 2.2em;
  line-height: 2.2em;
  padding: 0 .5em;
  font-weight: 700;
}

/* ============= Boutons WooCommerce ============= */

/* Secondaires (ajouter au panier, appliquer, mettre à jour, etc.) */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button,
.woocommerce .add_to_cart_button,
.single_add_to_cart_button {
  background: var(--mma-blue);
  color:#fff;
  border:1px solid var(--mma-blue-border);
  border-radius:6px;
  padding:.6em 1.2em;
  font-weight:600;
  text-decoration:none;
  transition:background .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .button:hover,
.woocommerce .add_to_cart_button:hover,
.single_add_to_cart_button:hover {
  background: var(--mma-blue-dark);
  color:#fff;
}
.woocommerce a.button:focus,
.woocommerce button.button:focus,
.woocommerce input.button:focus,
.woocommerce #respond input#submit:focus,
.woocommerce .button:focus,
.woocommerce .add_to_cart_button:focus,
.single_add_to_cart_button:focus {
  outline:none; box-shadow:0 0 0 3px rgba(47,128,237,.2);
}

/* Primaires (voir le panier, commander/valider/payer) */
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce a.checkout-button,
.woocommerce input#place_order {
  background: var(--mma-blue);
  color:#fff;
  border:1px solid var(--mma-blue-border);
  border-radius:6px;
  padding:.7em 1.4em;
  font-weight:700;
  text-transform: uppercase;
  letter-spacing:.02em;
  transition:background .2s ease, box-shadow .2s ease;
}
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce #respond input#submit.alt:hover,
.woocommerce a.checkout-button:hover,
.woocommerce input#place_order:hover {
  background: var(--mma-blue-dark);
  color:#fff;
}
.woocommerce a.button.alt:focus,
.woocommerce button.button.alt:focus,
.woocommerce input.button.alt:focus,
.woocommerce #respond input#submit.alt:focus,
.woocommerce a.checkout-button:focus,
.woocommerce input#place_order:focus {
  outline:none; box-shadow:0 0 0 3px rgba(47,128,237,.25);
}

/* Mini-panier : bouton “Commander” (BLEU) */
.woocommerce.widget_shopping_cart .buttons a{ width:100%; }
.woocommerce.widget_shopping_cart .buttons a.checkout{
  background: var(--mma-blue);
  color:#fff;
  border:1px solid var(--mma-blue-border);
}
.woocommerce.widget_shopping_cart .buttons a.checkout:hover{
  background: var(--mma-blue-dark);
}

/* Woo Blocks (si utilisés) */
.wc-block-components-button,
.wc-block-cart__submit-container .wc-block-components-button__button,
.wc-block-checkout__actions .wc-block-components-button {
  background: var(--mma-blue) !important;
  color:#fff !important;
  border:1px solid var(--mma-blue-border) !important;
  border-radius:6px !important;
  font-weight:700 !important;
  text-transform: uppercase !important;
}
.wc-block-components-button:hover {
  background: var(--mma-blue-dark) !important;
}

/* États désactivés */
.woocommerce .button.disabled,
.woocommerce .button:disabled,
.woocommerce .button.disabled:hover,
.woocommerce .button:disabled:hover,
button[disabled],
.button[disabled] {
  opacity:.55; cursor:not-allowed; filter:saturate(.8);
}

/* ==================== Formulaires (panier / checkout) ==================== */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container .select2-selection--single {
  border:1px solid #d7d7de;
  border-radius:8px;
  padding:.6em .8em;
  background:#fff;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.select2-container--default .select2-selection--single:focus,
.select2-container--default .select2-selection--single .select2-selection__rendered:focus {
  outline: none;
  border-color: var(--mma-blue);
  box-shadow: 0 0 0 3px rgba(47,128,237,.15);
}

/* Quantité */
.woocommerce .quantity input.qty{
  border:1px solid #d7d7de; border-radius:8px;
  padding:.4em .6em; width:4.5em; text-align:center;
}

/* ==================== Messages Woo ==================== */
.woocommerce-notices-wrapper .woocommerce-message{
  border-left:4px solid var(--mma-blue);
  background:#f3f7ff;
}
.woocommerce-notices-wrapper .woocommerce-info{
  border-left:4px solid var(--mma-blue);
  background:#f3f7ff;
}
.woocommerce-notices-wrapper .woocommerce-error{
  border-left:4px solid var(--mma-red);
  background:#fff5f5;
}

/* ==================== Tables panier / totaux ==================== */
.woocommerce table.shop_table{
  border-radius:12px; overflow:hidden;
}
.woocommerce table.shop_table tfoot tr.order-total th,
.woocommerce table.shop_table tfoot tr.order-total td{
  color:#0f172a; font-weight:700;
}

/* ==================== Pagination produits ==================== */
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span{
  border-radius:8px; border:1px solid #e1e3e8;
}
.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover{
  background: var(--mma-blue); color:#fff; border-color: var(--mma-blue);
}

/* ==================== Widgets / mini-panier ==================== */
.woocommerce ul.cart_list li a,
.woocommerce ul.product_list_widget li a{
  color:#0f172a;
}

/* ==================== Produit Archive BMS ==================== */
/* Espace sous le champ "Date" */
#product-3729 .mm-field--datebms,
#product-6428 .mm-field--datebms { margin-bottom: 12px !important; }

/* ==================== Newsletter (plugin TNP) ==================== */
/* Bouton newsletter (rouge fixe, sans hover) */
.mma-newsletter input.tnp-submit {
  background: var(--mma-blue) !important;
  color: #fff !important;
  border: 1px solid var(--mma-blue-border) !important;
  border-radius: 6px !important;
  padding: 10px 18px !important;
  width: auto !important;
  font-weight: 600 !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
  transition: background .2s ease, box-shadow .2s ease !important;
}
.mma-newsletter input.tnp-submit:hover {
  background: var(--mma-blue-dark) !important;
}
.mma-newsletter input.tnp-submit:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(47,128,237,.2) !important;
}
/* Champ email */
.mma-newsletter input.tnp-email {
  padding: 10px 14px !important;
  border: 1px solid rgba(0,0,0,.15) !important;
  border-radius: 6px !important;
  font-size: 15px !important;
  box-shadow: none !important;
}
/* Formulaire newsletter en ligne */
.mma-newsletter form {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
}
/* Sur mobile, on empile champ + bouton mais bouton reste étroit */
@media (max-width: 480px) {
  .mma-newsletter form { flex-direction: column; align-items: center; }
  .mma-newsletter input.tnp-email { width: 100% !important; }
  .mma-newsletter input.tnp-submit { width: auto !important; margin-top: 6px; }
}

/* --------------------------------------------------------------------------
   Bouton pilule BMS
   -------------------------------------------------------------------------- */
.bms-cta-pill { margin: .75rem 0 .25rem; text-align: left !important; }
.bms-cta-pill__link {
  display: inline-block;
  padding: .35rem .9rem;
  border-radius: 999px;
  background: var(--mma-red);
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: .9em;
  line-height: 1.2;
  transition: background .2s;
}
.bms-cta-pill__link:hover { background: var(--mma-red-dark); }
.bms-origin { margin-top: .5rem; font-size: .85em; color: #555; text-align: right; }

/* --------------------------------------------------------------------------
   Bloc CTA triple (abo BMS + archive + formation) - version inline
   -------------------------------------------------------------------------- */
.cta-bms-archive {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* 3 colonnes égales */
  gap: 8px;
  max-width: 800px;
  margin: 1.5em auto;
}

.cta-bms-archive .cta-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 14px;
  font-weight: 600;
  border-radius: 5px;
  text-decoration: none;
  color: #fff !important;
  transition: background .2s, box-shadow .2s;
  outline: none; /* retire le liseret défaut */
  border: 1px solid var(--mma-blue-border);
}

/* Variante primaire (BLEU) */
.cta-bms-archive .cta-btn--primary {
  background: var(--mma-blue);
  border-color: var(--mma-blue-border);
}
.cta-bms-archive .cta-btn--primary:hover {
  background: var(--mma-blue-dark);
}

/* Variante BMS (ROUGE) */
.cta-bms-archive .cta-btn--bms {
  background: var(--mma-red);
  border-color: #b11f1f;
}
.cta-bms-archive .cta-btn--bms:hover {
  background: var(--mma-red-dark);
}

/* Focus accessible : bleu par défaut, rouge pour BMS */
.cta-bms-archive .cta-btn:focus {
  box-shadow: 0 0 0 3px rgba(47,128,237,.2);
}
.cta-bms-archive .cta-btn--bms:focus {
  box-shadow: 0 0 0 3px rgba(211,47,47,.2);
}

/* Mobile : empile en colonne */
@media (max-width: 640px) {
  .cta-bms-archive { grid-template-columns: 1fr; }
}

/* Bouton d'abonnement (SMWP) : <button class="bms-cta-pill_link"> */
button.bms-cta-pill_link {
  background: var(--mma-red) !important;
  color: #fff !important;
  border: 1px solid #b11f1f !important;      /* remplace la bordure bleue globale */
  border-radius: 999px !important;
  padding: .45rem .9rem !important;
  font-weight: 700 !important;
  box-shadow: none !important;                /* retire tout résidu de shadow */
}
button.bms-cta-pill_link:hover {
  background: var(--mma-red-dark) !important;
}
button.bms-cta-pill_link:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(211,47,47,.2) !important; /* focus rouge, pas bleu */
}

/* --------------------------------------------------------------------------
   Ads (bloc Adsense dans le contenu)
   -------------------------------------------------------------------------- */
.mma-adsense { margin: 1.25rem 0; text-align: center; }

/* --------------------------------------------------------------------------
 * Mentions d'origine (BMS & Vigilance)
 * -------------------------------------------------------------------------- */
.mm-origin { margin-top: 1em; color: #475569; }
.mm-origin small em { font-style: italic; opacity: 0.9; }

/* --------------------------------------------------------------------------
 * Menu principal : CTA Alertes BMS / Archives / Formation
 * -------------------------------------------------------------------------- */
.main-navigation .menu > li.menu-alertes-bms > a {
  color: var(--mma-red) !important; font-weight: 700;
}
.main-navigation .menu > li.menu-alertes-bms > a:hover {
  color: var(--mma-red-dark) !important;
}
.main-navigation .menu > li.menu-archives > a,
.main-navigation .menu > li.menu-formation > a {
  color: var(--mma-blue) !important; font-weight: 700;
}
.main-navigation .menu > li.menu-archives > a:hover,
.main-navigation .menu > li.menu-formation > a:hover {
  color: var(--mma-blue-dark) !important;
}
