/* Firefox */
* {
  scrollbar-color: #f6e501 #0d0d0d;
}

*::-webkit-scrollbar-track {
  background: #0d0d0d;
}

*::-webkit-scrollbar-thumb {
  border: 3px solid #0d0d0d;
}

#cursor {
  background-color: rgb(255, 255, 255);
}

#cursor-border {
  box-shadow: 0 0 0 1px rgb(255, 255, 255);
}

body {
  background-color: #0d0d0d;
}

.container {
  max-width: 100vw;
  width: 100%;
  margin: auto;
}

.navbar-port {
  width: 100%;
  background-color: #0d0d0dd9;
  position: fixed;
  height: 100px;
  z-index: 999;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100px;
}

.logo img {
  height: 50px;
}

.navbar-port .menu-items {
  display: flex;
}

.navbar-port .nav-container li {
  list-style: none;
}

.navbar-port .nav-container a {
  text-decoration: none;
  color: #ffffff;
  font-weight: 500;
  font-size: 3rem;
  padding: 0.7rem;
  font-family: "poppins", sans-serif;
  text-transform: capitalize;
  transition: 0.3s;
}

.navbar-port .nav-container a:hover {
  opacity: 0.5;
}

.navbar-port .menu-items li {
  margin-bottom: 3rem;
  font-size: 1.5rem;
  font-weight: 500;
}

.nav-container {
  display: block;
  position: relative;
  height: 100px;
}

.nav-container .checkbox {
  position: absolute;
  display: block;
  height: 32px;
  width: 32px;
  top: 34px;
  left: 20px;
  z-index: 5;
  opacity: 0;
}

.nav-container .hamburger-lines {
  display: block;
  height: 26px;
  width: 32px;
  position: absolute;
  top: 34px;
  left: 20px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-container .hamburger-lines .line {
  display: block;
  height: 4px;
  width: 100%;
  border-radius: 10px;
  background: #ffffff;
}

.nav-container .hamburger-lines .line1 {
  transform-origin: 0% 0%;
  transition: transform 0.4s ease-in-out;
}

.nav-container .hamburger-lines .line2 {
  transition: transform 0.2s ease-in-out;
}

.nav-container .hamburger-lines .line3 {
  transform-origin: 0% 100%;
  transition: transform 0.4s ease-in-out;
}

.navbar-port .menu-items {
  padding-top: 120px;
  background-color: rgba(0, 0, 0, 0.9);
  height: 100vh;
  width: 100%;
  transform: translate(-150%);
  display: flex;
  flex-direction: column;
  transition: transform 0.5s ease-in-out;
  text-align: center;
}

.logo {
  position: absolute;
  top: 25px;
  right: 15px;
}

.nav-container input[type="checkbox"]:checked ~ .menu-items {
  transform: translateX(0);
}

.nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line1 {
  transform: rotate(45deg);
}

.nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line2 {
  transform: scaleY(0);
}

.nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line3 {
  transform: rotate(-45deg);
}

.nav-container input[type="checkbox"]:checked ~ .logo {
}

.navbar-port .nav-container a.active {
  opacity: 0.5;
}

.book {
  background-color: #0d0d0d;
  padding-top: 150px;
}

.book a {
  display: block;
  margin-bottom: 30px;
}

.book img {
  width: 100%;
  display: block;
  border-radius: 4px;
  transition: 0.3s;
}

.book img:hover {
  transform: scale(1.02);
}

#masonry-grid {
  margin: 0 auto;
  position: relative; /* requis par Masonry */
}

#masonry-grid .grid-sizer,
#masonry-grid .grid-item {
  width: calc((100% - 60px) / 3); /* 3 colonnes, gutter 30px */
  box-sizing: border-box;
  float: none; /* IMPORTANT : pas de float avec Masonry */
}

/* 2 colonnes */
@media (max-width: 1200px) {
  #masonry-grid .grid-sizer,
  #masonry-grid .grid-item {
    width: calc((100% - 30px) / 2);
  }
}

/* 1 colonne */
@media (max-width: 600px) {
  #masonry-grid .grid-sizer,
  #masonry-grid .grid-item {
    width: 100%;
  }
}

/* Loader fullscreen */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  inset: 0;
  width: 100%;
  height: 100vh;
  background-color: #0d0d0d; /* même fond que la galerie */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  flex-direction: column;
}

/* Optionnel : animation de fade out */
#loader.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

#loader-slow-msg {
  margin-top: 14px;
  font-size: 14px;
  opacity: 0.85;
  text-align: center;
  max-width: 320px;

  color: white;
}

@media (max-width: 1500px) {
  .book {
    /* column-count: 2; */
  }
}
@media (max-width: 1000px) {
  .book {
    /* column-count: 1; */
  }

  .navbar-port .nav-container a {
    font-size: 1.3rem;
  }
}

/* Évite les containers qui scrollent verticalement à l'intérieur de la page */
.book,
#masonry-grid {
  overflow-y: visible;
}

/* Le menu mobile peut scroller, mais on cache sa scrollbar */
.menu-items {
  overflow-y: auto;
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none; /* Firefox */
}

.menu-items::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Loader infini en bas */
#infinite-loader {
  display: none;
  padding: 24px 0 60px;
  text-align: center;
  min-height: 64px; /* évite le jump pendant le chargement */
  background-color: #0d0d0d;
  padding-bottom: 150px;
}
#infinite-loader.active {
  display: block;
}

#infinite-loader img {
  width: 56px; /* adapte si besoin */
  height: 56px; /* adapte si besoin */
  object-fit: contain;
  opacity: 0.9;
}

/* Le message de fin inchangé */
#infinite-end {
  display: none;
  text-align: center;
  opacity: 0.6;
  padding: 8px 0 40px;
  font-size: 0.9rem;
  background-color: #0d0d0d;
  padding-bottom: 150px;
}
#infinite-end.active {
  display: block;
}

.get-back {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.3s ease;
  animation: none;

  border: none;
  padding: 18px 24px;
  font-size: 18px;
  border-radius: 8px;
  transition: 0.5s;
}
.get-back a {
  color: black;
  text-decoration: none;
}

.get-back:hover {
  transform: translateX(-50%) translateY(-5px);
}
