/* Marion Artense Gély — version 3
   Nom en haut à droite, navigation à gauche.
   Un projet par écran : il défile de gauche à droite ; les projets s'enchaînent de haut en bas. */

@font-face { font-family: "Figtree"; src: url("fonts/figtree-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }

:root {
  --ink: #262626;
  --muted: #8c8c8c;
  --line: #e6e6e6;
  --paper: #ffffff;
  --todo: #b5622f;
  --top: 3.9rem;          /* bandeau du nom */
  --side: 14rem;          /* colonne de navigation */
  --pad: 2.25rem;         /* marge blanche */
  --gap: 3.5rem;          /* espace entre deux images */
  --vh: 100vh;
  --row-h: calc(var(--vh) - var(--top));
  --img-h: calc(var(--row-h) - 6.6rem);
  --sans: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
}
@supports (height: 100dvh) { :root { --vh: 100dvh; } }

* { box-sizing: border-box; }
html, body { background: var(--paper); color: var(--ink); }
body { margin: 0; font: 400 13px/1.5 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--muted); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
i, em { font-style: italic; }
h1, h2, h3, h4, p, ul, dl, dd, figure { margin: 0; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.todo { color: var(--todo); }

/* ---------- le nom, tout en haut à droite ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; height: var(--top); z-index: 3;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 0.85rem var(--pad) 0; background: var(--paper);
}
.name { font: italic 400 clamp(1.9rem, 2.7vw, 2.6rem)/1 var(--serif); letter-spacing: -0.005em; }
.name:hover { color: var(--ink); }

/* ---------- colonne de gauche ---------- */
.side {
  position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--side); z-index: 2;
  display: flex; flex-direction: column; padding: 0.6rem 1rem 1.6rem var(--pad);
}
.side nav li { font-size: 15px; line-height: 1.8; }
.side nav a[aria-current] { color: var(--muted); }
.foot { margin-top: auto; font-size: 12px; }
.foot p + p { margin-top: 0.9rem; }
.lang a[aria-current] { color: var(--muted); }

/* ---------- scène ---------- */
.stage { position: fixed; top: var(--top); left: var(--side); right: 0; bottom: 0; }
.is-rows .stage { overflow-y: auto; overflow-x: hidden; scroll-snap-type: y proximity; overscroll-behavior-y: contain; }

/* accueil : une seule image, entière, encadrée de blanc */
.hero {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.6rem calc(var(--side) + var(--pad)) var(--pad) var(--pad);
}
.hero img { display: block; height: calc(100% - 2rem); width: auto; max-width: 100%; object-fit: contain; }
.hero figcaption { margin-top: 0.75rem; font-size: 12px; color: var(--muted); }

/* accueil : Dust and Sirocco seul, en pleine page ; le parcours en glissant, signalé très discrètement */
.home-row { padding-top: 0; }
.home-row .track { padding: 0; gap: 0; }
.hero-slide { flex: 0 0 100%; height: 100%; padding: 0.6rem calc(var(--side) + var(--pad)) var(--pad) var(--pad); }
.cvpanel { flex: 0 0 auto; height: 100%; display: flex; flex-direction: column; cursor: auto; padding: 0.6rem var(--pad) var(--pad); }
.cvpanel h2 { font: italic 400 1.9rem/1.08 var(--serif); margin-bottom: 1rem; }
.cvpanel .cols { flex: 1 1 auto; min-height: 0; width: 56rem; column-count: auto; column-width: 13rem; column-fill: auto; }
.home-next { position: absolute; right: var(--pad); bottom: 1.1rem; font-size: 11px; }
.home-next button { color: var(--muted); opacity: 0.55; transition: opacity 0.3s; letter-spacing: 0.02em; }
.home-next button:hover, .home-next button:focus-visible { opacity: 1; color: var(--ink); }
.home-next .prev, .home-row.at-end .home-next .next { display: none; }
.home-row.at-end .home-next .prev { display: inline; }

/* ---------- un projet = un écran ---------- */
.row { height: var(--row-h); display: flex; flex-direction: column; padding-top: 0.6rem; scroll-snap-align: start; position: relative; }
.track {
  flex: 1 1 auto; min-height: 0; position: relative;
  display: flex; align-items: flex-start; gap: var(--gap);
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  padding: 0 0 0 var(--pad); scrollbar-width: none; cursor: grab;
}
.track.drag { cursor: grabbing; scroll-behavior: auto; user-select: none; }
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline: none; }
.end { flex: 0 0 1px; }

.piece { flex: 0 0 auto; display: flex; flex-direction: column; }
.piece img { display: block; height: var(--img-h); width: auto; background: #f4f3f1; -webkit-user-drag: none; }
.piece figcaption { width: 0; min-width: 100%; margin-top: 0.65rem; font-size: 11.5px; line-height: 1.45; }

.label { flex: 0 0 13rem; height: var(--img-h); display: flex; flex-direction: column; justify-content: flex-end; }
.label h2 { font: italic 400 1.9rem/1.08 var(--serif); margin-bottom: 0.6rem; }
.label .meta { font-size: 12px; }
.kind { color: var(--muted); }
.to-text { margin-top: 1.1rem; font-size: 12px; }
.to-text a { border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.hint { margin-top: 1.4rem; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
.hint span { display: inline-block; animation: nudge 1.8s ease-in-out infinite; }
.hint span.d { animation-name: nudge-d; }
@keyframes nudge { 50% { transform: translateX(5px); } }
@keyframes nudge-d { 50% { transform: translateY(4px); } }

/* texte du projet, en fin de ligne : colonnes qui défilent elles aussi */
.note { flex: 0 0 auto; height: var(--img-h); width: 21rem; column-width: 21rem; column-gap: 2.6rem; column-fill: auto; font-size: 12px; line-height: 1.6; }
.note p + p { margin-top: 0.6rem; }
.note h4 { font-size: 12px; font-weight: 500; margin: 1.1rem 0 0.3rem; }
.note .src { margin-top: 0.9rem; color: var(--muted); }
.note .credit { color: var(--muted); }

/* contrôles : progression, compteur, flèches */
.ctrl { flex: 0 0 2.6rem; display: flex; align-items: center; gap: 1.1rem; padding: 0 var(--pad); font-size: 12px; color: var(--muted); }
.progress { flex: 1 1 auto; height: 1px; background: var(--line); }
.progress span { display: block; height: 1px; width: 0; background: var(--ink); }
.count { font-variant-numeric: tabular-nums; min-width: 3.2rem; text-align: right; }
.ctrl button { font-size: 15px; line-height: 1; padding: 0.35rem 0.25rem; color: var(--ink); }
.ctrl button:disabled { color: var(--line); cursor: default; }
.row.static .ctrl { visibility: hidden; }

/* ---------- À propos et Contact : un écran chacun ---------- */
.screen { flex-direction: row; align-items: flex-start; gap: 3.2rem; padding: 0.6rem var(--pad) 1.6rem; }
.screen .piece img { height: calc(var(--row-h) - 4.6rem); max-width: 46vw; object-fit: cover; }
.screen .piece.wide img { width: 46vw; height: auto; max-height: calc(var(--row-h) - 4.6rem); object-fit: contain; }
.prose { flex: 0 1 31rem; max-height: calc(var(--row-h) - 2.4rem); overflow-y: auto; font-size: 12px; line-height: 1.62; padding-right: 0.5rem; }
.prose h2, .cv h2 { font: italic 400 1.9rem/1.08 var(--serif); margin-bottom: 1rem; }
.prose p + p { margin-top: 0.65rem; }
.screen.cv { display: block; }
.cv-in { height: 100%; display: flex; flex-direction: column; }
.cols { flex: 1 1 auto; column-count: 4; column-gap: 2.2rem; column-fill: balance; font-size: 11px; line-height: 1.45; min-height: 0; }
.cols .blk { break-inside: avoid-column; margin-bottom: 1rem; }
.cols h3 { font-size: 11px; font-weight: 500; margin-bottom: 0.3rem; break-after: avoid; }
.cols .rows li { display: grid; grid-template-columns: 3.9rem 1fr; gap: 0.5rem; margin-bottom: 0.2rem; break-inside: avoid; }
.cols .y { color: var(--muted); }

.contact { display: grid; grid-template-columns: 6rem 1fr; gap: 0.9rem 1rem; font-size: 13px; line-height: 1.55; }
.contact dt { color: var(--muted); }
.legal { margin-top: 2.6rem; font-size: 11px; color: var(--muted); }
.legal h3 { font-size: 11px; font-weight: 500; color: var(--ink); margin-bottom: 0.3rem; }

.nf { padding: var(--pad); }

/* ---------- écrans moyens : le CV passe sur trois colonnes ---------- */
@media (max-width: 1200px) { .cols { column-count: 3; } }

/* ---------- téléphone ---------- */
@media (max-width: 760px) {
  :root { --top: 3.4rem; --pad: 1.1rem; --gap: 1.4rem; --img-h: 56vh; }
  @supports (height: 100dvh) { :root { --img-h: 56dvh; } }
  body { overflow: auto; }
  .name { font-size: 1.75rem; }
  .side { position: static; width: auto; padding: calc(var(--top) + 0.3rem) var(--pad) 0; }
  .side nav ul { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; }
  .side nav li { font-size: 14px; }
  .foot { display: none; }
  .stage, .is-rows .stage { position: static; overflow: visible; }
  .hero { padding: 1.2rem var(--pad) 2rem; height: auto; }
  .hero img { height: auto; max-height: 68vh; }
  .row { height: auto; padding: 1.6rem 0 0.6rem; }
  .track { scroll-snap-type: x proximity; scroll-padding-inline: var(--pad); padding-bottom: 0.4rem; cursor: auto; }
  .piece, .label, .note { scroll-snap-align: start; }
  .piece img { max-width: 84vw; height: auto; max-height: var(--img-h); object-fit: contain; }
  .label { flex-basis: 56vw; height: auto; align-self: stretch; }
  .note { width: 84vw; column-width: auto; columns: 1; height: var(--img-h); overflow-y: auto; }
  .screen { flex-direction: column; gap: 1.2rem; padding: 1.4rem var(--pad); }
  .screen .piece img { height: auto; max-width: 100%; max-height: 70vh; }
  .prose { max-height: none; flex-basis: auto; }
  .cols { column-count: 1; }
  .home-row .track { scroll-padding-inline: 0; }
  .hero-slide { flex-basis: 100vw; height: auto; scroll-snap-align: start; }
  .cvpanel { width: 88vw; height: 72vh; overflow-y: auto; scroll-snap-align: start; }
  .cvpanel .cols { width: auto; columns: 1; flex: none; }
  .home-next { position: static; padding: 0 var(--pad) 1rem; text-align: right; }
}

@media (prefers-reduced-motion: reduce) { .hint span { animation: none; } }
