/* Semi de la Pomme — portfolio photo, amélioration non destructive */
body{margin:0;background:#0b0e0b;color:#fff;font-family:'Poppins',sans-serif}
.gallery-page{background:#0b0e0b;overflow:hidden}
.gallery-hero{position:relative;isolation:isolate;min-height:clamp(590px,82vh,850px);box-sizing:border-box;padding:145px 28px 140px;display:flex;align-items:center;background:#0b0e0b;overflow:hidden}
.gallery-hero::before{content:"";position:absolute;z-index:-2;inset:0;background:url('images/img12.jpg') center 42%/cover no-repeat;transform:scale(1.015)}
.gallery-hero::after{content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,rgba(5,10,7,.57) 0%,rgba(5,10,7,.27) 55%,rgba(5,10,7,.13) 100%),linear-gradient(to bottom,rgba(11,14,11,.15) 0%,rgba(11,14,11,0) 28%,rgba(11,14,11,.12) 52%,rgba(11,14,11,.6) 76%,#0b0e0b 100%);pointer-events:none}
.gallery-hero-content{position:relative;width:100%;max-width:1190px;margin:auto;padding-bottom:25px}
.back-link{display:inline-flex;align-items:center;margin-bottom:44px;color:rgba(255,255,255,.9);text-decoration:none;font-size:14px;font-weight:600;transition:color .2s}
.back-link:hover{color:#b9e36c}
.gallery-hero span,.eyebrow{color:#b9e36c;font-weight:700;text-transform:uppercase;letter-spacing:.16em;font-size:12px}
.gallery-hero h1{max-width:920px;font-size:clamp(48px,7.5vw,106px);font-weight:700;line-height:1.02;letter-spacing:-.055em;margin:18px 0 24px;text-wrap:balance;text-shadow:0 2px 30px rgba(0,0,0,.15)}
.gallery-hero p{max-width:630px;color:rgba(255,255,255,.92);font-size:clamp(15px,1.5vw,19px);line-height:1.75;margin:0}
.gallery-section{position:relative;max-width:1260px;margin:-30px auto 0;padding:85px 28px 125px}
.gallery-top{display:flex;justify-content:space-between;gap:30px;align-items:end;margin-bottom:34px}
.gallery-top h2{font-size:clamp(27px,3.5vw,46px);line-height:1.12;letter-spacing:-.04em;margin:12px 0 0;font-weight:700}
#photo-count{color:#b7bdb7;font-size:13px;white-space:nowrap}
.filter-bar{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:32px}
.filter-btn{border:1px solid rgba(255,255,255,.19);background:rgba(255,255,255,.055);color:#fff;padding:11px 17px;border-radius:6px;cursor:pointer;font-family:inherit;font-size:12px;font-weight:600;transition:background .2s,color .2s,border-color .2s}
.filter-btn:hover,.filter-btn.active{background:#b9e36c;color:#14200c;border-color:#b9e36c}
.photo-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.photo-item{position:relative;aspect-ratio:1/1;border-radius:5px;overflow:hidden;background:#1a211b;cursor:pointer;box-shadow:none;transition:transform .25s ease,box-shadow .25s ease}


.photo-item img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .55s ease,filter .35s ease}
.photo-item:hover{transform:translateY(-3px);box-shadow:0 14px 38px rgba(0,0,0,.32)}
.photo-item:hover img{transform:scale(1.015);filter:saturate(1.06)}
.lightbox{position:fixed;inset:0;z-index:9999;background:rgba(5,9,7,.96);display:none;align-items:center;justify-content:center;padding:30px}
.lightbox.active{display:flex}
.lightbox img{max-width:92vw;max-height:86vh;border-radius:3px;object-fit:contain}
.lightbox-close,.lightbox-prev,.lightbox-next{position:absolute;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.12);color:#fff;cursor:pointer;font-size:2rem;border-radius:50%}
.lightbox-close{top:24px;right:24px;width:50px;height:50px}
.lightbox-prev,.lightbox-next{top:50%;transform:translateY(-50%);width:54px;height:54px}
.lightbox-prev{left:20px}.lightbox-next{right:20px}
@media(max-width:900px){.photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.photo-item:nth-child(9n + 6){grid-column:span 1;aspect-ratio:4/3}}
@media(max-width:650px){.gallery-hero{min-height:670px;padding:125px 20px 130px;align-items:center}.gallery-hero::before{background-position:58% center}.gallery-hero::after{background:linear-gradient(90deg,rgba(5,10,7,.55),rgba(5,10,7,.14)),linear-gradient(to bottom,rgba(11,14,11,.15) 0%,transparent 32%,rgba(11,14,11,.45) 72%,#0b0e0b 100%)}.gallery-hero-content{padding-bottom:0}.back-link{margin-bottom:38px}.gallery-hero h1{font-size:clamp(45px,12vw,68px)}.gallery-section{margin:-50px auto 0;padding:65px 16px 90px}.gallery-top{display:block}.gallery-top h2{font-size:29px}#photo-count{margin-top:16px}.photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.photo-item,.photo-item:nth-child(9n + 1),.photo-item:nth-child(9n + 6){grid-column:auto;grid-row:auto;aspect-ratio:1/1}.lightbox-prev,.lightbox-next{display:none}}
@media(prefers-reduced-motion:reduce){.photo-item,.photo-item img,.filter-btn{transition:none}}

/* Animations élégantes et légères — sans agrandir les images */
@keyframes pommeHeroReveal{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}
@keyframes pommeImageReveal{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
@keyframes pommeBackgroundReveal{from{opacity:.65;transform:scale(1.045)}to{opacity:1;transform:scale(1.015)}}
.gallery-hero::before{animation:pommeBackgroundReveal 1.7s cubic-bezier(.2,.7,.2,1) both}
.gallery-hero-content>*{animation:pommeHeroReveal .8s cubic-bezier(.2,.7,.2,1) both}
.gallery-hero-content>*:nth-child(2){animation-delay:.10s}
.gallery-hero-content>*:nth-child(3){animation-delay:.18s}
.gallery-hero-content>*:nth-child(4){animation-delay:.26s}
.gallery-top{animation:pommeHeroReveal .75s ease both;animation-delay:.15s}
.photo-item{animation:pommeImageReveal .65s cubic-bezier(.2,.7,.2,1) both;animation-delay:.08s}
.photo-item:nth-child(8n + 2){animation-delay:.13s}
.photo-item:nth-child(8n + 3){animation-delay:.18s}
.photo-item:nth-child(8n + 4){animation-delay:.23s}
.photo-item:nth-child(8n + 5){animation-delay:.28s}
.photo-item:nth-child(8n + 6){animation-delay:.33s}
.photo-item:nth-child(8n + 7){animation-delay:.38s}
.photo-item:nth-child(8n + 8){animation-delay:.43s}
.photo-item:focus-visible,.filter-btn:focus-visible,.back-link:focus-visible{outline:2px solid #b9e36c;outline-offset:4px}
.photo-item img{backface-visibility:hidden}
@media(prefers-reduced-motion:reduce){.gallery-hero::before,.gallery-hero-content>*,.gallery-top,.photo-item{animation:none!important}}

/* Couverture propre à l'édition 2026, sans modifier les autres galeries */
.gallery-hero::before{background-image:url('images/galerie-2026-couverture.jpg');background-position:center 53%}
.gallery-hero .gallery-meta{margin-top:18px;color:rgba(255,255,255,.72);font-size:14px}
.empty-gallery{padding:40px 20px;text-align:center;color:#c4cac4}
.photo-item{border:0;padding:0;font:inherit}
