/* --- GENERAL LAYOUT & SCROLL --- */
.archives-intro p {
    margin-bottom: 3rem; /* Ajoute de l'espace sous le texte d'intro */
}

/* NOUVEAU: Style pour la mini-galerie d'introduction */
.intro-image-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

.intro-image-gallery .archive-gallery-item {
    width: clamp(200px, 22vw, 280px); /* Taille responsive */
    height: auto;
}
.archives-scroll {
  height: 100vh;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE & Edge */
}

.archives-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.archives-content {
  min-height: 100vh;
  background: var(--main-bg-color);
  padding: 5vh 0 0 0;
  font-size: 1.2em;
  font-weight: 400;
  opacity: 1;
  margin: 0;
  display: flex;
  position: relative;
}

/* --- HERO SECTION --- */
.archive-hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 2560px;
  margin: 0 auto;
}

.archive-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 18vh;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, var(--main-bg-color) 100%);
  z-index: 2;
  pointer-events: none;
}

.archive-hero video {
  position: absolute;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 1;
}

.archive-hero .archive-title {
  position: relative;
  z-index: 3;
  color: #fff;
  font-family: "Libre Baskerville", serif;
  font-size: 3vw;
  text-align: center;
}

/* --- NAVIGATION MENU --- */
.archive-nav-container {
    width: 250px;
    flex-shrink: 0;
    padding-right: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.archive-nav-container.is-visible {
    opacity: 1;
    visibility: visible;
}

.archive-nav-container ul {
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-nav-container .nav-link {
    display: block;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.archive-nav-container .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

.archive-nav-container .nav-link.active {
    color: #E0DED8;
    border-left-color: #fff;
    font-weight: bold;
}

/* --- NARRATIVE CONTENT --- */
.archives-narrative {
    flex-grow: 1;
    padding: 2rem 0;
}

.archives-intro {
  width: 90vw;
  max-width: 900px;
  margin: 0 auto;
  padding: 5vw 0;
  color: #fff;
  text-align: center;
  font-family: "Figtree", sans-serif;
}

.archive-chapter {
    max-width: 75ch;
    margin: 0 auto 5rem auto;
    padding: 0 2rem;
}

.archive-chapter h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: #E0DED8;
    border-left: 3px solid #fff;
    padding-left: 1rem;
    font-family: "Libre Baskerville", serif;
}

.archive-chapter p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.8);
    white-space: pre-wrap;
    text-align: justify;
    text-indent: 2em;
    margin-bottom: 1em;
}

/* --- ARCHIVES GALLERY (GRID & OVERLAY) --- */
.archives-gallery-section {
    margin-top: 8rem;
    padding-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: #E0DED8;
    font-family: "Libre Baskerville", serif;
}

.archive-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.archive-gallery-item {
  width: 180px;
  margin: 10px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 2px 8px #0005;
  transition: transform 0.2s;
}

.archive-gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.2s;
}

.archive-gallery-item:hover {
  transform: scale(1.05);
}

.archive-gallery-item:hover img {
  transform: scale(1.05);
}

.archive-overlay {
  position: fixed;
  z-index: 2000;
  top: 0; left: 0; right: 0; bottom: 0;
  display: none; /* Caché par défaut, géré par JS */
  align-items: center;
  justify-content: center;
}

.archive-overlay-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
}

.archive-overlay-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 95vw;
  width: 95vw;
  max-height: 90vh;
  position: relative;
  gap: 70px;
}

.archive-overlay-photo {
  flex: 0 1 auto;
}

.archive-overlay-photo img {
  max-width: 50vw;
  max-height: 70vh;
  width: auto;
  height: auto;
  box-shadow: 0 4px 32px #000a;
}

.archive-overlay-info {
  flex: 0 0 320px;
  color: #fff;
  padding: 40px 40px 40px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  text-shadow: 0 2px 8px #000a;
  min-width: 250px;
  max-width: 400px;
  word-break: break-word;
}

