/**
 * KNICS — fil d'actualité de la page d'accueil.
 *
 * Cette feuille est chargée uniquement sur #index. Les classes qu'elle
 * utilise sont ajoutées par knics-home-feed.js après identification des
 * titres Elementor, afin de ne modifier aucun autre bloc de la home.
 */

#index .knics-home-selection--removed {
  display: none !important;
}

#index .knics-home-feed-section {
  margin-top: -88px !important;
  padding-top: 56px !important;
}

#index .knics-home-feed-heading {
  width: 100%;
  margin: 0 0 clamp(30px, 3vw, 58px);
  text-align: center;
}

#index .knics-home-feed-heading > .elementor-widget-container {
  margin: 0 !important;
  padding: 0 clamp(18px, 5.5vw, 150px) !important;
}

#index .knics-home-feed-heading .elementor-heading-title {
  margin: 0;
  font-size: clamp(32px, 2.2vw, 48px);
  line-height: 1.05;
}

#index .knics-home-feed-link-wrap {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 14px;
  padding: 0 clamp(18px, 5.5vw, 150px);
  text-align: right;
}

#index .knics-home-feed-link-wrap > .elementor-widget-container {
  margin: 0 !important;
  padding: 0 !important;
}

#index .knics-home-feed-link-origin--empty {
  display: none !important;
}

#index .knics-home-feed-link-bar {
  position: relative;
  z-index: 10;
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 18px;
  overflow: visible;
}

#index .knics-home-feed-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 3px 0;
  color: var(--knics-green, #04c950) !important;
  font-size: clamp(16px, 1.25vw, 27px);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
}

#index .knics-home-feed-link:hover,
#index .knics-home-feed-link:focus-visible {
  color: #00ae42 !important;
  text-decoration: underline !important;
  text-underline-offset: .18em;
}

#index .knics-home-feed-products,
#index .knics-home-feed-products > .elementor-widget-container,
#index .knics-home-feed-carousel {
  box-sizing: border-box;
  width: 100%;
  max-width: none !important;
  height: auto !important;
  overflow: visible !important;
}

#index .knics-home-feed-products > .elementor-widget-container {
  padding-right: clamp(18px, 5.5vw, 150px);
  padding-left: clamp(18px, 5.5vw, 150px);
}

#index .knics-home-feed-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(28px, 2.1vw, 42px) clamp(18px, 1.8vw, 48px);
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  transform: none !important;
}

#index .knics-home-feed-grid > .js-product-miniature-wrapper,
#index .knics-home-feed-grid > .product-carousel,
#index .knics-home-feed-grid > .swiper-slide,
#index .knics-home-feed-grid > [class*="col-"] {
  display: block !important;
  position: relative !important;
  inset: auto !important;
  box-sizing: border-box;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

#index .knics-home-feed-grid > :nth-child(n + 11) {
  display: none !important;
}

/* Warehouse ajoute environ 12 px autour de chaque miniature. On les retire
   uniquement dans le fil d'actu afin d'agrandir légèrement les produits sans
   changer le nombre de colonnes. */
#index .knics-home-feed-grid .product-miniature-grid {
  width: 100% !important;
  max-width: none !important;
  padding: 0 !important;
}

/* Le fil devient une grille statique : seuls les contrôles du carrousel de
   produits sont retirés. Les flèches propres aux photos de chaque carte sont
   conservées. */
#index .knics-home-feed-products .swiper-button-prev,
#index .knics-home-feed-products .swiper-button-next,
#index .knics-home-feed-products .swiper-pagination,
#index .knics-home-feed-products .owl-nav,
#index .knics-home-feed-products .slick-arrow {
  display: none !important;
}

@media (min-width: 1200px) {
  #index .knics-home-feed-grid .knics-mini-row2 {
    gap: 8px;
  }

  #index .knics-home-feed-grid .knics-mini-size,
  #index .knics-home-feed-grid .knics-mini-cond {
    flex-shrink: 0;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }
}

@media (max-width: 1199px) {
  #index .knics-home-feed-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  #index .knics-home-feed-section {
    margin-top: -24px !important;
    padding-top: 38px !important;
  }

  #index .knics-home-feed-heading {
    margin-bottom: 24px;
  }

  #index .knics-home-feed-heading .elementor-heading-title {
    font-size: 30px;
  }

  #index .knics-home-feed-link-wrap {
    margin-bottom: 12px;
    padding-right: 16px;
    padding-left: 16px;
  }

  #index .knics-home-feed-link-bar {
    min-height: 36px;
    margin-bottom: 12px;
  }

  #index .knics-home-feed-products > .elementor-widget-container {
    padding-right: 16px;
    padding-left: 16px;
  }

  #index .knics-home-feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 12px;
  }
}

@media (max-width: 374px) {
  #index .knics-home-feed-products > .elementor-widget-container {
    padding-right: 12px;
    padding-left: 12px;
  }

  #index .knics-home-feed-grid {
    column-gap: 8px;
  }
}
