/* =====================================================
   BASE
===================================================== */
body {
  margin: 0;
  font-family: Helvetica, Arial, sans-serif;
  background: white;
  overflow: hidden;
  min-height: 100vh;
  position: relative;
}

body.projects-body {
  overflow: auto;
}

/* =====================================================
   HEADER
===================================================== */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 60px;
  position: relative;
  z-index: 30;
}

.back-button {
  position: absolute;
  left: 60px;
  top: 90px;
  z-index: 1000;
}

.back-button .icon-door {
  width: 50px;
  height: 50px;
  transition: transform 0.3s ease;
}

.back-button .icon-door:hover {
  transform: scale(1.1);
}

.header {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.header .left-block,
.header .right-block {
  flex-shrink: 0;
}

.header a {
  text-decoration: none;
  font-size: 50px;
  color: transparent;
  background: linear-gradient(to right, transparent 0%, rgba(5, 60, 54, 0.7) 50%, transparent 100%);
  background-size: 200% 100%;
  background-position: var(--x, 50%) 0%;
  background-clip: text;
  -webkit-background-clip: text;
  transition: background-position 0.05s ease-out;
}

/* =====================================================
   PAGE LISTE PROJETS
===================================================== */
.projects-page {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 120px 60px;
  min-height: 100vh;
  box-sizing: border-box;
  gap: 40px;
}

/* Colonne gauche */
.projects-left {
  flex: 1;
  max-width: 35%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.projects-text p {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: rgb(49, 95, 80);
}

/* Galerie */
.projects-photos {
  width: 680px;
  height: 80vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(3, 200px);
  gap: 20px;
  scroll-behavior: smooth;
  padding-right: 10px;
  position: relative;
}

.projects-photos a {
  position: relative;
  display: block;
  width: 200px;
  height: 200px;
  overflow: hidden;
  border-radius: 12px;
  background: #ccc;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.projects-photos a:hover {
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.projects-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Voile */
.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0.5);
  pointer-events: none;
  z-index: 10;
}

.projects-photos a:hover .photo-overlay {
  background-color: rgba(255,255,255,0);
}

/* Scrollbar */
.projects-photos::-webkit-scrollbar {
  width: 6px;
}

.projects-photos::-webkit-scrollbar-thumb {
  background: rgba(49, 95, 80, 0.4);
  border-radius: 999px;
}

/* =====================================================
   ICONES SOCIALES
===================================================== */
.socials {
  position: fixed;
  left: 20px;
  bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2000;
}

.socials a {
  text-decoration: none;
  display: block;
  width: 28px;
  height: 28px;
}

.socials img {
  width: 28px;
  height: 28px;
  background: #fff;
  padding: 4px;
  border-radius: 4px;
  display: block;
}

/* =====================================================
   RESPONSIVE (LISTE PROJETS)
===================================================== */
@media (max-width: 900px) {

  .projects-page {
    flex-direction: column;
    padding: 80px 20px;
    gap: 24px;
    height: auto;
  }

  .projects-left {
    max-width: 100%;
  }

  .projects-photos {
    width: 100%;
    height: auto;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    overflow: visible;
  }

  .projects-photos a {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
  }

  .socials {
    flex-direction: row;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
  }

  .socials img {
    width: 24px;
    height: 24px;
  }
}

/* =====================================================
   PAGE PROJET INDIVIDUEL
===================================================== */
.project-media {
  flex-shrink: 0;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

/* Vidéo */
.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: 12px;
  background: #f0f0f0;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

/* 3 photos */
.photo-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 15px;
}

.photo-row img {
  flex: 1;
  width: calc((100% - 30px) / 3);
  border-radius: 10px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.photo-row img:hover {
  transform: scale(1);
}

@media (max-width: 900px) {
  .photo-row {
    flex-direction: column;
    gap: 12px;
  }

  .photo-row img {
    width: 100%;
  }
}

/* Images, vidéos */
img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =====================================================
   LIGHTBOX
===================================================== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.9);
  justify-content: center;
  align-items: center;
  z-index: 5000;
  cursor: zoom-out;
}

.lightbox.active {
  display: flex;
}

.lightbox-img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: rgba(0,0,0,0.6);
}

.lightbox-close:hover {
  color: rgba(0,0,0,0.9);
}
