/**
 * Newsletter Popup Promo Pro - Styles front
 * Overlay sombre + dialog responsive (flexbox), épuré et moderne.
 */

.yn-nlpopup-overlay {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 17, 17, 0.62);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.25s ease;
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}

.yn-nlpopup-overlay.is-visible {
  display: flex;
  opacity: 1;
}

body.yn-nlpopup-open {
  overflow: hidden;
}

.yn-nlpopup {
  position: relative;
  display: flex;
  flex-direction: row;
  width: 100%;
  max-width: 760px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
  font-family: inherit;
  color: #1c1c1c;
}

.yn-nlpopup-overlay.is-visible .yn-nlpopup {
  transform: translateY(0) scale(1);
}

.yn-nlpopup__media {
  flex: 0 0 44%;
  max-width: 44%;
  background: #f4f0e9;
}

.yn-nlpopup__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yn-nlpopup__body {
  flex: 1 1 auto;
  padding: 34px 30px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.yn-nlpopup__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease, transform 0.2s ease;
}

.yn-nlpopup__close:hover {
  background: #ffffff;
  transform: rotate(90deg);
}

.yn-nlpopup__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: #1c1c1c;
}

.yn-nlpopup__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #555454;
}

.yn-nlpopup__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.yn-nlpopup__field input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 16px;
  font-size: 15px;
  border: 1px solid #d6d4d4;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.yn-nlpopup__field input[type="email"]:focus {
  border-color: #1c1c1c;
  box-shadow: 0 0 0 3px rgba(28, 28, 28, 0.08);
}

.yn-nlpopup__gdpr {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  line-height: 1.45;
  color: #555454;
  cursor: pointer;
}

.yn-nlpopup__gdpr input[type="checkbox"] {
  margin-top: 2px;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
}

.yn-nlpopup__gdpr a {
  color: #1c1c1c;
  text-decoration: underline;
}

.yn-nlpopup__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: #1c1c1c;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.yn-nlpopup__submit:hover {
  background: #000000;
}

.yn-nlpopup__submit.is-loading {
  opacity: 0.6;
  cursor: wait;
}

.yn-nlpopup__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.yn-nlpopup__message {
  font-size: 14px;
  line-height: 1.45;
  min-height: 0;
}

.yn-nlpopup__message.is-error {
  color: #c0392b;
}

.yn-nlpopup__message.is-success {
  color: #1e7e45;
}

.yn-nlpopup__code {
  margin-top: 8px;
  padding: 10px 14px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  color: #1c1c1c;
  background: #f4f0e9;
  border: 1px dashed #1c1c1c;
  border-radius: 8px;
}

.yn-nlpopup__dismiss {
  align-self: center;
  margin-top: 2px;
  padding: 4px 8px;
  background: none;
  border: 0;
  font-size: 12px;
  color: #9a9a9a;
  text-decoration: underline;
  cursor: pointer;
}

.yn-nlpopup__dismiss:hover {
  color: #555454;
}

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .yn-nlpopup {
    flex-direction: column;
    max-width: 420px;
  }

  .yn-nlpopup__media {
    flex: 0 0 auto;
    max-width: 100%;
    max-height: 180px;
  }

  .yn-nlpopup__media img {
    max-height: 180px;
  }

  .yn-nlpopup__body {
    padding: 26px 22px 22px;
  }

  .yn-nlpopup__title {
    font-size: 21px;
  }
}

@media (max-width: 380px) {
  .yn-nlpopup__body {
    padding: 22px 16px 18px;
  }

  .yn-nlpopup__media {
    max-height: 140px;
  }

  .yn-nlpopup__media img {
    max-height: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yn-nlpopup-overlay,
  .yn-nlpopup,
  .yn-nlpopup__close {
    transition: none;
  }
}
