/* ── Widget NPS — notation pertinence du contenu (1-5 étoiles) ──────── */
.nps-widget {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 1400;
  width: min(320px, calc(100vw - 40px));
  padding: 18px 20px 20px;
  background: #fff;
  border: 1px solid rgba(20, 40, 35, 0.08);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(15, 35, 30, 0.18);
  font-family: var(--font-body, "Outfit", system-ui, sans-serif);
  color: #1c2b27;
  transform: translateY(16px);
  opacity: 0;
  animation: nps-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

@keyframes nps-in {
  to { transform: translateY(0); opacity: 1; }
}

.nps-widget.is-hiding {
  animation: nps-out 0.3s ease forwards;
  pointer-events: none;
}

@keyframes nps-out {
  to { transform: translateY(16px); opacity: 0; }
}

.nps-widget__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: #9aa8a3;
  padding: 4px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nps-widget__close:hover { color: #1c2b27; background: rgba(20, 40, 35, 0.06); }

.nps-widget__question {
  margin: 0 22px 2px 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.nps-widget__subtitle {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: #6b7a75;
}

.nps-widget__stars {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.nps-widget__star {
  border: none;
  background: none;
  padding: 2px;
  cursor: pointer;
  line-height: 0;
  border-radius: 8px;
  transition: transform 0.15s ease;
}
.nps-widget__star svg {
  width: 34px;
  height: 34px;
  fill: #e2e8e5;
  stroke: #cdd8d3;
  stroke-width: 0.5;
  transition: fill 0.18s ease, transform 0.18s ease;
}
.nps-widget__star:hover { transform: scale(1.12); }
.nps-widget__star:focus-visible { outline: 2px solid var(--gold, #c79a3a); outline-offset: 2px; }

/* Survol et sélection : étoiles dorées */
.nps-widget__star.is-on svg {
  fill: #f5b301;
  stroke: #e0a000;
}
.nps-widget__star.is-on { animation: nps-pop 0.32s ease; }

@keyframes nps-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

.nps-widget__followup {
  margin-top: 12px;
  animation: nps-in 0.3s ease forwards;
}

.nps-widget__comment {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(20, 40, 35, 0.14);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 0.88rem;
  font-family: inherit;
  resize: vertical;
  color: #1c2b27;
  margin-bottom: 10px;
}
.nps-widget__comment:focus {
  outline: none;
  border-color: var(--gold, #c79a3a);
  box-shadow: 0 0 0 3px rgba(199, 154, 58, 0.16);
}

.nps-widget__submit {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #1f7a5f, #14624b);
  cursor: pointer;
  transition: filter 0.2s, transform 0.1s;
}
.nps-widget__submit:hover { filter: brightness(1.08); }
.nps-widget__submit:active { transform: translateY(1px); }
.nps-widget__submit[disabled] { opacity: 0.6; cursor: default; }

.nps-widget__thanks {
  margin: 6px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f7a5f;
}

.nps-widget__error {
  margin: 8px 0 0;
  font-size: 0.85rem;
  color: #c0392b;
}

@media (max-width: 600px) {
  .nps-widget {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nps-widget,
  .nps-widget__followup { animation: none; opacity: 1; transform: none; }
  .nps-widget__star.is-on { animation: none; }
}
