/**
 * Concept A — Modale / bottom-sheet / toast variantes grisées (fiche produit)
 * Scope strict : #product pour overrides legacy, .vum-* pour la modale.
 */

/* Neutralisation tooltip texte legacy (product.css) — surlignage hover conservé */
#product .attribute_list li.disabled::after {
  content: "";
  padding: 0;
  box-shadow: none;
}

#product .attribute_list li.disabled:hover::after,
#product .attribute_list li.disabled:focus-visible::after {
  opacity: 0;
  visibility: hidden;
}

/* Modale */
.vum-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.5);
}

.vum-overlay[hidden] {
  display: none !important;
}

.vum-dialog {
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.vum-handle {
  display: none;
}

.vum-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--prozon-black-color);
}

.vum-subtitle {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #555;
}

.vum-changes {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.vum-changes li {
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
  background: #f9f9f9;
  border-radius: 8px;
  color: var(--prozon-black-color);
}

.vum-warning {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: rgba(247, 181, 0, 0.12);
  border: 1px solid var(--prozon-accent-color);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.vum-warning-line {
  margin: 0 0 8px;
}

.vum-warning-encart {
  margin: 0;
  font-weight: 600;
}

.vum-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vum-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 50px;
  font-family: "Russo One", sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
}

.vum-btn--primary {
  background: var(--prozon-accent-color);
  color: #fff;
}

.vum-btn--primary:hover {
  filter: brightness(0.92);
}

.vum-btn--primary:focus-visible {
  outline: 3px solid var(--prozon-black-color);
  outline-offset: 2px;
}

.vum-btn--secondary {
  background: transparent;
  color: var(--prozon-black-color);
  border: 1px solid #ccc;
}

.vum-btn--secondary:focus-visible {
  outline: 2px solid var(--prozon-black-color);
  outline-offset: 2px;
}

/* Bottom-sheet mobile */
@media (max-width: 999px) {
  .vum-overlay--sheet {
    align-items: flex-end;
    padding: 0;
  }

  .vum-overlay--sheet .vum-dialog {
    max-width: none;
    max-height: 85vh;
    border-radius: 16px 16px 0 0;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom));
  }

  .vum-overlay--sheet .vum-handle {
    display: block;
    width: 40px;
    height: 4px;
    margin: 0 auto 16px;
    background: #ccc;
    border-radius: 2px;
  }
}

body.vum-open {
  overflow: hidden;
}

/* Toast — .vum-toast (pas #product) car mobile = append sur body */
.vum-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: #333;
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.vum-toast-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--prozon-accent-color);
  color: var(--prozon-black-color);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}

.vum-toast-text {
  flex: 1;
}

.vum-toast-close {
  flex-shrink: 0;
  padding: 0;
  border: none;
  background: none;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}

@media (max-width: 999px) {
  .vum-toast {
    position: fixed;
    top: calc(var(--prozon-mobile-header-h, 60px) + env(safe-area-inset-top) + 8px);
    left: 12px;
    right: 12px;
    z-index: 10060;
    margin-bottom: 0;
  }
}
