/* Barre catalogue e-commerce, sous le menu du site vitrine. Préfixe .ecb- pour ne
   collisionner avec aucune règle de assets/css/doemo.css. */

.ecb-barre {
  background: #17181c;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ecb-barre-inner {
  display: flex;
  align-items: stretch;
  gap: 0.2rem;
  flex-wrap: wrap;
}

.ecb-item { position: relative; display: flex; align-items: center; }

.ecb-lien {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.9rem;
  color: #fff;
  text-decoration: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.ecb-lien:hover { color: #ff8a8a; }

.ecb-lien-tout { color: #ff8a8a; border-right: 1px solid rgba(255, 255, 255, 0.12); }

.ecb-recherche {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex: 0 1 200px;
  min-width: 120px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  align-self: center;
  overflow: hidden;
}
.ecb-recherche input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.5rem 0 0.5rem 0.9rem;
}
.ecb-recherche input::placeholder { color: rgba(255, 255, 255, 0.6); }
.ecb-recherche input:focus { outline: none; }
.ecb-recherche button {
  background: none;
  border: none;
  color: #fff;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.ecb-recherche button i { font-size: 1rem; }

.ecb-lien-devis {
  margin-left: 0.6rem;
  background: #D42B2B;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  align-self: center;
}
.ecb-lien-devis:hover { background: #b32222; color: #fff; }

.ecb-lien-panier {
  align-self: center;
  margin-left: 0.6rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #D42B2B;
  border: 2px solid rgba(255, 255, 255, 0.35);
}
.ecb-lien-panier:hover { background: #b32222; }
.ecb-lien-panier i { font-size: 1.4rem; color: #fff; }


.ecb-caret {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.7;
  margin-top: 2px;
}

/* Panneau simple (une famille de la barre) */
.ecb-panneau {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  padding: 0.6rem 0;
  margin: 0;
  min-width: 280px;
  z-index: 50;
  list-style: none;
  flex-direction: column;
}
.ecb-item.ecb-ouvert .ecb-panneau { display: flex; }

.ecb-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }

.ecb-entree { position: relative; }

.ecb-entree > a {
  padding: 0.5rem 1.1rem;
  color: #1c2024;
  text-decoration: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.ecb-entree > a > span:first-of-type { flex: 1; display: flex; justify-content: space-between; gap: 0.5rem; }
.ecb-entree > a:hover { background: #f6f7f8; color: #D42B2B; }
.ecb-compte { color: #8a929c; font-weight: 400; }

.ecb-vignette { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: #f0f1f2; }
.ecb-vignette-repli { display: flex; align-items: center; justify-content: center; color: #b7bcc2; font-size: 15px; }

/* Vignette dans la barre noire (niveau 1) : plus petite, cerclée de blanc pour se
   détacher du fond sombre. */
.ecb-lien .ecb-vignette { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.35); background: #fff; }
.ecb-lien .ecb-vignette-repli { color: #17181c; font-size: 11px; }

.ecb-caret-droite {
  width: 0; height: 0; flex-shrink: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid #b7bcc2;
}

/* Volet de niveau 3, déployé à droite d'une entrée qui a elle-même des enfants */
.ecb-volet {
  display: none;
  position: absolute;
  top: -0.6rem;
  left: 100%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  padding: 0.6rem 0;
  margin: 0;
  min-width: 260px;
  max-height: 60vh;
  overflow-y: auto;
  list-style: none;
  z-index: 60;
}
.ecb-a-volet.ecb-ouvert > .ecb-volet { display: block; }
.ecb-volet li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1.1rem;
  color: #1c2024;
  text-decoration: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.83rem;
  font-weight: 500;
}
.ecb-volet li a > span { flex: 1; display: flex; justify-content: space-between; gap: 0.5rem; }
.ecb-volet .ecb-vignette { width: 26px; height: 26px; }
.ecb-volet li a:hover { background: #f6f7f8; color: #D42B2B; }

/* Panneau « Tout le catalogue » : une colonne par famille, plus large que les
   panneaux simples. */
.ecb-mega {
  padding: 1.4rem;
  gap: 2rem;
  min-width: min(920px, calc(100vw - 2rem));
  border-radius: 0 10px 10px 10px;
  /* Pas d'overflow ici : un `overflow-y` seul bascule aussi `overflow-x` en `auto`
     (règle CSS peu connue) et ça tronquait le volet de niveau 3, qui sort du panneau
     par une position absolue en `right: -260px`. */
}
.ecb-item.ecb-ouvert .ecb-mega { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.ecb-mega-colonne { min-width: 0; }
.ecb-mega-titre {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 800;
  font-size: 0.88rem;
  color: #D42B2B;
  text-decoration: none;
  padding-bottom: 0.5rem;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid #eee;
}
.ecb-mega-colonne .ecb-entree > a { padding: 0.3rem 0; }
.ecb-mega-colonne .ecb-volet { left: auto; right: -260px; }
/* Dernière colonne : ouvrir le volet vers la GAUCHE plutôt que vers la droite, sinon il
   sort de l'écran (rien à droite de la dernière colonne). */
.ecb-mega-colonne:last-child .ecb-volet { left: -260px; right: auto; }

@media (max-width: 900px) {
  .ecb-barre-inner { flex-wrap: nowrap; }
  .ecb-lien-devis { margin-left: 0.4rem; }
}
