/* ============================================================
   ALARM DISCOUNT — categorie.css  v3 (template match)
   ============================================================ */

/* ── HERO CATÉGORIE ── */
.cat-hero {
  position: relative;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 40px 0;
}
.cat-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(17,19,24,.95) 45%, rgba(17,19,24,.75) 75%, rgba(17,19,24,.5));
}
.cat-hero-inner { position: relative; z-index: 2; }

.cat-hero-title {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  margin-bottom: 12px;
  line-height: 1.15;
}
.cat-hero-desc {
  color: rgba(255,255,255,.72);
  font-size: .92rem;
  line-height: 1.75;
  max-width: 680px;
  margin: 0;
}
.cat-hero-desc strong { color: #fff; }

/* ── FIL D'ARIANE ── */
.breadcrumb-bar {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: 9px 0;
}
.fil-ariane {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  flex-wrap: wrap;
}
.fil-ariane a { color: #6c757d; text-decoration: none; transition: color .18s; }
.fil-ariane a:hover { color: #FFC107; }
.fil-ariane span { color: #111318; font-weight: 700; }
.fil-ariane .sep { font-size: .65rem; color: #ccc; }

/* ── PILLS SOUS-CATÉGORIES ── */
.cat-pills-bar {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 12px 0;
}
.cat-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cat-pill {
  display: inline-block;
  padding: 6px 16px;
  border: 1.5px solid #e9ecef;
  border-radius: 20px;
  font-size: .8rem;
  font-weight: 600;
  color: #495057;
  text-decoration: none;
  background: #fff;
  transition: all .18s;
  white-space: nowrap;
}
.cat-pill:hover { border-color: #FFC107; color: #111318; }
.cat-pill--active {
  background: #111318;
  border-color: #111318;
  color: #FFC107;
}

/* ── TOOLBAR TRI ── */
.cat-toolbar-v2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0 14px;
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 24px;
}
.cat-count-label { font-size: .88rem; color: #6c757d; }
.cat-count-label strong { color: #111318; font-size: 1rem; }

.sort-label { font-size: .82rem; color: #6c757d; }
.sort-select {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: .82rem;
  color: #111318;
  padding: 7px 12px;
  cursor: pointer;
  transition: border-color .18s;
  background: #fff;
}
.sort-select:focus { border-color: #FFC107; outline: none; box-shadow: 0 0 0 3px rgba(255,193,7,.1); }

/* ── CONTAINER GRILLE ── */
.cat-grid-container { padding-bottom: 60px; }

/* ── PRODUCT CARD ── */
.pcard {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e9ecef;
  background: #fff;
  transition: box-shadow .22s, transform .22s;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;       /* force le bloc à prendre toute la largeur de sa colonne */
  min-width: 0;      /* empêche le flex-item de déborder */
}
.pcard:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
  transform: translateY(-4px);
}

/* ─── Image wrapper : conteneur carré qui contraint l'image ─────────────── */
.pcard-img-wrap {
  display: block;           /* OBLIGATOIRE – supprime le layout inline par défaut */
  position: relative;
  overflow: hidden;
  width: 100%;              /* prend toute la largeur de .pcard */
  aspect-ratio: 1 / 1;     /* carré auto-calculé */
  background: #f8f9fa;
  flex-shrink: 0;           /* ne pas comprimer dans le flex column de .pcard */
}
.pcard-img-wrap img {
  display: block;           /* supprime le comportement inline et l'espace sous l'image */
  width: 100%;              /* contraint à la largeur du wrapper */
  height: 100%;             /* contraint à la hauteur du wrapper (définie par aspect-ratio) */
  max-width: 100%;          /* garde pour les contextes Bootstrap qui resetent */
  object-fit: contain;      /* contain pour voir les produits entiers */
  object-position: center;
  transition: transform .38s ease;
}
.pcard:hover .pcard-img-wrap img { transform: scale(1.04); }

.pcard-badge-img {
  position: absolute;
  top: 10px; left: 10px;
  background: #111318;
  color: #FFC107;
  font-size: .68rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
  z-index: 1;
}
.pcard-badge-img--promo { background: #e74c3c; color: #fff; }

.pcard-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pcard-title {
  font-size: .88rem;
  font-weight: 700;
  color: #111318;
  line-height: 1.45;
  margin: 0 0 12px;
  flex: 1;
  text-decoration: none;
  display: block;
}
.pcard-title:hover { color: #FFC107; }

.pcard-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.pcard-meta { flex: 1; min-width: 0; }

.pcard-price-wrap {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
}
.pcard-price {
  font-size: 1.05rem;
  font-weight: 900;
  color: #111318;
  white-space: nowrap;
}
.pcard-old {
  font-size: .78rem;
  color: #6c757d;
  text-decoration: line-through;
  white-space: nowrap;
}
.pcard-badge-promo {
  font-size: .68rem;
  font-weight: 800;
  color: #fff;
  background: #e74c3c;
  border-radius: 4px;
  padding: 1px 6px;
}

.pcard-stars {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 4px;
  font-size: .72rem;
  color: #FFC107;
}
.pcard-stars span.ms-2, .pcard-stars #avis { margin-left: 0 !important; }
.pcard-stars span:not(.bi),
.pcard-stars div,
.pcard-stars #avis,
.pcard-stars small span {
  color: #6c757d !important;
  font-size: .68rem;
  font-weight: 500;
}
.pcard-reviews {
  font-size: .7rem;
  color: #6c757d;
  margin-left: 2px;
  white-space: nowrap;
}

/* Bouton VOIR — fond sombre, texte jaune (template) */
.pcard-voir {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #111318;
  color: #FFC107;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 6px;
  padding: 8px 14px;
  text-decoration: none;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}
.pcard-voir:hover { background: #FFC107; color: #111318; }

/* ── DESCRIPTION BASE (collapsible) ── */
.collapsible-container { margin: 40px 0; }
.collapsible {
  max-height: 120px;
  overflow: hidden;
  transition: max-height .4s ease;
  color: #6c757d;
  font-size: .9rem;
  line-height: 1.7;
}
.collapsible.open { max-height: 2000px; }
.show-more {
  display: block;
  text-align: center;
  margin-top: 10px;
  cursor: pointer;
  color: #FFC107;
  font-size: 1.2rem;
}

/* ── PAGINATION ── */
.cat-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
}
.page-btn {
  min-width: 40px;
  height: 40px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #fff;
  color: #111318;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  transition: all .18s;
}
.page-btn:hover:not(:disabled):not(.page-btn--active) {
  border-color: #FFC107;
  color: #111318;
}
.page-btn--active {
  background: #111318;
  border-color: #111318;
  color: #FFC107;
  font-weight: 800;
}
.page-btn:disabled { opacity: .3; cursor: not-allowed; }
.page-ellipsis { color: #6c757d; font-weight: 700; padding: 0 4px; }

/* ── RESPONSIVE ── */
@media (max-width: 767px) {
  .cat-hero { min-height: 160px; padding: 28px 0; }
  .cat-hero-title { font-size: 1.5rem; }
  .cat-hero-desc { font-size: .84rem; }
  .pcard-voir { padding: 7px 10px; font-size: .68rem; }
  .pcard-body { padding: 10px; }
  .cat-pills { gap: 6px; }
  .cat-pill { font-size: .74rem; padding: 5px 12px; }
}
@media (max-width: 480px) {
  .pcard-bottom { flex-direction: column; align-items: flex-start; }
  .pcard-voir { width: 100%; justify-content: center; margin-top: 8px; }
}

/* ── Empty state (recherche sans résultat) ── */
.cat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}
.cat-empty-state > i {
  font-size: 3.5rem;
  color: #dee2e6;
  margin-bottom: 18px;
}
.cat-empty-state h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--dark, #1a1d21);
  margin-bottom: 8px;
}
.cat-empty-state p {
  font-size: .9rem;
  color: #8b9098;
  margin-bottom: 24px;
}
.cat-empty-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--dark, #1a1d21);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s, transform .15s;
}
.cat-empty-btn:hover { background: #111; color: #fff; transform: translateY(-1px); }
