@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');

:root{
  --slideH: 56vh;  /* hauteur photo desktop */
  --gap: 0px;      /* 0 = images collées */
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  background:#0b0b0c;
  color:#f3f3f3;
  font-family: "Bebas Neue", ui-sans-serif, system-ui;
  overflow:hidden; /* desktop: pas de scroll natif */
}

a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; background:none; border:0; cursor:pointer; }

/* ===== Topbar ===== */
.topbar{
  position:fixed;
  top:0; left:0; right:0;
  height:64px;
  padding:18px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  z-index:50;
  background: rgba(11,11,12,0.55);
  backdrop-filter: blur(10px);
}

.leftTag{
  font-size:14px;
  letter-spacing:.14em;
  text-transform:uppercase;
  opacity:.65;
}

.rightInfo{
  display:flex;
  align-items:center;
  gap:22px;
}

.name{
  font-size:14px;
  letter-spacing:.14em;
  text-transform:uppercase;
  opacity:.95;
}

.nav{
  display:flex;
  gap:16px;
  font-size:14px;
  letter-spacing:.14em;
  text-transform:uppercase;
  opacity:.88;
}

/* About/Contact buttons */
.navBtn{ padding:0; opacity:.80; }
.navBtn:hover{ opacity:1; }

/* Back link (project page) */
.back{
  font-size:14px;
  letter-spacing:.14em;
  text-transform:uppercase;
  opacity:.75;
}
.back:hover{ opacity:1; }

/* ===== Layout ===== */
.stage{
  position:fixed;
  top:64px; left:0; right:0; bottom:0;
  display:grid;
  grid-template-columns: max-content 1fr;
}

/* ===== Titles (index) ===== */
.titles{
  padding: 0 18px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap: 8px;
  overflow:hidden;
}

.titleRow{
  cursor:pointer;
  user-select:none;
  transform: translateX(0);
  transition: transform .15s ease;
}

.titleRow .t{
  font-size: 58px;
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255,255,255,0.22);
  transition: color .15s ease, text-shadow .15s ease;
  transform: scaleY(1.15);
  transform-origin: left center;
}

.titleRow:hover .t{ color: rgba(255,255,255,0.42); }

.titleRow.is-active{ transform: translateX(2px); }

.titleRow.is-active .t{
  color:#ffffff;
  text-shadow:
    0 0 8px rgba(255,255,255,0.45),
    0 0 24px rgba(255,255,255,0.25),
    0 0 48px rgba(255,255,255,0.14);
}

/* ===== Viewer ===== */
.viewer{
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:stretch;
  justify-content:center;
}

.rail{
  position:absolute;
  left:0; right:0;
  top:0;
  transform: translate3d(0,0,0);
  will-change: transform;
}

.slide{
  height: calc(var(--slideH) + var(--gap));
  padding: 0;
  display:flex;
  justify-content:center;
  align-items:center;
  will-change: transform;
}

.media{
  width: min(980px, 78vw);
  height: var(--slideH);
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* Desktop reveal */
.media img{
  width:100%;
  height:140%;
  object-fit: cover;
  display:block;
  transform: translate3d(0,0,0); /* on autorise les transforms */
  will-change: transform;
}

/* ===== Counter ===== */
.corner{
  position:fixed;
  right:22px;
  top:72px;
  z-index:60;
}

.count{
  font-weight: 400;
  letter-spacing: 0.10em;
  display:flex;
  gap:8px;
  align-items:baseline;
}
.count #now{ font-size:28px; }
.count .sep, .count #total{ font-size:14px; opacity:.55; }

/* ===== Project page left panel ===== */
.stage--project{
  grid-template-columns: max-content 1fr;
}

.projectInfo{
  padding: 0 18px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap: 14px;
  max-width: 520px;
}

.projectTitle{
  margin:0;
  font-size: 56px;
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color:#fff;
  text-shadow:
    0 0 10px rgba(255,255,255,0.35),
    0 0 28px rgba(255,255,255,0.18);
}

.projectSubtitle{
  margin:0;
  font-size: 22px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.projectText{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.62);
  max-width: 42ch;
}

/* ===== Modal ===== */
.modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999;
}
.modal.is-open{ display:block; }

