/* UX17.4 — mobile-first photo management */
.bd-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,145px),1fr));gap:12px;margin:12px 0}
.bd-photo-preview{border:1px solid #d0d7de;border-radius:12px;padding:8px;display:grid;gap:7px;min-width:0;overflow-wrap:anywhere;background:rgba(255,255,255,.07);font-size:.82rem}
.bd-photo-preview>img{width:100%;height:112px;object-fit:cover;border-radius:8px;background:#dce5ee}
.bd-photo-ok{color:#157347}.bd-photo-bad{color:#ad2727}.bd-photo-hint{font-size:.87rem;opacity:.85}
.bd-photo-actions{display:flex;flex-wrap:wrap;gap:5px}.bd-photo-actions button{font-size:.76rem;padding:6px 8px}
.bd-photo-viewer{width:100%;max-width:980px;margin:12px auto;outline-offset:3px}
.bd-photo-stage{height:clamp(250px,47vw,590px);background:#edf1f5;position:relative;display:flex;align-items:center;justify-content:space-between;border-radius:14px;overflow:hidden}
.bd-photo-stage>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:0}
.bd-photo-nav{position:relative;z-index:2;border:1px solid #cbd5e1;border-radius:50%;width:40px;height:40px;font-size:30px;background:rgba(255,255,255,.86);color:#10283f;cursor:pointer;margin:8px}
.bd-photo-counter{text-align:center;margin:7px 0;font-weight:600}
.bd-photo-thumbs{display:flex;gap:8px;overflow-x:auto;padding:8px 1px;scroll-snap-type:x mandatory}
.bd-photo-thumb{flex:0 0 84px;height:66px;padding:2px;border:2px solid transparent;border-radius:9px;background:transparent;scroll-snap-align:start;cursor:pointer}
.bd-photo-thumb[aria-current=true]{border-color:#1769aa}.bd-photo-thumb img{display:block;width:100%;height:100%;border-radius:5px;object-fit:cover}
@media(max-width:600px){.bd-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bd-photo-preview>img{height:120px}.bd-photo-stage{height:300px}.bd-photo-nav{height:38px;width:38px}.bd-photo-thumb{flex-basis:74px;height:60px}}

/* UX17.4 — image de couverture Marketplace avec URL signée */
.market-cover--image{overflow:hidden;padding:0;letter-spacing:normal}
.market-cover--image img{width:100%;height:100%;object-fit:cover;display:block}

/* V25 gallery lightbox — scoped and mobile safe */
.bd-photo-open{position:absolute;right:9px;bottom:9px;z-index:3;padding:7px 12px;border:0;border-radius:20px;background:rgba(12,28,43,.87);color:#fff;cursor:pointer;font-weight:600}
.bd-photo-lightbox{position:fixed;inset:0;z-index:2147483640;background:rgba(0,0,0,.96);display:flex;align-items:center;justify-content:center;color:white;touch-action:pan-y}
.bd-photo-lightbox-pane{position:absolute;inset:55px 0 80px;overflow:hidden;display:flex;align-items:center;justify-content:center;touch-action:none}
.bd-photo-lightbox-img{width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-select:none;transform-origin:center center;will-change:transform}
.bd-photo-lightbox-close,.bd-photo-lightbox-prev,.bd-photo-lightbox-next{position:absolute;z-index:3;border:0;border-radius:50%;background:rgba(30,40,50,.86);color:white;cursor:pointer}
.bd-photo-lightbox-close{top:max(12px,env(safe-area-inset-top));right:14px;width:48px;height:48px;font-size:35px}
.bd-photo-lightbox-prev,.bd-photo-lightbox-next{top:50%;width:42px;height:52px;font-size:38px;transform:translateY(-50%)}
.bd-photo-lightbox-prev{left:5px}.bd-photo-lightbox-next{right:5px}
.bd-photo-lightbox-info{position:absolute;bottom:max(12px,env(safe-area-inset-bottom));text-align:center;font-size:13px}
.bd-photo-lightbox-info::before{content:attr(data-counter);display:block;font-weight:700;margin-bottom:4px}
@media(max-width:600px){.bd-photo-lightbox-pane{inset:60px 0 75px}.bd-photo-lightbox-prev,.bd-photo-lightbox-next{width:35px;height:45px}}
