Veranda of Le Brasseur RestaurantProud Vessel in the HarborVintage BicycleShore of Lake NeuchâtelA Street in the City Center, NeuchâtelThe VistaView of the Port EntranceBird AerodromeA Day’s Stroll at the PortUninspiring WeatherBlurred VisionThe Fire Hydrant and the SnowReflections in a WindowWinter, the Stones, the Snow, the LakeThe Fantastic Five in the SnowTypical Architecture of La Chaux-de-Fonds
/* Style de secours si la feuille principale n’est pas chargée (sinon, il s’efface) */
.filters{display:flex;flex-wrap:wrap;gap:.5rem;margin:24px 0 32px}
.filter-chip{padding:.45rem .75rem;border:1px solid #D9D7D2;border-radius:999px;background:#fff;cursor:pointer;font-size:.95rem;line-height:1}
.filter-chip[aria-pressed=”true”]{border-color:#E7B770;box-shadow:inset 0 0 0 1px #E7B770}
.filters-status{font-size:.925rem;color:#555;margin-left:.5rem}
.sb-hidden{display:none!important}
.sb-page{opacity:0;transition:opacity .25s ease}
.sb-page.sb-ready{opacity:1}
.sb-page.sb-out{opacity:0}
@media (prefers-reduced-motion: reduce){.sb-page,.sb-page.sb-out{transition:none!important;opacity:1!important}}
/* =========================================================
PACK UNIQUE — Transitions de page + Filtres de galerie
– Colle ce bloc dans un “Bloc HTML” au-dessus de la galerie
– Fonctionne sans autre dépendance
========================================================= */
(function(){
// ———- 1) Transitions de page (fade in/out) ———-
const docEl = document.documentElement;
if(!matchMedia(‘(prefers-reduced-motion: reduce)’).matches){
docEl.classList.add(‘sb-page’);
window.addEventListener(‘pageshow’, ()=> docEl.classList.add(‘sb-ready’), { once:true });
document.addEventListener(‘click’, (e)=>{
const a = e.target.closest(‘a’);
if(!a) return;
const url = new URL(a.href, location.href);
const external = url.origin !== location.origin;
const hasTarget = a.target && a.target !== ‘_self’;
const isHash = url.pathname === location.pathname && url.hash;
const isFile = /\.(jpe?g|png|webp|avif|pdf|zip|mp4)(\?.*)?$/i.test(url.pathname);
const isAdmin = /\/wp-admin\//.test(url.pathname);
if(external || hasTarget || isHash || isFile || isAdmin) return;
if(a.hasAttribute(‘data-sb-lightbox’)) return; // laisser la lightbox
e.preventDefault();
docEl.classList.add(‘sb-out’);
setTimeout(()=>{ location.href = url.href; }, 180);
});
} else {
docEl.classList.add(‘sb-ready’);
}
// ———- 2) Filtres de galerie ———-
const gallerySel = ‘.wp-block-gallery, .kadence-gallery, .gallery, .kt-blocks-gallery’;
const filters = document.currentScript.previousElementSibling.previousElementSibling; // le