/* ══════════════════════════════════════════════
   EMERA · CY 06-1 · PRESS LIBRARY · STYLES
   Maison de Haute Horlogerie Indépendante
   ══════════════════════════════════════════════ */

*, ::before, ::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

:root {
  --bg:    #ffffff;
  --gold:  #B89A5C;
  --ink:   #2E2C2A;
  --muted: #9A9490;
  --cream: #F0EDE7;
}

html { height: 100%; }
body { min-height: 100%; }

/* ── SCROLLBAR — invisible (cohérence visuelle) ── */
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; -ms-overflow-style: none; }

body {
  background: #ffffff;
  color: var(--ink);
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  cursor: none;
}

*, a { cursor: none; }

/* ── CURSOR ── */
#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 0.75px solid rgba(46,44,42,0.28);
  background: rgba(46,44,42,0.03);
  /* backdrop-filter retiré : cause un artefact bleu sur Safari/macOS */
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%,-50%);
  outline: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    width .6s cubic-bezier(.16,1,.3,1),
    height .6s cubic-bezier(.16,1,.3,1),
    border-color .4s ease,
    background .4s ease;
}
#cursor::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(46,44,42,0.6);
  transform: translate(-50%,-50%);
  transition: all .5s cubic-bezier(.16,1,.3,1);
}
#cursor.hover {
  width: 54px; height: 54px;
  border-color: rgba(184,154,92,.45);
  background: rgba(184,154,92,.07);
}
#cursor.hover::after { width: 0; height: 0; opacity: 0; }

/* hover on photos */
#cursor.hover-photo {
  width: 64px; height: 64px;
  border-color: rgba(240,237,231,0.25);
  background: rgba(46,44,42,0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#cursor.hover-photo::after { width: 0; height: 0; opacity: 0; }

/* hover on download triggers */
#cursor.hover-dl {
  width: 68px; height: 68px;
  border-color: rgba(184,154,92,.7);
  background: rgba(184,154,92,.13);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#cursor.hover-dl::after { width: 0; height: 0; opacity: 0; }

/* ── PAGE ── */
.page {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
}

/* ── HEADER ── */
header {
  background: #ffffff;
  padding: 14px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  opacity: 0;
  animation: fadeDown .7s cubic-bezier(.16,1,.3,1) .05s forwards;
  position: relative;
  z-index: 300;
}

.logo a { display: block; cursor: none; }
.logo img { height: 32px; width: auto; display: block; }

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hdr-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
}

/* download all button in header */
.hdr-dl {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  cursor: none;
  padding: 6px 0;
  overflow: hidden;
}
.hdr-dl::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 0.5px;
  background: var(--gold);
  transition: width .4s cubic-bezier(.16,1,.3,1);
}
.hdr-dl:hover { color: var(--gold); }
.hdr-dl:hover::after { width: 100%; }
.hdr-dl-icon {
  font-size: 13px;
  display: inline-block;
  transition: transform .35s ease;
}
.hdr-dl:hover .hdr-dl-icon { transform: translateY(2px); }

/* ── GALLERY ── */
.gallery-center {
  flex: 1;
  display: flex;
  min-height: 0;
}
.gallery-center > .gallery {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.gallery {
  flex: 1;
  display: grid;
  grid-template-columns: 58fr 42fr;
  grid-template-rows: 1fr 1fr;
  gap: 0;
  background: #ffffff;
  opacity: 0;
  animation: fadeIn .9s ease .3s forwards;
  min-height: 0;
  overflow: hidden;
}

.g-front   { grid-column: 1; grid-row: 1 / 3; }
.g-closeup { grid-column: 2; grid-row: 1; }
.g-back    { grid-column: 2; grid-row: 2; }

.photo-item {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  height: 100%;
  opacity: 0;
  animation: photoIn .9s cubic-bezier(.16,1,.3,1) forwards;
}
.g-front   .photo-item { animation-delay: .35s; }
.g-closeup .photo-item { animation-delay: .55s; }
.g-back    .photo-item { animation-delay: .75s; }
@keyframes photoIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.photo-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 1.4s cubic-bezier(.16,1,.3,1);
  will-change: transform;
}

.g-back .photo-item img {
  object-position: center center;
}

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

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(240,237,231,0);
  transition: background .5s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 28px;
}
.photo-item:hover .photo-overlay { background: rgba(240,237,231,.55); }

.photo-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2.5px;
  color: transparent;
  text-transform: uppercase;
  transition: color .35s ease;
}
.photo-item:hover .photo-num { color: rgba(46,44,42,.5); }

.photo-num--white { color: transparent !important; }
.photo-item:hover .photo-num--white { color: rgba(255,255,255,0.75) !important; }

.photo-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s ease, transform .4s ease;
}
.photo-item:hover .photo-bottom { opacity: 1; transform: translateY(0); }

.photo-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 3px;
  color: var(--ink);
  text-transform: uppercase;
}

/* click to download */
.photo-hint {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 0.5px solid var(--gold);
  padding-bottom: 2px;
}

/* ── FOOTER ── */
/* legacy 48px footer stub removed — the editorial .ep-footer replaces it */

/* ── ANIMATIONS ── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ════════════════════════════════════════
   RESPONSIVE — MOBILE & TABLETTES (iPad inclus)
   Le breakpoint à 1100px couvre tous les iPad (portrait & paysage)
   ainsi que toutes les tablettes Android. La galerie mobile (slider
   plein écran avec flèches haut/bas) est plus appropriée sur ces
   formats que la grille desktop 3 colonnes.
   ════════════════════════════════════════ */
@media (max-width: 1100px), (hover: none) and (pointer: coarse) {
  #cursor { display: none !important; }
  body, *, a { cursor: auto !important; }
  body { overscroll-behavior-y: none; }

  .gallery-center { display: none !important; }
  footer { display: none !important; }

  header {
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 300;
    background: #fff;
  }
  .logo img { height: 26px; }
  .hdr-label, .hdr-dl { display: none; }

  /* Gallery container */
  #mob-gallery {
    position: fixed;
    top: 52px; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    z-index: 10;
    background: #fff;
  }

  /* Each slide */
  .mob-slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    will-change: transform;
  }

  /* Image frame */
  .mob-frame {
    flex: 1;
    margin: 16px 20px 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow:
      0 6px 28px rgba(46,44,42,.12),
      0 2px 6px rgba(46,44,42,.06);
  }
  .mob-frame img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    pointer-events: none;
  }

  /* Liquid transition canvas */
  #mob-liq-canvas {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    border-radius: 8px;
  }

  /* Nav arrows */
  .mob-arrow {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: color .2s;
    font-family: 'Barlow Condensed', sans-serif;
  }
  .mob-arrow:active { color: rgba(255,255,255,0.9); }
  .mob-arrow-up    { top: 10px; }
  .mob-arrow-down  { bottom: 10px; }
  .mob-arrow.hidden { display: none; }

  /* Progress bar */
  .mob-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: rgba(184,154,92,0.15);
    z-index: 7;
  }
  .mob-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gold);
    transition: none;
  }

  /* Info bar */
  .mob-info {
    height: 68px;
    padding: 14px 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
  }
  .mob-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    color: rgba(46,44,42,.45);
    text-transform: uppercase;
  }
  .mob-dl {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--gold);
    text-transform: uppercase;
    opacity: .9;
  }
}
