/* --- RESET & BODY --- */
body {
  margin: 0;
  padding: 0;
  width: 100%;
  
  font-family: "Bricolage";
  --bricolage-wght: 800;
  --bricolage-wdth: 100;
  --bricolage-opsz: 100;
  font-variation-settings: "wght" var(--bricolage-wght), "wdth" var(--bricolage-wdth), "opsz" var(--bricolage-opsz);
}

/* --- HEADER --- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center; 
  height: 60px; 
  padding: 0 10px; 
  position: relative;
  z-index: 100; 
}

/* --- COLONNES DU HEADER --- */
.header-left { 
  display: flex; 
  flex-direction: column; 
  flex: 1; 
  width: 33.33%; 
  align-items: flex-start; 
  text-align: left;
}

.prenom { font-size: 2rem; margin: 0; }

/* FILTRES */
.portfolio-filters {
  flex: 1;
  width: 33.33%;
  display: flex;
  justify-content: center; 
  align-items: center;
  gap: 5px;
}

.filter-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: "Bricolage";
  font-size: 1.5rem; 
  color: black;
  --bricolage-wght: 400; 
  font-variation-settings: "wght" var(--bricolage-wght), "wdth" var(--bricolage-wdth), "opsz" var(--bricolage-opsz);
  transition: all 0.2s ease;
}

.separator {
  font-size: 1.5rem;
  font-family: "Bricolage";
  --bricolage-wght: 400; 
}

.filter-btn:hover,
.filter-btn.active {
  --bricolage-wght: 800; 
}

.header-right { 
  display: flex; 
  justify-content: flex-end; 
  flex: 1; 
  width: 33.33%;
}

.contact-trigger {
  margin: 0;
  cursor: pointer;
  font-size: 1.5rem; 
}

/* --- MENU CONTACT --- */
.contact-wrapper {
  position: relative;
  display: inline-block;
}

.contact-dropdown {
  display: none; 
  position: absolute;
  top: 100%; 
  right: 0; 
  background-color: white;
  padding: 10px;
  min-width: 120px;
  text-align: right; 
  flex-direction: column;
  gap: 5px;
  border: 3px solid black; 
}

.contact-wrapper:hover .contact-dropdown {
  display: flex; 
}

.contact-dropdown a {
  text-decoration: none;
  color: black;
  font-size: 1rem;
  font-family: "Bricolage";
  --bricolage-wght: 400; 
  --bricolage-wdth: 100;
  --bricolage-opsz: 100;
  font-variation-settings: "wght" var(--bricolage-wght), "wdth" var(--bricolage-wdth), "opsz" var(--bricolage-opsz);
  white-space: nowrap; 
  display: block;
  margin-bottom: 5px;
}

.contact-dropdown a:hover {
  text-decoration: none; 
  --bricolage-wght: 800; 
}

/* --- LIGNES DE DECORATION --- */
.line.horizontal { 
  height: 3px; 
  background-color: black; 
  width: 100%; 
}

.line.vertical { 
  position: absolute; 
  top: 0; 
  height: 100%; 
  width: 3px; 
  background-color: black; 
  z-index: -1; 
}

.line.vertical.left { left: 33.33%; }
.line.vertical.right { right: 33.33%; }


h1 { text-align: center; margin: 2rem 0; }

/* --- GRILLE --- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 100%; 
  margin: 0 auto;
  gap: 0;
}

.grid-item {
  position: relative;
  
  /* MODIFICATION ICI : Hauteur ajustée à 500px */
  height: 500px;
  
  overflow: hidden;
  cursor: pointer;
  outline: none; 
}

/* CLASSE POUR CACHER LES ÉLÉMENTS FILTRÉS */
.grid-item.hidden {
  display: none; 
}

/* --- CARROUSEL --- */
.carousel-wrapper {
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.carousel-images {
  display: flex;
  width: calc(100% * 6);
  height: 100%;
  transition: transform 0.8s ease-in-out;
  transform: translateX(0);
}

.carousel-images img {
  width: calc(100% / 6);
  height: 100%;
  object-fit: cover;
  display: block;
}

.grid-item:hover .carousel-images {
  transform: translateX(-50%);
  transition: transform 10s linear;
}

/* --- OVERLAY --- */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.95);
  display: flex;
  justify-content: center; 
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2;
  padding: 40px;
}

/* ACTIVE STATE (ON/OFF) */
.grid-item.active .overlay {
  opacity: 1;
  pointer-events: auto;
}

/* --- CONTENU PROJET --- */
.projet-contenu {
  display: flex;
  flex-direction: column;
  align-items: flex-start; 
  text-align: left;        
  gap: 15px;
  max-width: 600px;
  width: 100%; 
}

.projet-titre {
  font-size: 1.5rem;
  text-transform: uppercase;
  color: black;
}

.projet-description {
  font-size: 1rem;
  line-height: 1.4;
  font-variation-settings: "wght" 400, "wdth" 100, "opsz" 100;
}

.projet-annee {
  font-size: 0.8rem;
  color: #666;
  margin-top: 10px;
  font-variation-settings: "wght" 400, "wdth" 100, "opsz" 100;
}

/* --- BARRE DE DÉFILEMENT (SCROLLBAR) --- */
:root {
  --scrollbar-color: black; 
}
::-webkit-scrollbar { width: 20px; }
::-webkit-scrollbar-track {
  background: white; 
  border-left: 3px solid black; 
}
::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-color); 
  border: 3px solid black; 
  border-radius: 0px; 
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-color);
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .site-header {
    flex-direction: column;
    text-align: center;
    align-items: center; 
    height: auto; 
    padding: 20px 10px; 
  }

  .header-left, .header-right, .portfolio-filters {
    width: 100%; 
    flex: auto; 
    justify-content: center; 
    text-align: center;
    align-items: center; 
    margin-bottom: 10px;
  }
  
  .portfolio-filters {
    flex-wrap: wrap;
  }

  .contact-wrapper { display: block; }
  .contact-dropdown {
    position: relative; 
    text-align: center;
    border: none;
    padding-top: 5px;
  }
  
  .line.vertical { display: none; }
  .prenom, .contact-trigger { font-size: 20px; }
  .grid { grid-template-columns: 1fr; }
}