/**
 * ==============================================================================
 * COMMUNAUTÉ VICARIALE DES LECTEURS JUNIORS - VSMT
 * Vicariat Forain Saint Michel De Togoudo
 * Styles de la page Répertoire des Anniversaires (liste.css)
 * 100% Mobile-First • Unités Relatives (rem, clamp, %) • Glassmorphism
 * ==============================================================================
 */

/* ==============================================================================
   BARRE DE STATISTIQUES (MOBILE-FIRST : 1 COLONNE PAR DÉFAUT)
   ============================================================================== */
.stats-bar {
  display: none;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  width: 100%;
}

.stat-card {
  background: var(--glass-bg);
  border: 0.09375rem solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem 0.85rem;
  text-align: center;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.stat-number {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 5vw, 1.75rem);
  font-weight: 800;
  color: var(--text-white);
  line-height: 1;
  margin-bottom: 0.35rem;
  text-shadow: 0 0 0.95rem var(--gold-glow);
}

.stat-label {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cream-gold);
}

/* ==============================================================================
   CARTE D'HONNEUR : PROCHAIN CÉLÉBRÉ
   ============================================================================== */
.next-honor-card {
  display: none;
  background: var(--glass-bg);
  border: 0.09375rem solid var(--glass-border-gold);
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 3.5vw, 1.5rem);
  box-shadow: 0 1rem 2.75rem rgba(25, 12, 6, 0.45), 0 0 1.5rem var(--gold-glow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.next-honor-card::before {
  content: '';
  position: absolute;
  top: -1.25rem;
  right: -1.25rem;
  width: 8rem;
  height: 8rem;
  background: radial-gradient(circle, rgba(247, 208, 112, 0.45) 0%, transparent 70%);
  pointer-events: none;
}

.next-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-honor {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(247, 208, 112, 0.22);
  border: 0.0625rem solid var(--gold-accent);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.725rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-countdown {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cream-soft);
  background: rgba(0, 0, 0, 0.35);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 0.0625rem solid rgba(255, 255, 255, 0.2);
}

.next-details {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 1.15rem);
  position: relative;
  z-index: 1;
}

.next-avatar-wrap {
  width: clamp(3.75rem, 12vw, 4.5rem);
  height: clamp(3.75rem, 12vw, 4.5rem);
  min-width: clamp(3.75rem, 12vw, 4.5rem);
  border-radius: 50%;
  border: 0.15rem solid var(--gold-accent);
  overflow: hidden;
  background: #2b170e;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.35rem 1.25rem rgba(0, 0, 0, 0.45), 0 0 1rem var(--gold-glow);
  flex-shrink: 0;
  color: var(--gold-accent);
  font-weight: 700;
  font-size: 1.25rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.next-avatar-wrap.has-photo {
  cursor: pointer;
}

.next-avatar-wrap.has-photo:hover {
  transform: scale(1.08);
  border-color: #ffffff;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.55), 0 0 1.25rem var(--gold-glow);
}

.next-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  transform: translateZ(0);
}

.next-info h3 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 3.5vw, 1.25rem);
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 0.25rem;
}

.next-info p {
  font-size: clamp(0.8rem, 2.6vw, 0.875rem);
  color: var(--cream-sand);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==============================================================================
   BARRE DE RECHERCHE
   ============================================================================== */
.search-box-wrap {
  display: none;
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  background: var(--glass-bg);
  border: 0.09375rem solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem 0.85rem 2.65rem;
  color: var(--text-white);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(0.85rem, 2.8vw, 0.95rem);
  outline: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.25s ease;
  box-shadow: 0 0.5rem 1.5rem rgba(15, 8, 4, 0.35);
}

.search-input:focus {
  border-color: var(--gold-accent);
  background: var(--glass-bg-hover);
  box-shadow: 0 0 0 0.2rem rgba(247, 208, 112, 0.25);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.15rem;
  height: 1.15rem;
  stroke: var(--gold-accent);
  pointer-events: none;
}

/* ==============================================================================
   GROUPES MENSUELS & CARTES DES LECTEURS
   ============================================================================== */
.month-group {
  margin-top: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.month-header {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.65rem 0.25rem 0.25rem;
}

.month-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.9rem, 3vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text-white);
  text-transform: uppercase;
  text-shadow: 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.4);
}

