/* ============================================================
   À PART Galerie — Styles
   ============================================================ */

/* ── Fonts ── */
@font-face {
  font-family: 'NeueHaasDisplay';
  src: url('fonts/NeueHaasDisplayRoman.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TimesNow';
  src: url('fonts/Times-Now-ExtraLight.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'TimesNow';
  src: url('fonts/Times-Now-SemiBold-Italic.woff2') format('woff2');
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

/* ── Variables ── */
:root {
  --white:     #ffffff;
  --black:     #111111;
  --grey:      #999999;
  --font-sans: 'NeueHaasDisplay', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-serif: 'TimesNow', 'Times New Roman', serif;

  --img-height:  420px;  /* hauteur fixe commune à toutes les images */
  --arrow-gap:    20px;  /* espace entre l'image et chaque flèche    */
  --info-edge:    36px;  /* distance des blocs info par rapport aux bords */
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Base ── */
html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-sans);
  cursor: none;
}

/* ============================================================
   Curseur personnalisé
   ============================================================ */
#cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--black);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s, background .2s, border .2s;
  mix-blend-mode: multiply;
}
#cursor.expanded {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--black);
}

/* ============================================================
   Logo — centré en haut, 250px
   ============================================================ */
#logo {
  position: fixed;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  opacity: 0;
  width: 250px;
  text-align: center;
}
#logo a       { display: block; }
#logo img     { width: 250px; height: auto; display: block; }
#logo-svg     { display: none; }

/* ============================================================
   Informations fixes sur les bords — centrées verticalement
   ============================================================ */
.fixed-info {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  font-size: 10px;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: var(--black);
  opacity: 0;
}
.fixed-info a { color: inherit; text-decoration: none; }
.fixed-info a:hover { text-decoration: underline; }

#info-left  { left:  var(--info-edge); text-align: left;  }
#info-right { right: var(--info-edge); text-align: right; }

/* ============================================================
   Scène centrale
   ============================================================ */
#scene {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Stage : [←] [slideshow+dots] [→] */
#stage {
  display: flex;
  align-items: center;
  opacity: 0;
}

/* ============================================================
   Flèches de navigation
   ============================================================ */
.nav-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  cursor: none;
  opacity: 0;
}
.nav-arrow svg {
  width: 18px;
  height: 11px;
  transition: transform .25s ease;
}

#arrow-prev { padding-right: var(--arrow-gap); }
#arrow-next { padding-left:  var(--arrow-gap); }

#arrow-prev:hover svg { transform: translateX(-4px); }
#arrow-next:hover svg { transform: translateX( 4px); }

/* ============================================================
   Diaporama
   ============================================================ */
#slideshow-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;  /* espace image → dots */
}

#slideshow {
  position: relative;
  height: var(--img-height);
  width: 300px;   /* valeur initiale, ajustée dynamiquement par JS */
  overflow: hidden;
}

/* Slides */
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  will-change: transform, opacity;
}
.slide.active { opacity: 1; z-index: 2; }
.slide.prev   { opacity: 1; z-index: 1; }

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center;
}

/* ============================================================
   Dots de navigation — sous l'image
   ============================================================ */
#dots {
  display: flex;
  gap: 7px;
  opacity: 0;
}
.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--grey);
  cursor: none;
  transition: background .3s;
}
.dot.active { background: var(--black); }

/* ============================================================
   Rideau d'ouverture (intro)
   ============================================================ */
#curtain {
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 500;
  transform-origin: top;
}

/* ============================================================
   MOBILE — breakpoint ≤ 680px
   ============================================================ */
@media (max-width: 680px) {

  /* Sur mobile le curseur natif est rétabli */
  html, body { cursor: auto; overflow: hidden; }
  #cursor    { display: none; }

  /* Logo plus petit */
  #logo      { top: 20px; width: 180px; }
  #logo img  { width: 180px; }

  /* Scène : occupe tout l'écran, centre le stage verticalement
     en tenant compte du logo en haut et des infos en bas       */
  #scene {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Reserve l'espace logo (~60px) et le footer (~70px) */
    padding-top:    60px;
    padding-bottom: 70px;
  }

  /* Stage : ligne [←] [slideshow+dots] [→], centré */
  #stage {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 4px;
  }

  /* Flèches plus généreuses au toucher */
  .nav-arrow {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    cursor: auto;
  }
  .nav-arrow svg { width: 16px; height: 10px; }

  #arrow-prev { padding-right: 8px; }
  #arrow-next { padding-left:  8px; }

  /* Diaporama : prend l'espace disponible entre les deux flèches */
  #slideshow-wrap {
    flex: 1;
    min-width: 0;
    gap: 12px;
  }

  #slideshow {
    height: 55vw;
    width:  100% !important;
    max-width: 100%;
  }

  /* Sur mobile l'image remplit le conteneur en couvrant */
  .slide img { object-fit: cover; }

  /* Dots légèrement plus grands pour le toucher */
  .dot { width: 5px; height: 5px; }

  /* ── Informations : chacune fixée sur son propre bord, en bas ── */
  .fixed-info {
    position: fixed;
    top:       auto;
    transform: none;
    bottom:    20px;
    /* reset des propriétés desktop */
    left:      auto;
    right:     auto;
    width:     auto;
  }

  #info-left  {
    left:       24px;
    right:      auto;
    text-align: left;
  }

  #info-right {
    right:      24px;
    left:       auto;
    text-align: right;
  }
}