.archive-overlay-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem); 
  margin-bottom: 0.5em;
  font-family: "Libre Baskerville", serif;
  font-weight: bold;
}

.archive-overlay-close {
  position: absolute;
  top: 24px;
  right: 36px;
  color: #fff;
  font-size: 2.2em;
  cursor: pointer;
  z-index: 20;
}

.archive-overlay-arrow {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.3s;
}

.archive-overlay-arrow.left { left: 2vw; }
.archive-overlay-arrow.right { right: 2vw; }

.archive-overlay-arrow img {
  width: 32px;
  opacity: 0;
  animation-duration: 2s;
  animation-iteration-count: infinite;
}

.archive-overlay-arrow.left img {
  transform: rotate(-90deg);
  animation-name: scroll-side-left;
}

.archive-overlay-arrow.right img {
  transform: rotate(90deg);
  animation-name: scroll-side-right;
}

.archive-overlay[style*="display: block"] .archive-overlay-arrow,
.archive-overlay[style*="display: flex"] .archive-overlay-arrow {
  display: flex !important;
}

@keyframes scroll-side-right {
  0%, 100% { opacity: 0; transform: rotate(90deg) translateX(0); }
  50% { opacity: 1; transform: rotate(90deg) translateX(10px); }
}

@keyframes scroll-side-left {
  0%, 100% { opacity: 0; transform: rotate(-90deg) translateX(0); }
  50% { opacity: 1; transform: rotate(-90deg) translateX(-10px); }
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    .archives-content {
        flex-direction: column;
    }
    .archive-nav-container {
        width: 100%;
        padding-right: 0;
        margin-bottom: 2rem;
    }
    .archive-nav-container ul {
        position: static;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .archive-nav-container .nav-link {
        border-radius: 20px;
        border-left: none;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    .archive-nav-container .nav-link.active {
        border-color: #c8a165;
        background-color: rgba(200, 161, 101, 0.1);
    }
}

@media (max-width: 900px) {
  .archive-overlay-content {
    flex-direction: column;
    gap: 20px;
    width: 100vw;
    max-width: 100vw;
    padding: 0;
  }
  .archive-overlay-photo img {
    max-width: 90vw;
    max-height: 50vh;
  }
  .archive-overlay-info {
    padding: 20px 10px;
    font-size: 1em;
    min-width: 0;
    max-width: 100vw;
  }
  .archive-chapter h3 {
    font-size: 1.8rem;
  }
  .archive-chapter p {
    font-size: 1rem;
  }
}
/* filepath: c:\MAMP\htdocs\glaneurs-main\css\archives.css */
/* --- GENERAL LAYOUT & SCROLL --- */
.archives-scroll {
  height: 100vh;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE & Edge */
}

.archives-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.archives-content {
  min-height: 100vh;
  background: var(--main-bg-color);
  padding: 5vh 0 0 0;
  font-size: 1.2em;
  font-weight: 400;
  opacity: 1;
  margin: 0;
  display: flex;
  position: relative;
}

/* --- HERO SECTION --- */
.archive-hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 2560px;
  margin: 0 auto;
}

.archive-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 18vh;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, var(--main-bg-color) 100%);
  z-index: 2;
  pointer-events: none;
}

.archive-hero video {
  position: absolute;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: 1;
}

.archive-hero .archive-title {
  position: relative;
  z-index: 3;
  color: #fff;
  font-family: "Libre Baskerville", serif;
  font-size: 3vw;
  text-align: center;
}

