:root {
  --font-display: "General Sans", "Helvetica Neue", sans-serif;
  --font-body: "Satoshi", "Helvetica Neue", sans-serif;
  --paper: #0a0a09;
  --ink: #f0eee8;
  --muted: #8d8a82;
  --blue: #c7a05b;
  --line: rgb(240 238 232 / 14%);
  --gutter: clamp(20px, 4vw, 64px);
  --ease: 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

@view-transition { navigation: auto; }

.case-page { background: var(--paper); }

.scroll-progress {
  position: fixed;
  z-index: 500;
  inset: 0 0 auto;
  height: 2px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
}

.home-return {
  position: fixed;
  z-index: 480;
  right: var(--gutter);
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 7px 14px 7px 8px;
  border: 1px solid rgb(240 238 232 / 20%);
  border-radius: 999px;
  color: #aaa69d;
  background: rgb(10 10 9 / 84%);
  backdrop-filter: blur(14px);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.home-return svg {
  width: 28px;
  color: var(--blue);
  fill: none;
  stroke: currentColor;
  stroke-width: .8;
}

.home-return:hover { color: #f0eee8; border-color: rgb(199 160 91 / 65%); }

.case-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding-inline: var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background var(--ease), border-color var(--ease);
}

.case-header.is-scrolled {
  border-color: var(--line);
  background: rgb(10 10 9 / 88%);
  backdrop-filter: blur(18px);
}

.brand svg { width: 32px; color: var(--blue); }

.case-back,
.case-contact {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.case-back { display: flex; gap: 16px; color: var(--muted); }
.case-contact { justify-self: end; padding: 11px 18px; border: 1px solid var(--line); border-radius: 999px; }
.case-back:hover { color: var(--blue); }
.case-contact:hover { color: #0a0a09; background: var(--blue); border-color: var(--blue); }

.case-hero {
  position: relative;
  isolation: isolate;
  min-height: 89svh;
  padding: 150px var(--gutter) 70px;
  overflow: hidden;
  background: radial-gradient(circle at 85% 35%, rgb(199 160 91 / 10%), transparent 27%);
}

.case-kicker {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  color: var(--muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.case-kicker span { color: var(--blue); }

.case-hero h1 {
  position: relative;
  z-index: 2;
  max-width: 11ch;
  margin-top: 11vh;
  font-family: var(--font-display);
  font-size: clamp(5rem, 12.5vw, 13rem);
  font-weight: 500;
  letter-spacing: -.09em;
  line-height: .75;
}

.case-thesis {
  position: absolute;
  z-index: 3;
  right: var(--gutter);
  bottom: 74px;
  max-width: 31ch;
  color: #b2aea5;
  font-size: clamp(1rem, 1.3vw, 1.3rem);
}

.case-index,
.case-cover-index {
  display: grid;
  place-items: center;
  width: clamp(76px, 8vw, 126px);
  aspect-ratio: 1;
  color: #0a0a09;
  background: var(--blue);
  border: 1px solid rgb(10 10 9 / 20%);
  border-radius: 50%;
  box-shadow: 0 20px 55px rgb(0 0 0 / 35%);
  font-size: clamp(.8rem, 1vw, 1rem);
  font-weight: 600;
  letter-spacing: .08em;
}

.case-index {
  position: absolute;
  z-index: 80 !important;
  right: 19vw;
  top: 28%;
}

.case-cover {
  position: relative;
  width: calc(100% - 2 * var(--gutter));
  margin-inline: var(--gutter);
}

.case-cover-media {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: #151512;
}

.case-cover-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.12) contrast(1.03);
  transform: scale(1.02);
}

/* Format rectangulaire 16:9 — plein cadre, esprit cinéma */
.case-cover.format-rect {
  height: min(58vw, 820px);
  border-radius: 0 12vw 0 0;
}

/* Format carré 1:1 — vignette centrée, esprit atelier */
.case-cover.format-carre {
  width: min(64vw, 780px);
  aspect-ratio: 1 / 1;
  height: auto;
  margin-inline: auto;
  border-radius: 6% 40% 6% 40%;
}

.case-cover-media::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, transparent 68%, rgb(0 0 0 / 44%));
}

.case-cover-media figcaption {
  position: absolute;
  z-index: 10;
  inset: auto 28px 24px;
  display: flex;
  justify-content: space-between;
  color: #f0eee8;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.case-cover-index {
  position: absolute;
  z-index: 80 !important;
  top: 28px;
  right: 28px;
}

.case-intro,
.case-story,
.case-deliverables {
  padding: clamp(90px, 11vw, 170px) var(--gutter);
}

.case-section-label {
  display: grid;
  grid-template-columns: 70px 1fr;
  color: var(--muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.case-section-label span { color: var(--blue); }

.case-intro {
  display: grid;
  grid-template-columns: .55fr 1.45fr;
  gap: 5vw;
}

.case-lead {
  max-width: 29ch;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: .98;
}

.case-facts {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 90px;
  border-top: 1px solid var(--line);
}

.case-facts div { padding: 20px 20px 0 0; }
.case-facts dt { color: var(--muted); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .08em; }
.case-facts dd { margin-top: 8px; font-size: var(--text-sm); }

.case-story { color: #171612; background: #e9e5da; }
.case-story .case-section-label { color: #756f64; }
.case-story .case-section-label span { color: #9c7434; }

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9vw;
  margin-top: clamp(70px, 10vw, 150px);
}

.story-block > span {
  display: block;
  padding-bottom: 16px;
  border-bottom: 1px solid rgb(23 22 18 / 20%);
  color: #756f64;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .1em;
}

.story-block h2 {
  max-width: 15ch;
  margin: 34px 0 24px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.7vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -.065em;
  line-height: .95;
}

.story-block p { max-width: 47ch; color: #686359; }

.case-visuals { padding: var(--gutter); }

.visual-panel {
  position: relative;
  overflow: hidden;
  background: #141412;
}

.visual-panel img { width: 100%; height: 100%; object-fit: cover; }

.visual-panel figcaption {
  position: absolute;
  z-index: 2;
  inset: auto 20px 18px;
  display: flex;
  justify-content: space-between;
  color: #f0eee8;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.visual-row {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 10vw;
  padding: 9vw 5vw 11vw;
}

.visual-placeholder {
  isolation: isolate;
  display: grid;
  place-items: center;
  border: 1px solid rgb(199 160 91 / 35%);
  color: var(--blue);
  background:
    linear-gradient(rgb(199 160 91 / 8%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(199 160 91 / 8%) 1px, transparent 1px),
    #10100e;
  background-size: 42px 42px;
}

/* Format rectangulaire 16:9 — plein cadre horizontal */
.visual-placeholder.format-rect {
  aspect-ratio: 16 / 9;
  border-radius: 0 8vw 0 8vw;
}

/* Format carré 1:1 — médaillon rond, esprit atelier */
.visual-placeholder.format-carre {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

.visual-placeholder::after {
  position: absolute;
  z-index: 0;
  inset: 12%;
  border: 1px solid rgb(199 160 91 / 18%);
  border-radius: 50%;
  content: "";
}

.visual-placeholder > div {
  position: relative;
  z-index: 2;
  width: clamp(88px, 12vw, 150px);
}

.visual-placeholder.has-image {
  border-color: transparent;
  background: #10100e;
}

.visual-placeholder .secondary-image {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-placeholder.has-image .placeholder-mark { display: none; }

.visual-placeholder svg {
  fill: none;
  stroke: currentColor;
  stroke-width: .6;
}

.visual-placeholder figcaption { z-index: 3; }
.visual-quote {
  max-width: 13ch;
  font-family: "Boska", Georgia, serif;
  font-size: clamp(2.8rem, 6vw, 7rem);
  font-style: italic;
  letter-spacing: -.045em;
  line-height: .96;
  color: var(--blue);
}

.case-deliverables {
  display: grid;
  grid-template-columns: .55fr 1.45fr;
  gap: 5vw;
  color: #171612;
  background: #e9e5da;
}

.case-deliverables .case-section-label { color: #756f64; }
.case-deliverables .case-section-label span { color: #9c7434; }
.case-deliverables h2 { font-size: clamp(2.7rem, 5.6vw, 6.8rem); letter-spacing: -.075em; line-height: .88; }
.case-deliverables h2 em { color: #9c7434; font-family: "Boska", Georgia, serif; font-weight: 400; }
.case-deliverables ol { margin-top: 80px; list-style: none; border-top: 1px solid rgb(23 22 18 / 18%); }
.case-deliverables li {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: center;
  min-height: 104px;
  border-bottom: 1px solid rgb(23 22 18 / 18%);
  transition: padding 350ms ease, color 350ms ease, background 350ms ease;
}
.case-deliverables li span { color: #756f64; font-size: var(--text-xs); }
.case-deliverables li p { font-family: var(--font-display); font-size: clamp(1.3rem, 2.5vw, 2.5rem); letter-spacing: -.045em; }

.next-case {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: .7fr 1.3fr auto;
  align-items: end;
  gap: 3vw;
  min-height: 72svh;
  padding: 90px var(--gutter) 64px;
  overflow: hidden;
  background: radial-gradient(circle at 80% 45%, rgb(199 160 91 / 13%), transparent 27%), #0a0a09;
}

.next-case > div { color: var(--muted); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .08em; }
.next-case > div p { margin-top: 10px; }
.next-case h2 { position: relative; z-index: 2; font-size: clamp(4rem, 9vw, 10rem); letter-spacing: -.085em; line-height: .78; }
.next-arrow { position: relative; z-index: 2; display: grid; place-items: center; width: 64px; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 50%; color: var(--blue); }
.next-index { position: absolute; z-index: 1; top: 50%; right: 8vw; color: rgb(199 160 91 / 10%); font-size: min(45vw, 650px); font-weight: 600; line-height: .7; transform: translateY(-50%); }
.next-case:hover .next-arrow { color: #0a0a09; background: var(--blue); transform: rotate(45deg); }

.case-footer {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  padding: 40px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.case-footer div { display: flex; gap: 26px; }

.case-hero h1,
.case-thesis,
.case-kicker,
.case-index { opacity: 0; transition: opacity 900ms cubic-bezier(.16, 1, .3, 1); }
.case-hero h1 { transition-delay: 100ms; }
.case-thesis { transition-delay: 240ms; }
.case-index { transition-delay: 300ms; }
.is-ready .case-hero h1,
.is-ready .case-thesis,
.is-ready .case-kicker,
.is-ready .case-index { opacity: 1; }

.reveal { opacity: 0; filter: blur(7px); transition: opacity 850ms cubic-bezier(.16, 1, .3, 1), filter 850ms cubic-bezier(.16, 1, .3, 1); }
.reveal.is-visible { opacity: 1; filter: blur(0); }
.reveal-media img {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1100ms cubic-bezier(.16, 1, .3, 1);
}
.reveal-media.is-visible img { clip-path: inset(0); }

@media (hover: hover) {
  .case-deliverables li:hover { padding-inline: 18px; color: #e9e5da; background: #171612; }
  .case-deliverables li:hover span { color: #aaa49a; }
}

@media (max-width: 800px) {
  .case-header { grid-template-columns: 1fr auto; min-height: 66px; background: rgb(10 10 9 / 84%); backdrop-filter: blur(14px); }
  .case-back { display: none; }
  .case-contact { padding: 9px 13px; font-size: .62rem; }
  .case-hero { min-height: 76svh; padding-top: 120px; }
  .case-kicker { grid-template-columns: 46px 1fr; gap: 4px; }
  .case-kicker p:last-child { grid-column: 2; }
  .case-hero h1 {
    max-width: 100%;
    margin-top: 14vh;
    font-size: clamp(3.4rem, 17vw, 6rem);
    line-height: .82;
    overflow-wrap: anywhere;
  }
  .case-thesis { right: var(--gutter); bottom: 35px; left: 34vw; font-size: .9rem; }
  .case-index { z-index: 40; top: 33%; right: 7vw; width: 64px; }
  .case-cover.format-rect { width: calc(100% - 40px); height: 116vw; margin-inline: 20px; border-radius: 24vw 24vw 0 0; }
  .case-cover.format-carre { width: calc(100% - 72px); aspect-ratio: 1 / 1; height: auto; margin-inline: auto; border-radius: 10% 32% 10% 32%; }
  .case-cover-index { z-index: 80 !important; top: 16px; right: 16px; width: 54px; }
  .case-cover-media figcaption { inset: auto 14px 14px; font-size: .6rem; }
  .case-intro,
  .case-deliverables { grid-template-columns: 1fr; gap: 54px; }
  .case-lead { font-size: clamp(2.4rem, 11vw, 4rem); }
  .case-facts { grid-column: 1; grid-template-columns: 1fr; gap: 18px; margin-top: 10px; }
  .case-facts div { padding-top: 16px; border-top: 1px solid var(--line); }
  .story-grid { grid-template-columns: 1fr; gap: 76px; }
  .visual-row { grid-template-columns: 1fr; gap: 70px; padding: 90px 0; }
  .visual-placeholder { width: 88%; }
  .visual-quote { margin-left: 18vw; }
  .case-deliverables h2 { font-size: clamp(3rem, 14vw, 4.7rem); }
  .case-deliverables ol { margin-top: 54px; }
  .case-deliverables li { grid-template-columns: 42px 1fr; min-height: 88px; }
  .next-case { grid-template-columns: 1fr auto; min-height: 65svh; align-content: end; }
  .next-case > div { grid-column: 1 / -1; }
  .next-case h2 { font-size: clamp(4rem, 20vw, 7rem); }
  .next-index { right: -5vw; font-size: 70vw; }
  .case-footer { grid-template-columns: 1fr auto; gap: 28px; }
  .case-footer div { grid-row: 2; }
  .case-footer > a { grid-row: 2; }
  .home-return {
    right: 16px;
    bottom: 16px;
    padding-right: 8px;
  }
  .home-return span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .case-hero h1,
  .case-thesis,
  .case-kicker,
  .case-index,
  .reveal { opacity: 1; filter: none; }
  .reveal-media img { clip-path: none; }
}
