/* =========================
   Archive header & filtres
   ========================= */

.archive-header {
  padding: var(--spacing-l) 0 0;
}

.archive-header .title-row {
}

.archive-header .title-main,
.archive-header .title-suffix {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
}

.archive-header .title-suffix {
  color: transparent;
  -webkit-text-stroke: 1px var(--color-black-01);
  text-stroke: 1px var(--color-black-01);
}

.archive-category-display {
  display: block;
  font-family: var(--font-title);
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  font-weight: 800;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-top: 0.625rem;
}

.archive-filters {
  margin: 1rem 0 3rem;
}

.tabs-header {
  display: flex;
  gap: clamp(1.25rem, 4vw, 2.5rem);
}

.tab-link.no-underline {
  text-decoration: none !important;
}

.taxo-dropdown {
  animation: fadeInArchive 0.3s ease;
}

@keyframes fadeInArchive {
  from { opacity: 0; }
  to { opacity: 1; }
}

.items-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem clamp(1.5rem, 4vw, 2.5rem);
  list-style: none;
  padding: 0;
  margin: 0;
}

.filter-item {
  text-decoration: none;
  color: var(--color-black-01);
  font-weight: 500;
}

.filter-item.active {
  color: var(--color-primary);
}

/* =========================
   Grille cartes projets
   ========================= */

.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--card-gap);
}

.project-card {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid #EAEAEA;
  background: #fff;
  transition:
    transform 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    box-shadow 0.4s ease;
}

.project-card:hover {
  transform: translateY(-0.5rem); /* 8px */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.project-thumbnail {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.project-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card:hover .project-thumbnail img {
  transform: scale(1.05);
}

.project-link-btn {
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(0.75rem, 1.2vw, 0.85rem);
  color: var(--color-primary);
  position: relative;
}

.project-link-btn::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--color-primary);
  transition: width 0.3s ease;
}

.project-card:hover .project-link-btn::after {
  width: 100%;
}

/* =========================
   Filtres – responsive
   ========================= */
.archive-filters .filter-count {
  display: none;
}

/* Desktop: liste visible, dropdown mobile caché */
.archive-filters .filter-trigger,
.archive-filters .filter-panel {
  display: none;
}

.archive-filters .taxo-dropdown > .items-list {
  display: flex;
}

/* =========================
   Media queries (px only)
   ========================= */

@media (max-width: 992px) {
  .cards-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .cards-grid-3 {
    grid-template-columns: 1fr;
    margin-top: 1rem;
  }

  .archive-filters {
    margin-bottom: 2.25rem;
  }

  .tabs-header {
    gap:  0.75rem;
    flex-wrap: wrap;
  }
	
	.tab-link.active {
    color: var(--color-primary);
    transform: scale(1); 
    margin-right: 0rem;
   }

  .tabs-header .tab-link {
    font-size: 0.75rem;
    line-height: 1.1;
  }

  .archive-filters .taxo-dropdown {
    display: flex;
    justify-content: center;
    margin-top: 10px;
  }

  .archive-filters .taxo-dropdown > * {
    width: 100%;
    max-width: 520px;
  }

  .archive-filters .taxo-dropdown > .items-list {
    display: none;
  }

  .archive-filters .filter-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;

    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--color-black-01);
    padding: 16px 4px;

    font-family: var(--font-title);
    font-weight: 800;
    font-size: 0.75rem;
    line-height: 1.1;
    text-transform: uppercase;
	  
    color: var(--color-black-01);
  }

  .archive-filters .filter-trigger:focus-visible {
    outline: 2px solid var(--color-red-01);
    outline-offset: 4px;
  }

  .archive-filters .filter-trigger-icon {
    width: 14px;
    height: 8px;
    flex: 0 0 14px;
    background: no-repeat center / 14px 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath fill='black' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
  }

  .archive-filters .filter-panel[hidden] {
    display: none;
  }

  .archive-filters .filter-panel {
    display: block;
    margin-top: 8px;
    border: 1px solid #EAEAEA;
    background: #fff;
  }

  .archive-filters .filter-panel .items-list {
    display: block;
    flex-wrap: initial;
    gap: 0;
  }

  .archive-filters .filter-panel li + li {
    border-top: 1px solid #EAEAEA;
  }

  .archive-filters .filter-panel .filter-item {
    display: block;
    padding: 14px 16px;
    text-transform: capitalize;
    color: var(--color-black-01);
  }

  .archive-filters .filter-panel .filter-item:hover,
  .archive-filters .filter-panel .filter-item:active {
    background: var(--color-beige-02);
  }

  .archive-filters .filter-panel .filter-item.active {
    background: var(--color-beige-02);
    color: var(--color-black-01);
    font-weight: 700;
  }

  .archive-filters .filter-panel .filter-item:focus-visible {
    outline: 2px solid var(--color-red-01);
    outline-offset: -2px;
  }
}
