* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%; /* Assure que le contenu occupe toute la hauteur */
  background-color: #efaab0;
  margin: 0;
  padding: 0;
}

.troisd {
  text-align: center;
}

.header {
  padding: 1.5rem 0;
  background: transparent;
  color: #fff9f5;
  z-index: 100;
  position: relative;
}

.header-link {
  text-decoration: none;
  font-size: 8.5vw;
  font-family: "Nighty DEMO", cursive;
  font-weight: 300;
  color: #be0822;
}
.header-link:hover {
  color: #fff9f5;
}

.header h1 {
  margin-top: 1rem;
}

.projects {
  display: flex;
  flex-direction: column;
  gap: 100px;
  width: 85%;
  margin-left: auto;
  margin-right: auto;
}

.project {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 30px;
}

.project.reverse {
  flex-direction: row-reverse;
}

.project-text {
  flex: 1;
  min-width: 250px;
  max-width: 30%; /* serré */
  font-family: "Cabinet Grotesk", sans-serif;
}

.project-text h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.project-text p {
  font-size: 1rem;
  line-height: 1.6;
}

.project-media {
  flex: 2;
  min-width: 250px;
  min-width: 300px;
  max-width: 66.66%;
}

.project-media img,
.project-media video {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.project-slider {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding: 10px 0;
}

.project-slider img {
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  width: 50%;
  margin-left: auto;
  margin-right: 0%;
}

.project-slider img:hover {
  box-shadow: 10px 10px 10px rgba(237, 236, 236, 0.1);
}

.slider-img {
  display: none;
  width: 100%;
  max-width: 100%; /* ajuste à ta convenance */
  user-select: none;
  height: auto;
}

.slider-img.active {
  display: block;
}

/* Carousel container */
.carousel-container {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin: 0; /* pas besoin de centrer */
}

/* Carousel track */
.carousel-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
}

/* Carousel images */
.carousel-image {
  width: 400px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.3s ease;
}
.carousel-image:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Lightbox */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: row;
}
#lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

/* Lightbox buttons */
.lightbox-btn {
  background: none;
  border: none;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  padding: 1rem 2rem;
  user-select: none;
}
.lightbox-btn:hover {
  color: #efaab0;
}

/* Responsive */
@media (max-width: 768px) {
  .project,
  .project.reverse {
    flex-direction: column;
  }
}
