.kit-galerie {
  --thumb-size: 72px;
  --thumb-gap: 10px;
  --thumb-border: #d9d9d9;
  --thumb-active: #111111;
  --thumb-radius: 8px;
  --arrow-size: 42px;

  --gallery-bg: #cbc4b8;
  --gallery-bg-white: #ffffff;

  --thumb-bg: #ffffff;
  --thumb-hover-bg: #f3efe8;

  --arrow-bg: rgba(255, 255, 255, 0.95);
  --arrow-hover-bg: #e6ded2;
  --arrow-color: #111111;

  --zoom-size: 38px;
  --zoom-bg: rgba(255, 255, 255, 0.92);

  width: 100%;
}

/* =========================
   IMAGE PRINCIPALE
========================= */

.kit-galerie__main {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  border-radius: 8px;
  isolation: isolate;
  line-height: 0;
  background: var(--gallery-bg);
}

.kit-galerie__main.is-white-bg {
  background: var(--gallery-bg-white);
}

.kit-galerie__main.is-beige-bg {
  background: var(--gallery-bg);
}

.kit-galerie__mainImg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: inherit;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.kit-galerie__mainImg.fit-cover {
  object-fit: cover !important;
}

.kit-galerie__mainImg.fit-contain {
  object-fit: contain !important;
}

.kit-galerie__mainImg.pos-center {
  object-position: center center !important;
}

.kit-galerie__mainImg.pos-left {
  object-position: left center !important;
}

.kit-galerie__mainImg.pos-right {
  object-position: right center !important;
}

.kit-galerie__mainImg.pos-center {
  object-position: center center;
}

.kit-galerie__mainImg.pos-left {
  object-position: left center;
}

.kit-galerie__mainImg.pos-right {
  object-position: right center;
}

/* =========================
   MINIATURES
========================= */

.kit-galerie__thumbs {
  display: flex;
  gap: var(--thumb-gap);
  margin-top: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}

.kit-galerie__thumb {
  width: var(--thumb-size);
  min-width: var(--thumb-size);
  height: var(--thumb-size);
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--thumb-border);
  border-radius: var(--thumb-radius);
  background: var(--thumb-bg);
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  box-shadow: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.kit-galerie__thumb:hover,
.kit-galerie__thumb:focus,
.kit-galerie__thumb:focus-visible,
.kit-galerie__thumb:active {
  background: var(--thumb-hover-bg);
  border-color: var(--thumb-border);
  box-shadow: none;
  outline: none;
}

.kit-galerie__thumb.is-active {
  border-color: var(--thumb-active);
}

.kit-galerie__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  border-radius: inherit;
}

/* =========================
   FLÈCHES
========================= */

.kit-galerie__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;

  width: var(--arrow-size);
  height: var(--arrow-size);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;

  border: 0;
  border-radius: 999px;
  background: var(--arrow-bg);
  color: var(--arrow-color);
  cursor: pointer;

  box-shadow: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;

  transition: background-color .2s ease, color .2s ease;
}

.kit-galerie__arrow:hover,
.kit-galerie__arrow:focus,
.kit-galerie__arrow:focus-visible,
.kit-galerie__arrow:active {
  background: var(--arrow-hover-bg);
  color: var(--arrow-color);
  box-shadow: none;
  outline: none;
}

.kit-galerie__arrow--prev {
  left: 12px;
}

.kit-galerie__arrow--next {
  right: 12px;
}

.arrow-icon {
  display: block;
  font-size: 22px;
  line-height: 1;
  transform: translateY(-1px);
  color: inherit;
}

/* =========================
   BOUTON ZOOM
========================= */

.kit-galerie__zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  width: var(--zoom-size);
  height: var(--zoom-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--zoom-bg);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: transform .2s ease, background-color .2s ease;
}

.kit-galerie__zoom:hover,
.kit-galerie__zoom:focus,
.kit-galerie__zoom:focus-visible,
.kit-galerie__zoom:active {
  transform: scale(1.04);
  outline: none;
}

.kit-galerie__zoom svg {
  display: block;
  width: 18px;
  height: 18px;
}

.kit-galerie__zoom svg circle,
.kit-galerie__zoom svg line {
  fill: none;
  stroke: #111111;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================
   LIGHTBOX
========================= */

.kit-galerie__lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(0, 0, 0, 0.88);
}

.kit-galerie__lightbox.is-open {
  display: flex;
}

.kit-galerie__lightboxImg {
  display: block;
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.kit-galerie__lightboxClose {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  appearance: none;
  -webkit-appearance: none;
}

body.kit-galerie-lightbox-open {
  overflow: hidden;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 767px) {
  .kit-galerie {
    --thumb-size: 56px;
    --thumb-gap: 8px;
    --thumb-radius: 6px;
    --arrow-size: 32px;
    --zoom-size: 34px;
  }

  .kit-galerie__main {
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
  }

  .kit-galerie__arrow--prev {
    left: 8px;
  }

  .kit-galerie__arrow--next {
    right: 8px;
  }

  .arrow-icon {
    font-size: 18px;
  }

  .kit-galerie__zoom {
    top: 8px;
    right: 8px;
  }

  .kit-galerie__thumbs {
    margin-top: 10px;
  }

  .kit-galerie__lightbox {
    padding: 16px;
  }

  .kit-galerie__lightboxClose {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 24px;
  }
}