/* ============================================================
   EPBOMI — Navigation mobile moderne (bottom navigation)
   ============================================================ */

/* ─── Masquer l'ancien menu hamburger + dropdown sur mobile ─── */
@media (max-width: 1023px) {
  .menu-toggle,
  .navbar .nav-links.open,
  .navbar .nav-links {
    display: none !important;
  }
}

/* ─── Icônes (sprite) ─── */
.bn-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.bn-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ─── Barre de navigation en bas ─── */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  display: none;
  align-items: stretch;
  height: calc(62px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 -8px 30px rgba(2, 44, 90, 0.12);
}

.bottom-nav .bn-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 6px 2px 0;
  cursor: pointer;
  color: #64748b;
  min-width: 0;
  transition: color 0.2s;
  text-decoration: none;
}
.bottom-nav .bn-tab:active { opacity: 0.7; }
.bottom-nav .bn-tab.active { color: var(--primary-dark); }

.bottom-nav .bn-tab-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

.bottom-nav .bn-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  line-height: 1;
  white-space: nowrap;
  font-family: var(--font-body);
}

.bottom-nav .bn-menu-btn {
  width: 46px;
  height: 46px;
  margin-top: -18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #7B1FA2 100%);
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.9),
    0 8px 20px rgba(1, 87, 155, 0.35);
}
.bottom-nav .bn-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}
.bottom-nav .bn-menu-icon .bn-icon { color: #fff; width: 24px; height: 24px; }
.bottom-nav .bn-tab.menu .bn-menu-icon.spin { transform: rotate(90deg); }

/* ─── Fond flouté derrière le panneau ─── */
.bn-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1250;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.bn-backdrop.open { opacity: 1; pointer-events: auto; }

/* ─── Panneau bas (bottom sheet) ─── */
.bn-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1260;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -20px 60px rgba(2, 44, 90, 0.25);
  transform: translateY(110%);
  transition: transform 0.42s cubic-bezier(0.32, 1.2, 0.4, 1);
  will-change: transform;
  font-family: var(--font-body);
  visibility: hidden;
}
.bn-sheet.open {
  transform: translateY(0);
  visibility: visible;
}

.bn-sheet-handle {
  width: 42px;
  height: 5px;
  border-radius: 3px;
  background: #dbe1ea;
  margin: 10px auto 0;
  flex-shrink: 0;
}

.bn-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 8px;
  flex-shrink: 0;
}
.bn-sheet-head h2 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.bn-sheet-close {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.bn-sheet-close:hover {
  background: #e2e8f0;
  transform: rotate(90deg);
}

.bn-sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 20px calc(20px + env(safe-area-inset-bottom));
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.bn-group { margin-top: 18px; }
.bn-group:first-child { margin-top: 8px; }

.bn-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #94a3b8;
  margin-bottom: 8px;
  font-family: var(--font-body);
}

.bn-group-list { display: grid; grid-template-columns: 1fr; gap: 4px; }

.bn-group-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #334155;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.18s, transform 0.18s;
}
.bn-group-item .bn-icon {
  width: 20px;
  height: 20px;
  color: #64748b;
}
.bn-group-item:hover { background: #f1f5f9; }
.bn-group-item:active { transform: scale(0.98); }
.bn-group-item.active {
  background: linear-gradient(135deg, rgba(1, 87, 155, 0.08), rgba(123, 31, 162, 0.08));
  color: var(--primary);
}
.bn-group-item.active .bn-icon { color: var(--primary); }

.bn-item-chev {
  margin-left: auto;
  color: #cbd5e1;
  font-size: 1.1rem;
  font-weight: 700;
}

/* ─── Espace pour la barre fixe en bas ─── */
@media (max-width: 1023px) {
  .bottom-nav { display: flex; }
  html { scroll-padding-bottom: 90px; }
  body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom) + 14px);
  }
  .footer { margin-bottom: 0; }
}

/* ─── Desktop : masqués ─── */
@media (min-width: 1024px) {
  .bottom-nav,
  .bn-backdrop,
  .bn-sheet {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bn-sheet,
  .bn-backdrop,
  .bottom-nav .bn-menu-icon {
    transition: none !important;
  }
}

/* ─── Bouton WhatsApp flottant ─── */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 1190;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.wa-float svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}
.wa-float:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.55);
}
.wa-float::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.55);
  animation: wa-ring 2.4s ease-out infinite;
}
@keyframes wa-ring {
  0% { transform: scale(0.85); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}
@media (min-width: 1024px) {
  .wa-float { bottom: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-float::before { animation: none; }
}

/* ─── Bandeau thème de l'année ─── */
.theme-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  font-family: var(--font-body);
  background: linear-gradient(90deg, var(--primary-darker), #7B1FA2, var(--primary-dark));
  background-size: 200% 100%;
  animation: theme-slide 18s linear infinite;
}
.theme-banner strong { white-space: nowrap; }
@keyframes theme-slide {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
.theme-banner .tb-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.78rem;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
@media (max-width: 1023px) {
  .theme-banner { font-size: 0.8rem; padding: 8px 12px; }
}

/* ─── Liste des assemblées (eglise.html) ─── */
.eglises-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.eglises-toolbar input {
  flex: 1;
  min-width: 220px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.eglises-toolbar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(1, 87, 155, 0.12);
}
.eglises-toolbar .eglises-total {
  font-size: 0.85rem;
  color: var(--text-light);
  white-space: nowrap;
}
.eglises-toolbar .eglises-total strong {
  color: var(--primary);
  font-size: 1.15rem;
}
.eg-group { margin-top: 26px; }
.eg-group h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 14px;
}
.eg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.eg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.eg-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.eg-card h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}
.eg-pastor {
  display: block;
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
}
.eg-meta {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}
.eg-contact {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.eg-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 6px;
}
.eg-links a {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  text-decoration: none;
}
a.eg-map {
  background: var(--primary);
  color: #fff;
}
a.eg-www {
  background: rgba(1, 87, 155, 0.08);
  color: var(--primary);
}
.eg-empty {
  text-align: center;
  color: var(--text-light);
  padding: 30px 10px;
}