/* ============================================
   POP-UP ÉVÉNEMENT — EYE Africa
   Glassmorphism · Responsive · Accessible
   ============================================ */

/* --- Overlay --- */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 25, 35, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 1rem;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Lock body scroll */
body.popup-open {
  overflow: hidden;
}

/* --- Container --- */
.popup-container {
  position: relative;
  display: flex;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transform: scale(0.88) translateY(30px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.popup-overlay.active .popup-container {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* --- Close button (X) --- */
.popup-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.25s ease;
  line-height: 1;
}

.popup-close-btn:hover {
  background: rgba(243, 146, 55, 0.55);
  transform: rotate(90deg);
}

/* --- Left: Image panel --- */
.popup-image {
  flex: 0 0 46%;
  position: relative;
  overflow: hidden;
  background: #0a2e3d;
}

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

/* subtle gradient overlay on the image for blending */
.popup-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(17, 75, 95, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

/* --- Right: Content panel --- */
.popup-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 2rem;
  color: #fff;
  position: relative;
  background: linear-gradient(160deg, rgba(17, 75, 95, 0.85) 0%, rgba(10, 40, 58, 0.92) 100%);
}

/* Badge */
.popup-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(243, 146, 55, 0.2);
  border: 1px solid rgba(243, 146, 55, 0.45);
  color: #F39237;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  padding: 5px 14px;
  border-radius: 50px;
  width: fit-content;
  margin-bottom: 1rem;
}

.popup-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #F39237;
  animation: badgePulse 1.8s ease-in-out infinite;
}

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

/* Title */
.popup-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.6rem;
  color: #fff;
}

.popup-title span {
  color: #F39237;
}

/* Description */
.popup-description {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 0.5rem;
}

/* Info list */
.popup-info {
  list-style: none;
  padding: 0;
  margin: 0 0 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popup-info li {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  gap: 8px;
}

.popup-info li svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: #F39237;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* CTA Buttons */
.popup-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.popup-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  background: linear-gradient(135deg, #F39237 0%, #e67e22 100%);
  color: #fff;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 6px 24px rgba(243, 146, 55, 0.35);
  text-align: center;
}

.popup-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(243, 146, 55, 0.5);
}

.popup-cta-primary svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  flex-shrink: 0;
}

.popup-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
  text-align: center;
}

.popup-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Dismiss link */
.popup-dismiss {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
  background: none;
  border: none;
}

.popup-dismiss:hover {
  color: rgba(255, 255, 255, 0.75);
}

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

/* Tablet */
@media (max-width: 768px) {
  .popup-container {
    flex-direction: column;
    max-height: 92vh;
    max-width: 420px;
  }

  .popup-image {
    flex: 0 0 auto;
    height: 200px;
  }

  .popup-content {
    padding: 1.5rem 1.4rem;
  }

  .popup-title {
    font-size: 1.3rem;
  }

  .popup-description {
    font-size: 0.82rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .popup-overlay {
    padding: 0.5rem;
  }

  .popup-container {
    max-width: 100%;
    border-radius: 16px;
  }

  .popup-image {
    height: 160px;
  }

  .popup-content {
    padding: 1.2rem 1rem;
  }

  .popup-title {
    font-size: 1.15rem;
  }

  .popup-info li {
    font-size: 0.78rem;
  }

  .popup-cta-primary {
    padding: 11px 18px;
    font-size: 0.85rem;
  }
}
