/* Photos MS v3 : cadres remplis, sans marge ajoutée ni déformation. Recadrage individuel via --ms-photo-position. Logos, décors aria-hidden et zooms exclus. */
main :is(img[src*=".jpg" i],img[src*=".jpeg" i],img[src*=".webp" i],img[src*=".png" i]):not([src*="logo" i]):not(.ms-contractor-brand-logo):not([aria-hidden="true"]):not([aria-hidden="true"] img):not(:is(dialog,[role="dialog"],.lightbox,#lightbox,.zoom,#zoom,.photo-zoom,.ms-lightbox) img) {
  display:block;
  box-sizing:border-box;
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  max-height:none!important;
  aspect-ratio:1/1!important;
  object-fit:cover!important;
  object-position:var(--ms-photo-position,center)!important;
  padding:0!important;
  background:transparent;
  border:0!important;
  border-radius:0;
}
.hero-c .panel-wrap{margin-top:0!important}
.ms-photo-strip{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  width:100%;max-width:1200px;
  margin:0 auto;padding:16px 16px 0;
  box-sizing:border-box;
}
.ms-photo-frame{min-width:0;margin:0;padding:0;overflow:hidden}
main .ms-photo-frame>img{position:static!important;inset:auto!important;display:block;margin:0!important;transform:none!important}
.hero .photo.ms-square-photo{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;
  position:static!important;min-height:0!important;height:auto!important;
  aspect-ratio:auto!important;align-self:flex-start;padding:0;background:transparent;
}
.photos{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;overflow:visible!important;
  margin:24px 0 0!important;padding:0!important;
  scroll-snap-type:none!important;
}
.photos>figure{width:auto!important;min-width:0;margin:0;flex:none!important;scroll-snap-align:none}
.photos figcaption{padding:10px 8px!important;overflow-wrap:anywhere}
.ms-photo-cards,.ms-mixed-photo-cards{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;background:transparent!important;border:0!important;
}
.ms-photo-cards>.tile,.ms-mixed-photo-cards>.tile{grid-column:auto!important;min-width:0}
.ms-mixed-photo-cards>.tile.txt{aspect-ratio:auto!important;min-height:128px;padding:18px;justify-content:flex-start}
.audit-cards:has(img){grid-template-columns:1fr!important}
.realisations-grille{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}
.realisations-grille>figure{min-width:0}
.realisations-grille>figure>button{display:block;width:100%;height:auto!important;max-height:none!important;aspect-ratio:1/1!important;padding:0}
@media(min-width:600px){.audit-cards:has(img){grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(min-width:960px){
  .ms-photo-strip,.photos,.ms-photo-cards,.ms-mixed-photo-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .audit-cards:has(img){grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .realisations-grille{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:700px){
  .ms-photo-strip{gap:10px;padding-top:12px}
  .photos,.ms-photo-cards,.ms-mixed-photo-cards{gap:12px!important}
  main .ms-photo-frame>img{padding:0!important}
  .hero .photo.ms-square-photo{gap:10px}
}
@media(max-width:319px){.ms-photo-strip,.photos,.ms-photo-cards,.ms-mixed-photo-cards{grid-template-columns:1fr!important}}

/* Cartes volontairement rédactionnelles sans photographie correspondante. */
main .ph-grid>.ms-photo-text-only{box-sizing:border-box;min-width:0;min-height:150px;height:auto!important;aspect-ratio:auto!important;display:flex;align-items:flex-start;justify-content:flex-start;padding:22px;background:var(--light,#f3f4f6)!important;color:var(--ink,#202830);border:1px solid rgba(100,110,120,.2);overflow-wrap:anywhere}
main .ph-grid>.ms-photo-text-only>div{position:static!important;inset:auto!important;background:transparent!important;color:inherit!important;padding:0!important}
main .ph-grid>.ms-photo-text-only::before,main .ph-grid>.ms-photo-text-only::after{display:none!important}