/* ============================== */
/* 🔹 Filter Bar                  */
/* ============================== */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  background-color: var(--third-color);
  width: 30%;
  margin: 20px auto;
  border-radius: 8px;
  align-items: center;
}

.filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 60px;
}

.filter-btn img {
  width: 40px;
  height: 40px;
  filter: invert(1);
  pointer-events: none;
}

.filter-btn:focus,
.filter-btn:active {
  outline: none;
}

.filter-text {
  font-size: 12px;
  color: var(--first-color);
  margin-top: 5px;
}

.filter-btn:hover img {
  transform: scale(1.2);
}

.filter-btn[data-filter="all"] {
  background-color: var(--second-color);
  padding: 10px;
  border-radius: 5px;
  width: 50px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-btn[data-filter="all"] .filter-text {
  margin: 0;
  font-size: 14px;
  font-weight: bold;
  color: var(--first-color);
  line-height: 1;
}

.filter-btn.active {
  background-color: var(--fourth-color);
  border-radius: 5px;
  padding: 5px;
}


/* ============================== */
/* 🔹 Main (cards)                */
/* ============================== */
.main {
  display: flex;
  margin: 0;
  font-family: Helvetica, sans-serif;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

.main.loading {
  opacity: 0.3;
}

.skewed p, .skewed small {
  color: var(--first-color);
}

.skewed h1 {
  margin: 0;
  padding-bottom: 2px;
  margin-bottom: 5px;
  color: var(--first-color);
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid var(--first-color);
  width: fit-content;
}

.skewed {
  width: 45em;
  display: flex;
  background: var(--second-color);
  margin: 2em 0;
  box-shadow: 0 0 15px rgb(0, 0, 0, 0.7);
}

.skewed .text {
  padding: 1em;
  width: 50%;
  display: flex;
  justify-content: space-evenly;
  align-items: flex-start;
  flex-direction: column;
}

.skewed a {
  color: var(--first-color);
  text-decoration: none;
}

.skewed .image {
  width: 50%;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  display: flex;
}

.skewed .image > div {
  width: 100%;
  height: 100%;
}

.skewed .image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.skewed .image::before {
  content: '';
  position: absolute;
  left: -6.1em;
  top: 50%;
  transform: translateY(-50%) rotate(20deg);
  background: var(--second-color);
  width: 50%;
  height: 140%;
  box-shadow: 0 0 20px rgb(0, 0, 0, 0.7);
}


/* ============================== */
/* 🔹 Project Identity & Boutons  */
/* ============================== */
.project-identity {
  margin-top: 5px;
  line-height: 1.6;
}

.info-box {
  display: inline-flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--third-color);
  padding: 4px 8px;
  margin: 4px 4px 6px 0;
  border-radius: 6px;
  color: var(--first-color);
}

.label-info {
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 0.5px;
  color: var(--first-color);
  background-color: var(--fourth-color);
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 5px;
} 

.info-value {
  font-weight: 500;
  font-size: 0.85em;
  color: var(--first-color);
}

.game-build-link {
  color: #45a6f5 !important;
  font-weight: bold;
  font-size: 0.95em;
  text-decoration: underline !important;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.game-build-link:hover {
  color: #0b7dda !important;
  text-decoration: underline;
}

.read-more-text {
  display: inline-block;
  text-align: center;
  align-self: center;
  margin-top: 10px;
  padding: 4px 10px;
  font-weight: bold;
  font-size: 0.9em;
  color: var(--first-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.read-more-text:hover {
  text-decoration: underline !important;
  background-color: var(--fourth-color);
}


/* ============================== */
/* 🔹 Modale (project)            */
/* ============================== */
.project-modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-modal-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(3px);
}

.project-modal-content {
  position: relative;
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--fourth-color);
  padding: 20px;
  border-radius: 10px;
  color: var(--first-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 10001;
  animation: fadeIn 0.3s ease;
}

.project-modal-content .title {
  font-size: 2rem;
  font-weight: bold;
  color: var(--first-color);
  text-transform: uppercase;
  text-align: center;
  position: relative;
  margin-bottom: 30px;
}

.project-modal-content .title::after {
  content: "";
  width: 80px;
  height: 3px;
  background: var(--second-color);
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
}

.project-modal-content h3 {
  font-size: 2rem;
  font-weight: bold;
  color: var(--first-color);
  text-transform: uppercase;
  position: relative;
  margin-top: 30px;
  margin-bottom: 20px;
}

.project-modal-content h3::after {
  content: "";
  width: 100px;
  height: 4px;
  background: var(--second-color);
  position: absolute;
  left: 0;
  bottom: -10px;
}

.project-modal-content h4 {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--first-color);
  text-transform: capitalize;
  margin-top: 15px;
  border-left: 4px solid var(--second-color);
  padding-left: 10px;
}

.project-modal-content ul {
  list-style: none;
  padding: 0;
}

.project-modal-content ul li {
  background: var(--third-color);
  color: var(--first-color);
  padding: 5px;
  border-radius: 4px;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
}

.project-modal-content ul li strong {
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--first-color);
}

.project-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: var(--first-color);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10002;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}