.month-divider {
  flex: 1;
  height: 0.09375rem;
  background: linear-gradient(90deg, rgba(247, 208, 112, 0.4) 0%, transparent 100%);
}

.reader-card {
  background: var(--glass-bg);
  border: 0.0625rem solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.75rem clamp(0.75rem, 3vw, 1.15rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.6rem, 2.5vw, 0.875rem);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0.35rem 1.25rem rgba(15, 8, 4, 0.25);
  transition: all 0.25s ease;
  width: 100%;
}

.reader-card:hover {
  background: var(--glass-bg-hover);
  border-color: var(--gold-accent);
  transform: translateY(-0.125rem);
  box-shadow: 0 0.625rem 1.75rem rgba(15, 8, 4, 0.45);
}

.reader-card.today {
  background: rgba(247, 208, 112, 0.18);
  border: 0.09375rem solid var(--gold-accent);
  box-shadow: 0 0.5rem 1.85rem rgba(247, 208, 112, 0.35);
}

/* Avatar du lecteur : grand, net et cliquable */
.reader-avatar {
  width: clamp(3.15rem, 10vw, 3.65rem);
  height: clamp(3.15rem, 10vw, 3.65rem);
  min-width: clamp(3.15rem, 10vw, 3.65rem);
  border-radius: 50%;
  background: #2a160d;
  border: 0.125rem solid var(--gold-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: clamp(0.9rem, 2.8vw, 1rem);
  color: var(--gold-accent);
  overflow: hidden;
  box-shadow: 0 0.25rem 0.85rem rgba(0, 0, 0, 0.4), 0 0 0.625rem rgba(247, 208, 112, 0.2);
  flex-shrink: 0;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.reader-avatar.has-photo {
  cursor: pointer;
}

.reader-avatar.has-photo:hover {
  transform: scale(1.08);
  border-color: #ffffff;
  box-shadow: 0 0.35rem 1.25rem rgba(0, 0, 0, 0.5), 0 0 1rem var(--gold-glow);
}

.reader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.reader-info {
  flex: 1;
  min-width: 0;
}

.reader-name {
  font-size: clamp(0.85rem, 2.8vw, 0.95rem);
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reader-meta {
  font-size: clamp(0.725rem, 2.4vw, 0.78rem);
  color: var(--cream-sand);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.reader-date {
  color: var(--gold-accent);
  font-weight: 700;
}

.days-badge {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.days-today {
  background: var(--gold-gradient);
  color: #24130b;
  box-shadow: 0 0 0.95rem var(--gold-glow);
  animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0.625rem rgba(247, 208, 112, 0.4); }
  50% { box-shadow: 0 0 1.35rem rgba(247, 208, 112, 0.8); }
}

.days-soon {
  background: rgba(247, 208, 112, 0.22);
  border: 0.0625rem solid var(--gold-accent);
  color: var(--text-white);
}

.days-normal {
  background: rgba(0, 0, 0, 0.25);
  border: 0.0625rem solid rgba(255, 255, 255, 0.15);
  color: var(--cream-sand);
}

/* Loading & Empty States */
.loading-state,
.empty-state {
  text-align: center;
  padding: 3rem 1.25rem;
  color: var(--cream-sand);
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  border: 0.0625rem solid var(--glass-border);
  backdrop-filter: blur(16px);
  margin-top: 1rem;
}

.empty-state p {
  font-size: 0.9rem;
}

/* Pop-up Anniversaire du Jour */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 2, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.25rem;
  animation: fadeIn 0.25s ease forwards;
}

.popup-overlay.visible {
  display: flex;
}

.popup-card {
  background: rgba(40, 22, 14, 0.92);
  border: 0.125rem solid var(--gold-accent);
  border-radius: var(--radius-lg);
  max-width: min(92vw, 26rem);
  width: 100%;
  box-shadow: 0 1.5rem 4.5rem rgba(0, 0, 0, 0.65), 0 0 2rem var(--gold-glow);
  text-align: center;
  padding: 1.75rem 1.25rem;
  position: relative;
  overflow: hidden;
}

.popup-header-icon {
  font-size: 2.75rem;
  margin-bottom: 0.6rem;
  display: block;
}

.popup-card h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.2rem, 4vw, 1.45rem);
  color: var(--text-white);
  margin-bottom: 0.35rem;
}

.popup-card p {
  font-size: 0.85rem;
  color: var(--cream-sand);
  margin-bottom: 1.25rem;
}

.popup-people-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  max-height: 14rem;
  overflow-y: auto;
}

