/* My89 Gallery 1.0.0
   Référence fonctionnelle et visuelle : galerie publique espace.php (septembre 2026).
   Toute évolution transversale de la galerie publique My89 doit partir de ce fichier. */

.my89-gallery-section{margin:.7rem 0 1.25rem}
.my89-gallery-section .gallery-head{display:flex;align-items:baseline;gap:.55rem;margin:1.2rem 0 .55rem}
.my89-gallery-section .gallery-head .section-title{margin:0}
.my89-gallery-section .gallery-count{font-size:.9rem;font-weight:500;color:#666}
.my89-gallery-section .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}
.my89-gallery-section .gallery-item{position:relative;display:block;border:0;padding:0;cursor:pointer;aspect-ratio:1/1;overflow:hidden;background:#eee}
.my89-gallery-section .gallery-item img{display:block;width:100%;height:100%;object-fit:cover}
.my89-gallery-section .gallery-item-more::after{content:"";position:absolute;inset:0;background:rgba(0,0,0,.52)}
.my89-gallery-section .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}
.my89-gallery-section .gallery-item-more:hover::after,.my89-gallery-section .gallery-item-more:focus-visible::after{background:rgba(0,0,0,.60)}
.my89-gallery-section .gallery-item-more:focus-visible{outline:3px solid #fff;outline-offset:-5px}
.my89-gallery-section .gallery-item[hidden]{display:none!important}
@media(min-width:900px){.my89-gallery-section .gallery-public{margin-left:0;margin-right:0;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}}

.my89-gallery-section .lb-backdrop{position:fixed;left:0;top:var(--lb-vvtop,0px);width:100vw;height:var(--lb-vvh,100dvh);background:#151515;display:none;align-items:stretch;justify-content:stretch;z-index:2147483646;padding:0}
.my89-gallery-section .lb-backdrop.-show{display:flex}
.my89-gallery-section .lb-frame{width:100vw;height:100%;display:flex;flex-direction:column;background:#151515;overflow:hidden}
.my89-gallery-section .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:#151515}
.my89-gallery-section .lb-media{position:relative;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;padding:12px 14px}
.my89-gallery-section .lb-media.is-dragging{cursor:grabbing}
.my89-gallery-section .lb-media img{display:block;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;will-change:transform;transform:translate3d(0,0,0);transform-origin:center center;box-sizing:content-box;border:9px solid #fff;background:#fff;border-radius:2px;box-shadow:0 10px 36px rgba(0,0,0,.58)}
.my89-gallery-section .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:#151515}
.my89-gallery-section .lb-control-spacer{display:block;width:42px;height:42px}
.my89-gallery-section .lb-mobile-navgroup{display:flex;align-items:center;justify-content:center;gap:7px;min-width:0}
.my89-gallery-section .lb-mobile-navgroup .lb-pager{flex:0 1 auto;min-width:88px}
.my89-gallery-section .lb-mobile-navgroup .lb-nav{flex:0 0 38px}
.my89-gallery-section .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;text-decoration:none}
.my89-gallery-section .lb-control-btn,.my89-gallery-section .lb-dot,.my89-gallery-section .lb-pager,.my89-gallery-section .lb-dots{touch-action:manipulation;-ms-touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}
.my89-gallery-section .lb-control-btn:focus-visible{outline:2px solid #fff;outline-offset:2px}
.my89-gallery-section .lb-close{font-size:22px;line-height:1}
.my89-gallery-section .lb-nav{font-size:28px;line-height:1;padding-bottom:3px}
.my89-gallery-section .lb-heart{background:#fff;border-color:#fff}
.my89-gallery-section .lb-heart svg{width:20px;height:20px;stroke:#111;fill:none;stroke-width:2}
.my89-gallery-section .lb-heart.is-liked svg{stroke:#ff4168;fill:#ff4168}
.my89-gallery-section .lb-heart:disabled{opacity:.55;cursor:wait}
.my89-gallery-section .lb-pager{min-width:0;text-align:center;color:#fff}
.my89-gallery-section .lb-count{font-size:12px;line-height:1;margin-bottom:7px;color:rgba(255,255,255,.78)}
.my89-gallery-section .lb-dots{display:flex;align-items:center;justify-content:center;gap:6px;min-height:10px;overflow:hidden}
.my89-gallery-section .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}
.my89-gallery-section .lb-dot.is-active{background:#fff;transform:scale(1.22)}
.my89-gallery-section .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}

.my89-gallery-section .lb-photo-info{flex:0 0 auto;width:100%;box-sizing:border-box;padding:0 16px 10px;text-align:center;color:#fff;background:#151515}
.my89-gallery-section .lb-photo-info[hidden]{display:none!important}
.my89-gallery-section .lb-photo-info-inner{max-width:820px;margin:0 auto;font-size:14px;line-height:1.42;color:rgba(255,255,255,.92)}
.my89-gallery-section .lb-photo-caption-row{margin:0}
.my89-gallery-section .lb-photo-caption{white-space:pre-line}
.my89-gallery-section .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}
.my89-gallery-section .lb-info-more[hidden]{display:none!important}
.my89-gallery-section .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)}
.my89-gallery-section .lb-photo-link{color:#fff;text-decoration:underline;text-underline-offset:2px}
.my89-gallery-section .lb-photo-link:hover,.my89-gallery-section .lb-photo-link:focus-visible{color:#fff}
.my89-gallery-section .lb-photo-credit-label{color:rgba(255,255,255,.58)}

.my89-gallery-section .lb-bottom-desktop{display:none;background:#151515}
@media(min-width:900px){
  .my89-gallery-section .lb-frame{padding:10px 24px 16px}
  .my89-gallery-section .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:#151515}
  .my89-gallery-section .lb-top-controls .lb-control-btn{width:38px;height:38px}
  .my89-gallery-section .lb-media{padding:14px 18px;flex:1 1 auto}
  .my89-gallery-section .lb-media img{border-width:14px}
  .my89-gallery-section .lb-controls{display:none}
  .my89-gallery-section .lb-bottom-desktop{display:block;position:relative;width:min(900px,calc(100vw - 120px));min-height:42px;margin:8px auto 0;padding:0}
  .my89-gallery-section .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}
  .my89-gallery-section .lb-bottom-desktop .lb-nav{width:36px;height:36px}
  .my89-gallery-section .lb-bottom-desktop .lb-pager{min-width:82px;padding:0 2px}
  .my89-gallery-section .lb-bottom-desktop .lb-count{margin-bottom:5px}
  .my89-gallery-section .lb-bottom-desktop .lb-dots{gap:5px}
  .my89-gallery-section .lb-heart-desktop{position:absolute;right:0;top:0;width:38px;height:38px}
}

.my89-gallery-section .lb-backdrop:not(.is-photo-fullscreen) .lb-top-controls{justify-content:space-between}
.my89-gallery-section .lb-top-left{display:flex;align-items:center;gap:8px}
.my89-gallery-section .lb-fullscreen-enter svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.my89-gallery-section .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)}
.my89-gallery-section .lb-backdrop.is-photo-fullscreen,.my89-gallery-section .lb-backdrop.is-photo-fullscreen .lb-frame{background:#000}
.my89-gallery-section .lb-backdrop.is-photo-fullscreen .lb-frame{position:relative;padding:0!important}
.my89-gallery-section .lb-backdrop.is-photo-fullscreen .lb-top-controls,.my89-gallery-section .lb-backdrop.is-photo-fullscreen .lb-photo-info,.my89-gallery-section .lb-backdrop.is-photo-fullscreen .lb-controls,.my89-gallery-section .lb-backdrop.is-photo-fullscreen .lb-bottom-desktop{display:none!important}
.my89-gallery-section .lb-backdrop.is-photo-fullscreen .lb-photo-fullscreen-exit{display:grid}
.my89-gallery-section .lb-backdrop.is-photo-fullscreen .lb-media{position:absolute;inset:0;width:100%;height:100%;padding:0!important;background:#000}
.my89-gallery-section .lb-backdrop.is-photo-fullscreen .lb-media img{max-width:none!important;max-height:none!important;width:auto;height:auto;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;object-fit:contain!important;transform:translate3d(0,0,0)}
.my89-gallery-section .lb-download-link{text-decoration:none;font-size:19px;line-height:1}
.my89-gallery-section .lb-photo-fullscreen-download{display:none;position:absolute;top:max(10px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));z-index:30;width:40px;height:40px;background:rgba(20,20,20,.62);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.my89-gallery-section .lb-backdrop.is-photo-fullscreen .lb-photo-fullscreen-download{display:grid}
.my89-gallery-section .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:my89-gallery-spin .75s linear infinite;pointer-events:none}
@keyframes my89-gallery-spin{to{transform:rotate(360deg)}}