/* --- NAVIGATION MENU --- */
.archive-nav-container {
    width: 250px;
    flex-shrink: 0;
    padding-right: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.archive-nav-container.is-visible {
    opacity: 1;
    visibility: visible;
}

.archive-nav-container ul {
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-nav-container .nav-link {
    display: block;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.archive-nav-container .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.05);
}

.archive-nav-container .nav-link.active {
    color: #E0DED8;
    border-left-color: #fff;
    font-weight: bold;
}

/* --- NARRATIVE CONTENT --- */
.archives-narrative {
    flex-grow: 1;
    padding: 2rem 0;
}

.archives-intro {
  width: 90vw;
  max-width: 900px;
  margin: 0 auto;
  padding: 5vw 0;
  color: #fff;
  text-align: center;
  font-family: "Figtree", sans-serif;
}

.archive-chapter {
    max-width: 75ch;
    margin: 0 auto 5rem auto;
    padding: 0 2rem;
}

.archive-chapter h3 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: #E0DED8;
    border-left: 3px solid #FFF;
    padding-left: 1rem;
    font-family: "Libre Baskerville", serif;
}

.archive-chapter p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.8);
    white-space: pre-wrap;
    text-align: justify;
    text-indent: 2em;
    margin-bottom: 1em;
}

/* --- ARCHIVES GALLERY (GRID & OVERLAY) --- */
.archives-gallery-section {
    margin-top: 8rem;
    padding-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    color: #E0DED8;
    font-family: "Libre Baskerville", serif;
}

.archive-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.archive-thumb {
  width: 180px;
  margin: 10px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 2px 8px #0005;
  transition: transform 0.2s;
}

.archive-thumb img {
  width: 100%;
  display: block;
  transition: transform 0.2s;
}

/* Applique le zoom sur le conteneur ET l'image */
.archive-thumb:hover {
  transform: scale(1.05);
}
.archive-thumb:hover img {
  transform: scale(1.05);
}
.archive-overlay {
  position: fixed;
  z-index: 2000;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.archive-overlay-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:rgba(4,14,30,0.8);}
/* Agrandir la photo */
.archive-overlay-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  background: none;
  max-width: 95vw;
  width: 95vw;
  max-height: 90vh;
  overflow: visible;
  position: relative;
  box-shadow: none;
  gap: 70px; /* Augmente l'écart ici (ex : 70px) */
}
.archive-overlay-photo {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Photo très grande, centrée */
.archive-overlay-photo img {
  max-width: 50vw;
  max-height: 70vh;
  width: auto;
  height: auto;
  display: block;
  margin: 0;
  box-shadow: 0 4px 32px #000a;
}
/* Infos à droite, sans fond */
.archive-overlay-info {
  flex: 0 0 320px;
  color: #fff;
  padding: 40px 40px 40px 0;
  background: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  text-shadow: 0 2px 8px #000a;
  min-width: 250px;
  max-width: 400px;
  word-break: break-word;
}
.archive-overlay-info h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem); 
  margin-bottom: 0.5em;
  font-family: "Libre Baskerville", serif;
  font-weight: bold;
  letter-spacing: 0.02em;
}
.archive-overlay-close {
  position: absolute;
  top: 24px;
  right: 36px;
  color: #fff;
  font-size: 2.2em;
  cursor: pointer;
  z-index: 20;
  background: none;
  border: none;
  line-height: 1;
  padding: 0;
}
.archive-overlay-arrow {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s, transform 0.3s;
}

.archive-overlay-arrow.left {
  left: 2vw;
}
.archive-overlay-arrow.right {
  right: 2vw;
}

/* Pour la flèche gauche */
.archive-overlay-arrow img {
  width: 40px;
  animation: scroll-side-left 2s infinite;
  opacity: 0;
  cursor: pointer;
}

.archive-overlay-arrow.left img {
  width: 32px;
  transform: rotate(-90deg);
  animation: scroll-side-left 2s infinite;
  opacity: 0;
  cursor: pointer;
}
.archive-overlay-arrow.right img {
  width: 32px;
  transform: rotate(90deg);
  animation: scroll-side-right 2s infinite;
  opacity: 0;
  cursor: pointer;
}

@keyframes scroll-side-right {
  0% {
    opacity: 0;
    transform:translate(0);
  }
  50% {
    opacity: 1;
    transform: translateX(10px); /* Décale vers la droite */
  }
  100% {
    opacity: 0;
    transform:translateX(20px); /* Décale encore plus vers la droite */
  }
}
@keyframes scroll-side-left {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  50% {
    opacity: 1;
    transform: translateX(-10px); /* Décale vers la gauche */
  }
  100% {
    opacity: 0;
    transform: translateX(-20px); /* Décale encore plus vers la gauche */
  }
}

