/* ============================================================
   Notices & Toasts — global (toutes les pages WooCommerce)
   ============================================================ */

/* -------------------------
   Suppression totale des notices natives WooCommerce
   ------------------------- */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.woocommerce-notice,
ul.woocommerce-error,
.wc-block-components-notice-banner,
.wc-block-store-notices,
.woocommerce-store-notice,
.woocommerce [role="alert"]:not(.cl-notice):not(.cl-toast),
.woocommerce-notices-wrapper > *:not(.cl-notice) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* -------------------------
   Notices inline personnalisées
   ------------------------- */
.cl-notice {
  display: flex !important;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.1rem;
  border-radius: .625rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: .75rem;
  animation: cl-notice-in .25s ease;
  list-style: none;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
}

@keyframes cl-notice-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cl-notice-success {
  background: #ECFDF5;
  border: 1px solid #6EE7B7 !important;
  color: #065F46;
}
.cl-notice-error {
  background: #FEF2F2;
  border: 1px solid #FECACA !important;
  color: #991B1B;
}
.cl-notice-info {
  background: rgb(235, 242, 230);
  border: 1px solid #C5D9BC !important;
  color: #2E4D1E;
}

.cl-notice-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.cl-notice-icon svg { width: 18px; height: 18px; }

.cl-notice-text { flex: 1; line-height: 1.4; }
.cl-notice-text a { color: inherit !important; font-weight: 700; text-decoration: underline; }

.cl-notice-close {
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  padding: 2px !important;
  display: flex !important;
  align-items: center !important;
  opacity: .55 !important;
  color: inherit !important;
  flex-shrink: 0;
  box-shadow: none !important;
  line-height: 1 !important;
  transition: opacity .15s !important;
}
.cl-notice-close:hover { opacity: 1 !important; }

/* -------------------------
   Toasts flottants (coin bas-droit)
   ------------------------- */
#cl-toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  pointer-events: none;
  max-width: 340px;
  width: calc(100% - 3rem);
}

.cl-toast {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.1rem;
  border-radius: .75rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: .88rem;
  font-weight: 500;
  pointer-events: all;
  box-shadow: 0 4px 24px rgba(0,0,0,.13), 0 1px 4px rgba(0,0,0,.06);
  animation: cl-toast-in .32s cubic-bezier(.34,1.56,.64,1);
  line-height: 1.4;
}

.cl-toast.cl-toast-out {
  animation: cl-toast-out .22s ease forwards;
}

@keyframes cl-toast-in {
  from { opacity: 0; transform: translateX(24px) scale(.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes cl-toast-out {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(24px) scale(.95); }
}

.cl-toast-success { background: #ECFDF5; border: 1px solid #6EE7B7; color: #065F46; }
.cl-toast-error   { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.cl-toast-info    { background: rgb(235, 242, 230); border: 1px solid #C5D9BC; color: #2E4D1E; }

.cl-toast-icon { flex-shrink: 0; width: 18px; height: 18px; display: flex; align-items: center; }
.cl-toast-icon svg { width: 18px; height: 18px; }
.cl-toast-msg { flex: 1; }
.cl-toast-msg a { color: inherit !important; font-weight: 700; text-decoration: underline; }

@media (max-width: 480px) {
  #cl-toast-container { bottom: 1rem; right: 1rem; left: 1rem; max-width: none; width: auto; }
}
