/* ------------------------------------------------------------


 CSS SPECIFIQUE PAGE PROJETS RCA // MAJ : 260405


------------------------------------------------------------ */


/* ------------------------------------------------------------
   FILTRE DESKTOP : project-meta et btn
------------------------------------------------------------ */

/* Parent et pseudo-élément */
.project-meta .btn {
  position: relative;
  display: inline-block;
  cursor: pointer;
   /* laisse de la place pour l'icône + 10px d'espace */
  transition: all 0.2s ease-in-out;

}

.project-meta .btn:hover {
  
  transform: translateX(0px); 
}

/* Pseudo-élément pour l'icône à gauche */
.project-meta .btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 360px;                 /* icône collée à gauche du bouton */
  width: 16px;
  height: 16px;
  transform: translateY(-50%) translateX(-4px); /* centre verticalement */
  
  background-image: url('../images/r-arrow.svg');
  background-size: contain;
  background-repeat: no-repeat;
  
  opacity: 0;
  transition: all 0.2s ease-in-out;
  pointer-events: none;
}


.project-meta .btn.active::before {
  opacity: 1;
                /* icône collée à gauche du bouton */
  width: 16px;
  height: 16px;
  transform: translateY(-50%) translateX(-4px); /* centre verticalement */

}

.project-meta .btn.active:hover::before {
  transform: translateY(-50%) translateX(-7px);
}

/* ------------------------------------------------------------
   LAYOUT MOBILE : container header
------------------------------------------------------------ */

  #container-header{display: none;width: 100%;text-align: center;padding: 15%;}

/* ------------------------------------------------------------
   SECRET RATIO : PRICE et SHOW PRICES
------------------------------------------------------------ */

.description{display: flex;
    justify-content: space-between;
    align-items: center;
  width: 100%;}

.price {
  
  opacity: 0;
  font-style: italic;
  transition: opacity 0.3s ease;
  text-align: right;
  margin: 1% 0;
  color:grey;
}


.show-prices .price {
  opacity: 1;
}



/* ------------------------------------------------------------
   MODE OVERVIEW : MOSAIQUE
------------------------------------------------------------ */

.toggleOverview{
  
  text-align: justify;
  background-color: white;
  font-size: 1em;
  line-height: 1.5em;
  font-weight: 500;
  color: rgba(20, 20, 20, 1);
  word-wrap: break-word;
}

/* Mode overview */
.container.overview {
  display: grid;

  padding: 5px;
  height: 100vh; /* plein écran */
  width: calc(100% - 400px);
  max-width: 100%;
  left:400px;
}

.container.overview .project {
  margin: 0 !important;
  overflow: hidden;
  border: none;
}

.container.overview .project img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.container.overview .vignette {
  width: 100%;
  height: 100%;
  
}
.container.overview .project img:hover {
  opacity: .8;
}

.container.overview .description {
  display: none !important;
}

.container.overview .img-default {
  display: none !important;
}

/* ------------------------------------------------------------
   PROJECT PRESENTATION : PROJECT + FILTERDIV + VIGNETTE
------------------------------------------------------------ */

.project {
  padding:2%;
  flex: 0 0 33.33%;
  max-width: 500px;
  position: relative;
  font-weight: 400;
  height: auto;
  border-right:1px solid black;
  border-bottom:1px solid black;
 
}

.project a {
  text-decoration: none;
  color: none;
}

.filterDiv {
  display: none;
}
.show {
  display: block;
}

.filterDiv {
  opacity: 1;
  transition: opacity 0.3s ease;
}
.filterDiv.hide {
  opacity: 0;
}

.vignette {
  margin: 0;
  background-color: #f0ede8;
  aspect-ratio: 3 / 4;
  position: relative;
  display: inline-block;
}

.vignette img,
.vignette video {
  display: block;
  width: 100%; 
  height: 100%;
  object-fit: cover;
  border-radius: 0px;

}

.img-default {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.2s ease-in-out; /* durée et type de transition */
}

.vignette:hover .img-default {
  opacity: 1;
}

/* ------------------------------------------------------------
   RESPONSIVE LAYOUT : MEDIA
------------------------------------------------------------ */

@media only all and (min-width: 1920px) and (max-width: 9000px) {
.project {
  padding:2%;
  flex: 0 0 25%;
  max-width: 900px;
  position: relative;
  font-weight: 400;
  height: auto;
 
}}


@media only all and (min-width: 700px) and (max-width: 1200px) {
.container.overview {
  display: grid;
  gap: 5px;
  padding: 5px;
  height: 100vh; /* plein écran */
  width: calc(100% - 300px);
  max-width: 100%;
  left:300px;
}

.project {
  padding:2%;
  flex: 0 0 50%;
  max-width: 500px;}

/* Pseudo-élément pour l'icône à gauche */
.project-meta .btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 260px;                 /* icône collée à gauche du bouton */
  width: 16px;
  height: 16px;
  transform: translateY(-50%) translateX(-4px); /* centre verticalement */
  
  background-image: url('../images/r-arrow.svg');
  background-size: contain;
  background-repeat: no-repeat;
  
  opacity: 0;
  transition: all 0.2s ease-in-out;
  pointer-events: none;
}


.project-meta .btn.active::before {
  opacity: 1;
                /* icône collée à gauche du bouton */
  width: 16px;
  height: 16px;
  transform: translateY(-50%) translateX(-4px); /* centre verticalement */

}


}

/* 100px — 600px (mobile) */

@media only all and (min-width : 100px) and (max-width : 600px) {

  #container-header{display: block;width: 100%;margin-top:20%;text-align: center;}

  .project {
    flex: 0 0 50%;
  }
  .price{display: none;}
  

 .filter-dropdown {
    position: relative;
    display: block;
    width: 100%;
  }

  .filter-btn {
    width: 100%;
    background-color: white;
    color: black;
    margin:0;
    padding: 15px 0px;
    font-size: 1em;
    border: 0px solid black;
    border-radius: 0px;
    cursor: pointer;
    text-align: center;
  }

  .filter-menu.show-filter {
    display: block;
  }

  .filter-menu .btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 15px 14px;
    background: none;
    border: none;
    font: inherit;       /* récupère la typo du parent */
    color: inherit;
  }

  .filter-menu .btn:hover {
    color:black;
  }

  /* --- Animation d'apparition du menu mobile --- */
  .filter-menu {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-15px);
    transition: all 0.3s ease;
    pointer-events: none;
    position: absolute;
    background: linear-gradient(to bottom, white, #F7F7F7);
    width: 100%;
    z-index: 999;
  }

  .filter-menu.show-filter {
    opacity: 1;
    max-height: 500px;
    transform: translateY(0);
    pointer-events: auto;
  }

  }
