/* PORTFOLIO CNED — SECTION PROJETS */

/* Section projets - fond clair */
.section-projets {
  position: relative;
  background: var(--color-blanc-casse);
  color: var(--color-text-sombre);
  padding: 6rem 0;
}

/* Container principal */
.projets-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ============================================
   HEADER - TITRE & FILTRES
   ============================================ */

.projets-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4rem;
  gap: 2rem;
}

/* Titre principal */
.projets-title {
  font-family: "Stack Sans Notch", sans-serif;
  font-weight: 600;
  font-size: 4.5rem;
  line-height: 1.1;
  color: var(--color-text-sombre);
  margin: 0;
}

/* Container des filtres */
.projets-filters-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
  padding-top: 0.5rem;
  max-width: 500px;
}

/* Wrapper avec scroll horizontal */
.filters-wrapper {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-text-sombre) transparent;
  width: 100%;
}

.filters-wrapper::-webkit-scrollbar {
  height: 4px;
}

.filters-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.filters-wrapper::-webkit-scrollbar-thumb {
  background: var(--color-text-sombre);
  border-radius: 2px;
}

/* Tags de filtre - sélection multiple */
.filter-tag {
  font-family: var(--font-principale);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--color-text-sombre);
  background: transparent;
  border: 1px solid var(--color-text-sombre);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-tag:hover {
  background: rgba(5, 4, 3, 0.1);
}

.filter-tag.active {
  background: var(--color-text-sombre);
  color: var(--color-blanc-casse);
  font-weight: 500;
}

/* Bouton réinitialiser */
.filter-reset {
  font-family: var(--font-principale);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--color-text-sombre);
  background: transparent;
  border: 1px solid var(--color-text-sombre);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-reset:hover {
  background: var(--color-text-sombre);
  color: var(--color-blanc-casse);
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: var(--color-text-sombre);
  color: var(--color-blanc-casse);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0 0.25rem;
}

.filter-reset:hover .filter-count {
  background: var(--color-blanc-casse);
  color: var(--color-text-sombre);
}

/* ============================================
   GRILLE DE PROJETS
   ============================================ */

.projets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

/* Carte de projet */
.projet-card {
  background: transparent;
  border: 1px solid var(--color-text-sombre);
  overflow: visible;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.projet-card:hover {
  transform: translateY(-8px);
}

/* Image du projet */
.projet-image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: var(--color-beige-clair);
  border-radius: 0;
}

.projet-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.projet-card:hover .projet-image img {
  transform: scale(1.05);
}

/* Contenu du projet */
.projet-content {
  padding: 1.5rem;
}

/* Titre du projet */
.projet-title {
  font-family: var(--font-principale);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--color-text-sombre);
  margin: 0 0 1rem;
}

/* Tags du projet */
.projet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  font-family: var(--font-principale);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--color-text-sombre);
  background: transparent;
  border: 1px solid var(--color-text-sombre);
  padding: 0.25rem 0.75rem;
  letter-spacing: 0.02em;
}

/* Bouton du projet */
.projet-button {
  font-family: var(--font-principale);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-sombre);
  background: transparent;
  border: 1px solid var(--color-text-sombre);
  padding: 0.75rem 2rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  letter-spacing: 0.02em;
  width: 100%;
  text-decoration: none;
  display: block;
  text-align: center;
}

.projet-button:hover {
  background: var(--color-text-sombre);
  color: var(--color-blanc-casse);
}

/* ============================================
   PAGINATION
   ============================================ */

.projets-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.pagination-btn {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--color-text-sombre);
  color: var(--color-text-sombre);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--color-text-sombre);
  color: var(--color-blanc-casse);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-btn svg {
  width: 20px;
  height: 20px;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-number {
  min-width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--color-text-sombre);
  color: var(--color-text-sombre);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-principale);
  font-weight: 400;
  font-size: 0.9rem;
  padding: 0 0.75rem;
  transition: all 0.2s ease;
}

.pagination-number:hover {
  background: var(--color-text-sombre);
  color: var(--color-blanc-casse);
}

.pagination-number.active {
  background: var(--color-text-sombre);
  color: var(--color-blanc-casse);
  font-weight: 500;
}

.pagination-ellipsis {
  color: var(--color-text-sombre);
  font-size: 1.2rem;
  padding: 0 0.25rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
  .projets-title {
    font-size: 3.5rem;
  }
  
  .projets-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .section-projets {
    padding: 4rem 0;
  }
  
  .projets-container {
    padding: 0 1.5rem;
  }
  
  .projets-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 1.5rem;
  }
  
  .projets-title {
    font-size: 2.5rem;
  }
  
  .projets-filters-container {
    max-width: 100%;
    align-items: flex-start;
    padding-top: 0;
  }
  
  .filters-wrapper {
    width: 100%;
  }
  
  .filter-tag {
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
  }
  
  .filter-reset {
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
  }
  
  .filter-count {
    min-width: 18px;
    height: 18px;
    font-size: 0.7rem;
  }
  
  .projets-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3rem;
  }
  
  .projet-image {
    height: 240px;
  }
  
  .projet-title {
    font-size: 1.25rem;
  }
  
  .pagination-numbers {
    gap: 0.35rem;
  }
  
  .pagination-number,
  .pagination-btn {
    min-width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .projets-container {
    padding: 0 1rem;
  }
  
  .projets-title {
    font-size: 2rem;
  }
  
  .filters-wrapper {
    gap: 0.4rem;
  }
  
  .filter-tag {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }
  
  .filter-reset {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }
  
  .projets-grid {
    gap: 1rem;
  }
  
  .projet-image {
    height: 200px;
  }
  
  .projet-content {
    padding: 1.25rem;
  }
  
  .projet-title {
    font-size: 1.125rem;
  }
  
  .tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
  }
  
  .projet-button {
    font-size: 0.85rem;
    padding: 0.65rem 1.5rem;
  }
  
  .pagination-btn svg {
    width: 18px;
    height: 18px;
  }
}