.popup-person-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
  border: 0.0625rem solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  text-align: left;
}

.popup-btn-close {
  width: 100%;
  padding: 0.85rem;
  background: var(--gold-gradient);
  border: none;
  border-radius: var(--radius-md);
  color: #24130b;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 0.875rem;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: 0 0.35rem 1.25rem rgba(247, 208, 112, 0.4);
}

.popup-btn-close:hover {
  transform: translateY(-0.125rem);
}

/* Bouton flottant */
.fab-register {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--gold-gradient);
  color: #24130b;
  padding: 0 1.25rem;
  height: 3rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 0.825rem;
  text-decoration: none;
  box-shadow: 0 0.5rem 1.5rem rgba(247, 208, 112, 0.45);
  transition: all 0.2s ease;
  z-index: 99;
}

.fab-register:hover {
  transform: translateY(-0.125rem) scale(1.02);
  box-shadow: 0 0.75rem 1.85rem rgba(247, 208, 112, 0.65);
}

/* ==============================================================================
   MODAL LIGHTBOX PHOTO HAUTE RÉSOLUTION
   ============================================================================== */
.photo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 2, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.25rem;
  animation: fadeIn 0.25s ease forwards;
}

.photo-modal-overlay.visible {
  display: flex;
}

.photo-modal-card {
  background: rgba(40, 22, 14, 0.94);
  border: 0.125rem solid var(--gold-accent);
  border-radius: var(--radius-lg);
  max-width: min(92vw, 26rem);
  width: 100%;
  box-shadow: 0 1.5rem 4.5rem rgba(0, 0, 0, 0.75), 0 0 2rem var(--gold-glow);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.25rem 1.25rem;
  position: relative;
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

.photo-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 0.0625rem solid rgba(255, 255, 255, 0.3);
  color: var(--text-white);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.photo-modal-close:hover {
  background: rgba(215, 45, 60, 0.6);
  border-color: #ff5a64;
  transform: rotate(90deg);
}

.photo-modal-img-wrap {
  width: 100%;
  max-height: 22rem;
  min-height: 12rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(30, 15, 8, 0.8) 0%, rgba(10, 5, 2, 0.95) 100%);
  border: 0.09375rem solid rgba(247, 208, 112, 0.4);
  margin-bottom: 1rem;
  box-shadow: inset 0 0 1.25rem rgba(0, 0, 0, 0.6);
  padding: 0.5rem;
}

.photo-modal-img-wrap img {
  max-width: 100%;
  max-height: 21rem;
  object-fit: contain;
  display: block;
  border-radius: calc(var(--radius-md) - 0.25rem);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: high-quality;
}

.photo-modal-info {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}

.photo-modal-info h3 {
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 3.5vw, 1.15rem);
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 0.03em;
}

.photo-modal-info p {
  font-size: 0.825rem;
  color: var(--cream-sand);
}

.photo-modal-date {
  margin-top: 0.25rem;
  display: inline-block;
  background: rgba(247, 208, 112, 0.18);
  border: 0.0625rem solid var(--gold-accent);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-accent);
}

/* ==============================================================================
   PROGRESSIVE ENHANCEMENT POUR TABLETTE & PC (MIN-WIDTH: 38em / 608px)
   ============================================================================== */
@media (min-width: 38em) {
  .stats-bar {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.875rem;
  }
}
