/* MEVO — surcouche visuelle candidate, 23 octobre 2026.
 * À charger uniquement pour panier/commande/confirmation avec body.mevo-commerce.
 * Conserve les composants, dimensions internes et événements des prestataires.
 * État natif de production et recette responsive à vérifier avant publication.
 */
/* Duplicate the scope class only on roots: the late historical body:is(...)
 * rules have one class of specificity and !important backgrounds. */
body.mevo-commerce #mevo-consent-panel [data-open] { color: #172018; }
body.mevo-commerce.mevo-commerce {
  --mc-ink: #101611;
  --mc-surface: #1d2820;
  --mc-signal: #9fcc4f;
  --mc-paper: #f3ebdc;
  --mc-field: #fffcf2;
  --mc-muted: #59614f;
  --mc-line: #bcc5ac;
  --mc-error: #8f2424;
  --mc-font: Arial, Helvetica, sans-serif;
  background: var(--mc-ink) !important;
  color: var(--mc-paper);
  font: 16px/1.6 var(--mc-font);
  margin: 0;
}
body.mevo-commerce.mevo-commerce #wrap,
body.mevo-commerce.mevo-commerce #main {
  background: var(--mc-ink) !important;
  color: var(--mc-paper);
}
body.mevo-commerce:not(.page-id-16) #main #content-wrap {
  width: calc(100% - 48px) !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
  padding-top: 0;
  padding-bottom: 48px;
}
body.mevo-commerce :is(h1,h2,h3,h4,h5,h6) {
  font-family: var(--mc-font);
  text-transform: none;
  letter-spacing: -.025em;
}
body.mevo-commerce :is(a,button,input,select,textarea,summary):focus-visible {
  outline: 3px solid #2d5e1d !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px var(--mc-paper);
}
body.mevo-commerce .mevo-journey-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid #4b5b40;
}
body.mevo-commerce > .mevo-journey-header,
body.mevo-commerce .mevo-confirmation-main {
  box-sizing: border-box;
  width: calc(100% - 48px);
  max-width: 1180px;
  margin-inline: auto;
}
body.mevo-commerce .mevo-confirmation-main { padding-bottom: 48px; }
body.mevo-commerce .mevo-journey-brand {
  color: var(--mc-paper) !important;
  font: 900 46px/.95 "Arial Black", "Trebuchet MS", Arial, sans-serif;
  letter-spacing: -3px;
}
body.mevo-commerce .mevo-journey-header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 22px;
  font-size: 14px;
}
body.mevo-commerce .mevo-journey-header a:not(.mevo-cart-link),
body.mevo-commerce .mevo-journey-footer a {
  color: var(--mc-paper);
  text-underline-offset: 4px;
}
body.mevo-commerce .mevo-journey-header nav > a:not(.mevo-cart-link) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
body.mevo-commerce .mevo-journey-intro {
  max-width: 800px;
  padding: 0 0 28px;
}
/* Only the checkout introduction is obsolete on the native order receipt.
 * The confirmation view and every native gateway callback remain untouched. */
body.mevo-commerce.mevo-native-receipt .mevo-journey-intro { display: none; }
body.mevo-commerce .mevo-journey-intro h1 {
  color: var(--mc-paper);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  margin-bottom: 16px;
}
body.mevo-commerce .mevo-journey-intro p {
  color: #d4ddc9;
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}
body.mevo-commerce .mevo-journey-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  border-top: 1px solid #4b5b40;
  margin-top: 42px;
  padding-top: 24px;
  font-size: 13px;
}
body.mevo-commerce .mevo-journey-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Les cartes sont claires, comme les fiches/formules de l'accueil. Les champs
 * natifs et les iframes Stripe/PayPal restent ainsi dans un contexte lisible. */
