/* Aura — Recherche intelligente (autocomplétion) */
.ep-suggest-host { position: relative; }

.ep-suggest {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  width: max(100%, min(30rem, calc(100vw - 24px)));
  max-height: min(70vh, 32rem);
  overflow-y: auto;
  padding: 6px;
  background: #fff;
  color: #111;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(18, 19, 47, .18);
  z-index: 1100;
  font-size: 14px;
  line-height: 1.35;
  text-align: start;
}
.ep-suggest[hidden] { display: none; }

/* Dans le tiroir mobile : la liste se superpose sous le champ, à la largeur du tiroir */
.ep-suggest--inline {
  inset-inline: 10px;
  width: auto;
  max-height: 55vh;
}

.ep-suggest__heading {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6b7280;
}

.ep-suggest__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.ep-suggest__item:hover,
.ep-suggest__item.is-active { background: #f1f4fb; }

.ep-suggest__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ep-suggest__parent { color: #6b7280; }
.ep-suggest__cat-ico { color: var(--yc-primary-color, #1B1F4B); font-weight: 800; }

.ep-suggest__img {
  width: 44px; height: 44px;
  object-fit: contain;
  border-radius: 6px;
  background: #f6f7fb;
  flex: 0 0 44px;
}
.ep-suggest__prod .ep-suggest__label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}
.ep-suggest__price { font-weight: 800; color: #BE123C; white-space: nowrap; }

.ep-suggest__mark { background: #fff1d6; color: inherit; border-radius: 3px; padding: 0 1px; }

.ep-suggest__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 8px 10px; }
.ep-suggest__chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1f4fb;
  font-weight: 600;
}
.ep-suggest__chip:hover { background: #e3e9f7; }

.ep-suggest__empty, .ep-suggest__loading { padding: 12px 10px; color: #6b7280; }

.ep-suggest__all {
  margin-top: 4px;
  justify-content: center;
  font-weight: 800;
  color: var(--yc-primary-color, #1B1F4B);
  border-top: 1px solid #eef0f6;
  border-radius: 0 0 8px 8px;
}

@media (prefers-reduced-motion: no-preference) {
  .ep-suggest { animation: ep-suggest-in .12s ease-out; }
  @keyframes ep-suggest-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}

/* ===== Barre de recherche : style « pilule » avec bouton coloré ===== */
#searchInputHolder .input,
.navigation-drawer .mobile-search {
  --ep-sb-accent: var(--ep-accent, #E11D48);
}
#searchInputHolder .container { width: 100%; }
#searchInputHolder .input {
  width: 100%;
  max-width: 44rem;
  gap: 0;
  padding: 3px 3px 3px 18px;
  background: #fff;
  border: 2px solid var(--ep-sb-accent);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(18, 19, 47, .12);
}
#searchInputHolder .input:focus-within { border-color: var(--ep-navy, #1B1F4B); }
#searchInputHolder .input input,
#searchInputHolder .input input:focus {
  max-width: none;
  border: 0 !important;
  border-radius: 0;
  outline: none !important;
  box-shadow: none;
  background: transparent;
  height: 40px;
  padding: 0;
  font-size: 15px;
}
#searchInputHolder .input .search-btn {
  margin: 0;
  height: 40px;
  min-width: 48px;
  padding: 0 18px;
  justify-content: center;
  background: var(--ep-sb-accent);
  border-radius: 999px;
  color: #fff;
}
#searchInputHolder .input .search-btn svg { width: 22px; height: 22px; color: #fff; }
#searchInputHolder .input .search-btn:hover { background: var(--ep-accent-dark, #BE123C); }
#searchInputHolder .ep-suggest { width: 100%; }

/* Tiroir mobile */
.navigation-drawer .mobile-search.ep-suggest-host { position: relative; }
.navigation-drawer .mobile-search {
  margin: 14px 16px;
  padding: 3px 3px 3px 16px;
  width: auto;
  background: #fff;
  border: 2px solid var(--ep-sb-accent);
  border-radius: 999px;
  gap: 0;
}
.navigation-drawer .mobile-search input,
.navigation-drawer .mobile-search input:focus {
  border: 0 !important;
  outline: none !important;
  background: transparent;
  color: #111;
  padding: 0 !important;
  height: 38px;
}
.navigation-drawer .mobile-search button {
  height: 38px; min-width: 44px;
  background: var(--ep-sb-accent);
  border-radius: 999px;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.navigation-drawer .mobile-search .search-icon,
[dir="ltr"] .navigation-drawer .mobile-search .search-icon {
  position: static; transform: none; color: #fff; font-size: 20px;
}

/* ===== Panneau : Acheter par catégorie (émoticônes) ===== */
.ep-suggest__emoji { font-size: 20px; line-height: 1; flex: 0 0 26px; text-align: center; }
.ep-suggest__browse {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 6px;
  padding: 0 2px 6px;
}
.ep-suggest__cat--browse { padding: 9px 10px; font-weight: 600; }
.ep-suggest__cat--browse .ep-suggest__label { white-space: nowrap; }
.ep-suggest--inline .ep-suggest__browse { grid-template-columns: 1fr; }
@media (max-width: 480px) { .ep-suggest__browse { grid-template-columns: 1fr; } }

/* ===== Accueil : colonne « Acheter par catégorie » à gauche du slider (desktop) ===== */
.ep-catside { display: block; }
.ep-hero__slider { min-width: 0; }
@media (min-width: 992px) {
  .ep-hero--cats {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 16px;
    max-width: 1400px;
    margin: 16px auto;
    padding: 0 20px;
    align-items: stretch;
  }
  .ep-catside {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 5;
    background: #fff;
    border: 1px solid var(--ep-border, #E6E4F1);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(27, 31, 75, .07);
  }
  .ep-catside__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    background: var(--ep-navy, #1B1F4B);
    color: #fff;
    border-radius: 11px 11px 0 0;
    font-weight: 800;
    font-size: 15px;
  }
  .ep-catside__head a { color: #fff; font-size: 13px; text-decoration: underline; }
  .ep-catside__list { list-style: none; margin: 0; padding: 4px 0; flex: 1; overflow: visible; }
  .ep-catside__item { position: relative; }
  .ep-catside__link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px;
    color: var(--ep-ink, #1A1830);
    font-weight: 600; font-size: 14px;
    text-decoration: none;
    border-bottom: 1px solid #f0f2f7;
  }
  .ep-catside__item:last-child .ep-catside__link { border-bottom: 0; }
  .ep-catside__emoji { font-size: 20px; width: 26px; text-align: center; flex: 0 0 26px; }
  .ep-catside__text { flex: 1; min-width: 0; }
  .ep-catside__chev { color: #8a93a6; font-size: 18px; }
  .ep-catside__item:hover > .ep-catside__link,
  .ep-catside__link:focus-visible { background: #f1f4fb; color: var(--ep-accent, #E11D48); }

  /* sous-catégories : volet qui s'ouvre à droite */
  .ep-catside__sub {
    display: none;
    list-style: none; margin: 0; padding: 8px;
    position: absolute; top: 0; inset-inline-start: 100%;
    min-width: 240px;
    background: #fff;
    border: 1px solid var(--ep-border, #E6E4F1);
    border-radius: 10px;
    box-shadow: 0 18px 40px rgba(18, 19, 47, .18);
    z-index: 20;
  }
  .ep-catside__item:hover > .ep-catside__sub,
  .ep-catside__item:focus-within > .ep-catside__sub { display: block; }
  .ep-catside__sub a {
    display: block; padding: 8px 12px; border-radius: 6px;
    color: var(--ep-ink, #1A1830); font-size: 14px; text-decoration: none;
  }
  .ep-catside__sub a:hover { background: #f1f4fb; color: var(--ep-accent, #E11D48); }
}

/* Le fond bleu marine du hero ne doit pas remplir les marges autour de la colonne + slider */
.main-content > section.ep-hero-host,
.main-content > section:first-child:has(.ep-hero--cats) {
  background: var(--ep-cream, #F7F6FB);
  border-bottom: 0;
}
@media (min-width: 992px) {
  .ep-hero--cats .ep-hero__slider {
    background: var(--ep-navy, #1B1F4B);
    border-radius: 12px;
    overflow: hidden;
  }
  .ep-hero--cats .ep-catside { min-height: 100%; }
}

/* ===== Badges (NOUVEAU / PROMO) ===== */
.ep-catside__badge {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--ep-accent, #E11D48);
  color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.5;
}
.ep-catside__toggle { display: none; }

/* ===== Mobile / tablette : « Acheter par catégorie » repliable, au-dessus du slider ===== */
@media (max-width: 991px) {
  .ep-hero--cats { padding: 10px 12px 0; }
  .ep-catside {
    margin: 0 0 10px;
    background: #fff;
    border: 1px solid var(--ep-border, #E6E4F1);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(27, 31, 75, .08);
    overflow: hidden;
  }
  .ep-catside__head {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    background: var(--ep-navy, #1B1F4B);
    color: #fff;
    font-weight: 800; font-size: 15px;
    cursor: pointer;
    user-select: none;
  }
  .ep-catside__title { flex: 1; }
  .ep-catside__all { color: #fff; font-size: 12px; font-weight: 600; text-decoration: underline; }
  .ep-catside__toggle { display: inline-block; font-size: 20px; line-height: 1; transition: transform .2s ease; }
  .ep-catside.is-open .ep-catside__toggle { transform: rotate(180deg); }

  .ep-catside__list { display: none; list-style: none; margin: 0; padding: 0; }
  .ep-catside.is-open .ep-catside__list { display: block; }

  .ep-catside__link {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 16px;
    color: var(--ep-ink, #1A1830);
    font-weight: 600; font-size: 15px;
    text-decoration: none;
    border-bottom: 1px solid #eef0f6;
  }
  .ep-catside__emoji { font-size: 22px; width: 28px; text-align: center; flex: 0 0 28px; }
  .ep-catside__text { flex: 1; min-width: 0; }
  .ep-catside__chev {
    flex: 0 0 auto;
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    margin: -6px -8px -6px 0;
    color: #8a93a6; font-size: 22px;
    transition: transform .2s ease;
  }
  .ep-catside__item.is-open > .ep-catside__link .ep-catside__chev { transform: rotate(90deg); }

  .ep-catside__sub { display: none; list-style: none; margin: 0; padding: 4px 0 6px; background: #f7f8fc; }
  .ep-catside__item.is-open > .ep-catside__sub { display: block; }
  .ep-catside__sub a {
    display: block; padding: 10px 16px 10px 56px;
    color: var(--ep-ink, #1A1830); font-size: 14px; text-decoration: none;
  }
}


/* ============================================================
   Aura V5 - PC : bannieres adaptees au cadre + grille stable
   Mobile non modifie.
   ============================================================ */
@media (min-width: 992px) {
  .ep-hero--cats {
    display: grid !important;
    grid-template-columns: minmax(220px, 250px) minmax(0, 1fr) !important;
    gap: 16px !important;
    width: calc(100% - 40px) !important;
    max-width: 1400px !important;
    margin: 16px auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    align-items: stretch !important;
    overflow: visible !important;
    position: relative !important;
    left: auto !important;
    transform: none !important;
  }

  .ep-hero--cats > .ep-catside {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: clamp(300px, 30vw, 430px) !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .ep-hero--cats > .ep-hero__slider {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: clamp(300px, 30vw, 430px) !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .ep-hero--cats .ep-hero__slider .yc-slider__desktop {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border-radius: 12px !important;
  }

  .ep-hero--cats .yc-slider__desktop .splide__track,
  .ep-hero--cats .yc-slider__desktop .splide__list,
  .ep-hero--cats .yc-slider__desktop .splide__slide {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  /* L'image entière remplit le cadre, sans zoom ni découpe sur les côtés. */
  .ep-hero--cats .yc-slider__desktop .splide__slide {
    background-position: center center !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
  }

  .ep-hero--cats .ep-catside__list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .ep-hero--cats {
    width: calc(100% - 28px) !important;
    grid-template-columns: minmax(205px, 225px) minmax(0, 1fr) !important;
    gap: 12px !important;
  }
}