/* ============================== */
/* 🔹 Paragraphes + Galerie   */
/* ============================== */
.dev-paragraph-with-image {
  overflow: hidden;
  margin: 20px 0;
  font-size: 1rem;
  color: var(--first-color);
  text-align: justify;
  line-height: 1.6;
}

.dev-image {
  float: right;
  margin-left: 20px;
  margin-bottom: 10px;
  width: 350px;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.asset-link {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  background-color: var(--second-color);
  color: var(--first-color);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.asset-link:hover {
  background-color: var(--first-color);
  color: var(--fourth-color);
}

.external-link-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.external-link-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--second-color);
  color: var(--first-color);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border: 2px solid var(--third-color);
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.external-link-btn:hover {
  background-color: var(--first-color);
  color: var(--fourth-color);
  border-color: var(--first-color);
}

.project-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 10px;
}

.project-gallery .gallery-thumb {
  width: 200px;
  height: auto;
  border-radius: 6px;
  cursor: zoom-in;
  transition: transform 0.2s ease;
}

.project-gallery .gallery-thumb:hover {
  transform: scale(1.05);
}

/* ============================== */
/* 🔹 Lightbox (Zoom image)       */
/* ============================== */
.image-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10001;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-lightbox-backdrop {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
}

@keyframes zoomInFromThumb {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.zoomed-img {
  position: relative;
  width: auto;
  height: auto;
  min-width: 1000px; 
  min-height: 500px;
  max-width: 95vw;
  max-height: 95vh;
  border-radius: 4px;
  transition: transform 0.3s ease;
  animation: zoomInFromThumb 0.3s ease-out;
  cursor: zoom-out;
  object-fit: contain;
}

.zoom-close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.2rem;
  font-weight: bold;
  color: var(--first-color);
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10002;
  transition: color 0.2s ease;
}

.zoom-close-btn:hover {
  color: var(--second-color);
}

@media screen and (max-width: 480px) {
  .filter-bar {
      flex-direction: column;
      width: 40%;
      padding: 5px;
  }

  .filter-btn {
      width: 100%;
      padding: 8px;
  }

  .skewed {
      width: 70%;
      padding: 10px;
  }

  .skewed .text {
      padding: 1em;
  }

  .skewed h1 {
      font-size: 20px;
  }

  .skewed p {
      font-size: 0.75em;
  }
}


/* ============================== */
/* 🔹 Responsive Design           */
/* ============================== */

@media screen and (max-width: 1200px) {
  .skewed {
      width: 80%;
  }
  
}

@media screen and (max-width: 768px) {
  .filter-bar {
      width: 40%;
      flex-wrap: wrap;
      gap: 5px;
  }

  .filter-btn {
      min-width: 45px;
      font-size: 10px;
  }

  .skewed {
      width: 70%;
      margin: 1em 0;
      flex-direction: column;
      align-items: center;
      text-align: center;
  }

  .skewed h1 {
      font-size: 24px;
  }

  .skewed p {
      font-size: 0.8em;
  }

  .skewed .image {
      height: auto;
      width: 100%;
  }

  .skewed .text {
    width: 100%;
  }

  .skewed .image::before {
      display: none;
  }

  .skewed .image img {
    width: 100%;
  }

  .navbar-nav {
      flex-direction: column;
      text-align: center;
  }

  .zoomed-img {
    min-width: unset;
    min-height: unset;
    width: 100%;
    height: auto;
  } 
}