.works-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--background-color);
  padding-bottom: 100px;
}

.works-line {
  z-index: 50;
  display: flex;
  gap: 50px;
  flex-direction: row;
  margin-bottom: 60px;
  flex-wrap: wrap; /* Permet de passer à la ligne sur petit écran */
  justify-content: center;
}

/* --- LA CARTE PROJET (CONTENEUR) --- */
.work-card {
  position: relative; /* Indispensable pour que l'overlay se positionne par rapport à la carte */
  width: 450px;
  height: 600px;
  border-radius: 0px;
  overflow: hidden; /* Coupe l'image si elle zoome et arrondit les bords */
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* L'image prend toute la place */
.work-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.15s ease-in-out;
  display: block;
}

/* --- L'OVERLAY (INFO AU SURVOL) --- */
.work-overlay {
  position: absolute;
  inset: 0; 
  background: rgba(0, 0, 0, 0.85); /* Fond noir très opaque comme ton image */
  padding: 40px 30px;
  
  display: flex;
  flex-direction: column;
  justify-content: center; /* Centre verticalement */
  align-items: center;
  text-align: center;

  opacity: 0; /* Caché par défaut */
  transition: opacity 0.15s ease-in-out;
  
  /* Petit effet de flou pour le style (optionnel) */
  backdrop-filter: blur(2px);
}

/* TYPOGRAPHIE DANS L'OVERLAY */
.work-overlay h3 {
  font-family: effra-cc, sans-serif, Arial, Helvetica, sans-serif;
  font-size: 38px;
  color: white;
  margin-bottom: 20px;
  font-weight: 500;
}

.work-overlay p {
  font-family: "eb-garamond", serif, 'Times New Roman', Times, serif;
  font-size: 20px;
  line-height: 1.4;
  color: #ddd;
  margin-bottom: 40px;
}

/* LE BOUTON JAUNE */
.overlay-btn {
  background-color: var(--secondary-color); /* Ton jaune */
  color: black;
  font-family: effra-cc, sans-serif, Arial, Helvetica, sans-serif;
  font-size: 20px;
  padding: 12px 40px;
  border-radius: 10px;
  text-transform: lowercase;
  font-weight: 500;
  display: inline-block;
  transition: transform 0.15s;
}

/* --- INTERACTIONS (HOVER) --- */

/* Quand on survole la CARTE */
.work-card:hover .work-overlay {
  opacity: 1; /* Le texte apparaît */
}

.work-card:hover img {
  transform: scale(1.10); /* L'image zoome légèrement derrière */
  filter: blur(2px); /* L'image devient un peu floue pour lisibilité */
}

/* Petit effet clic sur le bouton */
.work-card:hover .overlay-btn:active {
  transform: scale(0.95);
}

/* --- RESPONSIVE --- */
@media (max-width: 1000px) {
  .work-card {
    width: 320px; /* Plus petit sur tablette/mobile */
    height: 450px;
  }
  
  .text-title {font-size: 102px;}
  .work-overlay h3 { font-size: 28px; }
  .work-overlay p { font-size: 16px; }
}

/* --- FILTRES (ONGLETS) --- */
.works-filters {
  display: flex;
  flex-wrap: wrap; /* Passe à la ligne sur mobile */
  justify-content: center;
  gap: 20px;
  margin-bottom: 60px; /* Espace avant les cartes */
  margin-top: -20px; /* Remonte un peu vers le titre */
  z-index: 50;
}

/* Style spécifique des boutons de filtre */
.filter-btn {
  background-color: transparent;
  color: white; /* Blanc par défaut */
  border: 1px solid white; /* Bordure fine blanche */
  padding: 10px 25px;
  font-family: effra-cc, sans-serif;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 50px; /* Arrondi style "pill" */
}

/* Survol */
.filter-btn:hover {
  border-color: var(--secondary-color);
  color: var(--secondary-color);
  background-color: transparent;
}

/* État ACTIF (bouton sélectionné) */
.filter-btn.active {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: black; /* Texte noir sur fond jaune */
  font-weight: 600;
}


/* --- GESTION DE L'AFFICHAGE DES CATÉGORIES --- */

.works-category {
  display: none; /* Caché par défaut */
  width: 100%;
  
  /* Petite animation d'apparition */
  animation: fadeInWorks 0.5s ease-in-out;
}

/* La classe qui rend visible */
.works-category.active {
  display: block;
}

/* Keyframes pour l'animation douce */
@keyframes fadeInWorks {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive pour les boutons */
@media (max-width: 768px) {
  .works-filters {
    gap: 10px;
  }
  .filter-btn {
    font-size: 14px;
    padding: 8px 16px;
  }
}