/* ===================================
   EXIT-INTENT POPUP
   Lead capture popup optimisé mobile
   =================================== */

.exit-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.exit-popup.active {
  display: flex;
}

/* ========== BACKDROP ========== */
.exit-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== MODAL ========== */
.exit-popup__dialog {
  position: relative;
  max-width: 500px;
  width: 100%;
  background: #FFFFFF;
  border-radius: 24px;
  padding: 0;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ========== HEADER ========== */
.exit-popup__header {
  background: linear-gradient(135deg, #B89051 0%, #A67E44 100%);
  padding: 32px 28px 28px;
  text-align: center;
  position: relative;
}

.exit-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.exit-popup__close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.exit-popup__icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  font-size: 3.5rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.exit-popup__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 5vw, 1.875rem);
  font-weight: 800;
  color: #FFFFFF;
  margin: 0 0 8px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.exit-popup__subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  line-height: 1.5;
}

/* ========== BODY ========== */
.exit-popup__body {
  padding: 32px 28px;
}

.exit-popup__text {
  text-align: center;
  color: #4a5568;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 24px;
}

/* ========== FORM ========== */
.exit-popup__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exit-popup__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exit-popup__label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #374151;
}

.exit-popup__input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  color: #111827;
  background: #f9fafb;
  outline: none;
  transition: all 0.3s ease;
  font-family: inherit;
}

.exit-popup__input:focus {
  border-color: #B89051;
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(184, 144, 81, 0.1);
}

.exit-popup__input::placeholder {
  color: #9ca3af;
}

.exit-popup__button {
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(135deg, #B89051 0%, #A67E44 100%);
  color: #FFFFFF;
  font-size: 1.125rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(184, 144, 81, 0.4);
  margin-top: 8px;
}

.exit-popup__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(184, 144, 81, 0.5);
}

.exit-popup__button:active {
  transform: translateY(0);
}

.exit-popup__note {
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
  margin: 12px 0 0;
  font-style: italic;
}

/* ========== URGENCY BADGE ========== */
.exit-popup__urgency {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0 auto 20px;
}

.exit-popup__urgency-icon {
  width: 16px;
  height: 16px;
}

/* ========== RESPONSIVE MOBILE ========== */
@media (max-width: 640px) {
  .exit-popup {
    padding: 16px;
  }

  .exit-popup__dialog {
    max-width: 100%;
    border-radius: 20px;
  }

  .exit-popup__header {
    padding: 28px 20px 24px;
  }

  .exit-popup__icon {
    width: 60px;
    height: 60px;
    font-size: 3rem;
    margin-bottom: 12px;
  }

  .exit-popup__title {
    font-size: 1.5rem;
  }

  .exit-popup__subtitle {
    font-size: 0.9375rem;
  }

  .exit-popup__body {
    padding: 24px 20px;
  }

  .exit-popup__text {
    font-size: 0.9375rem;
    margin-bottom: 20px;
  }

  .exit-popup__input {
    padding: 13px 14px;
  }

  .exit-popup__button {
    padding: 15px 28px;
    font-size: 1.0625rem;
  }
}
