/* Présentation locale des exemples de Prestations B. */
/* Bandeau hero Prestations B : option 3 (16:9, contain, fond crème), largeur maximale */
.prestations-b .cl-banner--studies {
  margin: 0 auto var(--space-xl);
  width: min(100%, calc(100vw - 1.25rem));
  max-width: 96rem;
  gap: clamp(6px, 0.9vw, 14px);
  padding: 0 clamp(4px, 1.5vw, 20px);
}
.cl-banner--studies img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--color-bg);
}
.cl-banner--studies figcaption { grid-column: 1 / -1; text-align: center; font-size: .75rem; color: var(--color-text-muted); padding: 8px 0; }
.prestations-b .cl-service { gap: clamp(24px, 4vw, 64px); scroll-margin-top: 100px; }
.prestations-b .cl-service > * { min-width: 0; }
.service-gallery { border: 1px solid var(--color-secondary); background: var(--color-white); }
.service-gallery--single .service-gallery__slide[hidden] { display: block !important; visibility: visible; }
.service-gallery__slide { margin: 0; }
.service-gallery [hidden] { display: none !important; }
.service-gallery__image { display: flex; align-items: center; justify-content: center; position: relative; aspect-ratio: 4 / 3; padding: 16px; background: var(--color-white); overflow: hidden; }
.service-gallery__image:hover { opacity: 1; }
.prestations-b .service-gallery__image img { width: 100%; height: 100%; min-height: 0; object-fit: contain; aspect-ratio: auto; }
.service-gallery__zoom { position: absolute; right: 12px; bottom: 12px; background: var(--color-bg); border: 1px solid var(--color-secondary); padding: 4px 10px; font-size: .75rem; color: var(--color-accent); }
.service-gallery__caption { padding: 20px 24px 18px; border-top: 1px solid var(--color-bg); min-height: 174px; }
.service-gallery__title { font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.3; display: block; margin-bottom: 8px; }
.service-gallery__caption p { margin: 0 0 10px; color: var(--color-text-muted); font-size: .9rem; line-height: 1.55; }
.service-gallery__caption small { display: block; font-size: .72rem; color: var(--color-text-muted); }
.service-gallery__controls { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 10px 12px; border-top: 1px solid var(--color-secondary); }
.service-gallery button, .gallery-dialog button { appearance: none; font: inherit; color: var(--color-accent); background: transparent; border: 1px solid transparent; border-radius: 2px; cursor: pointer; min-width: 40px; min-height: 44px; }
.service-gallery button:hover, .gallery-dialog button:hover { background: var(--color-bg); }
.service-gallery button:focus-visible, .service-gallery a:focus-visible, .gallery-dialog button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -3px; }
.service-gallery__dots { display: flex; gap: 0; }
.service-gallery__dots button { min-width: 28px; padding: 0; display: grid; place-items: center; }
.service-gallery__dots span { width: 7px; height: 7px; border: 1px solid var(--color-accent); border-radius: 100%; }
.service-gallery__dots [aria-current="true"] span { background: var(--color-accent); }
.service-gallery__count { color: var(--color-text-muted); font-size: .75rem; min-width: 36px; text-align: center; }
.service-gallery .service-gallery__play { font-size: .78rem; padding: 0 10px; margin-left: auto; border-color: var(--color-secondary); }
.service-gallery__note { color: var(--color-text-muted); font-size: .75rem; line-height: 1.5; margin: 12px 0 0; }
.service-gallery.is-enhanced .service-gallery__slides { display: grid; }
.service-gallery.is-enhanced .service-gallery__slide { grid-area: 1 / 1; }
/* Les légendes occupent toutes la grille : la hauteur ne saute pas entre deux images. */
.service-gallery.is-enhanced .service-gallery__slide[hidden] { display: block !important; visibility: hidden; pointer-events: none; }
.service-gallery.is-enhanced .service-gallery__slide:not([hidden]) { animation: gallery-reveal .35s ease-out; }
@keyframes gallery-reveal { from { opacity: .4; } to { opacity: 1; } }
.gallery-dialog { width: min(1200px, calc(100% - 24px)); max-height: calc(100dvh - 24px); padding: 20px; border: 1px solid var(--color-secondary); background: var(--color-bg); color: var(--color-text); }
.gallery-dialog::backdrop { background: rgba(44,42,38,.8); }
.gallery-dialog__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.gallery-dialog__toolbar h2 { font-size: 1.25rem; margin: 0; }
.gallery-dialog button { flex-shrink: 0; padding: 0 12px; border-color: var(--color-secondary); }
.gallery-dialog img { width: 100%; max-height: 70vh; object-fit: contain; background: var(--color-white); }
.gallery-dialog > p { font-size: .85rem; margin: 14px 0 0; }
body.gallery-open { overflow: hidden; }
@media (min-width: 768px) and (max-width: 1050px) {
  .prestations-b .cl-service { grid-template-columns: 1fr; max-width: 700px; margin-inline: auto; }
  .prestations-b .cl-service .cl-service__media { order: 0; }
  .prestations-b .cl-service .cl-service__body { order: 1; }
  .prestations-b .nav-toggle { display: flex; }
  .prestations-b .site-nav:not(.site-nav--open) { display: none; }
}
@media (max-width: 640px) {
  .prestations-b .cl-banner--studies { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px; }
  .cl-banner--studies figcaption { font-size: .67rem; }
  .service-gallery__caption { padding: 16px; min-height: 180px; }
  .service-gallery__image { padding: 8px; }
  .service-gallery__controls { padding: 8px; gap: 2px; }
  .service-gallery__dots button { min-width: 24px; }
  .service-gallery__zoom { font-size: .7rem; bottom: 8px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .prestations-b { scroll-behavior: auto; }
  html:has(.prestations-b) { scroll-behavior: auto; }
  .service-gallery.is-enhanced .service-gallery__slide:not([hidden]) { animation: none; }
}
