/* Galerie publique info.php - reprise des regles exactes espace.php v1.35. */
.gallery-head{display:flex;align-items:baseline;gap:.55rem;margin:1.2rem 0 .55rem}.gallery-head .section-title{margin:0}.gallery-count{font-size:.9rem;font-weight:500;color:#666}.gallery-public{margin-top:.65rem;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}.gallery-item{position:relative;display:block;border:0;padding:0;cursor:pointer;aspect-ratio:1/1;overflow:hidden;background:#eee}.gallery-item img{display:block;width:100%;height:100%;object-fit:cover}.gallery-item-more::after{content:"";position:absolute;inset:0;background:rgba(0,0,0,.52)}.gallery-more-count{position:absolute;inset:0;z-index:2;display:grid;place-items:center;color:#fff;font-size:clamp(30px,6vw,56px);font-weight:800;letter-spacing:-.035em;text-shadow:0 1px 12px rgba(0,0,0,.25);pointer-events:none}.gallery-item-more:hover::after,.gallery-item-more:focus-visible::after{background:rgba(0,0,0,.60)}.gallery-item-more:focus-visible{outline:3px solid #fff;outline-offset:-5px}
@media(min-width:900px){.gallery-public{margin-left:0;margin-right:0;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}}

.gallery-item[hidden]{display:none!important}
.lb-backdrop{position:fixed;left:0;top:var(--lb-vvtop,0px);width:100vw;height:var(--lb-vvh,100dvh);background:#000;display:none;align-items:stretch;justify-content:stretch;z-index:2147483646;padding:0}.lb-backdrop.-show{display:flex}.lb-frame{width:100vw;height:100%;display:flex;flex-direction:column;background:#000;overflow:hidden}.lb-top-controls{flex:0 0 auto;display:flex;align-items:center;justify-content:flex-end;min-height:54px;padding:max(8px,env(safe-area-inset-top)) 16px 4px;box-sizing:border-box;background:#000}.lb-media{flex:1 1 auto;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}.lb-media.is-dragging{cursor:grabbing}.lb-media img{display:block;max-width:100vw;max-height:100%;width:auto;height:auto;object-fit:contain;pointer-events:none;will-change:transform;transform-origin:center center}.lb-controls{flex:0 0 auto;min-height:76px;padding:10px 16px max(18px,env(safe-area-inset-bottom));display:grid;grid-template-columns:42px minmax(0,1fr) 42px;align-items:center;gap:8px;background:#000}.lb-control-spacer{display:block;width:42px;height:42px}.lb-mobile-navgroup{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0}.lb-mobile-navgroup .lb-pager{flex:0 1 auto;min-width:88px}.lb-mobile-navgroup .lb-nav{flex:0 0 38px}.lb-control-btn{width:38px;height:38px;border:1px solid rgba(255,255,255,.38);border-radius:999px;background:rgba(255,255,255,.10);color:#fff;display:grid;place-items:center;cursor:pointer}.lb-control-btn,.lb-dot,.lb-pager,.lb-dots{touch-action:manipulation;-ms-touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}.lb-control-btn:focus-visible{outline:2px solid #fff;outline-offset:2px}.lb-close{font-size:22px;line-height:1}.lb-nav{font-size:28px;line-height:1;padding-bottom:3px}.lb-heart{background:#fff;border-color:#fff}.lb-heart svg{width:20px;height:20px;stroke:#111;fill:none;stroke-width:2}.lb-heart.is-liked svg{stroke:#ff4168;fill:#ff4168}.lb-pager{min-width:0;text-align:center;color:#fff}.lb-count{font-size:12px;line-height:1;margin-bottom:7px;color:rgba(255,255,255,.78)}.lb-dots{display:flex;align-items:center;justify-content:center;gap:6px;min-height:10px;overflow:hidden}.lb-dot{width:7px;height:7px;padding:0;border:0;border-radius:999px;background:rgba(255,255,255,.38);cursor:pointer;flex:0 0 auto}.lb-dot.is-active{background:#fff;transform:scale(1.22)}.lb-ellipsis{color:rgba(255,255,255,.62);font-size:13px;line-height:1;letter-spacing:1px;flex:0 0 auto;user-select:none;-webkit-user-select:none}
.lb-photo-info{flex:0 0 auto;width:100%;box-sizing:border-box;padding:0 16px 10px;text-align:center;color:#fff;background:#000}.lb-photo-info[hidden]{display:none!important}.lb-photo-info-inner{max-width:820px;margin:0 auto;font-size:14px;line-height:1.42;color:rgba(255,255,255,.92)}.lb-photo-caption-row{margin:0}.lb-photo-caption{white-space:pre-line}.lb-info-more{display:inline;border:0;padding:0;margin:0 0 0 .25rem;background:none;color:#fff;font:inherit;font-weight:650;text-decoration:underline;text-underline-offset:2px;cursor:pointer}.lb-info-more[hidden]{display:none!important}.lb-photo-meta{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.25rem;margin-top:4px;font-size:12.5px;line-height:1.35;color:rgba(255,255,255,.72)}.lb-photo-link{color:#fff;text-decoration:underline;text-underline-offset:2px}.lb-photo-link:hover,.lb-photo-link:focus-visible{color:#fff}.lb-photo-credit-label{color:rgba(255,255,255,.58)}

.lb-bottom-desktop{display:none}
@media(min-width:900px){
  .lb-frame{padding:10px 24px 16px}
  .lb-top-controls{display:flex;align-items:center;justify-content:flex-end;width:min(900px,calc(100vw - 120px));margin:0 auto 6px;min-height:42px;padding:0;background:#000}
  .lb-top-controls .lb-control-btn{width:38px;height:38px}
  .lb-media{padding:0;flex:1 1 auto}
  .lb-media img{max-width:min(1080px,calc(100vw - 96px));max-height:100%}
  .lb-controls{display:none}
  .lb-bottom-desktop{display:block;position:relative;width:min(900px,calc(100vw - 120px));min-height:42px;margin:8px auto 0;padding:0;background:#000}
  .lb-desktop-navcluster{display:grid;grid-template-columns:38px auto 38px;align-items:center;justify-content:center;gap:6px;width:max-content;margin:0 auto}
  .lb-bottom-desktop .lb-nav{width:36px;height:36px}
  .lb-bottom-desktop .lb-pager{min-width:82px;padding:0 2px}
  .lb-bottom-desktop .lb-count{margin-bottom:5px}
  .lb-bottom-desktop .lb-dots{gap:5px}
  .lb-heart-desktop{position:absolute;right:0;top:0;width:38px;height:38px}
}

/* V1.29 — mise en valeur des photos de galerie comme dans un cadre d'exposition.
   Le fond anthracite distingue mieux la fenetre des images sombres, et le passe-partout blanc
   ne concerne que la grande photo ouverte, jamais les vignettes de la mosaique. */
.lb-backdrop,.lb-frame,.lb-top-controls,.lb-controls,.lb-photo-info,.lb-bottom-desktop{background:#151515}
.lb-media{padding:12px 14px}
.lb-media img{
  max-width:calc(100vw - 44px);
  max-height:calc(100% - 24px);
  box-sizing:content-box;
  border:9px solid #fff;
  background:#fff;
  border-radius:2px;
  box-shadow:0 10px 36px rgba(0,0,0,.58);
}
@media(min-width:900px){
  .lb-media{padding:14px 18px}
  .lb-media img{
    max-width:min(1080px,calc(100vw - 132px));
    max-height:calc(100% - 28px);
    border-width:14px;
  }
}

/* V1.30 — troisième niveau de consultation : photo seule sur toute la fenêtre.
   Le niveau 2 conserve le cadre blanc, les infos, la navigation et le coeur.
   Le niveau 3 masque tout ce qui n'est pas la photo et laisse seulement une petite croix de retour. */
.lb-backdrop:not(.is-photo-fullscreen) .lb-top-controls{justify-content:space-between}
.lb-top-left{display:flex;align-items:center;gap:8px}
.lb-fullscreen-enter svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.lb-photo-fullscreen-exit{
  display:none;
  position:absolute;
  top:max(10px,env(safe-area-inset-top));
  right:max(10px,env(safe-area-inset-right));
  z-index:30;
  width:40px;
  height:40px;
  font-size:20px;
  line-height:1;
  background:rgba(20,20,20,.62);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.lb-backdrop.is-photo-fullscreen,.lb-backdrop.is-photo-fullscreen .lb-frame{background:#000}
.lb-backdrop.is-photo-fullscreen .lb-frame{position:relative;padding:0!important}
.lb-backdrop.is-photo-fullscreen .lb-top-controls,
.lb-backdrop.is-photo-fullscreen .lb-photo-info,
.lb-backdrop.is-photo-fullscreen .lb-controls,
.lb-backdrop.is-photo-fullscreen .lb-bottom-desktop{display:none!important}
.lb-backdrop.is-photo-fullscreen .lb-photo-fullscreen-exit{display:grid}
.lb-backdrop.is-photo-fullscreen .lb-media{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  padding:0!important;
  background:#000;
}
.lb-backdrop.is-photo-fullscreen .lb-media img{
  max-width:100vw!important;
  max-height:var(--lb-vvh,100dvh)!important;
  width:auto;
  height:auto;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  object-fit:contain;
}

/* V1.34 — Visualiseur HD unifie.
   La lightbox et le plein ecran utilisent exactement le meme fichier HD.
   Zoom focal ameliore : pinch tactile sur la zone visee, zoom molette centre sur le curseur,
   panoramique souris/tactile plus naturel, sans bloquer l'enregistrement de l'image. */
.lb-media{position:relative}
.lb-media img{
  max-width:none!important;
  max-height:none!important;
  width:auto;
  height:auto;
  object-fit:contain!important;
  pointer-events:auto!important;
  user-select:auto;
  -webkit-user-select:auto;
  -webkit-touch-callout:default;
  -webkit-user-drag:none;
  image-rendering:auto;
  transform:translate3d(0,0,0);
  transform-origin:center center;
}
.lb-backdrop.is-photo-fullscreen .lb-media img{
  max-width:none!important;
  max-height:none!important;
  width:auto;
  height:auto;
  object-fit:contain!important;
  transform:translate3d(0,0,0);
}
.lb-media.is-loading::after{
  content:"";
  position:absolute;
  left:50%;top:50%;
  width:34px;height:34px;
  margin:-17px 0 0 -17px;
  border:3px solid rgba(255,255,255,.28);
  border-top-color:#fff;
  border-radius:50%;
  animation:lb-spin .75s linear infinite;
  pointer-events:none;
}
@keyframes lb-spin{to{transform:rotate(360deg)}}

