/* =========================================================
   reportage-style.css — particularités de la page Reportage
   Mise en page à 2 colonnes : nav latérale (20%) + carrousel (80%)
   Dépend de global.css (variables, header, footer, etc.)
   ========================================================= */

.gallery-layout{
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--rule);
}

/* ---------------------------------------------------------
   Colonne 1 — 20%, fond blanc, navigation vers les autres séries
   --------------------------------------------------------- */
.gallery-side{
  width: 20%;
  flex: 0 0 20%;
  background: #ffffff;
  border-right: 1px solid var(--rule);
  padding: clamp(2rem, 4vw, 3rem) clamp(1.4rem, 2.6vw, 2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2.5rem;
}

.railwayTitle {
	display:inline-flex;
}

.gallery-side-info h1, .railway{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  margin: 0.3rem 0 0.5rem;
}

.railway {display:none;}

.gallery-side-info p{
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0;
}

.side-nav-label{
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

.side-nav {display:block;}

.side-nav li{ border-bottom: 1px solid var(--rule); }
.side-nav li:first-child{ border-top: 1px solid var(--rule); }
.side-nav a{
  display: block;
  padding: 0.9rem 0;
  font-family: var(--font-display);
  font-size: 1rem;
  transition: color 0.2s ease;
}
.side-nav a:hover{ color: var(--ink-soft); }

/* ---------------------------------------------------------
   Colonne 2 — 80%, carrousel plein cadre
   --------------------------------------------------------- */
.gallery-main{
  width: 80%;
  flex: 0 0 80%;
  background: var(--bg-paper);
}

.carousel{
  position: relative;
  height: 83.9vh;
  min-height: 83.9vh;
  overflow: hidden;
}
.carousel-track{
  display: flex;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.65, 0.05, 0.36, 1);
  touch-action: pan-y;
  cursor: grab;
}
.carousel-track:active{ cursor: grabbing; }

.carousel-slide{
  flex: 0 0 100%;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
}
.slide-media{
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg-paper);
}
/* Barre de chargement : visible tant que la photo n'a pas encore recouvert
   la zone (image lente à charger, connexion faible, etc.). Purement en CSS :
   la vraie image (position absolute, peinte après ce pseudo-élément dans
   l'ordre du DOM) la recouvre automatiquement dès qu'elle est rendue. */
.slide-media::before{
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(160px, 40%);
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--ink-soft), transparent);
  background-size: 200% 100%;
  animation: adessiasSlideLoading 1.3s linear infinite;
  pointer-events: none;
}
@keyframes adessiasSlideLoading{
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce){
  .slide-media::before{ animation: none; opacity: 0.4; }
}
.slide-media .frame-mark{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  opacity: 0.5;
  pointer-events: none;
}
.slide-media .frame-mark svg{ width: 34px; height: 34px; }
.slide-media img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding:.5rem;
  pointer-events: none;
}

/* ---------------------------------------------------------
   Cartouche d'introduction du carrousel — même comportement que
   les diapositives-photo (même classe .carousel-slide, gérée par
   le même script), mais scindé en deux colonnes : image à gauche,
   titre + contenu de la page à droite. N'apparaît que si la page
   a du contenu (voir page-serie.php).
   --------------------------------------------------------- */
.carousel-slide--cartouche{
  flex-direction: row;
}
.cartouche-media{
  flex: 0 0 50%;
  position: relative;
  overflow: hidden;
  background: var(--bg-paper);
}
.cartouche-media img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cartouche-media .frame-mark{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  opacity: 0.5;
}
.cartouche-media .frame-mark svg{ width: 34px; height: 34px; }

.cartouche-content{
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1.6rem, 4vw, 3.2rem);
  overflow-y: auto;
}
.cartouche-content h2{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin: 0;
  line-height: 1.2;
}
.cartouche-content p{
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin: 0 0 1rem;
}
.cartouche-content p:last-child{ margin-bottom: 0; }

@media (max-width: 700px){
  .carousel-slide--cartouche{ flex-direction: column; }
  .cartouche-media{ flex: 0 0 40%; }
  .cartouche-content{ flex: 1 1 auto; padding: 1.4rem; }
}

.slide-caption {
  padding: 1rem clamp(1.4rem, 3vw, 2.2rem);
  border-top: 1px solid var(--rule);
  background: var(--bg-paper);
  text-align: right;
}
.slide-caption strong{
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.02rem;
  margin-bottom: 0.15rem;
}
.slide-caption span{
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* Flèches de navigation, en bas à droite du carrousel */
.carousel-controls{
  position: absolute;
  right: clamp(1rem, 3vw, 1.8rem);
  bottom: clamp(4.6rem, 9vw, 5.6rem);
  display: flex;
  gap: 0.6rem;
  z-index: 5;
}
.carousel-btn{
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  background: rgba(239, 239, 239, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.carousel-btn:hover{ background: var(--ink); color: var(--bg); }
.carousel-btn svg{ width: 18px; height: 18px; }

.folio {
	height: 8svh; background:rgb(247, 247, 245); border-top:1px solid var(--rule);
}
.folio .footer-inner {
	padding:1rem var(--gutter) 1rem;
	
	
}
/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 900px){
  .gallery-layout{ flex-direction: column; }
  .gallery-side{
    width: 100%;
    flex-basis: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 1.3rem var(--gutter);
    gap: 1.6rem;
  }
  .gallery-side-info h1, .railway { font-size: 1.35rem; margin-top: 0.15rem; }
  .side-nav {display:none  !important;}
  .side-nav{ display: flex; flex-direction: row; gap: 1.4rem; }
  .side-nav li{ border: none; }
  .side-nav a{ padding: 0; }
  .side-nav-label{ display: none; }
  .railway {display:block;}

  .gallery-main{ width: 100%; flex-basis: auto; }
  .carousel{ height: 62vh; min-height: 62vh; }
  .carousel-controls{ bottom: clamp(3.6rem, 12vw, 4.4rem); }
}

@media (max-width: 560px){
  .gallery-side{ flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .cartouche-media {display:none;}
}
