.lws-ressources-cards {
  position: relative;
  padding: clamp(2.5rem, 6vh, 4rem) 0;
  color: var(--lws-ivory, #f4efe8);
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
}
.lws-ressources-cards__inner {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
}
.lws-ressources-cards__header {
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 42rem;
}
.lws-ressources-cards__title {
  margin: 0 0 clamp(1.25rem, 3vw, 1.75rem);
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  color: var(--lws-ivory, #f4efe8);
  text-wrap: balance;
}
.lws-ressources-cards__intro {
  color: var(--lws-text-soft, #c7bbb3);
  font-size: 1rem;
  line-height: 1.68;
}
.lws-ressources-cards__grid {
  display: grid;
  gap: 1.25rem;
}
.lws-ressources-cards__grid--1 {
  grid-template-columns: 1fr;
  max-width: 36rem;
}
.lws-ressources-cards__grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.lws-ressources-cards__grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.lws-ressources-cards__card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.35rem 1.4rem 1.45rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: #1a1a1a;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}
.lws-ressources-cards__card:hover {
  border-color: #DBAF5C;
}
.lws-ressources-cards__card:hover .lws-ressources-cards__type {
  color: #DBAF5C;
}
.lws-ressources-cards__type {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lws-copper, #DBAF5C);
  font-weight: 700;
}
.lws-ressources-cards__card-title {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.35;
  font-weight: 600;
}
.lws-ressources-cards__card-link {
  color: inherit;
  text-decoration: none;
}
.lws-ressources-cards__card-link:hover,
.lws-ressources-cards__card-link:focus-visible {
  color: var(--lws-copper-hover, #E8C070);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}
.lws-ressources-cards__excerpt {
  margin: 0;
  color: var(--lws-text-soft, #c7bbb3);
  font-size: 1rem;
  line-height: 1.68;
  flex: 1;
}
.lws-ressources-cards__cta,
.lws-ressources-cards__hub-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.lws-ressources-cards__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.15rem;
}
.lws-ressources-cards__cta {
  align-self: flex-start;
  color: #f0f0f0;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.lws-ressources-cards__cta:hover,
.lws-ressources-cards__cta:focus-visible,
.lws-ressources-cards__cta:active {
  background: #DBAF5C;
  border-color: #DBAF5C;
  color: #1a120e;
}
.lws-ressources-cards__footer {
  margin-top: 1.75rem;
}
.lws-ressources-cards__hub-cta {
  color: #f4f0ea;
  border: 1px solid rgba(244, 240, 234, 0.35);
  background: transparent;
}
.lws-ressources-cards__hub-cta:hover,
.lws-ressources-cards__hub-cta:focus-visible {
  border-color: var(--lws-copper, #DBAF5C);
  color: var(--lws-copper-hover, #E8C070);
}

/* ——— Stage accueil : hauteur du texte mène, photo au ratio natif ——— */
.lws-ressources-cards--stage {
  padding: clamp(2.5rem, 6vh, 4.5rem) 0;
}
.lws-ressources-cards--stage .lws-ressources-cards__stage-slot {
  width: min(1200px, calc(100% - 5rem));
  max-width: 1200px;
  margin: 0 auto;
}
.lws-ressources-cards--stage .lws-ressources-cards__stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: stretch;
  column-gap: 6.5rem;
  width: 100%;
}
.lws-ressources-cards--stage .lws-ressources-cards__image-column {
  /* La rangée prend la hauteur du texte ; la photo s’y cale sans imposer 1200px */
  height: 0;
  min-height: 100%;
  max-width: min(500px, 42vw);
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
}
.lws-ressources-cards--stage .lws-ressources-cards__image-frame {
  position: relative;
  height: 100%;
  width: auto;
  max-width: 100%;
  overflow: hidden;
  border-radius: 24px;
  background: transparent;
}
.lws-ressources-cards--stage .lws-ressources-cards__photo {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center top;
  border-radius: 24px;
}
.lws-ressources-cards--stage .lws-ressources-cards__text-column {
  min-width: 0;
  max-width: 36rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1.15rem;
  padding-left: 0.35rem;
}
.lws-ressources-cards--stage .lws-ressources-cards__header {
  margin-bottom: 0;
  max-width: none;
  flex: 0 0 auto;
}
.lws-ressources-cards--stage .lws-ressources-cards__title {
  margin: 0;
}
.lws-ressources-cards--stage .lws-ressources-cards__carousel {
  position: relative;
  width: 100%;
  overflow: visible;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0 3.75rem;
}
.lws-ressources-cards--stage .lws-ressources-cards__slides {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  display: block;
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.lws-ressources-cards--stage .lws-ressources-cards__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(20px) scale(0.98);
  filter: blur(3px);
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}
.lws-ressources-cards--stage .lws-ressources-cards__slide.is-active {
  position: relative;
  display: block;
  height: auto;
  min-height: 0;
  opacity: 1;
  transform: translateX(0) scale(1);
  filter: blur(0);
  pointer-events: auto;
}
.lws-ressources-cards--stage .lws-ressources-cards__slide .lws-ressources-cards__card {
  width: 100%;
  box-sizing: border-box;
  flex: 0 0 auto;
}
.lws-ressources-cards--stage .lws-ressources-cards__actions {
  flex-wrap: nowrap;
}
.lws-ressources-cards--stage .lws-ressources-cards__actions .lws-ressources-cards__cta,
.lws-ressources-cards--stage .lws-ressources-cards__actions .lws-ressources-cards__hub-cta {
  flex-shrink: 0;
  white-space: nowrap;
}
.lws-ressources-cards--stage .lws-ressources-cards__actions .lws-ressources-cards__cta {
  align-self: center;
}
.lws-ressources-cards--stage .lws-ressources-cards__nav {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: auto;
  gap: 0.85rem;
  padding: 1.3rem 0 0;
  flex: 0 0 auto;
}
.lws-ressources-cards--stage .lws-ressources-cards__nav[hidden] {
  display: none !important;
}
.lws-ressources-cards--stage .lws-ressources-cards__controls {
  display: contents;
}
.lws-ressources-cards--stage .lws-ressources-cards__controls[hidden] {
  display: none !important;
}
.lws-ressources-cards--stage .lws-ressources-cards__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
  color: inherit;
  padding: 0;
  touch-action: manipulation;
}
.lws-ressources-cards--stage .lws-ressources-cards__arrow--prev {
  left: 0;
}
.lws-ressources-cards--stage .lws-ressources-cards__arrow--next {
  right: 0;
}
.lws-ressources-cards--stage .lws-ressources-cards__arrow[hidden] {
  display: none !important;
}
.lws-ressources-cards--stage .lws-ressources-cards__arrow:hover,
.lws-ressources-cards--stage .lws-ressources-cards__arrow:focus-visible {
  background: rgba(219, 175, 92, 0.18);
  border-color: rgba(219, 175, 92, 0.45);
  transform: translateY(-50%) scale(1.05);
  outline: none;
}
.lws-ressources-cards--stage .lws-ressources-cards__arrow svg {
  width: 18px;
  height: 18px;
  stroke: rgba(255, 255, 255, 0.78);
}
.lws-ressources-cards--stage .lws-ressources-cards__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.lws-ressources-cards--stage .lws-ressources-cards__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: width 0.3s ease, background 0.3s ease, border-color 0.3s ease, border-radius 0.3s ease;
}
.lws-ressources-cards--stage .lws-ressources-cards__dot.is-active {
  background: #C7BBB3;
  width: 24px;
  border-radius: 4px;
  border-color: #C7BBB3;
  will-change: transform;
}

@media (max-width: 900px) {
  .lws-ressources-cards__grid--2,
  .lws-ressources-cards__grid--3 {
    grid-template-columns: 1fr;
    max-width: 36rem;
  }

  .lws-ressources-cards--stage .lws-ressources-cards__stage-slot {
    width: min(440px, calc(100% - 2rem));
  }
  .lws-ressources-cards--stage .lws-ressources-cards__stage {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: clamp(1rem, 3svh, 1.5rem);
    width: 100%;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__image-column {
    height: auto;
    min-height: 0;
    max-width: 100%;
    order: 2;
    position: relative;
    width: 100%;
    align-self: stretch;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__header {
    order: 1;
    margin-bottom: 0;
    text-align: center;
    max-width: none;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__title {
    text-align: center;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__intro {
    text-align: center;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__image-frame {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: min(100%, 360px);
    height: auto;
    margin: 0 auto;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__photo {
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__text-column {
    order: 3;
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    gap: 1rem;
    padding-left: 0;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__carousel {
    order: 0;
    flex: 0 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__slides {
    flex: 0 0 auto;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__slide,
  .lws-ressources-cards--stage .lws-ressources-cards__slide.is-active {
    height: auto;
    min-height: 0;
    flex: 0 0 auto;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__slide .lws-ressources-cards__card {
    flex: 0 0 auto;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__actions {
    justify-content: center;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 1 auto;
    width: auto;
    max-width: calc(100% - 92px);
    min-width: 0;
    margin-top: 0;
    padding: 0;
    gap: 0;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__arrow {
    position: static;
    transform: none;
    width: clamp(30px, 5svh, 36px);
    height: clamp(30px, 5svh, 36px);
  }
  .lws-ressources-cards--stage .lws-ressources-cards__arrow:hover,
  .lws-ressources-cards--stage .lws-ressources-cards__arrow:focus-visible {
    transform: scale(1.05);
  }
  .lws-ressources-cards--stage .lws-ressources-cards__arrow svg {
    width: 14px;
    height: 14px;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__dots {
    gap: 6px;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__dot {
    width: 5px;
    height: 5px;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__dot.is-active {
    width: 15px;
  }
}

/* Mobile: image between title and slides */
@media (max-width: 900px) {
  .lws-ressources-cards--stage .lws-ressources-cards__text-column {
    display: contents;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__header {
    order: 1;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__image-column {
    order: 2;
  }
  .lws-ressources-cards--stage .lws-ressources-cards__carousel {
    order: 3;
  }
}
