/* ==========================================================================
   Section : Categories
   Pattern "Nos Rayons" — cards horizontales avec thumb + nom + count + subs.
   ========================================================================== */

.tme-categories{
  background: var(--bg);
  padding: var(--sp-16) 0;
}

/* ── Header de section ───────────────────────────────────── */
.tme-categories__head{
  margin: 0 auto var(--sp-10);
  text-align: center;
  max-width: 640px;
}

.tme-categories__tag{
  display: inline-block;
  background: rgba(0,76,148,.10);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: var(--rd-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.tme-categories__title{
  color: var(--text);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: var(--fw-bold);
  line-height: 1.15;
  margin: 0 0 var(--sp-2);
  letter-spacing: -0.01em;
}

.tme-categories__sub{
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: 1.5;
  margin: 0;
}

/* ── Grille ──────────────────────────────────────────────── */
.tme-categories__grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}

@media (max-width: 1280px){
  .tme-categories__grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px){
  .tme-categories__grid{
    grid-template-columns: 1fr;
  }
}

/* ── Card ────────────────────────────────────────────────── */
.tme-cat-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rd-md);
  overflow: hidden;
  display: flex;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.tme-cat-card:hover{
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,76,148,.08);
}

/* ── Thumbnail (image ou icone) ─────────────────────────── */
.tme-cat-card__thumb{
  width: 110px;
  flex-shrink: 0;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
  text-decoration: none;
  overflow: hidden;
  align-self: stretch;
}
.tme-cat-card__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tme-cat-card__icon{
  width: 44px;
  height: 44px;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tme-cat-card__icon svg{
  width: 100%;
  height: 100%;
}

/* ── Body ────────────────────────────────────────────────── */
.tme-cat-card__body{
  flex: 1;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.tme-cat-card__row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #F1F5F9;
}

.tme-cat-card__name{
  margin: 0;
  font-size: var(--fs-base);
  font-weight: var(--fw-semi);
  color: var(--text);
  line-height: 1.2;
  min-width: 0;
}
.tme-cat-card__name a{
  color: inherit;
  text-decoration: none;
  transition: color .15s ease;
}
.tme-cat-card__name a:hover{
  color: var(--primary);
}

.tme-cat-card__count{
  display: inline-block;
  background: rgba(0,76,148,.08);
  color: var(--primary);
  padding: 2px 9px;
  border-radius: var(--rd-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  flex-shrink: 0;
  line-height: 1.4;
}

/* ── Liste sous-categories ───────────────────────────────── */
.tme-cat-card__subs{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.tme-cat-card__subs li{
  font-size: var(--fs-sm);
  line-height: 1.3;
}
.tme-cat-card__subs a{
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}
.tme-cat-card__subs a:hover{
  color: var(--primary);
}
.tme-cat-card__more a{
  color: var(--primary);
  font-weight: var(--fw-semi);
}

/* ── Mobile fine-tune ────────────────────────────────────── */
@media (max-width: 480px){
  .tme-cat-card__thumb{ width: 90px; }
  .tme-cat-card__body{ padding: 12px 14px; }
}
