/* =============================================
   POPUPS & LIGHTBOX — Mairie d'Andance
   Mobile-first
   ============================================= */

/* ── Backdrop commun ───────────────────────── */
.popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 40, 0.72);
  backdrop-filter: blur(4px);
  z-index: 0;
}

/* ── Conteneur popup ───────────────────────── */
#popup-alerte,
#popup-confirmation,
#popup-galerie {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: popupFadeIn .25s ease both;
}

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

/* ── Boîte popup ───────────────────────────── */
.popup-box {
  position: relative;
  z-index: 1;
  background: white;
  border-radius: 18px;
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  animation: popupSlideUp .3s ease both;
}

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

.popup-box h2 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 14px;
}

/* ── Bouton fermeture ──────────────────────── */
.popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0,0,0,0.06);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  color: var(--texte);
}

.popup-close:hover { background: rgba(0,0,0,0.14); }

/* ── Contenu ───────────────────────────────── */
.popup-content {
  font-size: 14px;
  color: var(--gris);
  line-height: 1.7;
  padding-left: 14px;
  margin-bottom: 20px;
}

/* ── Footer popup ──────────────────────────── */
.popup-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.popup-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: white;
  padding: 11px 20px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: filter .2s, transform .2s;
  text-decoration: none;
}

.popup-btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.popup-btn-secondary {
  background: none;
  border: none;
  color: var(--gris);
  font-size: 13px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color .2s;
  text-decoration: underline;
}

.popup-btn-secondary:hover { color: var(--texte); }


/* ── GALERIE / LIGHTBOX ────────────────────── */
#popup-galerie {
  z-index: 9100;
  padding: 0;
}

.popup-galerie-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  padding: 16px;
}

.popup-galerie-img-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
}

.popup-galerie-close {
  position: fixed;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: white;
  z-index: 2;
}

.popup-galerie-close:hover { background: rgba(255,255,255,0.3); }

.popup-galerie-nav {
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  color: white;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  flex-shrink: 0;
}

.popup-galerie-nav:hover { background: rgba(255,255,255,0.25); }

/* Images cliquables */
.andance-lightbox {
  cursor: zoom-in;
  transition: opacity .2s, transform .2s;
}

.andance-lightbox:hover {
  opacity: .88;
  transform: scale(1.02);
}


/* ── BANNIÈRE RGPD ─────────────────────────── */
#rgpd-banniere {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  background: var(--texte);
  border-top: 3px solid var(--rhone);
  padding: 14px 4%;
  animation: slideUp .4s ease both;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.rgpd-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
}

.rgpd-texte {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.rgpd-texte p {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin: 0;
}

.rgpd-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.rgpd-btn-accepter {
  background: var(--rhone);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: background .2s;
  white-space: nowrap;
}

.rgpd-btn-accepter:hover { background: var(--rhone-mid); }

.rgpd-btn-refuser {
  background: none;
  border: 1.5px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.6);
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  transition: all .2s;
  white-space: nowrap;
}

.rgpd-btn-refuser:hover {
  border-color: rgba(255,255,255,0.5);
  color: white;
}


/* ── Responsive tablette / desktop ─────────── */
@media (min-width: 600px) {
  .rgpd-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .rgpd-texte { flex: 1; }
  .rgpd-actions { flex-shrink: 0; }

  .popup-box { padding: 32px 28px 28px; }
  .popup-box h2 { font-size: 22px; }
}

@media (min-width: 768px) {
  .popup-galerie-nav {
    width: 52px; height: 52px;
    font-size: 28px;
  }
}
