/* ========================================
   LLOFER POPUP - DESIGN PREMIUM
   ======================================== */

/* Reset & Base */
.llofer-popup * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Container principal */
.llofer-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

/* Overlay avec blur */
.llofer-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  animation: overlayFadeIn 0.3s ease;
}

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

/* Container de la popup */
.llofer-popup__container {
  position: relative;
  display: flex;
  background: white;
  max-width: 900px;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 
    0 50px 100px rgba(0, 0, 0, 0.25),
    0 20px 40px rgba(0, 0, 0, 0.15);
  animation: popupSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

@keyframes popupSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Bouton fermeture */
.llofer-popup__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #333;
}

.llofer-popup__close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

/* ========================================
   PARTIE VISUELLE (GAUCHE)
   ======================================== */

.llofer-popup__visual {
  position: relative;
  flex: 0 0 380px;
  background: linear-gradient(135deg, #ff6a00 0%, #ff8533 100%);
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.llofer-popup__visual-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
}

.llofer-popup__visual-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(255, 255, 255, 0.03) 35px, rgba(255, 255, 255, 0.03) 70px);
}

.llofer-popup__visual-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.llofer-popup__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 8px 20px;
  border-radius: 50px;
  margin-bottom: 30px;
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.llofer-popup__badge-text {
  color: white;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.llofer-popup__discount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 20px;
  animation: discountBounce 1s ease 0.3s;
}

@keyframes discountBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.llofer-popup__discount-currency {
  font-size: 96px;
  font-weight: 900;
  color: white;
  line-height: 1;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.llofer-popup__discount-symbol {
  font-size: 48px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin-left: 4px;
}

.llofer-popup__visual-text {
  color: white;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  max-width: 280px;
}

/* ========================================
   PARTIE CONTENU (DROITE)
   ======================================== */

.llofer-popup__content {
  flex: 1;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.llofer-popup__header {
  margin-bottom: 32px;
}

.llofer-popup__title {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 12px;
  line-height: 1.2;
}

.llofer-popup__subtitle {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
}

.llofer-popup__subtitle strong {
  color: #ff6a00;
  font-weight: 700;
}

/* ========================================
   FORMULAIRE
   ======================================== */

.llofer-popup__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.llofer-popup__input-group {
  position: relative;
}

.llofer-popup__input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  pointer-events: none;
  transition: color 0.3s ease;
}

.llofer-popup__input-group:focus-within .llofer-popup__input-icon {
  color: #ff6a00;
}

.llofer-popup__input-group input {
  width: 100%;
  padding: 16px 18px 16px 52px;
  font-size: 15px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
  transition: all 0.3s ease;
  font-family: inherit;
}

.llofer-popup__input-group input:focus {
  outline: none;
  border-color: #ff6a00;
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.1);
}

.llofer-popup__input-group input::placeholder {
  color: #aaa;
}

.llofer-popup__submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  font-size: 15px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #ff6a00 0%, #ff8533 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.llofer-popup__submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.llofer-popup__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255, 106, 0, 0.4);
}

.llofer-popup__submit:hover::before {
  opacity: 1;
}

.llofer-popup__submit:active {
  transform: translateY(0);
}

.llofer-popup__submit-arrow {
  transition: transform 0.3s ease;
}

.llofer-popup__submit:hover .llofer-popup__submit-arrow {
  transform: translateX(4px);
}

/* ========================================
   MESSAGE DE SUCCÈS
   ======================================== */

.llofer-popup__success {
  display: none;
  text-align: center;
  animation: successFadeIn 0.5s ease;
}

.llofer-popup__success.active {
  display: block;
}

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

.llofer-popup__success-icon {
  margin-bottom: 20px;
  animation: successIconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successIconPop {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.llofer-popup__success-title {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.llofer-popup__success-message {
  font-size: 15px;
  color: #666;
  margin-bottom: 28px;
}

/* Code promo */
.llofer-popup__coupon {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
}

.llofer-popup__coupon-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.llofer-popup__coupon-code {
  font-size: 32px;
  font-weight: 900;
  color: #ff6a00;
  letter-spacing: 4px;
  margin-bottom: 16px;
  font-family: 'Courier New', monospace;
  animation: couponGlow 2s ease-in-out infinite;
}

@keyframes couponGlow {
  0%, 100% { text-shadow: 0 0 10px rgba(255, 106, 0, 0.3); }
  50% { text-shadow: 0 0 20px rgba(255, 106, 0, 0.5); }
}

.llofer-popup__coupon-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.llofer-popup__coupon-copy:hover {
  color: #ff6a00;
  border-color: #ff6a00;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.llofer-popup__coupon-copy.copied {
  color: #10b981;
  border-color: #10b981;
}

.llofer-popup__success-note {
  font-size: 13px;
  color: #999;
}

/* ========================================
   TRUST BADGES
   ======================================== */

.llofer-popup__trust {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid #f0f0f0;
}

.llofer-popup__trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
  .llofer-popup__container {
    flex-direction: column;
    max-width: 500px;
  }

  .llofer-popup__visual {
    flex: 0 0 auto;
    padding: 40px 30px;
  }

  .llofer-popup__discount-currency {
    font-size: 72px;
  }

  .llofer-popup__discount-symbol {
    font-size: 36px;
  }

  .llofer-popup__visual-text {
    font-size: 16px;
  }

  .llofer-popup__content {
    padding: 40px 30px;
  }

  .llofer-popup__title {
    font-size: 24px;
  }

  .llofer-popup__trust {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .llofer-popup {
    padding: 10px;
  }

  .llofer-popup__container {
    border-radius: 16px;
  }

  .llofer-popup__visual {
    padding: 30px 20px;
  }

  .llofer-popup__content {
    padding: 30px 20px;
  }

  .llofer-popup__title {
    font-size: 22px;
  }

  .llofer-popup__coupon-code {
    font-size: 24px;
    letter-spacing: 2px;
  }
}

/* ========================================
   ÉTATS DE CHARGEMENT
   ======================================== */

.llofer-popup__submit.loading {
  pointer-events: none;
  opacity: 0.7;
}

.llofer-popup__submit.loading .llofer-popup__submit-text {
  opacity: 0.5;
}

.llofer-popup__submit.loading .llofer-popup__submit-arrow {
  animation: arrowLoading 1s linear infinite;
}

@keyframes arrowLoading {
  0% { transform: translateX(-10px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateX(10px); opacity: 0; }
}


/* ========================================
   FLOATING TRIGGER BUTTON
   ======================================== */

.llofer-trigger {
  position: fixed;
  right: 15px;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  transform-origin: right center;
  z-index: 9998;

  background: linear-gradient(135deg, #ff6a00, #ff8533);
  color: white;
  border: none;
  padding: 12px 20px;

  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;

  border-radius: 10px 10px 0 0;
  cursor: pointer;

  box-shadow: 0 10px 30px rgba(255,106,0,0.4);

  transition: all 0.3s ease;
}

.llofer-trigger:hover {
  transform: translateY(-50%) rotate(-90deg) translateY(-5px);
  box-shadow: 0 15px 40px rgba(255,106,0,0.5);
}

.llofer-trigger.hidden {
  opacity: 0;
  pointer-events: none;
}