/**
 * Bandeau « ajouté au panier » — visible accueil, boutique, fiche produit.
 */

:root {
  --cg-header-offset: 80px;
}

.cg-global-notices:empty {
  display: none !important;
}

body .cg-global-notices.woocommerce-notices-wrapper:not(:empty) {
  position: fixed;
  top: calc(var(--cg-header-offset, 80px) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(42rem, calc(100vw - 1.5rem));
  max-width: min(42rem, calc(100vw - 1.5rem));
  margin: 0;
  padding: 0;
  pointer-events: none;
}

body .cg-global-notices .woocommerce-message,
body .cg-global-notices .woocommerce-info,
body .cg-global-notices .woocommerce-error {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0;
  padding: 0.9rem 1.15rem;
  border: none;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(74, 71, 66, 0.16);
  font-family: "Inter", sans-serif;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--cg-texte-soft, #4a4742);
  background: #fffefb;
  list-style: none;
}

body .cg-global-notices .woocommerce-message {
  background: #fffefb;
  border-left: 4px solid var(--cg-sage-pastel, #c8e0c4);
}

body .cg-global-notices .woocommerce-info {
  border-left: 4px solid var(--cg-rose-nude, #e8cfcb);
}

body .cg-global-notices .woocommerce-error {
  border-left: 4px solid #eb5757;
  background: #fff8f8;
}

body .cg-global-notices .woocommerce-message::before,
body .cg-global-notices .woocommerce-info::before,
body .cg-global-notices .woocommerce-error::before {
  display: none;
}

body .cg-global-notices .woocommerce-message a.button,
body .cg-global-notices .woocommerce-info a.button,
body .cg-global-notices a.wc-forward {
  margin-left: auto;
  padding: 0.45rem 1.1rem;
  background: linear-gradient(135deg, #c8e0c4 0%, #e8cfcb 100%) !important;
  color: var(--cg-texte-soft, #4a4742) !important;
  border: none !important;
  border-radius: 999px !important;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}

body .cg-global-notices .cg-notice-dismiss {
  margin-left: 0.15rem;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(74, 71, 66, 0.08);
  color: var(--cg-texte-soft, #4a4742);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

body .cg-global-notices .cg-notice-dismiss:hover,
body .cg-global-notices .cg-notice-dismiss:focus-visible {
  background: rgba(74, 71, 66, 0.16);
  outline: none;
}
