/*
 * Soda Palette Composer — Notifications WooCommerce
 * v1.0.1 — Design des notices erreur / succès / info, cohérent avec le
 * reste du site (Sweet & Soda). Classes standard WooCommerce
 * (.woocommerce-error / .woocommerce-message / .woocommerce-info) :
 * s'applique partout où WooCommerce les affiche (panier, paiement,
 * Mon compte...), pas seulement sur les pages du compte.
 *
 * Icône en position absolue plutôt qu'en grille CSS : le contenu de ces
 * notices varie (simple texte, liste à puces, lien, bouton "Voir le
 * panier"...) et une grille avec placement automatique le replaçait de
 * façon imprévisible. Ici, le contenu suit un flux normal, quel qu'il
 * soit, dans une boîte dont le padding réserve juste la place de l'icône.
 */

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
  box-sizing: border-box;
  position: relative;
  display: block !important;
  width: min(720px, calc(100% - 32px));
  margin: 0 auto 20px !important;
  padding: 14px 18px 14px 46px !important;
  border: 1px solid transparent !important;
  border-radius: 12px;
  list-style: none !important;
  font-family: "Archivo", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

.woocommerce-error::before,
.woocommerce-message::before,
.woocommerce-info::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 18px;
  width: 22px;
  height: 22px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.woocommerce-error li {
  margin: 0 0 4px !important;
  padding: 0 !important;
  list-style: none !important;
}

.woocommerce-error li:last-child { margin-bottom: 0 !important; }

.woocommerce-error a,
.woocommerce-message a,
.woocommerce-info a {
  font-weight: 700;
  text-decoration: underline;
}

/* Bouton d'action éventuel (ex. "Voir le panier" à côté du message) —
 * WooCommerce l'ajoute parfois en <a class="button wc-forward">. */
.woocommerce-message a.button,
.woocommerce-info a.button {
  display: inline-block;
  width: auto;
  margin: 8px 0 0;
  padding: 7px 16px;
  border-radius: 999px;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

/* ---------------- Erreur ---------------- */

.woocommerce-error {
  background: #fdecec !important;
  border-color: #f5c6c6 !important;
  color: #7a1414 !important;
}

.woocommerce-error::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23e50914' stroke-width='1.7'/%3E%3Cpath d='M12 7.5v6' fill='none' stroke='%23e50914' stroke-width='1.9' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='16.3' r='1.05' fill='%23e50914'/%3E%3C/svg%3E");
}

/* ---------------- Succès ---------------- */

.woocommerce-message {
  background: #eaf7ee !important;
  border-color: #bfe3ca !important;
  color: #14532d !important;
}

.woocommerce-message::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%231a7f43' stroke-width='1.7'/%3E%3Cpath d='m8 12.5 2.5 2.5 5.5-6.5' fill='none' stroke='%231a7f43' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.woocommerce-message a.button {
  background: #1a7f43;
  color: #fff !important;
}

.woocommerce-message a.button:hover { background: #156636; }

/* ---------------- Info ---------------- */

.woocommerce-info {
  background: #eef7ff !important;
  border-color: #cfe6fb !important;
  color: #0d3f66 !important;
}

.woocommerce-info::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23147bea' stroke-width='1.7'/%3E%3Ccircle cx='12' cy='8.3' r='1.05' fill='%23147bea'/%3E%3Cpath d='M12 11.5v5' fill='none' stroke='%23147bea' stroke-width='1.9' stroke-linecap='round'/%3E%3C/svg%3E");
}

.woocommerce-info a.button {
  background: #147bea;
  color: #fff !important;
}

.woocommerce-info a.button:hover { background: #0d5fc0; }

@media (max-width: 600px) {
  .woocommerce-error,
  .woocommerce-message,
  .woocommerce-info {
    padding: 12px 14px 12px 42px !important;
    font-size: 13px;
  }

  .woocommerce-error::before,
  .woocommerce-message::before,
  .woocommerce-info::before {
    top: 12px;
    left: 14px;
  }
}
