/* STATS BAR */
.stats-bar {
  background: var(--light-bg);
  padding: 2rem 4rem;
  display: flex;
  gap: 4rem;
  border-bottom: 1px solid var(--border);
}

.stat {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-n {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-l {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

/* MAIN LAYOUT */
.resources-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  min-height: 60vh;
}

/* SIDEBAR */
.sidebar {
  padding: 3rem 2rem;
  background: var(--light-bg);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 80px;
  align-self: start;
}

.sidebar-title {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.filter-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.filter-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .8rem;
  border-radius: 2px;
  text-decoration: none;
  font-size: .88rem;
  color: var(--muted);
  font-weight: 400;
  transition: all .2s;
}

.filter-list li a:hover,
.filter-list li a.active {
  background: var(--cream);
  color: var(--accent);
  font-weight: 500;
}

.filter-list li a .count {
  font-size: .72rem;
  background: #e8f6fc;
  color: var(--accent);
  padding: .15rem .5rem;
  border-radius: 20px;
}

.filter-list li a.active .count {
  background: var(--accent);
  color: var(--cream);
}

/* RESOURCES GRID */
.resources-main {
  padding: 3rem;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--border);
}

.res-card {
  background: var(--cream);
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  transition: background .2s;
}

.res-card:hover {
  background: var(--light-bg);
}

.res-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}

.res-card:hover::after {
  transform: scaleX(1);
}

.res-meta {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
}

.res-tag {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: #e8f6fc;
  padding: .2rem .6rem;
  border-radius: 2px;
}

.res-tag.css,
.count.css{
  background: #eaf3de !important;
  color: #639922 !important;
}
.res-tag.wordpress,
.count.wordpress{
  background: #f1efe8 !important;
  color: #5f5e5a !important;
}
.res-tag.javascript,
.count.javascript{
  background: #faeeda !important;
  color: #ba7517 !important;
}
.res-tag.python,
.count.python{
  background: #eee2bf !important;
  color: #639922 !important;
}
.res-tag.excel,
.count.excel{
  background: #faece7 !important;
  color: #d85a30 !important;
}
.res-tag.design,
.count.design{
  background: #e1f5ee !important;
  color: #1d9e75 !important;
}
.res-tag.vscode,
.count.vscode{
  background: #f1efe8 !important;
  color: #5f5e5a !important;
}
.res-tag.php,
.count.php{
  background: #eeedfe !important;
  color: #7f77dd !important;
}
.res-tag.méthodologie,
.count.méthodologie{
  background: #fbeaf0 !important;
  color: #d4537e !important;
}



.res-type {
  font-size: .68rem;
  color: var(--muted);
}

.res-date {
  font-size: .68rem;
  color: var(--muted);
  margin-left: auto;
}

.res-level {
  display: flex;
  gap: 3px;
  margin-bottom: .8rem;
}

.res-level span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.res-level.lvl1 span:nth-child(1) {
  background: var(--accent);
}

.res-level.lvl2 span:nth-child(1),
.res-level.lvl2 span:nth-child(2) {
  background: var(--accent);
}

.res-level.lvl3 span:nth-child(1),
.res-level.lvl3 span:nth-child(2),
.res-level.lvl3 span:nth-child(3) {
  background: var(--accent);
}

.res-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .6rem;
  line-height: 1.25;
}

.res-desc {
  font-size: .83rem;
  line-height: 1.65;
  max-height: 5em;
  overflow: hidden;
  color: var(--muted);
  font-weight: 300;
}

.res-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1.2rem;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}

.res-link:hover {
  border-bottom-color: var(--accent);
}




@media (max-width: 1024px) {
  .page-hero,
  .stats-bar {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .resources-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
  }

  .filter-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .4rem;
  }

  .filter-list li a {
    padding: .4rem .8rem;
  }

  .resources-main {
    padding: 2rem;
  }

}

@media (max-width: 600px) {


  .stats-bar {
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.5rem;
  }
}