/* Galerie clients Cartec — présentation compacte et visionneuse. */
body.page-id-5353 .sc-client-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: clamp(16px, 2vw, 26px) !important;
  align-items: stretch !important;
  margin: 24px 0 50px !important;
}
body.page-id-5353 .sc-client-card {
  display: flex !important;
  flex-direction: column !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid #e1e7e8 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 10px 28px rgba(17, 34, 43, .07) !important;
  transition: transform .25s ease, box-shadow .25s ease;
}
body.page-id-5353 .sc-client-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 17px 40px rgba(17, 34, 43, .13) !important;
}
body.page-id-5353 .sc-client-card .cs-proof-slot {
  display: block !important;
  flex: none !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #17232a !important;
}
body.page-id-5353 .sc-client-card .cs-proof-open {
  display: block !important;
  position: relative;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  background: #17232a !important;
  cursor: zoom-in;
}
body.page-id-5353 .sc-client-card .cs-proof-image {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  transition: transform .4s ease;
}
body.page-id-5353 .sc-client-card:hover .cs-proof-image { transform: scale(1.035); }
body.page-id-5353 .sc-client-card figcaption {
  display: block !important;
  flex: 1 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 14px 18px 17px !important;
  border: 0 !important;
  background: #fff !important;
  color: #33434b !important;
  font-size: clamp(14px, 1.2vw, 16px) !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}
body.page-id-5353 .sc-client-card .cs-proof-open:focus-visible {
  outline: 3px solid #167447 !important;
  outline-offset: -3px;
}
@media (max-width: 700px) {
  body.page-id-5353 .sc-client-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important;
    margin: 18px 0 38px !important;
  }
  body.page-id-5353 .sc-client-card .cs-proof-open { aspect-ratio: 4 / 3 !important; }
  body.page-id-5353 .sc-client-card figcaption {
    padding: 12px 15px 14px !important;
    font-size: 15px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.page-id-5353 .sc-client-card,
  body.page-id-5353 .sc-client-card .cs-proof-image { transition: none !important; }
}

/* The site's global proof-image rules use an ID and !important. Scope the
   gallery override more tightly so the photos occupy the actual card. */
html body.page-id-5353 #cartec-main .entry-content.entry-content figure.sc-client-card {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #e1e7e8 !important;
  box-shadow: 0 10px 28px rgba(17, 34, 43, .07) !important;
}
html body.page-id-5353 #cartec-main .entry-content.entry-content .sc-client-card .cs-proof-slot.cs-proof-slot {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #17232a !important;
}
html body.page-id-5353 #cartec-main .entry-content.entry-content .sc-client-card .cs-proof-slot.cs-proof-slot > a.cs-proof-open {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #17232a !important;
}
html body.page-id-5353 #cartec-main .entry-content.entry-content .sc-client-card .cs-proof-slot.cs-proof-slot > a.cs-proof-open > img.cs-proof-image {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  background: #17232a !important;
}
html body.page-id-5353 #cartec-main .entry-content.entry-content .sc-client-card.sc-photo-portrait .cs-proof-slot.cs-proof-slot > a.cs-proof-open > img.cs-proof-image {
  object-fit: contain !important;
}

body.sc-lightbox-open { overflow: hidden !important; }
#sc-client-lightbox {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #0e1418 !important;
  color: #fff !important;
  overflow: hidden !important;
}
#sc-client-lightbox::backdrop { background: rgba(0, 0, 0, .92) !important; }
#sc-client-lightbox .sc-lightbox-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: max(14px, env(safe-area-inset-top)) 18px max(14px, env(safe-area-inset-bottom));
  box-sizing: border-box;
}
#sc-client-lightbox .sc-lightbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex: 0 0 auto;
  min-height: 44px;
}
#sc-client-lightbox .sc-lightbox-meta { min-width: 0; }
#sc-client-lightbox .sc-lightbox-group {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #c4d1cf;
  font: 600 13px/1.2 inherit;
  letter-spacing: .1em;
  text-transform: uppercase;
}
#sc-client-lightbox .sc-lightbox-count {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 14px;
}
#sc-client-lightbox button {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
  color: #fff;
  cursor: pointer;
  font: 300 28px/1 Arial, sans-serif;
}
#sc-client-lightbox button:hover, #sc-client-lightbox button:focus-visible {
  background: #18724b;
  border-color: #4aad7a;
  outline: none;
}
#sc-client-lightbox .sc-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  margin: 8px 0;
  touch-action: pan-y;
}
#sc-client-lightbox .sc-lightbox-photo {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100% - 132px);
  max-height: 100%;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 14px 45px rgba(0, 0, 0, .35);
}
#sc-client-lightbox .sc-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
#sc-client-lightbox .sc-lightbox-prev { left: 4px; }
#sc-client-lightbox .sc-lightbox-next { right: 4px; }
#sc-client-lightbox .sc-lightbox-caption {
  flex: 0 0 auto;
  max-height: 3.2em;
  margin: 0 auto;
  overflow: auto;
  color: #e5eae8;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}
@media (max-width: 700px) {
  #sc-client-lightbox .sc-lightbox-layout { padding-right: 12px; padding-left: 12px; }
  #sc-client-lightbox .sc-lightbox-stage { margin: 6px -12px; }
  #sc-client-lightbox .sc-lightbox-photo { max-width: 100%; max-height: 100%; }
  #sc-client-lightbox .sc-lightbox-nav { top: auto; bottom: 12px; transform: none; width: 44px; height: 44px; background: rgba(5, 13, 17, .7); }
  #sc-client-lightbox .sc-lightbox-prev { left: 14px; }
  #sc-client-lightbox .sc-lightbox-next { right: 14px; }
  #sc-client-lightbox .sc-lightbox-caption { font-size: 14px; padding: 2px 42px 0; }
}