/* Cache les flèches hors overlay */
.archive-overlay-arrow {
  display: none;
}
.archive-overlay[style*="display: block"] .archive-overlay-arrow,
.archive-overlay[style*="display: flex"] .archive-overlay-arrow {
  display: flex !important;
}
/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    .archives-content {
        flex-direction: column;
    }
    .archive-nav-container {
        width: 100%;
        padding-right: 0;
        margin-bottom: 2rem;
    }
    .archive-nav-container ul {
        position: static;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .archive-nav-container .nav-link {
        border-radius: 20px;
        border-left: none;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    .archive-nav-container .nav-link.active {
        border-color: #fff;
        background-color: rgba(200, 161, 101, 0.1);
    }
}

@media (max-width: 900px) {
  .archive-overlay-content {
    flex-direction: column;
    gap: 20px;
    width: 100vw;
    max-width: 100vw;
    padding: 0;
  }
  .archive-overlay-photo img {
    max-width: 90vw;
    max-height: 50vh;
  }
  .archive-overlay-info {
    padding: 20px 10px;
    font-size: 1em;
    min-width: 0;
    max-width: 100vw;
  }
  .archive-chapter h3 {
    font-size: 1.8rem;
  }
  .archive-chapter p {
    font-size: 1rem;
  }
}
/* --- NOUVEAU: IMAGES FLOTTANTES EN ARRIÈRE-PLAN --- */

.archives-content {
  /* Cette propriété est cruciale pour que le positionnement absolu des enfants fonctionne */
  position: relative; 
}

.floating-images-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Placé sous le texte */
  /* pointer-events: none; A RETIRER pour que les images soient cliquables */
  overflow: hidden; /* Empêche les images de déborder si elles sont trop grandes */
}

.floating-image {
  position: absolute;
  display: block; /* Important pour que le <a> se comporte comme un bloc */
  opacity: 0.1; /* Opacité encore plus faible */
  filter: grayscale(80%) blur(1px); /* Effet "archive" et léger flou */
  z-index: 1; /* z-index de base */
  transform: translateY(var(--translate-y, 0px)); /* Utilise une variable CSS pour la parallaxe */
  /* Transition plus douce pour le survol */
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), 
              opacity 0.4s ease, 
              filter 0.4s ease;
}

/* NOUVEAU: Style pour l'image à l'intérieur du lien */
.floating-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* NOUVEAU: Effet au survol */
.floating-image:hover {
  opacity: 1; /* Opacité d'origine */
  filter: grayscale(0%) blur(0); /* Filtre retiré */
  z-index: 3; /* Passe au-dessus du texte et des autres images */
  /* Combine la parallaxe (via la variable) et le zoom */
  transform: translateY(var(--translate-y, 0px)) scale(1.1);
  cursor: pointer;
}

/* Positionnement individuel de chaque image */
#float-img-1 {
  top: 20vh;
  left: 5vw;
  width: 20vw;
  max-width: 250px;
}
#float-img-2 {
  top: 120vh;
  right: 8vw;
  width: 18vw;
  max-width: 220px;
}
#float-img-3 {
  top: 250vh;
  left: 10vw;
  width: 15vw;
  max-width: 180px;
}
#float-img-4 {
  top: 350vh;
  right: 5vw;
  width: 22vw;
  max-width: 280px;
}
#float-img-5 {
  top: 480vh;
  left: 8vw;
  width: 17vw;
  max-width: 200px;
}

/* S'assurer que le texte et la navigation sont bien au-dessus */
.archives-narrative, .archive-nav-container {
  position: relative;
  z-index: 2;
}

/* Cacher les images sur les petits écrans pour ne pas surcharger */
@media (max-width: 768px) {
  .floating-images-container {
    display: none;
  }
}