/* Ynisek - Bannières d'accueil */

/* ---------- Slider ---------- */

.ynbn-hero {
  margin: 20px 0 24px;
  border-radius: var(--yn-radius, 12px);
  background: #fff;
  box-shadow: var(--yn-shadow, 0 2px 10px rgba(0, 0, 0, .06));
  overflow: hidden;
}

.ynbn-hero-stage {
  position: relative;
  aspect-ratio: 1920 / 450;
  background: var(--yn-bg, #f5f5f7);
}

.ynbn-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility 0s linear .5s;
}

.ynbn-slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity .5s ease;
}

.ynbn-slide a,
.ynbn-slide img {
  display: block;
  width: 100%;
  height: 100%;
}

.ynbn-slide img {
  object-fit: cover;
}

.ynbn-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--yn-primary, #3b1151);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  cursor: pointer;
  opacity: 0;
  transition: opacity .2s, background .2s;
}

.ynbn-arrow .material-icons {
  font-size: 30px;
  line-height: 44px;
}

.ynbn-hero:hover .ynbn-arrow,
.ynbn-arrow:focus-visible {
  opacity: 1;
}

.ynbn-arrow:hover {
  background: var(--yn-accent, #f08300);
  color: #fff;
}

.ynbn-arrow--prev {
  left: 16px;
}

.ynbn-arrow--next {
  right: 16px;
}

/* Onglets sous le slider */
.ynbn-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid var(--yn-border, #e5e5ea);
}

.ynbn-tabs::-webkit-scrollbar {
  display: none;
}

.ynbn-tab {
  position: relative;
  flex: 1 0 140px;
  padding: 14px 12px;
  border: 0;
  border-right: 1px solid var(--yn-border, #e5e5ea);
  background: #fff;
  color: var(--yn-muted, #6e6e73);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: color .2s, background .2s;
}

.ynbn-tab:last-child {
  border-right: 0;
}

.ynbn-tab:hover {
  background: var(--yn-bg, #f5f5f7);
  color: var(--yn-text, #1d1d1f);
}

.ynbn-tab.is-active {
  color: var(--yn-primary, #3b1151);
}

.ynbn-tab-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: var(--yn-accent, #f08300);
}

.ynbn-tab.is-active .ynbn-tab-progress {
  width: 100%;
}

.ynbn-hero.is-playing .ynbn-tab.is-active .ynbn-tab-progress {
  animation: ynbn-progress var(--ynbn-interval, 6000ms) linear forwards;
}

.ynbn-hero.is-paused .ynbn-tab.is-active .ynbn-tab-progress {
  animation-play-state: paused;
}

@keyframes ynbn-progress {
  from { width: 0; }
  to { width: 100%; }
}

/* ---------- Sections ---------- */

.ynbn-section {
  margin: 0 0 32px;
}

.ynbn-section-title {
  margin: 8px 0 16px;
  color: var(--yn-text, #1d1d1f);
  font-size: 1.5rem;
  font-weight: 700;
}

/* À découvrir */
.ynbn-discover-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.ynbn-card {
  display: block;
  border-radius: var(--yn-radius, 12px);
  background: #fff;
  color: var(--yn-text, #1d1d1f);
  box-shadow: var(--yn-shadow, 0 2px 10px rgba(0, 0, 0, .06));
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

a.ynbn-card:hover,
a.ynbn-card:focus {
  color: var(--yn-primary, #3b1151);
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--yn-shadow-hover, 0 8px 24px rgba(59, 17, 81, .15));
}

.ynbn-card-img {
  display: block;
  aspect-ratio: 385 / 200;
  overflow: hidden;
}

.ynbn-card-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}

a.ynbn-card:hover .ynbn-card-img img {
  transform: scale(1.04);
}

.ynbn-card-title {
  display: block;
  padding: 12px 14px;
  font-weight: 700;
}

/* Encarts promo */
.ynbn-promo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.ynbn-promo-item {
  display: block;
  border-radius: var(--yn-radius, 12px);
  overflow: hidden;
  box-shadow: var(--yn-shadow, 0 2px 10px rgba(0, 0, 0, .06));
  transition: transform .2s, box-shadow .2s;
}

a.ynbn-promo-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--yn-shadow-hover, 0 8px 24px rgba(59, 17, 81, .15));
}

.ynbn-promo-item img {
  display: block;
  width: 100%;
  height: auto;
}

/* Marques */
.ynbn-brands-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ynbn-brands-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--yn-shadow, 0 2px 10px rgba(0, 0, 0, .06));
}

.ynbn-brands-list img {
  display: block;
  max-width: 100%;
  height: auto;
  filter: grayscale(1);
  opacity: .75;
  transition: filter .2s, opacity .2s;
}

.ynbn-brands-list li:hover img {
  filter: none;
  opacity: 1;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .ynbn-discover-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ynbn-promo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .ynbn-hero {
    margin-top: 12px;
    border-radius: 8px;
  }

  .ynbn-arrow {
    display: none;
  }

  .ynbn-tab {
    flex-basis: 120px;
    padding: 10px 8px;
    font-size: .8125rem;
  }

  .ynbn-discover-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ynbn-slide,
  .ynbn-card,
  .ynbn-card-img img {
    transition: none;
  }

  .ynbn-hero.is-playing .ynbn-tab.is-active .ynbn-tab-progress {
    animation: none;
  }
}
