/* ============================================================
   LLBMG — Surcharges de menu/style.css
   (chargé APRÈS menu/style.css — les règles ci-dessous ont la priorité)
   ============================================================ */

/* ---------- Reset minimal ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ---------- Variables personnalisées LLBMG ---------- */
:root {
  /* ── Thème couleur — modifiables via js/theme.js ── */
  --color-brand:       #3E5B9B;   /* couleur principale */
  --color-brand-light: #4b6cb7;   /* ton clair (gradient) */
  --color-brand-dark:  #182848;   /* ton sombre (gradient) */

  --color-primary:   #1a3a5c;
  --color-secondary: #c8a84b;
  --color-accent:    var(--color-brand-light);
  --primary:         var(--color-brand);
  --primary-light:   var(--color-brand-light);
  --primary-dark:    var(--color-brand-dark);
  --radius:          8px;
  --shadow:          0 2px 12px rgba(0,0,0,.15);
  --font-main:       'Segoe UI', system-ui, sans-serif;
  /* Couleur principale du menu circulaire SVG */
  --primary-brand:   var(--color-brand);
  --rubrique-shift:  10px;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  width: 100%;
}

/* Annule le margin: 0 1% de menu/style.css → page pleine largeur */
html, body {
  margin: 0 !important;
  padding: 0;
  width: 100%;
}
html {
  height: 100%;
}

body {
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--theme-bg, #f5f6fa);
  /* overflow-x géré par html dans menu/style.css — ne pas le répéter sur body */
}

/* bdn.css redéfinit --primary sur :root : on le rattache au thème sur le shell */
body.page-home,
body.page-rubrique {
  --primary: var(--color-brand);
  --primary-light: var(--color-brand-light);
  --primary-dark: var(--color-brand-dark);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; }


/* Accueil desktop : verset dans le header. Mobile : verset sous le header. */
.page-home .header-row--main,
.page-rubrique .header-row--main {
  padding-right: 16px;
  position: relative;
  width: 100%;
}
.page-home .header-brand,
.page-rubrique .header-brand {
  flex: 0 0 auto;
}
.page-home .header-about-btn {
  display: none;
}
.page-home .header-title,
.page-home .header-subnav,
.page-home #page-subnav {
  display: none !important;
}
.page-home .home-date {
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  color: #7a8aa8;
  margin: 6px 0 0;
  flex-shrink: 0;
  letter-spacing: .02em;
}
@media (min-width: 601px) {
  .page-home .verse-panel {
    display: none;
  }
  .page-home .header-logo-btn,
  .page-home .header-brand,
  .page-rubrique .header-logo-btn,
  .page-rubrique .header-brand {
    position: relative;
    z-index: 2;
  }
  .header-rubrique-verse {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100% - 210px);
    flex: none;
    padding: 0 8px;
    pointer-events: none;
  }
}
@media (max-width: 600px) {
  .page-home .header-row--main {
    flex-wrap: nowrap;
    padding-right: 10px;
  }
  .page-home .verse-panel {
    display: none;
  }
  .page-home .home-date {
    display: block;
  }
  .page-home .header-brand {
    flex: 0 0 auto;
  }
  .page-home .site-header {
    height: 70px;
    min-height: 70px;
    overflow: hidden;
  }
}

/* ============================================================
   HEADER — sticky au lieu de fixed (menu/style.css = fixed)
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  left: auto;
  width: 1280px;
  max-width: calc(100% - 36px);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px 14px 0 0;
  z-index: 500;
  background: linear-gradient(135deg, var(--color-brand-light), var(--color-brand-dark)) !important;
}

/* ---------- Verset biblique dans le header des rubriques ---------- */

/* header-row--main : pleine largeur, verset centré comme à l'accueil */
.page-rubrique .header-row--main {
  width: 100%;
  position: relative;
}

