/**
 * Indispensables accueil — pastilles type sous-catégories
 */
.bam-ess {
  --bam-purple: #6b3d8f;
  --bam-purple-dark: #4a2a66;
  --bam-purple-mid: #857bab;
  --bam-paper: #fcfafd;
  --bam-border: #e8e0ef;
  --bam-shadow: 0 8px 24px rgb(75 42 102 / 0.08);
  --bam-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --bam-radius: 10px;
  text-align: start;
}

/* Masque l’ancien titre Elementor : le module porte désormais les H2 */
.incontournables .elementor-widget-heading {
  display: none !important;
}

.bam-ess__section {
  padding: 1.5rem 0 0.5rem;
}

.bam-ess__section + .bam-ess__section {
  padding-top: 0.75rem;
}

.bam-ess__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.bam-ess__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bam-purple-mid);
}

.bam-ess__title {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--bam-purple-dark);
  line-height: 1.2;
}

.bam-ess__lead {
  margin: 0.35rem 0 0;
  max-width: none;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #6b7280;
}

@media (min-width: 768px) {
  .bam-ess__lead {
    white-space: nowrap;
  }
}

.bam-ess__all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--bam-purple);
  text-decoration: none;
  padding: 0.5rem 0.125rem;
  min-height: 44px;
}

.bam-ess__all svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bam-ess__all:hover,
.bam-ess__all:focus {
  color: #c2410c;
  text-decoration: none;
}

.bam-ess__swiper {
  position: relative;
  padding-inline: 2.75rem;
  overflow: hidden;
}

.bam-ess__swiper .swiper-wrapper {
  align-items: stretch;
}

.bam-ess__swiper .swiper-slide {
  height: auto;
  box-sizing: border-box;
}

.bam-ess__nav {
  appearance: none;
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-70%);
  width: 40px;
  height: 40px;
  border: 1px solid var(--bam-border);
  border-radius: 999px;
  background: var(--bam-paper);
  color: var(--bam-purple-dark);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 160ms var(--bam-ease), border-color 160ms var(--bam-ease), color 160ms var(--bam-ease), opacity 160ms var(--bam-ease);
}

.bam-ess__nav svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bam-ess__nav--prev { left: 0; }
.bam-ess__nav--next { right: 0; }

.bam-ess__nav:hover:not(:disabled),
.bam-ess__nav:focus:not(:disabled) {
  background: #f3eef7;
  border-color: #d3c4e2;
  color: var(--bam-purple);
}

.bam-ess__nav:focus-visible {
  outline: 2px solid var(--bam-purple);
  outline-offset: 2px;
}

.bam-ess__nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.bam-ess__tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  border-radius: var(--bam-radius);
}

.bam-ess__tile:hover,
.bam-ess__tile:focus {
  text-decoration: none;
  color: inherit;
}

.bam-ess__tile:focus-visible {
  outline: 2px solid var(--bam-purple);
  outline-offset: 3px;
}

.bam-ess__well {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bam-paper);
  border: 1px solid var(--bam-border);
  border-radius: var(--bam-radius);
  transition: transform 180ms var(--bam-ease), box-shadow 180ms var(--bam-ease), border-color 180ms var(--bam-ease);
}

.bam-ess__well img {
  position: absolute;
  inset: 11%;
  display: block;
  width: 78%;
  height: 78%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
}

.bam-ess__tile:hover .bam-ess__well {
  transform: translateY(-2px);
  box-shadow: var(--bam-shadow);
  border-color: #d3c4e2;
}

.bam-ess__name {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--bam-purple-dark);
  text-align: center;
}

@media (max-width: 767.98px) {
  .bam-ess__swiper {
    padding-inline: 0;
  }

  .bam-ess__nav {
    display: none;
  }

  .bam-ess__name {
    font-size: 0.75rem;
  }

  .bam-ess__head {
    align-items: start;
  }

  .bam-ess__all {
    min-height: 0;
    padding: 0.25rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bam-ess__tile:hover .bam-ess__well {
    transform: none;
  }
}

/* RTL : flèches sans scaleX Warehouse */
html[dir="rtl"] .bam-ess__nav svg {
  transform: scaleX(-1);
}

html[dir="rtl"] .bam-ess__all svg {
  transform: scaleX(-1);
}