.modalBackdrop{
  position:absolute;
  inset:0;
  background: rgba(11,11,12,0.72);
  backdrop-filter: blur(10px);
}

.modalPanel{
  position:absolute;
  left:18px;
  top:50%;
  transform: translateY(-50%);
  width: min(560px, calc(100vw - 36px));
  padding: 18px 18px 22px 18px;
}

.modalClose{
  position:absolute;
  right:12px;
  top:10px;
  font-size:16px;
  letter-spacing:.12em;
  opacity:.65;
}
.modalClose:hover{ opacity:1; }

.modalTitle{
  margin:0 0 10px 0;
  font-size:56px;
  line-height:.9;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:#fff;
  text-shadow:
    0 0 10px rgba(255,255,255,0.35),
    0 0 28px rgba(255,255,255,0.18);
}

.modalSubtitle{
  margin:0 0 14px 0;
  font-size:16px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: rgba(255,255,255,0.55);
}

.modalText{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  font-size:14px;
  line-height:1.6;
  letter-spacing:0.02em;
  color: rgba(255,255,255,0.70);
  max-width:56ch;
}

.modalLink{
  color: rgba(255,255,255,0.92);
  text-decoration:none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
}
.modalLink:hover{ border-bottom-color: rgba(255,255,255,0.6); }

/* ===== Intro overlay ===== */
.intro{
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  background: #0b0b0c;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease;
}

.intro.is-on{ opacity:1; pointer-events:auto; }
.intro.is-off{ opacity:0; pointer-events:none; }

.introInner{
  text-align: center;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 700ms ease, opacity 700ms ease;
}

.intro.is-on .introInner{
  transform: translateY(0);
  opacity: 1;
}

.introTag{
  font-size: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
}

.introTitle{
  font-size: 72px;
  line-height: .9;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 0 12px rgba(255,255,255,0.35),
    0 0 42px rgba(255,255,255,0.18);
}

/* ===== Responsive ===== */

/* <= 900px : pas de colonne titres */
@media (max-width: 900px){
  .stage{ grid-template-columns: 1fr; }
  .titles{ display:none; }
  .media{ width: min(900px, 92vw); height: 58vh; }

  .stage--project{ grid-template-columns: 1fr; }
  .projectInfo{
    padding: 18px 18px 0 18px;
    max-width:none;
  }
}

/* <= 768px : MOBILE MODE + OPTION C */
@media (max-width: 768px){
  body{ overflow:auto; } /* scroll natif mobile */

  .stage{
    position:relative;
    top:64px;
    display:block;
  }

  .viewer{ height:auto; overflow:visible; }
  .rail{ position:relative; transform:none !important; }

  .slide{ height:auto; padding:0; }
 @media (max-width: 768px){
  .media{
    width:100%;
    height: 58vh;   /* plus petit */
  }

  .media img{
    width:100%;
    height:100%;
    object-fit: cover;   /* on remplit */
    object-position: center;
  }

  .corner{ display:none; }
}



  .corner{
    position:fixed;
    bottom:16px;
    top:auto;
    right:16px;
    opacity:0.6;
  }

  .projectTitle{ font-size:42px; }
  .projectText{ max-width:none; }

  .modalPanel{
    left:16px;
    right:16px;
    width:auto;
    top:auto;
    bottom:16px;
    transform:none;
  }
  .modalTitle{ font-size:44px; }

  .introTitle{ font-size: 54px; }
}

@media (max-width: 768px){
  .corner{
    display: none;
  }
}
/* Caption (mobile) */
.caption{
  display:none; /* caché desktop */
}

@media (max-width: 768px){
  .media{ position:relative; }

  .caption{
    display:block;
    position:absolute;
    left:14px;
    right:14px;
    bottom:14px;

    color:#fff;
    font-size:18px;
    letter-spacing:.08em;
    text-transform:uppercase;

    text-shadow:
      0 2px 18px rgba(0,0,0,0.65),
      0 0 18px rgba(0,0,0,0.55);
    pointer-events:none;
  }

  /* petit gradient discret pour lisibilité */
  .media::after{
    content:"";
    position:absolute;
    left:0; right:0; bottom:0;
    height:45%;
    background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
    pointer-events:none;
  }
}
