body {
    font-family: "Raleway", sans-serif;
    margin: 0;
    color: #F4F1F9;
    background-color: #000;
}

header h1 {
    display: inline-block;
    margin: 0;
    padding-top: 5px;
    font-weight: 200;
    width: 40%;
}

header span {
    font-weight: 900;
}

/* Loader */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: end;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    transition: all .5s ease;
}

.loader.hidden {
    pointer-events: none;
    opacity: 0;
}

.spinner {
    width: 100%;
    height: 5px;
    border-top-color: #3A383E;
    animation: spin 2s ease infinite;
    margin-bottom: 10px;
    background-repeat: no-repeat;
    background-image: linear-gradient(to right, #ffffff10, #ffffff, #ffffff10);
    background-size: 80% 100%;
    background-position: center;
}

@keyframes spin {
    85% { opacity: .6; }
    100% { background-size: 100% 100%;  opacity: 0; }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 0.8fr); /* 6 colonnes pour plus de flexibilité */
  gap: 20px;
  max-width: 95vw;
  margin: 40px auto;
  padding: 20px;
}

/* Motif qui se répète toutes les 5 images */

.gallery-item:nth-child(1) {
  grid-column: 1 / 1;
  grid-row: 1;
}
.gallery-item:nth-child(2) {
  grid-column: 2 / 2;
  grid-row: 1 / 2;
}
.gallery-item:nth-child(3) {
  grid-column: 3/5;
  grid-row: 1 / 3;
}
.gallery-item:nth-child(4) {
  grid-column: 1;
  grid-row: 2;
}
.gallery-item:nth-child(5) {
  grid-column: 2;
  grid-row: 2;
}
.gallery-item:nth-child(6) {
  grid-column: 1 / 3;
  grid-row: 3 / 5;
}

/* Style commun à toutes les images */
.gallery-item {
  overflow: hidden;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: .05s ease-out;
}

.gallery-item:hover img {
    transform: scale(1.1);
    cursor: zoom-in;
}

/* Responsive - 2 colonnes sur mobile */
@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-item {
    grid-column: span 2 !important;
    grid-row: span 1 !important;
    aspect-ratio: 1/1 !important;
  }
}

/* Overlay de plein écran */
.fullscreen-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fullscreen-overlay.active {
  display: flex;
  opacity: 1;
}

/* Conteneur pour l'image */
.fullscreen-img-container {
  max-width: 90%;
  max-height: 90%;
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

/* Image zoomable */
.fullscreen-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  position: relative;
}

/* Conteneur des infos (en haut) */
.fullscreen-info {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  color: white;
  font-family: Arial, sans-serif;
  text-align: center;
  user-select: none;
}

.fullscreen-filename {
  font-size: 16px;
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.fullscreen-details {
  font-size: 14px;
  opacity: 0.8;
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* Contrôles de zoom (en bas à droite) */
.fullscreen-zoom-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: 2001;
}

.fullscreen-zoom-slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 12px;
  border-radius: 20px;
}

.fullscreen-zoom-slider {
  width: 120px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #ddd;
  border-radius: 3px;
  outline: none;
}

.fullscreen-zoom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

.fullscreen-zoom-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

.fullscreen-zoom-value {
  color: white;
  font-size: 14px;
  min-width: 40px;
  text-align: center;
}

.fullscreen-zoom-btn {
    margin-right: 10px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 5px;
  padding: 5px 10px;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  transition: background 0.2s;
}

.fullscreen-zoom-btn:hover {
  background: rgba(0, 0, 0, 1);
}

/* Boutons de navigation */
.fullscreen-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 30px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 20px;
  z-index: 2001;
  user-select: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.fullscreen-nav:hover {
  opacity: 1;
}

.fullscreen-nav.prev {
  left: 20px;
}

.fullscreen-nav.next {
  right: 20px;
}

/* Ajoutez ceci à votre CSS existant */
.fullscreen-help-text {
  color: white;
  font-size: 12px;
  opacity: 0.7;
  margin-top: 5px;
  text-align: center;
  width: 100%;
}

.fullscreen-zoom-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px; /* Espacement réduit pour le texte d'aide */
}

/* Glass Morphism avec titre à gauche et menu à droite */
#site-title-container {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
}

#site-title {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 15px 5px;
  color: white;
  font-weight: lighter;
  font-size: 1.2rem;
  letter-spacing: 1px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(31, 38, 135, 0.2);
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  min-width: 150px;
  text-align: center;
}

#site-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
}

#glass-menu {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  font-family: 'Raleway', Tahoma, Geneva, Verdana, sans-serif;
}

#main-menu, #sub-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
  padding: 10px 15px;
  width: fit-content;
  transition: all 0.3s ease;
}

#main-menu {
  display: flex;
  gap: 10px;
}

#main-menu li {
  position: relative;
}

#sub-menu-container {
  position: absolute;
  top: 100%;
  right: 0;
  width: fit-content;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  margin-top: 10px;
}

#sub-menu-container.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#sub-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}

.glass-item {
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: block;
  text-align: center;
  position: relative;
  overflow: hidden;
  font-size: 0.9rem;
}

.glass-item::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.glass-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.glass-item:hover::before {
  transform: scaleX(1);
}

.glass-item.active {
  background: rgba(245, 234, 246, 0.2);
  font-weight: bold;
  color: #ffffff;
}

.glass-toggle {
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.glass-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.arrow {
  transition: transform 0.2s ease;
  font-size: 0.7em;
}

#sub-menu-container.show .arrow {
  transform: rotate(180deg);
}

/* Effet de bordure lumineuse */
#site-title-container::before,
#glass-menu::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(145deg, rgba(100, 200, 255, 0.2), rgba(255, 100, 255, 0.2));
  z-index: -1;
  border-radius: 16px;
  opacity: 0.5;
}

#site-title {
  background-size: 200% 100%;
}

/* Style pour le titre du dossier actuel */
#current-folder-title {
  margin: 20px auto;
  color: white;
  font-family: 'Raleway', Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
  text-transform: capitalize;
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  display: block;
  z-index: 10;
}

/* Effet de brillance subtile */
#current-folder-title::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 8px;
}

#current-folder-title {
  animation: fadeIn 0.5s ease-out;
}
