/* BAYANNET — Modal newsletter (consentement 18-07) */

.nl-modal {
  position: fixed; inset: 0;
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .25s cubic-bezier(.4, 0, .2, 1);
  font-family: 'Poppins', system-ui, sans-serif;
}
.nl-modal.show { opacity: 1; }
.nl-modal[hidden] { display: none !important; }

.nl-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 21, 79, .7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nl-modal-content {
  position: relative;
  background: #ffffff;
  color: #0f172a;
  border-radius: 20px;
  padding: 36px 32px 28px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 32px 80px rgba(0, 21, 79, .35);
  transform: translateY(16px) scale(.96);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1);
  text-align: center;
}
.nl-modal.show .nl-modal-content { transform: translateY(0) scale(1); }

.nl-modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border: none; background: #f1f5f9;
  color: #64748b;
  font-size: 22px; line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: all .2s;
}
.nl-modal-close:hover {
  background: #ef4444; color: #ffffff;
  transform: scale(1.08);
}

.nl-modal-icon {
  width: 60px; height: 60px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(0,157,255,.12), rgba(230,167,0,.1));
  color: #009dff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.nl-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #00154F;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.nl-modal-sub {
  font-size: 14px;
  color: #475569;
  margin: 0 0 6px;
  line-height: 1.5;
}
.nl-modal-promise {
  font-size: 11.5px;
  color: #94a3b8;
  margin: 0 0 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nl-modal-form { text-align: left; }

.nl-modal-email {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  transition: all .2s;
  margin-bottom: 14px;
}
.nl-modal-email:focus {
  outline: none;
  background: #ffffff;
  border-color: #009dff;
  box-shadow: 0 0 0 3px rgba(0, 157, 255, .15);
}

.nl-modal-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 20px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #475569;
}
.nl-modal-consent input[type="checkbox"] {
  margin-top: 2px;
  width: 16px; height: 16px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #009dff;
}
.nl-modal-consent-text { flex: 1; }
.nl-modal-consent-text a {
  color: #009dff;
  text-decoration: underline;
  font-weight: 500;
}
.nl-modal-consent-text a:hover { color: #0070cc; }

.nl-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.nl-modal-btn {
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
}
.nl-modal-btn-skip {
  background: transparent;
  color: #64748b;
}
.nl-modal-btn-skip:hover { color: #0f172a; background: #f1f5f9; }

.nl-modal-btn-primary {
  background: linear-gradient(135deg, #009dff, #0070cc);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 157, 255, .3);
}
.nl-modal-btn-primary:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 157, 255, .45);
}
.nl-modal-btn-primary:disabled {
  opacity: .4;
  cursor: not-allowed;
  box-shadow: none;
}

.nl-modal-error {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .25);
  border-radius: 8px;
  color: #dc2626;
  font-size: 12.5px;
  text-align: left;
}
.nl-modal-error[hidden] { display: none; }

/* État succès */
.nl-modal-success {
  padding: 10px 0;
  text-align: center;
}
.nl-modal-success-icon {
  width: 60px; height: 60px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
}
.nl-modal-success h3 {
  font-size: 18px;
  color: #00154F;
  margin: 0 0 8px;
}
.nl-modal-success p {
  font-size: 13.5px;
  color: #475569;
  line-height: 1.5;
}
.nl-modal-success[hidden] { display: none; }

/* RTL */
[dir="rtl"] .nl-modal-content { text-align: center; }
[dir="rtl"] .nl-modal-close { right: auto; left: 12px; }
[dir="rtl"] .nl-modal-actions { justify-content: flex-start; }
[dir="rtl"] .nl-modal-consent { flex-direction: row-reverse; }

/* Responsive */
@media (max-width: 480px) {
  .nl-modal-content { padding: 28px 20px 22px; }
  .nl-modal-title { font-size: 18px; }
  .nl-modal-actions { flex-direction: column-reverse; }
  .nl-modal-btn { width: 100%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .nl-modal, .nl-modal-content { transition: opacity .1s; }
  .nl-modal-content { transform: none !important; }
}
