
/* Pages de catégories */

.category-main {
  position: relative;
  top: auto;
  transform: none;
  width: 100%;
  padding-top: 70px;
}

/* Liste des projets */

.project-list {
  width: 60%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 35px;
}

/* Vignettes */

.project {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.project img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform-origin: center center;
}

/* Titre au survol */

.project-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  font-family: "futura-medium-bt", sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.project:hover .project-title,
.project:focus-visible .project-title {
  opacity: 1;
}

/* Navigation */

.category-main nav {
  margin: 45px 20px;
}

/* Fenêtre projet plein écran */

.project-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #ffffff;
  overflow-y: auto;
  display: none;
}

.project-overlay.is-open {
  display: block;
  animation: overlay-in 0.25s ease;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.project-open {
  overflow: hidden;
}

/* Croix de fermeture */

.project-close {
  position: fixed;
  top: 22px;
  right: 28px;
  z-index: 1002;
  border: 0;
  padding: 0;
  background: transparent;
  color: #111111;
  font-family: Arial, sans-serif;
  font-size: 36px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

/* Contenu du projet */

.project-content {
  width: 100%;
  padding: 110px 30px 60px;
}

/* Générique en deux colonnes */

.project-credits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 25px;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 90px;
}

.project-heading {
  text-align: right;
}

.project-heading h1 {
  margin: 0;
  font-family: "futura-bold", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

.project-info {
  text-align: left;
  font-family: "futura-medium-bt", sans-serif;
  font-size: 13px;
  letter-spacing: 0.4px;
}

.project-info p {
  margin: 0 0 10px;
}

.project-info span {
  margin-left: 8px;
}

/* Galerie verticale du projet */

.project-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

.project-gallery img {
  display: block;
  width: 100%;
  max-width: 1200px;
  height: auto;
  opacity: 1;
  visibility: visible;
}
@media (min-width: 601px) {
  #project-i-could-live-here-forever .project-gallery img,
  #project-femme-plemousse .project-gallery img {
    max-height: 85vh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
  }
}

/* Tablettes */

@media (max-width: 1024px) {
  .category-main {
    padding-top: 85px;
  }

  .project-list {
    width: 100%;
    gap: 20px;
  }

  .project-title {
    opacity: 1;
    inset: auto 0 0;
    min-height: 42px;
    justify-content: flex-start;
    background: rgba(0, 0, 0, 0.45);
    padding: 10px 12px;
    text-align: left;
    font-size: 13px;
  }
}

/* Téléphones */

@media (max-width: 600px) {
  .project-close {
    top: 15px;
    right: 18px;
    font-size: 32px;
  }

  .project-content {
    padding: 80px 20px 40px;
  }

  .project-credits {
    column-gap: 25px;
    margin-bottom: 50px;
  }

  .project-heading h1 {
    font-size: 12px;
  }

  .project-info {
    font-size: 11px;
  }

  .project-info p {
    margin: 0 0 5px;
  }

  .project-gallery {
  gap: 10px;
}
}
/* Cadrage de VOILA LA RADINE sur ordinateur */
.project-voila-radine img {
  object-position: 50% 50%;
  transform: scale(1.2) translate(0, -50px);
}

/* Cadrage de VOILA LA RADINE sur téléphone */
@media (max-width: 600px) {
  .project-voila-radine img {
    object-position: center center;
    transform: none;
  }
}

/* Fondu à l'apparition des images (actif seulement si le script tourne) */
.project img,
.project-gallery img {
  transition: opacity 0.5s ease;
}

.fade-ready .project img:not(.is-loaded),
.fade-ready .project-gallery img:not(.is-loaded) {
  opacity: 0;
}
