/* ===============================
SECTION GALERIE
=============================== */
.is-editoriale .container.full {
    width: min(100%, 98%) !important;
}
.section-galerie .container{
  position: relative;
}

.section-galerie__intro{
  max-width: 900px;
  margin: 0 auto 32px;
  text-align: center;
}

.section-galerie__text{
  max-width: 760px;
  margin: 0 auto;
}

.section-galerie__text p:last-child{
  margin-bottom: 0;
}

.section-galerie__cta{
  margin-top: 24px;
}

/* ===============================
ITEMS COMMUNS
=============================== */

.galerie-item{
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  position: relative;
  background: rgba(255,255,255,0.12);
}

.galerie-item__img{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===============================
GRILLE SIMPLE
=============================== */

.galerie-grid--standard{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.galerie-grid--standard .galerie-item{
  aspect-ratio: 0.82 / 1;
}

/* ===============================
SLIDER AVEC TON JS EXISTANT
=============================== */

.galerie-h-scroll{
  --gap: 22px;
  position: relative;
}

.galerie-h-scroll .scroll{
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: auto;
  align-items: stretch;
}

.galerie-h-scroll .scroll::-webkit-scrollbar{
  display: none;
}

.galerie-slide{
  flex: 0 0 calc((100% - (var(--gap) * 3)) / 4);
  min-width: calc((100% - (var(--gap) * 3)) / 4);
  max-width: calc((100% - (var(--gap) * 3)) / 4);
  box-sizing: border-box;
}

.galerie-item--slide{
  width: 100%;
  aspect-ratio: 0.82 / 1;
}

.galerie-slider-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: var(--color-main);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.galerie-h-scroll .prev{
  left: -12px;
}

.galerie-h-scroll .next{
  right: -12px;
}

.galerie-h-scroll .h-scroll-nav{
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.galerie-h-scroll .h-scroll-nav span{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
}

.galerie-h-scroll .h-scroll-nav span.selected{
  background: var(--color-main);
}

/* ===============================
GALERIE ÉDITORIALE
=============================== */

.galerie-grid--editorial{
  display: flex;
  align-items: center;
  gap: 28px;
}

.galerie-grid--editorial .galerie-item--editorial{
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  position: relative;
  flex: 0 0 auto;
}

.galerie-grid--editorial .galerie-item--editorial.is-featured{
  width: 42%;
  aspect-ratio: 1 / 0.75;
}

.galerie-grid--editorial .galerie-item--editorial.is-secondary{
  width: calc((55% - 56px) / 3);
}

/* 2e image */
.galerie-grid--editorial .galerie-item--editorial.is-secondary:nth-child(2){
  aspect-ratio: 1 / 1.1;
}

/* 3e image */
.galerie-grid--editorial .galerie-item--editorial.is-secondary:nth-child(3){
  aspect-ratio: 1.1 / 1.4;
}

/* 4e image */
.galerie-grid--editorial .galerie-item--editorial.is-secondary:nth-child(4){
  aspect-ratio: 1 / 1.2;
  margin-top: -100px;
}

.galerie-grid--editorial .galerie-item__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===============================
RESPONSIVE
=============================== */

@media (max-width: 1180px){

  .galerie-grid--standard{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .galerie-slide{
    flex: 0 0 calc((100% - var(--gap)) / 2);
    min-width: calc((100% - var(--gap)) / 2);
    max-width: calc((100% - var(--gap)) / 2);
  }

  .galerie-grid--editorial{
    flex-wrap: wrap;
    align-items: stretch;
    gap: 22px;
  }

  .galerie-grid--editorial .galerie-item--editorial.is-featured{
    width: 100%;
    aspect-ratio: 1.4 / 1;
  }

  .galerie-grid--editorial .galerie-item--editorial.is-secondary{
    width: calc((100% - 44px) / 3);
    margin-top: 0;
  }

  .galerie-grid--editorial .galerie-item--editorial.is-secondary:nth-child(2){
    aspect-ratio: 1 / 1.05;
  }

  .galerie-grid--editorial .galerie-item--editorial.is-secondary:nth-child(3){
    aspect-ratio: 1 / 1.15;
  }

  .galerie-grid--editorial .galerie-item--editorial.is-secondary:nth-child(4){
    aspect-ratio: 1 / 1.1;
    margin-top: 0;
  }

}

@media (max-width: 768px){

  .section-galerie__intro{
    text-align: left;
    margin-bottom: 24px;
  }

  .section-galerie__text{
    margin: 0;
  }

  .galerie-grid--standard{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .galerie-slide{
    flex: 0 0 82%;
    min-width: 82%;
    max-width: 82%;
  }

  .galerie-grid--editorial{
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .galerie-grid--editorial .galerie-item--editorial.is-featured,
  .galerie-grid--editorial .galerie-item--editorial.is-secondary{
    width: 100%;
    margin-top: 0;
  }

  .galerie-grid--editorial .galerie-item--editorial.is-featured{
    aspect-ratio: 1.1 / 1;
  }

  .galerie-grid--editorial .galerie-item--editorial.is-secondary:nth-child(2),
  .galerie-grid--editorial .galerie-item--editorial.is-secondary:nth-child(3),
  .galerie-grid--editorial .galerie-item--editorial.is-secondary:nth-child(4){
    aspect-ratio: 1.1 / 1;
  }

  .galerie-item{
    border-radius: 22px;
  }

  .galerie-slider-arrow{
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .galerie-h-scroll .prev{
    left: -6px;
  }

  .galerie-h-scroll .next{
    right: -6px;
  }

}