/* Galerie CFEC — photos originales, navigation manuelle et lecture facultative. */
@media(min-width:981px){.main-nav>a:not(.button){white-space:nowrap}}
@media(min-width:981px) and (max-width:1180px){.main-nav{gap:12px}.header-inner{gap:16px}.main-nav>a:not(.button){font-size:.73rem}.main-nav .button{font-size:.71rem;padding-inline:12px}}
.gallery-intro .lead{max-width:800px}
.photo-gallery{padding-top:12px;scroll-margin-top:100px}
.gallery-filters,.slideshow-controls,.photo-thumbs,.gallery-keys{display:none}
.photo-gallery.is-ready .gallery-filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:24px}
.gallery-filters button,.slideshow-controls button,.gallery-dialog-nav button{font:inherit;min-height:44px;cursor:pointer;border:1px solid var(--line);background:transparent;color:var(--ink,#102b38);font-size:.84rem;font-weight:700;padding:10px 17px;border-radius:999px}
.gallery-filters button[aria-pressed="true"]{background:#102b38;color:#fff;border-color:#102b38}
.gallery-filters button span{opacity:.65;margin-left:7px;font-size:.78rem}
.gallery-filters button:hover{border-color:#102b38}
.photo-slide{margin:0 0 35px}
.photo-gallery.is-ready .photo-slide{margin:0}
.photo-slide[hidden],.photo-thumbs button[hidden]{display:none!important}
.slideshow-stage{border-radius:18px;overflow:hidden;scroll-margin-top:105px}
.photo-slide .slide-enlarge.gallery-open{display:block;position:relative;width:100%;height:clamp(360px,61vh,660px);margin:0;padding:0;border:0;border-radius:18px;background:#102b38;touch-action:pan-y}
.photo-slide .slide-enlarge.gallery-open img{display:block;width:100%;height:100%;object-fit:contain;transform:none;transition:none;user-select:none;-webkit-user-drag:none}
.photo-slide .slide-enlarge.gallery-open:hover img{transform:none}
.slide-caption{background:var(--paper,#f7f8f5);padding:24px 0 5px}
.slide-caption .small-label{color:var(--muted);font-size:.7rem}
.slide-caption h2{font-size:clamp(1.3rem,2vw,1.65rem);line-height:1.2;margin:8px 0 9px;letter-spacing:-.03em}
.slide-caption p{font-size:.92rem;color:var(--muted);margin:0;max-width:85ch}
.photo-gallery.is-ready .slideshow-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;justify-content:space-between;margin:20px 0}
.slide-navigation{display:flex;align-items:center;gap:16px}
.slide-navigation button,.gallery-dialog-nav button{font-size:1.2rem;padding:7px 18px;border-radius:12px}
.slideshow-controls button:disabled{opacity:.4;cursor:default}
.slide-count{font-size:.86rem;font-weight:700;min-width:80px;text-align:center;font-variant-numeric:tabular-nums}
.slide-play[aria-pressed="true"]{background:#102b38;color:#fff}
.photo-gallery.is-ready .gallery-keys{display:block;font-size:.8rem;color:var(--muted);margin:0 0 22px}
.photo-gallery.is-ready .photo-thumbs{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:12px;margin-top:22px;padding-top:24px;border-top:1px solid var(--line)}
.photo-thumbs button{position:relative;appearance:none;display:block;width:100%;aspect-ratio:4/3;min-width:0;padding:4px;border:2px solid transparent;border-radius:10px;background:#e7ece8;cursor:pointer}
.photo-thumbs img{display:block;width:100%;height:100%;object-fit:contain;border-radius:5px}
.photo-thumbs button[aria-current="true"]{border-color:#c94620;background:#fff}
.photo-thumbs button:hover{border-color:#102b38}
.photo-thumbs button::after{content:attr(data-number);position:absolute;left:7px;bottom:6px;border-radius:4px;background:#102b38e0;color:#fff;font-size:.62rem;padding:1px 5px}
.gallery-filters button:focus-visible,.slideshow-controls button:focus-visible,.photo-thumbs button:focus-visible,.slide-enlarge:focus-visible,.gallery-dialog-nav button:focus-visible,.metier-photo:focus-visible{outline:3px solid #19798a;outline-offset:4px}
.gallery-dialog-nav{display:flex;align-items:center;justify-content:center;gap:22px;margin-top:15px}
.gallery-dialog-nav .slide-count{min-width:85px}
.gallery-footer-note{margin-top:28px;color:var(--muted);font-size:.9rem}
.metier-photos{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px}
.metier-photos--three{grid-template-columns:repeat(3,minmax(0,1fr))}
.metier-photos--single{max-width:510px;grid-template-columns:1fr}
.metier-photo{display:block;text-decoration:none;color:inherit}
.metier-photo figure{margin:0}
.metier-photo img{display:block;width:100%;height:365px;object-fit:contain;background:#e7ece8;border:1px solid var(--line);border-radius:14px}
.metier-photo h3{margin:17px 0 8px;font-size:1.2rem}
.metier-photo p{margin:0;color:var(--muted);font-size:.91rem}
.metier-photo .photo-cta{display:block;margin-top:15px;color:#102b38;font-size:.82rem;font-weight:700;text-decoration:underline;text-underline-offset:4px}
.metier-gallery-link{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin-top:30px}
.gallery-backlinks{display:flex;flex-wrap:wrap;gap:12px;margin-top:25px}
.gallery-backlinks a{font-size:.9rem;text-decoration:underline;text-underline-offset:4px}
@media(max-width:800px){.photo-gallery.is-ready .photo-thumbs{grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.metier-photos--three{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.photo-slide .slide-enlarge.gallery-open{height:330px;border-radius:12px}.slideshow-stage{border-radius:12px}.photo-gallery.is-ready .gallery-filters{gap:8px;margin-bottom:18px}.gallery-filters button{font-size:.76rem;padding:8px 12px}.photo-gallery.is-ready .photo-thumbs{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.slide-caption{padding-top:20px}.slide-caption p{font-size:.86rem}.slide-navigation{gap:8px}.slideshow-controls .slide-play{font-size:.76rem;padding:9px 13px}.slide-count{min-width:68px;font-size:.79rem}.slide-navigation button{padding:7px 14px}.metier-photos,.metier-photos--three{grid-template-columns:1fr;gap:28px}.metier-photo img{height:350px}.metier-gallery-link .button{width:100%;justify-content:center}.gallery-keys{max-width:34ch}}
@media(max-width:360px){.photo-slide .slide-enlarge.gallery-open{height:295px}.slideshow-controls{gap:10px!important}.slideshow-controls .slide-play{width:100%}.slide-navigation{justify-content:space-between;width:100%}}