.header-rubrique-verse {
  flex: 1;                          /* prend tout l'espace restant */
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 700;
  font-family: 'Times New Roman', Times, serif;
  color: rgba(255, 255, 255, 0.92);
  padding: 0 20px;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.header-rubrique-verse-ref {
  display: block;
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.60);
  margin-top: 4px;
  letter-spacing: 0.04em;
}
.header-verse-br { display: none; }

/* ============================================================
   FOOTER — coins inférieurs arrondis annulés (pleine largeur)
   ============================================================ */
.site-footer {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;   /* annule le border-radius 0 0 14px 14px du menu */
  position: relative;
  /* Thème couleur — override du gradient hardcodé dans menu/style.css */
  background: linear-gradient(135deg, var(--color-brand-dark), var(--color-brand-light)) !important;
}

/* ---------- Pastilles colorées dans le footer ---------- */
.footer-dots {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Transitions de page (fondu simple, sans scale) ---------- */
@keyframes pageZoomIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes zoomOutCentered {
  from { opacity: 1; transform: scale(1); }
  50%, to { opacity: 0; transform: scale(0.3); }
}

/* Bloque les clics pendant la transition — n'affecte ni la mise en page ni le header */
body.zoom-out {
  pointer-events: none;
}

/* Fondu à l’ouverture — uniquement le contenu de la page appelée, jamais le header/footer */
.page-rubrique .site-main {
  animation: pageZoomIn 0.5s ease both;
  align-items: stretch;
}

/* Base commune : flex colonne, espacement vertical */
body.page-home,
body.page-rubrique {
  display: flex;
  flex-direction: column;
  padding-top: 10px;
  padding-bottom: 10px;
  box-sizing: border-box;
}
/* Viewport fixe : header et footer ancrés, seul le main défile.
   svh en dernier : sur mobile, 100dvh/100vh dépassent la zone visible (barre d’adresse). */
body.page-home,
body.page-rubrique {
  height: 100dvh;
  height: 100svh;
  max-height: 100dvh;
  max-height: 100svh;
  min-height: 0;
  overflow: hidden;
}

.page-rubrique .site-main,
.page-rubrique .rubrique-page-title,
.page-rubrique .rubrique-content {
  margin-left: 0;
}

.page-home .site-header,
.page-home .site-main,
.page-home .site-footer,
.page-rubrique .site-header,
.page-rubrique .site-main,
.page-rubrique .site-footer {
  width: 1280px;
  max-width: calc(100% - 36px);
  margin: 0 auto;
}

.page-home .site-header,
.page-rubrique .site-header,
.page-home .site-footer,
.page-rubrique .site-footer {
  flex: 0 0 auto;
  border: 1px solid rgba(62, 91, 155, 0.18);
}

.page-home .site-main,
.page-rubrique .site-main {
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
/* Accueil : défilement interne du main (viewport fixe) */
.page-home .site-main {
  overflow-y: auto;
  overflow-x: hidden;
}

.page-home .site-header,
.page-rubrique .site-header {
  margin-top: 0;
}

.page-home .site-footer,
.page-rubrique .site-footer {
  margin-bottom: 0;
}

/* Conteneur stable : largeur fixe, hauteur libre selon contenu */
.page-home .site-main,
.page-rubrique .site-main {
  width: 1280px;
  max-width: calc(100% - 36px);
  margin: 0 auto;
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Coins arrondis haut (header) et bas (footer) */
.page-home .site-header,
.page-rubrique .site-header {
  border-radius: 14px 14px 0 0;
}
.page-home .site-footer,
.page-rubrique .site-footer {
  border-radius: 0 0 14px 14px;
}

/* ---------- Titre de rubrique en haut à gauche du contenu ---------- */
.rubrique-page-title {
  width: 100%;
  max-width: 100%;
  margin: 12px auto 12px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-primary, #1a3a5c);
  letter-spacing: 0.03em;
}
.rubrique-page-title img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ---------- Nom de rubrique dans le header ---------- */
.header-rubrique-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.04em;
}

/* ---------- Pages rubriques ---------- */
.rubrique-content {
  width: 100%;
  max-width: 100%;
  margin: 0 0 28px;
  background: #fff;
  border: 2px solid color-mix(in srgb, var(--color-brand) 25%, transparent);
  border-radius: 16px;
  box-shadow: 0 4px 24px color-mix(in srgb, var(--color-brand) 12%, transparent);
  padding: 36px 40px 28px;
  box-sizing: border-box;
}
.rubrique-body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.rubrique-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  border-bottom: 2px solid #e8ecf5;
  padding-bottom: 22px;
}
.rubrique-header-extra {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}
.rubrique-header-extra:empty { display: none; }
.rubrique-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  color: var(--color-brand);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.rubrique-year {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-brand-dark);
  opacity: 0.9;
}
.rubrique-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
}
/* Un seul intitulé visible : celui de .rubrique-page-title (sauf titre Bible chapitre) */
.page-rubrique .rubrique-header > .rubrique-icon {
  display: none;
}
.page-rubrique .rubrique-header > h1:not(:has(.brt-btn)) {
  display: none;
}
.page-rubrique .rubrique-header:not(:has(.brt-btn)):not(:has(.rubrique-header-extra:not(:empty))):not(:has(#bhs-wrap)):not(:has(#mq-lib-btn)) {
  display: none;
}
.page-rubrique .rubrique-header:not(:has(.brt-btn)):has(.rubrique-header-extra:not(:empty)),
.page-rubrique .rubrique-header:not(:has(.brt-btn)):has(#bhs-wrap),
.page-rubrique .rubrique-header:not(:has(.brt-btn)):has(#mq-lib-btn) {
  margin-bottom: 16px;
  padding-bottom: 12px;
}
.rubrique-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-brand);
  margin: 28px 0 8px;
}
.rubrique-body h2:first-child {
  margin-top: 0;
}
.rubrique-body p {
  color: #555;
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 6px;
}
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 10px 24px;
  border-radius: 8px;
  background: var(--color-brand);
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background .2s;
}
.back-btn:hover { background: var(--color-brand-dark); }

