@font-face {
  font-family: "Space Grotesk";
  src: url("assets/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --paper: #0e0e11;
  --surface: #1c1c20;
  --ink: #f0f0ff;
  --muted: #727279;
  --purple: #8080ff;
  font: 100%/1.5 "Space Grotesk", Arial, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  padding: 80px 40px;
  background: var(--paper) url("assets/grid.svg") center top / 2200px auto no-repeat;
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, iframe:focus-visible { outline: 3px solid var(--purple); outline-offset: 5px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul { margin: 0; }
.skip { position: absolute; left: 1rem; top: -8rem; background: var(--surface); padding: .6rem 1rem; }
.skip:focus { top: 1rem; z-index: 5; }
.masthead { max-width: 700px; margin: auto; }
.identity, .tags { display: flex; align-items: center; }
.identity { justify-content: space-between; }
.identity a { width: 60px; height: 60px; border-radius: 50%; position: relative; }
.portrait img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.linkedin { background: var(--surface); display: grid; place-items: center; }
.linkedin img { width: 28px; filter: grayscale(1) brightness(1.55); }
.home-page { --home-gutter: 40px; padding-top: 36px; padding-inline: 0; }
.home-header, .home-content { width: calc(100% - var(--home-gutter) - var(--home-gutter)); max-width: 1100px; margin-inline: auto; }
.home-header, .home-brand, .reel-caption { display: flex; align-items: center; }
.home-header, .reel-caption { justify-content: space-between; }
.home-header { gap: 10px; }
.home-brand { gap: 10px; font-weight: 700; letter-spacing: -.035em; }
.home-brand img { width: 48px; height: 48px; border-radius: 50%; }
.home-header .linkedin { width: 42px; height: 42px; border-radius: 50%; }
.home-header .linkedin img { width: 20px; }
.home-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr); align-items: center; gap: clamp(26px, 4vw, 64px); padding-block: clamp(66px, 8vw, 108px); }
.hero-copy { container-type: inline-size; }
.hero-copy h1 { font-size: min(clamp(2rem, 3.5vw, 3.75rem), 11cqi); line-height: 1.08; letter-spacing: -.06em; white-space: nowrap; }
.hero-copy p { max-width: 38ch; margin-top: 20px; color: #babac5; font-size: 1.1875rem; line-height: 1.45; }
.hero-specialties { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding: 0; list-style: none; }
.hero-specialties li { padding: 10px 13px; border-radius: 12px; background: #323243; color: #aeaeff; font-size: .9375rem; font-weight: 700; }
.reel-link { display: block; border-radius: 24px; }
.reel-frame { padding: clamp(10px, 1.8vw, 22px); background: var(--surface); border-radius: 24px; }
.reel-caption { gap: 10px; padding: 11px 12px 0; color: #babac5; font-size: .9375rem; }
.reel-play { position: absolute; inset: 0; margin: auto; width: clamp(54px, 6vw, 64px); aspect-ratio: 1; height: fit-content; min-height: clamp(54px, 6vw, 64px); display: grid; place-items: center; border-radius: 50%; background: #0e0e11db; padding-left: 3px; color: var(--ink); font-size: 1.25rem; }
.gallery { scroll-margin-top: 24px; }
.gallery > h2 { margin-bottom: 20px; font-size: clamp(1.65rem, 3vw, 2.1rem); letter-spacing: -.04em; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.project { display: flex; flex-direction: column; height: 100%; padding: 12px; border-radius: 14px; background: var(--surface); }
.project:is(:hover, :focus-visible) { background-color: #252528; }
.screen, .movie { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background: #151517; }
.screen { width: 100%; border-radius: 8px; container-type: size; }
.reel-frame .screen { border-radius: 12px; }
.screen img, .screen iframe, .movie img, .movie iframe { width: 100%; height: 100%; object-fit: cover; display: block; border: none; }

/* Déborder le cadre de 2 px pour masquer les pixels de bord des médias. */
.screen img, .next-media img, dialog .movie iframe {
  position: absolute;
  inset: -2px;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  max-width: none;
}

.screen iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(max(100cqw, 177.778cqh) + 4px);
  height: auto;
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.movie.vimeo-autoplay > iframe { position: absolute; inset: 0; }
.vimeo-autoplay > iframe.vimeo-standby { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: no-preference) {
  /* Courbe échantillonnée du ressort Framer : masse 1, rigidité 400, amortissement 30. */
  .project, .reel-frame {
    --card-spring: linear(0, .0653, .2121, .3862, .5547, .7, .8153, .9006, .9592, .9962, 1.0169, 1.0263, 1.0283, 1.0261, 1.0218, 1.0168, 1.0121, 1.0081, 1.0049, 1.0026, 1);
  }
  .project, .reel-frame { transition: transform 400ms ease-out, background-color 220ms ease-out; transition-timing-function: var(--card-spring), ease-out; }
  .project:focus-visible, .reel-link:focus-visible .reel-frame { transform: scale(1.02); }
  @media (hover: hover) {
    .project:hover, .reel-link:hover .reel-frame { transform: scale(1.02); }
  }
}
.caption { --tag-inset: 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 7px 10px; padding: 10px 2px 2px; }
.caption h3 { font-size: 1.0625rem; letter-spacing: -.035em; line-height: 1.24; overflow-wrap: anywhere; }
.year { font-size: .875rem; color: #a2a2ad; }
.tags { grid-column: 1 / -1; flex-wrap: wrap; gap: .3rem; margin-inline-start: calc(-1 * var(--tag-inset)); }
.tag { display: inline-block; background: #252528; color: #d2d1da; font-size: .8125rem; border-radius: 100px; padding: 2px var(--tag-inset); }
@media (max-width: 799px) {
  .home-hero { grid-template-columns: 1fr; gap: 28px; padding-block: 42px 48px; }
  .hero-copy h1 { font-size: min(clamp(1.8125rem, 6vw, 3.125rem), 11cqi); }
}
@media (max-width: 430px) {
  .home-header { flex-wrap: wrap; }
  .home-header .linkedin { width: 36px; height: 36px; }
  .hero-specialties li { padding-inline: 9px; font-size: .875rem; }
  .project-grid { gap: 12px; }
  .project { padding: 8px; }
  .caption { --tag-inset: 6px; grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .caption h3 { font-size: 1rem; }
}
footer { text-align: center; margin: 60px auto 0; padding-top: 60px; font-size: 1rem; font-weight: 700; letter-spacing: -.2px; }
footer span { color: var(--muted); }
.case + footer { margin-top: 40px; color: var(--muted); }
.case + footer a:hover { color: #babac5; }
.case + footer span { color: inherit; }
footer a:hover { color: var(--purple); }
.case { max-width: 920px; margin: 40px auto 0; }
.case-copy { max-width: 720px; margin-inline: auto; }
.case-copy h1 { font-size: 2.5rem; font-weight: 500; line-height: 1.1; letter-spacing: -.03em; }
.case-copy h2 { font-size: 1.75rem; font-weight: 500; line-height: 1.2; letter-spacing: -.03em; }
.next h2 { font-size: 1.75rem; font-weight: 700; line-height: 1.5; letter-spacing: -.03em; color: #babac5; }
.case-copy p, .next p { color: #babac5; letter-spacing: -.03em; line-height: 1.5625; }
.case-copy .date { color: var(--muted); }
.next { margin-top: 120px; }
.next > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.next-card { display: block; padding: 12px; border-radius: 10px; background: #141415; transition: background-color 400ms ease-out; }
.next-card:is(:hover, :focus-visible) { background-color: #1d1d1f; }
.next-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); }
.next-media img { display: block; object-fit: cover; }
.next h3 { margin: 12px 0 6px; color: #babac5; font-size: 1.125rem; font-weight: 600; letter-spacing: -.06em; line-height: 20px; }
.next p { color: var(--muted); letter-spacing: -.06em; line-height: 20px; }
dialog { width: min(80vw,1000px,145dvh); margin: auto; max-height: none; padding: 0; border: 0; border-radius: 20px; background: transparent; }
dialog .movie { border-radius: inherit; background: #000; }
dialog::backdrop { background: #000c; }
body:has(dialog[open]) { overflow: hidden; }
.close-film { position: absolute; z-index: 1; right: 10px; top: 10px; opacity: 0; color: white; background: #111; border: 0; border-radius: 50%; width: 40px; height: 40px; font-size: 24px; pointer-events: none; }
.close-film:focus-visible { opacity: 1; pointer-events: auto; }
@media(max-width: 799px) {
  body { padding: 60px 40px; }
}
@media (min-width: 600px) and (max-width: 799px) {
  .next { margin-top: 140px; }
  .case + footer { margin-top: 60px; }
}
@media(max-width: 599px) {
  body { padding: 40px 20px; }
  .home-page { --home-gutter: 20px; }
  .movie { border-radius: 9px; }
  .next > div { grid-template-columns: 1fr; }
  .next-inset { padding-inline: 20px; }
  .case-copy h1 { font-size: 2.25rem; line-height: 2.5rem; }
  .case-copy h2 { font-size: 1.5rem; }
  .case-copy p:where(:not(.date)) { font-size: .9375rem; line-height: 1.5rem; }
  footer { margin-top: 40px; }
}
@media(prefers-reduced-motion: reduce) { *, *::before { transition: none !important; } }

/* Fiches projet : les groupes de visuels et de textes suivent l’ordre du récit. */
.study { display: grid; gap: 40px; }
.study-row, .study-stack { display: grid; gap: var(--gap,20px); min-width: 0; }
.study-row { grid-auto-flow: column; grid-auto-columns: minmax(0,1fr); align-items: start; }
.study img { width: 100%; height: auto; display: block; }
.study .movie { border-radius: 0; }
.study p { margin: 0; }
.study-note { background: #141415; border-radius: 12px; padding: var(--note-padding,20px); }
.study-note h3 { color: #babac5; font-size: 1.625rem; font-weight: 500; line-height: 1.5625rem; letter-spacing: -.04em; }
.case-copy .study-note p { color: var(--muted); font-size: 1rem; line-height: 1.25rem; letter-spacing: normal; }
.case-copy .study-caption { font-size: .875rem; line-height: 1.125rem; }
@media (min-width: 600px) and (max-width: 799px) {
  .study-note h3 { font-size: 1.375rem; }
}
@media (max-width: 799px) {
  .study-narrow-stack { grid-auto-flow: row; }
}
@media(max-width:599px) {
  .study-row, .study-stack { gap: var(--mobile-gap,var(--gap,20px)); }
  .study-note h3 { font-size: 1.5rem; line-height: 1.5rem; }
}
