/* =========================================
   PROJECT.CSS — pages case study (work/*.html)
   Frise horizontale + drawer + progress bar
   Note : ces pages ont html/body { overflow: hidden }
   ========================================= */

:root {
  --pad:      24px;
  --drawer-w: 30vw;
}

html, body {
  height: 100%;
  overflow: hidden;
}

/* ── TRACK — frise horizontale desktop ──── */
.track {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex;
  align-items: stretch;
  overflow-x: scroll;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  transition: left 0.5s cubic-bezier(.16,1,.3,1);
}
.track::-webkit-scrollbar { display: none; }
.track:active { cursor: grabbing; }
body.drawer-open .track { left: var(--drawer-w); }

/* ── SLIDES desktop ─────────────────────── */
.slide {
  height: 100%;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: stretch;
}

.slide-hero {
  flex: 0 0 100vw;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--pad);
  gap: 20px;
}

.project-title {
  font-weight: 300;
  font-size: clamp(48px, 7vw, 100px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.btn-info {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: none;
  border: 1px solid var(--ink);
  padding: 10px 16px;
  cursor: pointer;
  width: fit-content;
  transition: background 0.25s, color 0.25s;
}
.btn-info:hover,
.btn-info.is-open { background: var(--ink); color: var(--bg); }
.btn-info .arrow { display: inline-block; transition: transform 0.4s; }
.btn-info.is-open .arrow { transform: rotate(45deg); }

.slide-visual { padding: var(--pad) 0 var(--pad) var(--pad); }
.slide-visual img,
.slide-visual video {
  height: 100%;
  width: auto;
  max-width: 80vw;
  object-fit: cover;
  border-radius: var(--radius);
  transition: border-radius 0.5s;
}
.slide-visual :is(img,video):hover { border-radius: 0; }

.slide-text {
  flex: 0 0 880px;
  display: flex;
  align-items: flex-end;
  padding: var(--pad) 96px var(--pad) 48px;
}
.slide-text h2 {
  font-weight: 300;
  font-size: 20px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.slide-text h2 em { font-style: italic; }

.slide-next {
  flex: 0 0 440px;
  display: flex;
  align-items: flex-end;
  padding: var(--pad) 48px;
}
.next-project { display: flex; flex-direction: column; gap: 16px; }
.next-label {
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
}
.next-title {
  font-weight: 300;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
  transition: opacity 0.2s;
}
.next-title:hover { opacity: 0.5; }

/* ── DRAWER ─────────────────────────────── */
.drawer {
  position: fixed;
  top: var(--nav-h); left: 0; bottom: 0;
  width: var(--drawer-w);
  z-index: 180;
  background: var(--bg);
  border-right: 1px solid var(--rule);
  transform: translateX(calc(-1 * var(--drawer-w)));
  transition: transform 0.5s cubic-bezier(.16,1,.3,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none;
}
.drawer::-webkit-scrollbar { display: none; }
.drawer.is-open { transform: translateX(0); }

.drawer-header {
  display: flex;
  justify-content: flex-end;
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0;
  background: var(--bg); z-index: 1;
}
.drawer-close {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-weight: 500; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); opacity: 0.5; transition: opacity 0.2s;
}
.drawer-close:hover { opacity: 1; }

.drawer-content {
  display: flex;
  flex-direction: column;
  padding: 32px var(--pad);
}
.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}
.drawer-section:first-child { border-top: none; padding-top: 0; }
.drawer-label {
  font-weight: 500; font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.5;
}
.drawer-value { font-size: 15px; line-height: 1.5; }
.drawer-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-tag {
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--rule); padding: 6px 12px;
}
.drawer-desc { font-size: 15px; line-height: 1.65; }

/* ── PROGRESS BAR ───────────────────────── */
.progress {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 150; height: 2px;
  background: rgba(0,0,0,.1);
  pointer-events: none;
}
.progress-bar {
  height: 100%; background: var(--ink);
  width: 0%; transition: width 0.1s linear;
}

/* ── RESPONSIVE MOBILE ──────────────────── */
@media (max-width: 720px) {
  :root { --drawer-w: 85vw; --radius: 16px; }

  html, body { height: auto; overflow: visible; }

  .track {
    position: static;
    display: block;
    overflow: visible;
    cursor: default;
    padding-top: var(--nav-h);
    transition: none;
  }
  body.drawer-open .track { left: 0; }

  .slide { height: auto; width: 100%; display: block; }

  .slide-hero {
    flex: none; width: 100%;
    min-height: 60vw; display: flex;
    padding: var(--pad);
    padding-top: calc(var(--pad) + 24px);
  }
  .slide-visual {
    padding: var(--pad) var(--pad) 0; width: 100%;
  }
  .slide-visual img,
  .slide-visual video {
    height: auto; width: 100%; max-width: 100%;
    border-radius: var(--radius);
  }
  .slide-text {
    flex: none; width: 100%;
    padding: 32px var(--pad); align-items: flex-start;
  }
  .slide-text h2 { font-size: 18px; }
  .slide-next {
    flex: none; width: 100%;
    padding: 48px var(--pad);
    border-top: 1px solid var(--rule);
    margin-top: 24px;
  }
  .drawer { position: fixed; top: var(--nav-h); width: var(--drawer-w); }
  .progress { display: none; }
}