body.mevo-commerce :is(.wc-block-cart, .wc-block-checkout, .wp-block-woocommerce-empty-cart-block, .mevo-confirmation) {
  color: var(--mc-ink) !important;
  font-family: var(--mc-font);
  min-width: 0;
}
body.mevo-commerce .wc-block-components-main,
body.mevo-commerce .wc-block-components-sidebar,
body.mevo-commerce .wp-block-woocommerce-empty-cart-block,
body.mevo-commerce .mevo-confirmation {
  background: var(--mc-paper);
  border: 1px solid #b8c59c;
  border-radius: 12px;
  padding: clamp(18px, 2.4vw, 30px);
  min-width: 0;
}
body.mevo-commerce :is(.wc-block-cart,.wc-block-checkout,.wp-block-woocommerce-empty-cart-block) :is(h2,h3,h4,p,label),
body.mevo-commerce :is(.wc-block-components-title,.wc-block-components-checkout-step__title,.wc-block-components-product-name) {
  color: var(--mc-ink) !important;
}
body.mevo-commerce .wc-block-components-checkout-step__title {
  font-size: 21px !important;
  font-weight: 700 !important;
  line-height: 1.3;
}
body.mevo-commerce :is(.wc-block-cart,.wc-block-checkout,.wp-block-woocommerce-empty-cart-block,.mevo-confirmation) a {
  color: #2d5e1d;
  text-underline-offset: 4px;
}
body.mevo-commerce :is(.wc-block-components-product-price,.wc-block-formatted-money-amount) {
  color: var(--mc-ink) !important;
}
body.mevo-commerce :is(.wc-block-components-product-metadata,.wc-block-components-order-summary-item__description,.wc-block-components-address-card__address) {
  color: var(--mc-muted) !important;
}
body.mevo-commerce .wc-block-components-text-input input,
body.mevo-commerce .wc-blocks-components-select__select,
body.mevo-commerce .wc-block-components-textarea {
  background: var(--mc-field) !important;
  color: var(--mc-ink) !important;
  border-color: #788667 !important;
  border-radius: 6px;
  min-height: 52px;
  font-size: 16px;
}
body.mevo-commerce .wc-block-components-text-input label,
body.mevo-commerce .wc-blocks-components-select__label,
body.mevo-commerce .wc-block-components-combobox label {
  color: var(--mc-muted) !important;
}
body.mevo-commerce :is(.wc-block-components-order-summary,.wc-block-components-totals-wrapper,.wc-block-components-order-summary__button-text) {
  background: transparent;
  color: var(--mc-ink) !important;
  border-color: var(--mc-line) !important;
}
body.mevo-commerce :is(.wc-block-components-radio-control__option,.wc-block-components-radio-control-accordion-content,.wc-block-components-address-card) {
  background: var(--mc-field);
  color: var(--mc-ink) !important;
  border-color: var(--mc-line) !important;
}
body.mevo-commerce .wc-block-components-radio-control__label {
  color: var(--mc-ink) !important;
  font-weight: 700;
}
body.mevo-commerce .wc-block-components-checkbox__input {
  accent-color: #2d5e1d;
}
body.mevo-commerce :is(.wc-block-components-validation-error,.wc-block-components-text-input.has-error label) {
  color: var(--mc-error) !important;
}
body.mevo-commerce .wc-block-components-text-input.has-error input {
  border-color: var(--mc-error) !important;
}
body.mevo-commerce .wc-block-components-notice-banner.is-error {
  background: #fff0eb;
  color: #651d1d;
  border: 1px solid #b85446;
  border-radius: 6px;
}
body.mevo-commerce .wc-block-components-notice-banner:is(.is-info,.is-success) {
  background: #e1e8cf;
  color: var(--mc-ink);
  border: 1px solid #82986a;
  border-radius: 6px;
}
/* Cibles précises : aucun sélecteur global pour les boutons prestataires. */
body.mevo-commerce.mevo-commerce .wc-block-cart .wc-block-cart__submit-button,
body.mevo-commerce.mevo-commerce .wc-block-checkout .wc-block-components-checkout-place-order-button,
body.mevo-commerce.mevo-commerce .mevo-confirmation-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 15px 22px;
  background: var(--mc-signal) !important;
  border: 2px solid var(--mc-ink) !important;
  color: var(--mc-ink) !important;
  border-radius: 6px;
  font: 700 16px/1.4 var(--mc-font);
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}
body.mevo-commerce .wc-block-cart__submit-button .wc-block-components-button__text,
body.mevo-commerce .wc-block-components-checkout-place-order-button .wc-block-components-button__text {
  color: var(--mc-ink) !important;
}
body.mevo-commerce :is(.wc-block-cart__submit-button,.wc-block-components-checkout-place-order-button):is(:disabled,[aria-disabled="true"]) {
  opacity: .55;
  cursor: not-allowed;
}
body.mevo-commerce .wc-block-cart-item__remove-link,
body.mevo-commerce .wc-block-components-checkout-return-to-cart-button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #2d5e1d !important;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
body.mevo-commerce .mevo-edit-cart {
  margin: 0 0 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--mc-line);
}
body.mevo-commerce .mevo-edit-cart a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 700;
}
body.mevo-commerce .mevo-edit-cart small {
  display: block;
  color: var(--mc-muted);
  font-size: 13px;
  line-height: 1.5;
}
body.mevo-commerce .mevo-cart-continue {
  margin-top: 24px;
  color: #d4ddc9;
}
body.mevo-commerce .mevo-cart-continue a { color: var(--mc-signal); }
body.mevo-commerce .mevo-confirmation :is(h1,h2,h3) { color: var(--mc-ink); }
body.mevo-commerce .mevo-confirmation,
body.mevo-commerce .mevo-confirmation * { box-sizing: border-box; }
body.mevo-commerce .mevo-confirmation h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  font-weight: 800;
}
body.mevo-commerce .mevo-confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-block: 26px;
}
body.mevo-commerce .mevo-confirmation-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid #62734f;
  border-radius: 6px;
  color: #2d5e1d;
  font-weight: 700;
  text-decoration: none;
}
body.mevo-commerce .mevo-confirmation :is(table,th,td) { border-color: var(--mc-line); }
body.mevo-commerce .mevo-confirmation table { width: 100%; border-collapse: collapse; }
body.mevo-commerce .mevo-confirmation :is(th,td) { padding: 12px; text-align: left; }
body.mevo-commerce .mevo-confirmation th { font-weight: 700; }
body.mevo-commerce .mevo-confirmation__header > p { margin-block: 16px 0; }
body.mevo-commerce .mevo-confirmation__eyebrow { color: #2d5e1d; font-size: 12px; font-weight: 700; letter-spacing: .04em; }
body.mevo-commerce .mevo-confirmation__summary,
body.mevo-commerce .mevo-confirmation__next { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--mc-line); }
body.mevo-commerce .mevo-confirmation :is(h2,h3) { font-size: 22px; line-height: 1.3; font-weight: 700; margin-bottom: 16px; }
body.mevo-commerce .mevo-confirmation__items { list-style: none; padding: 0; margin: 0; }
body.mevo-commerce .mevo-confirmation__items li,
body.mevo-commerce .mevo-confirmation__totals > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding-block: 12px; align-items: start; }
body.mevo-commerce .mevo-confirmation__items li + li { border-top: 1px solid var(--mc-line); }
body.mevo-commerce .mevo-confirmation__items li > span { min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
body.mevo-commerce .mevo-confirmation__items small { display: block; margin-top: 4px; font-size: 13px; font-weight: 400; color: var(--mc-muted); }
body.mevo-commerce .mevo-confirmation__items strong,
body.mevo-commerce .mevo-confirmation__totals dd { white-space: nowrap; text-align: right; margin: 0; }
body.mevo-commerce .mevo-confirmation__totals { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--mc-line); }
body.mevo-commerce .mevo-confirmation__totals dt { font-weight: 400; }
body.mevo-commerce .mevo-confirmation__totals .mevo-confirmation__total { font-size: 20px; font-weight: 700; }
body.mevo-commerce .mevo-confirmation__total dt { font-weight: 700; }
body.mevo-commerce .mevo-confirmation__coaching { padding: 20px; border: 1px solid #9aaa81; background: #d5ddc5; border-radius: 8px; }
body.mevo-commerce .mevo-confirmation__account { margin: 26px 0 0; }
body.mevo-commerce :is(.mevo-native-order-details,.mevo-native-receipt-notice) {
  box-sizing: border-box;
  min-width: 0;
  margin-block: 24px;
  padding: clamp(18px,2.4vw,30px);
  background: var(--mc-paper);
  color: var(--mc-ink);
  border: 1px solid #b8c59c;
  border-radius: 12px;
}
body.mevo-commerce .mevo-native-order-details > summary {
  cursor: pointer;
  min-height: 44px;
  color: var(--mc-ink);
  font-weight: 700;
}
body.mevo-commerce .mevo-native-order-details[open] > summary { margin-bottom: 18px; }
body.mevo-commerce .mevo-native-receipt-notice:empty { display: none; }

/* Composant indépendant : utilisable dans le header accueil sans retoucher
 * les sections existantes. Le compteur n'est rendu qu'avec une donnée fiable. */
.mevo-cart-link,
.mevo-fl .mevo-cart-link,
body.mevo-commerce .mevo-cart-link {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 15px;
  background: #9fcc4f !important;
  color: #101611 !important;
  border: 1px solid #9fcc4f;
  border-radius: 5px;
  font: 700 14px/1.4 Arial, Helvetica, sans-serif;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
}
.mevo-cart-link svg { width: 21px; height: 21px; flex-shrink: 0; }
.mevo-cart-link:hover { background: #b0dc63 !important; }
.mevo-cart-count {
  display: inline-flex;
  min-width: 22px;
  min-height: 22px;
  padding: 1px 5px;
  align-items: center;
  justify-content: center;
  background: #101611;
  color: #f3ebdc;
  border-radius: 50%;
  font-size: 12px;
}
.mevo-cart-count[hidden] { display: none; }
.mevo-fl[data-mevo-fl] .fl-header { column-gap: 24px; }
.mevo-fl .fl-header > .fl-brand { order: 0; }
.mevo-fl .fl-header > .fl-nav { order: 2; }
.mevo-fl .fl-header > .mevo-cart-link { order: 1; }
.mevo-fl .fl-header > .fl-menu-toggle { order: 3; }
body.mevo-commerce .mevo-journey-header > .mevo-journey-brand { order: 0; }
body.mevo-commerce .mevo-journey-header > nav { order: 2; margin-left: auto; }
body.mevo-commerce .mevo-journey-header > .mevo-cart-link { order: 1; }
@media (min-width: 701px) and (max-width: 1050px) {
  .mevo-fl[data-mevo-fl] .fl-header { flex-wrap: wrap; padding-block: 22px; gap: 18px 24px; }
  .mevo-fl .fl-header > .fl-brand { margin-right: auto; }
  .mevo-fl .fl-header > .mevo-cart-link { order: 1; }
  .mevo-fl .fl-header > .fl-nav { order: 2; flex-basis: 100%; justify-content: flex-end; }
}
@media (max-width: 700px) {
  .mevo-fl[data-mevo-fl] .fl-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding-block: 20px;
  }
  .mevo-fl .fl-header > .fl-brand { grid-column: 1; grid-row: 1; }
  .mevo-fl .fl-header > .mevo-cart-link { grid-column: 2; grid-row: 1; }
  .mevo-fl .fl-header > .fl-menu-toggle { grid-column: 1/-1; grid-row: 2; justify-content: center; }
  .mevo-fl .fl-header > .fl-nav { top: 100%; }
  body.mevo-commerce:not(.page-id-16) #main #content-wrap {
    width: calc(100% - 32px) !important;
    padding-bottom: 32px;
  }
  body.mevo-commerce > .mevo-journey-header,
  body.mevo-commerce .mevo-confirmation-main { width: calc(100% - 32px); }
  body.mevo-commerce .mevo-confirmation-main { padding-bottom: 32px; }
  body.mevo-commerce .mevo-journey-header { flex-wrap: wrap; gap: 16px; padding-block: 22px; }
  body.mevo-commerce .mevo-journey-header nav { flex: 1 1 100%; justify-content: flex-start; gap: 6px 16px; }
  body.mevo-commerce .mevo-journey-header > .mevo-cart-link { order: 1; margin-left: auto; }
  body.mevo-commerce .mevo-journey-header > nav { order: 2; margin-left: 0; }
  body.mevo-commerce .mevo-journey-header nav .mevo-cart-link { margin-left: auto; }
  body.mevo-commerce .mevo-journey-intro { padding-bottom: 24px; }
  body.mevo-commerce .wc-block-components-main,
  body.mevo-commerce .wc-block-components-sidebar { padding: 18px 16px; }
  body.mevo-commerce .wc-block-components-checkout-step { padding-left: 0 !important; }
  body.mevo-commerce .wc-block-components-checkout-step__container { margin-left: 0 !important; }
  body.mevo-commerce .mevo-confirmation-actions { align-items: stretch; flex-direction: column; }
  body.mevo-commerce .mevo-confirmation-actions a { width: 100%; }
  body.mevo-commerce .mevo-confirmation :is(th,td) { padding: 10px 6px; font-size: 14px; overflow-wrap: anywhere; }
}
@media (max-width: 380px) {
  body.mevo-commerce .mevo-journey-header nav .mevo-cart-link { margin-left: 0; flex-basis: 100%; }
  /* Explicit ends prevent the native product span from creating implicit columns. */
  body.mevo-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 10px;
  }
  body.mevo-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row > .wc-block-cart-item__image {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    padding-right: 0;
    min-width: 0;
  }
  body.mevo-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row > .wc-block-cart-item__product {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  body.mevo-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row > .wc-block-cart-item__total {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    min-width: 0;
    padding: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    text-align: left;
  }
  body.mevo-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row > .wc-block-cart-item__total::before { content: 'Total'; }
  body.mevo-commerce .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity { flex-wrap: wrap; padding-right: 0; }
}