/* ---------- Animation respiration lente du logo central ---------- */
@keyframes logoBreathe {
  0%   { transform: scale(0.78); opacity: 0.85; }
  50%  { transform: scale(1.00); opacity: 1;    }
  100% { transform: scale(0.78); opacity: 0.85; }
}

.center-logo {
  transform-box:    fill-box;
  transform-origin: center;
  animation: logoBreathe 5s ease-in-out infinite;
}

/* Logo : respiration uniquement sur la page d’accueil (menu circulaire affiché) */
.header-logo {
  transform-origin: center;
}
.page-home .header-logo {
  animation: logoBreathe 5s ease-in-out infinite;
  animation-delay: -2.5s;
}

/* ── Rubriques : le main défile entre le header et le footer ── */
.page-rubrique .site-main {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  height: auto;
  /* Scrollbar invisible → largeur égale à header/footer, zéro décalage */
  scrollbar-width: none;
}
.page-rubrique .site-main::-webkit-scrollbar {
  display: none;
}
.site-footer { flex-shrink: 0; }
.site-header { flex-shrink: 0; }

/* ============================================================
   RESPONSIVE MINIMAL
   ============================================================ */
@media (max-width: 600px) {
  html {
    height: 100%;
    overflow: hidden;
  }
  /* Cadre collé au viewport visible : le footer ne peut plus passer sous l’écran */
  body.page-home,
  body.page-rubrique {
    position: fixed;
    inset: 0;
    width: 100%;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: hidden;
    padding: 8px;
    padding-top: max(8px, env(safe-area-inset-top, 0px));
    padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
    padding-left: max(8px, env(safe-area-inset-left, 0px));
    padding-right: max(8px, env(safe-area-inset-right, 0px));
  }

  /* Pleine largeur du cadre (déjà centré par le padding égal du body) */
  .site-header,
  .page-home .site-header,
  .page-home .site-main,
  .page-home .site-footer,
  .page-rubrique .site-header,
  .page-rubrique .site-main,
  .page-rubrique .site-footer {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    left: auto;
  }
  /* Coins arrondis conservés sur mobile */
  .site-header,
  .page-home .site-header,
  .page-rubrique .site-header {
    border-radius: 14px 14px 0 0 !important;
    top: 0;
    padding-top: 0;
  }
  .page-home .site-footer,
  .page-rubrique .site-footer {
    border-radius: 0 0 14px 14px;
    position: relative;
    min-height: 70px;
    height: 70px;
    box-sizing: border-box;
    padding: 6px 12px 6px 44px;
  }

  /* Menu circulaire : pas de translateX — évite le saut vers la droite au clic */
  .container,
  .container.menu-visible {
    transform: none;
  }
  .container.menu-zoom-out {
    animation: zoomOutCentered 0.85s ease both;
    transition: none;
  }

  /* Header mobile : logo + LLBMG + verset sur une seule ligne (accueil et rubriques) */
  .page-home .site-header,
  .page-rubrique .site-header {
    flex-direction: row;
    align-items: center;
    min-height: 70px;
    height: 70px;
    overflow: hidden;
    box-sizing: border-box;
  }
  .page-home .header-row--main,
  .page-rubrique .header-row--main {
    width: 100%;
    height: 70px;
    flex-shrink: 0;
    flex-wrap: nowrap;
    align-items: center;
    padding: 0 8px 0 12px;
  }
  .page-home .header-brand,
  .page-rubrique .header-brand {
    flex: 0 0 auto;
  }
  .header-verse-br { display: block; }
  .header-rubrique-verse {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: clamp(0.5rem, 2.5vw, 0.64rem);
    padding: 0 4px 0 6px;
    line-height: 1.22;
    white-space: nowrap;
    overflow: hidden;
    position: static;
    left: auto;
    transform: none;
    pointer-events: none;
  }
  .header-rubrique-verse-ref {
    display: block !important;
    font-size: 0.5rem;
    margin-top: 1px;
    color: rgba(255, 255, 255, 0.70);
    white-space: nowrap;
  }
  .page-home .header-verse {
    font-size: 0.72rem;
    line-height: 1.3;
    white-space: nowrap;
    text-align: center;
  }
  .page-home .header-verse br.br-mid {
    display: block;
  }
  .page-home .header-verse-ref {
    font-size: 0.58rem;
    margin-top: 2px;
  }

  /* Rafraîchir : dans le footer, à gauche, sans agrandir le header */
  .site-refresh-btn {
    display: flex;
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Pastilles : centrées sous le compteur de visites */
  .footer-copy {
    order: 1;
    margin: 0;
    line-height: 1.2;
  }
  .footer-stats {
    order: 2;
    line-height: 1.2;
  }
  .footer-dots {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    justify-content: center;
    gap: 7px;
    margin: 2px 0 0;
    order: 3;
  }
  .footer-dot {
    width: 11px;
    height: 11px;
  }

  /* Carte de contenu rubrique : padding réduit sur mobile */
  .rubrique-content {
    padding: 16px 14px 20px;
    border-radius: 10px;
  }
  .rubrique-header h1 {
    font-size: 1.3rem;
  }
  .rubrique-header-extra .bdn-archive-btn {
    padding: .32rem .75rem;
    font-size: .78rem;
  }
  .rubrique-year {
    font-size: 1.3rem;
  }
}

/* ============================================================
   ECRANS TACTILES (mobile + tablette) — supprime le gap haut
   ============================================================ */
@media (hover: none) and (pointer: coarse) {
  .site-header {
    top: 0;
  }
}

/* ============================================================
   MODE PWA STANDALONE — supprime le gap sous la barre de statut
   ============================================================ */
@media (display-mode: standalone) {
  .site-header {
    top: 0;
  }
}

/* ---------- Police Playfair Display pour les étiquettes du menu ---------- */
.service text {
  font-family: 'Playfair Display', Georgia, serif !important;
}

/* ---------- Suppression de l'assombrissement au survol ---------- */
.service:hover  circle.shadow,
.service.active circle.shadow {
  fill-opacity: 0 !important;
}

/* ---------- Pulse sur la bulle sélectionnée avant navigation ---------- */
@keyframes bubblePulse {
  0%   { transform: scale(1.15) translateY(-5px); }
  50%  { transform: scale(1.24) translateY(-7px); }
  100% { transform: scale(1.15) translateY(-5px); }
}
.service.selected-pulse .icon-wrapper {
  animation: bubblePulse 0.7s ease-in-out infinite;
}
.service.selected-pulse text {
  fill: var(--primary-brand);
  font-weight: bold;
}

/* ---------- Anneau blanc intérieur des bulles de service ---------- */
.service circle.ring-inner {
  fill:           none;
  stroke:         #ffffff;
  stroke-width:   2px;
  opacity:        0.75;
  pointer-events: none;
}
.service.active circle.ring-inner,
.service:hover  circle.ring-inner {
  opacity:      1;
  stroke-width: 2.5px;
}

/* ---------- Bulle LLBMG : fond = couleur du thème actif ---------- */
.service.serv-special circle:not(.shadow):not(.ring-inner) {
  fill: var(--color-brand);
}
.service.serv-special circle.ring-inner {
  stroke:       var(--color-brand);
  stroke-width: 5px;
  opacity:      1;
}
.service.serv-special.active circle.ring-inner,
.service.serv-special:hover  circle.ring-inner {
  stroke-width: 6px;
}

/* Dropdown LLBMG (accueil, menu circulaire) — items séparés */
.llbmg-circle-dd {
  position: fixed;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 148px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  box-sizing: border-box;
}
.llbmg-circle-dd.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.llbmg-circle-dd.is-measuring,
.llbmg-circle-dd.is-measuring .llbmg-circle-dd-item {
  opacity: 0 !important;
  animation: none !important;
}
.llbmg-circle-dd[data-side="right"] {
  padding-left: 18px;
  margin-left: -18px;
}
.llbmg-circle-dd[data-side="left"] {
  padding-right: 18px;
  margin-right: -18px;
}
.llbmg-circle-dd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--color-brand, #4b6cb7);
  color: #fff;
  text-decoration: none;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.88rem;
  font-weight: 700;
  border: 2px solid rgba(255,255,255,.5);
  box-shadow: 0 4px 14px rgba(16, 24, 48, .22);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-8px);
  animation: none;
}
.llbmg-circle-dd.open:not(.is-measuring) .llbmg-circle-dd-item {
  animation: llbmgCircleDdIn .7s ease forwards;
}
.llbmg-circle-dd.open:not(.is-measuring) .llbmg-circle-dd-item:nth-child(1) { animation-delay: .08s; }
.llbmg-circle-dd.open:not(.is-measuring) .llbmg-circle-dd-item:nth-child(2) { animation-delay: .22s; }
.llbmg-circle-dd.open:not(.is-measuring) .llbmg-circle-dd-item:nth-child(3) { animation-delay: .36s; }
.llbmg-circle-dd.open:not(.is-measuring) .llbmg-circle-dd-item:nth-child(4) { animation-delay: .50s; }
.llbmg-circle-dd.open:not(.is-measuring) .llbmg-circle-dd-item:nth-child(5) { animation-delay: .64s; }
.llbmg-circle-dd-item img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}
.llbmg-circle-dd-item img.no-invert {
  filter: none;
}
.llbmg-circle-dd-item:hover {
  background: var(--color-brand-dark, #182848);
  color: #fff;
  text-decoration: none;
}
@keyframes llbmgCircleDdIn {
  to { opacity: 1; transform: translateX(0); }
}
.service.serv-special .icon-wrapper {
  transition: transform .8s cubic-bezier(0.22, 1, 0.36, 1) !important;
}
.service.llbmg-raised .icon-wrapper,
.service.serv-special:hover .icon-wrapper,
.service.serv-special.active .icon-wrapper {
  transform: scale(1.15) translateY(-5px);
}
.service.llbmg-raised text,
.service.serv-special:hover text {
  fill: var(--primary-brand);
  font-weight: bold;
}
.service.selected-pulse .icon-wrapper {
  animation: bubblePulse 0.9s ease-in-out infinite;
}
.page-home .container {
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
              transform 350ms ease,
              filter 1.25s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Accueil desktop / laptop : le cercle tient ENTIEREMENT entre le verset et le footer. */
@media (min-width: 601px) {
  .page-home .site-main {
    overflow: hidden;
  }
  .page-home .container,
  .page-home .container.menu-visible {
    flex: 1 1 0%;
    min-height: 0;
    width: 100%;
    max-width: min(680px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    transform: none;
  }
  .page-home .container.menu-zoom-out {
    animation: zoomOutCentered 0.85s ease both;
    transform: none;
  }
  .page-home .container #circle-nav-services {
    display: block;
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 650 / 550;
  }
}
@media (hover: hover) and (pointer: fine) {
  .container.llbmg-dd-blur {
    filter: none;
    opacity: 1;
    pointer-events: auto;
  }
}
@media (hover: none), (pointer: coarse) {
  .container.llbmg-dd-blur {
    filter: blur(6px);
    opacity: .55;
    pointer-events: none;
  }
  .llbmg-circle-dd {
    align-items: center;
    width: min(260px, calc(100vw - 32px));
    min-width: 0;
  }
  .llbmg-circle-dd[data-side="center"] {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }
  .llbmg-circle-dd-item {
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    transform: translateY(10px);
  }
  .llbmg-circle-dd.open:not(.is-measuring) .llbmg-circle-dd-item {
    animation-name: llbmgCircleDdInMobile;
  }
}
@keyframes llbmgCircleDdInMobile {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Compteur de visites dans le footer ---------- */
.footer-visit-today {
  opacity: .85;
}
.footer-visit-sep {
  opacity: .4;
}
.footer-visit-total {
  opacity: .55;
}

/* Cartes LLBMG — même dégradé que la pastille, desktop et mobile */
.llbmg-home-card,
.lect-verse-card,
.lect-today-card,
.lect-detail-header,
.epa-month-banner,
.epa-card,
.epa-calendar,
.bdn-nav-local,
.bdn-nav-bar,
.bdn-header--themed,
.bdn-footer--themed,
.planning-mois-detail:not(.mois-passe) {
  background: linear-gradient(135deg, var(--color-brand-dark) 0%, var(--color-brand-light) 100%);
}
.planning-mois-detail.mois-passe {
  background: #eef2f8 !important;
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--color-brand-light) 42%, #ffffff) 0%,
    color-mix(in srgb, var(--color-brand) 22%, #ffffff) 100%) !important;
  color: var(--color-brand-dark) !important;
}

/* Accueil : la date du jour ne doit pas être masquée par le menu circulaire */
.page-home .verse-panel {
  overflow: visible;
  flex-shrink: 0;
  padding-bottom: 10px;
  position: relative;
  z-index: 2;
}
.page-home .header-date {
  display: block;
  position: relative;
  z-index: 2;
  margin-top: 8px;
  margin-bottom: 2px;
}

/* Carte Verset de la semaine — accueil, sous le menu circulaire */
.page-home .verset-semaine-accueil {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 8px 16px;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: opacity .4s ease;
}
.page-home .container.menu-zoom-out ~ .verset-semaine-accueil {
  opacity: 0;
  pointer-events: none;
}
.page-home .lect-verse-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 5px solid #fff;
  outline: 1.5px solid color-mix(in srgb, var(--color-brand-light) 45%, #fff);
  border-radius: 14px;
  padding: 12px 22px 10px;
  margin: 0;
  box-shadow: 0 4px 22px color-mix(in srgb, var(--color-brand-dark) 28%, transparent);
  color: #fff;
}
.page-home .lect-verse-card > :not(.vsem-waves) {
  position: relative;
  z-index: 2;
}
/* Vague type model_vague_css.php (gentle-wave, 4 calques parallaxe) */
.page-home .lect-verse-card .vsem-waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 58px;
  margin: 0;
  z-index: 1;
  pointer-events: none;
}
.page-home .lect-verse-card .parallax > use {
  animation: vsemMoveForever 25s cubic-bezier(.55, .5, .45, .5) infinite;
}
.page-home .lect-verse-card .parallax > use:nth-child(1) {
  animation-delay: -2s;
  animation-duration: 7s;
}
.page-home .lect-verse-card .parallax > use:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
}
.page-home .lect-verse-card .parallax > use:nth-child(3) {
  animation-delay: -4s;
  animation-duration: 13s;
}
.page-home .lect-verse-card .parallax > use:nth-child(4) {
  animation-delay: -5s;
  animation-duration: 20s;
}
@keyframes vsemMoveForever {
  0%   { transform: translate3d(-90px, 0, 0); }
  100% { transform: translate3d(85px, 0, 0); }
}
@media (max-width: 768px) {
  .page-home .lect-verse-card .vsem-waves {
    height: 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .page-home .lect-verse-card .parallax > use {
    animation: none;
  }
}
.page-home .lect-verse-label {
  font-size: .62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,.55);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.page-home .lect-verse-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.2);
}
.page-home .lect-verse-texte {
  font-size: .9rem;
  font-style: italic;
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.45;
  color: #fff;
  margin: 0 0 4px;
  text-align: center;
  quotes: "\201C" "\201D";
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}
.page-home .lect-verse-texte::before { content: open-quote; }
.page-home .lect-verse-texte::after  { content: close-quote; }
.page-home .lect-verse-ref {
  font-size: .75rem;
  font-weight: 800;
  color: rgba(255,255,255,.7);
  letter-spacing: .4px;
  text-align: right;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 601px) {
  .page-home .verset-semaine-accueil {
    flex: 0 0 auto;
    align-self: center;
    width: 100%;
    max-width: min(900px, calc(100% - 72px));
    max-height: none;
    overflow: visible;
    margin-top: -18px;
    margin-bottom: 8px;
    padding: 0 12px 10px;
  }
  .page-home .lect-verse-texte {
    font-size: .86rem;
    line-height: 1.42;
  }
}
@media (min-width: 601px) and (max-height: 900px) {
  .page-home .lect-verse-texte {
    font-size: .8rem;
    line-height: 1.38;
  }
  .page-home .lect-verse-card {
    padding: 10px 18px 8px;
  }
  .page-home .lect-verse-label {
    margin-bottom: 6px;
  }
}
@media (max-width: 600px) {
  .page-home .verse-panel {
    flex-shrink: 0;
    padding-bottom: 0;
    margin-bottom: 0;
  }
  .page-home .container {
    flex: 1 1 auto;
    min-height: 0;
    max-width: min(100%, 340px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .page-home .container #circle-nav-services {
    max-height: 100%;
    width: 100%;
    height: auto;
  }
  .page-home .verset-semaine-accueil {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    padding: 4px 10px 8px;
    margin-top: 0;
  }
  .page-home .lect-verse-card {
    padding: 8px 12px 8px;
    border-width: 4px;
    max-height: 7.2rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .page-home .lect-verse-label {
    margin-bottom: 6px;
    font-size: .58rem;
  }
  .page-home .lect-verse-label,
  .page-home .lect-verse-ref {
    flex-shrink: 0;
  }
  .page-home .lect-verse-texte {
    font-size: .84rem;
    line-height: 1.45;
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    margin-bottom: 4px;
    padding-right: 6px;
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  .page-home .lect-verse-texte::-webkit-scrollbar {
    width: 4px;
  }
  .page-home .lect-verse-texte::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .4);
    border-radius: 4px;
  }
}

/* Bouton actualiser — dans le footer, visible sur mobile / PWA */
.site-refresh-btn {
  display: none;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.18);
  color: #fff;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  z-index: 6;
}
.site-refresh-btn:active {
  background: rgba(255,255,255,.32);
}
.site-refresh-hint {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4000;
  background: var(--color-brand-dark, #182848);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  pointer-events: none;
}

/* Consentement / récupération des notes Bible (sans compte) */
#llbmg-annot-overlay {
  position: fixed;
  inset: 0;
  z-index: 2400;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(16, 24, 40, .52);
  padding: 18px;
}
#llbmg-annot-overlay.open { display: flex; }
.llbmg-annot-card {
  background: #fff;
  color: #1a2a3a;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
  padding: 22px 22px 18px;
  width: 100%;
  max-width: 440px;
  max-height: min(88vh, 640px);
  overflow: auto;
}
.llbmg-annot-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-brand-dark, #182848);
}
.llbmg-annot-card p { margin: 0 0 10px; font-size: .88rem; line-height: 1.45; }
.llbmg-annot-list {
  margin: 0 0 12px;
  padding-left: 1.15rem;
  font-size: .84rem;
  line-height: 1.45;
}
.llbmg-annot-list li { margin-bottom: 6px; }
.llbmg-annot-note { font-size: .78rem !important; color: #5a6a80; }
.llbmg-annot-stats {
  background: #f3f6fb;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: .86rem;
}
.llbmg-annot-code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.25rem;
  letter-spacing: .12em;
  text-align: center;
  background: #f3f6fb;
  border: 1px dashed #c5d0e0;
  border-radius: 10px;
  padding: 14px 8px;
  margin: 8px 0 14px;
  font-weight: 700;
  color: var(--color-brand-dark, #182848);
  word-break: break-all;
}
.llbmg-annot-code-long {
  font-size: 1.05rem;
  letter-spacing: .04em;
}
.llbmg-annot-label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  margin: 8px 0 6px;
}
.llbmg-annot-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c8d4e8;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1.05rem;
  letter-spacing: .08em;
  font-family: ui-monospace, Consolas, monospace;
  text-transform: uppercase;
}
.llbmg-annot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 14px;
}
.llbmg-annot-actions.col { flex-direction: column; }
.llbmg-annot-actions.col .llbmg-annot-btn { width: 100%; }
.llbmg-annot-btn {
  border: 0;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: .84rem;
  font-weight: 700;
  cursor: pointer;
}
.llbmg-annot-btn.primary {
  background: var(--color-brand, #3E5B9B);
  color: #fff;
}
.llbmg-annot-btn.ghost {
  background: #eef2f8;
  color: #2a3a50;
}
.llbmg-annot-sep { height: 1px; background: #e4ebf4; margin: 14px 0; }
.llbmg-annot-err { color: #b42318; font-size: .8rem; margin: 6px 0 0; }
.lect-annot-recover-link {
  display: block;
  width: 100%;
  margin-top: 10px;
  border: 0;
  background: none;
  color: var(--color-brand, #3E5B9B);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  padding: 4px 0;
}
[data-theme="dark"] .llbmg-annot-card { background: #1e2a3a; color: #d1d9e6; }
[data-theme="dark"] .llbmg-annot-card h3 { color: #e8eef6; }
[data-theme="dark"] .llbmg-annot-note { color: #8aa0b8; }
[data-theme="dark"] .llbmg-annot-stats,
[data-theme="dark"] .llbmg-annot-code { background: #162232; border-color: #2a3c52; color: #e8eef6; }
[data-theme="dark"] .llbmg-annot-input { background: #162232; border-color: #2a3c52; color: #e8eef6; }
[data-theme="dark"] .llbmg-annot-btn.ghost { background: #2a3a50; color: #d1d9e6; }
[data-theme="dark"] .llbmg-annot-sep { background: #2a3c52; }
