/**
 * Styles pour la popup et la topbar du calendrier de l'avent
 */

/* ============================================
   TOPBAR
   ============================================ */

.advent-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #91be1a;
  color: white;
  padding: 0.75rem 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.advent-topbar.hidden {
  display: none;
}

.advent-topbar__container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.advent-topbar__text {
  font-weight: 500;
  font-size: 1.05rem;
}

.advent-topbar__link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.advent-topbar__link:hover {
  background: white;
  color: #91be1a;
  transform: translateX(3px);
}

/* Ajustement du body quand la topbar est affichée */
body.advent-topbar-visible {
  padding-top: 56px;
}

/* Cacher la topbar pour les admins (thème Gin) */
body.gin--horizontal-toolbar .advent-topbar {
  display: none;
}

body.gin--horizontal-toolbar.advent-topbar-visible {
  padding-top: 0;
}

/* Responsive topbar */
@media (max-width: 768px) {
  .advent-topbar__text {
    font-size: 0.85rem;
  }
  
  .advent-topbar__link {
    font-size: 0.85rem;
    padding: 0.3rem 0.75rem;
  }
}

/* ============================================
   POPUP
   ============================================ */

.advent-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.advent-popup.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.advent-popup__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.advent-popup__container {
  position: relative;
  max-width: 600px;
  width: 90%;
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease-out;
}

.advent-popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  border-radius: 50%;
}

.advent-popup__close:hover {
  color: #333;
  background: #f0f0f0;
}

.advent-popup__content {
  margin-bottom: 2rem;
}

.advent-popup__content h2 {
  color: #2c3e50;
  font-size: 1.75rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.advent-popup__content p {
  color: #555;
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.advent-popup__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Les boutons utilisent les styles natifs du thème */
.advent-popup__cta,
.advent-popup__dismiss {
  flex: 1;
  min-width: 200px;
  margin: 0 !important;
  display: flex !important;
  justify-content: center;
  align-items: center;
  height: 45px !important;
  min-height: 45px !important;
  max-height: 45px !important;
  line-height: 45px !important;
  border-radius: 25px;
  font-size: 1.0625rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  padding: 0 1.5rem !important;
  box-sizing: border-box;
}

/* Bouton principal (CTA) */
.advent-popup__cta {
  background-color: #91be1a;
  color: white !important;
}

.advent-popup__cta:hover {
  background-color: #407006;
  opacity: 0.75;
}

/* Bouton secondaire (dismiss) */
.advent-popup__dismiss {
  background-color: #ececec;
  color: #000000;
}

.advent-popup__dismiss:hover {
  opacity: 0.75;
}

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

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

/* Responsive popup */
@media (max-width: 768px) {
  .advent-popup__container {
    width: 95%;
    padding: 2rem 1.5rem;
    margin-top: 5vh;
  }

  .advent-popup__content h2 {
    font-size: 1.5rem;
  }

  .advent-popup__content p {
    font-size: 1rem;
  }

  .advent-popup__actions {
    flex-direction: column;
  }

  .advent-popup__cta,
  .advent-popup__dismiss {
    width: 100%;
    min-width: initial;
    height: 45px !important;
    min-height: 45px !important;
    max-height: 45px !important;
    line-height: 45px !important;
  }
}

/* Prevent body scroll when popup is open */
body.advent-popup-open {
  overflow: hidden;
}

