/* MARAMEO, marameo.tv
   Deux références : la retenue de specialoffer.inc (coins typographiques, une œuvre à la fois,
   archive en tableau) et la typographie cinétique de « Symphony in Acid » (Arial, blocs noir,
   gris et bleu, barre de lecture rouge). */

:root {
  --bg: #ffffff;
  --fg: #000000;
  --dim: #8a8a8a;
  --line: rgba(0, 0, 0, 0.14);
  --blue: #0000ff;
  --red: #ff0000;
  --grey: #c9c9c9;
  --pad: clamp(16px, 2.6vw, 40px);
  --small: 13px;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: Arial, "Helvetica Neue", Helvetica, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0f0e0d;
  --fg: #d8d3c6;
  --dim: #77736a;
  --line: rgba(216, 211, 198, 0.22);
  --blue: #5b6bff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 500 var(--small)/1.3 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.dim { color: var(--dim); }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 100; top: 8px; left: 8px; background: var(--fg); color: var(--bg); padding: 6px 10px; }

/* ---------- Coins ---------- */
.corners {
  position: fixed; left: 0; right: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px;
  padding: var(--pad); pointer-events: none;
  mix-blend-mode: difference; color: #fff;
}
.corners { top: 0; }
.corners--bottom { top: auto; bottom: 0; grid-template-columns: 1fr 1fr; }
.corners .c { pointer-events: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.corners .dim { color: #888; }
.tc { text-align: center; }
.tr, .br { text-align: right; }
[aria-current="page"] { text-decoration: underline; text-underline-offset: 3px; }
/* sur les pages de lecture, les coins du bas ne flottent pas au-dessus du texte */
.page-studio .corners--bottom, .page-legal .corners--bottom, .page-project .corners--bottom, .page-work .corners--bottom {
  position: static; mix-blend-mode: normal; color: var(--fg);
}
.page-studio .corners--bottom .dim, .page-project .corners--bottom .dim { color: var(--dim); }

/* ---------- Barre de lecture rouge ---------- */
.playhead {
  position: fixed; top: 0; bottom: 0; left: 0; width: clamp(6px, 0.9vw, 14px);
  background: var(--red); z-index: 40; pointer-events: none;
  transform: translateX(-100%); will-change: transform;
}
.playhead--loop { position: absolute; animation: sweep 6s linear infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100vw); } }

/* ---------- Accueil ---------- */
.page-home { height: 100svh; overflow: hidden; }
.stage { position: fixed; inset: 0; display: grid; place-items: center; }
.stage__media { display: block; position: relative; line-height: 0; }
.stage__media video, .stage__media img {
  max-width: min(64vw, 1100px); max-height: 64svh; width: auto; height: auto; object-fit: contain;
  transition: opacity 0.35s ease;
}
.stage.is-bleed .stage__media { position: fixed; inset: 0; }
.stage.is-bleed .stage__media video, .stage.is-bleed .stage__media img { width: 100vw; height: 100svh; max-width: none; max-height: none; object-fit: cover; }
.stage.is-switching .stage__media video, .stage.is-switching .stage__media img { opacity: 0; }
.stage__count {
  position: fixed; left: 50%; bottom: var(--pad); transform: translateX(-50%); z-index: 21;
  mix-blend-mode: difference; color: #fff; font-variant-numeric: tabular-nums;
}
.noscript-list { padding: 80px var(--pad); list-style: none; font-size: 22px; }

/* Intro cinétique (une fois par session) */
.intro { position: fixed; inset: 0; z-index: 30; background: #fff; color: #000; display: none; padding: var(--pad); cursor: pointer; }
.intro.is-on { display: flex; align-items: flex-end; }
.intro.is-out { opacity: 0; transition: opacity 0.5s ease; pointer-events: none; }

/* ---------- Typographie cinétique ---------- */
.kinetic {
  font: 400 clamp(34px, 6.6vw, 116px)/1.02 var(--display);
  letter-spacing: -0.01em;
  display: flex; flex-wrap: wrap; align-content: flex-end; gap: 0.06em 0.26em;
  width: 100%;
}
/* Studio : le slogan cinétique est le titre visible de la page (son texte lisible pour les lecteurs d'écran, à côté) */
.kinetic-titre { margin: 0; width: 100%; font: inherit; }
.kinetic .w { display: inline-block; padding: 0 0.08em; will-change: transform; transition: background-color 0.25s, color 0.25s; }
.w.k, mark.k { background: #000; color: #fff; }
.w.g, mark.g { background: var(--grey); color: #000; }
.w.b, mark.b { background: #0000ff; color: #fff; }
.w.u { color: #0000ff; text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.1em; }
.w.is-in { animation: win 0.35s ease both; }
@keyframes win { from { opacity: 0; } to { opacity: 1; } }
.kinetic.cols { display: grid; grid-template-columns: repeat(var(--cols, 3), auto); justify-content: start; gap: 0 0.5em; }
mark { padding: 0 0.08em; }

/* ---------- Studio ---------- */
.page-studio { background: #fff; color: #000; }
.kinetic-wrap { position: relative; min-height: 100svh; display: flex; align-items: flex-end; padding: 90px var(--pad) var(--pad); overflow: hidden; }
.big { padding: 12vh var(--pad); }
.big p, .statement { margin: 0; font: 400 clamp(28px, 4.6vw, 80px)/1.06 var(--display); letter-spacing: -0.01em; max-width: 22ch; }
.big a, .cta a, .contact__mail a { color: #0000ff; text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
.block { padding: 10vh var(--pad); border-top: 1px solid var(--line); }
.label { margin: 0 0 18px; font: inherit; color: var(--dim); text-transform: none; }
.lead { margin: 0 0 6vh; font: 400 clamp(22px, 2.6vw, 40px)/1.1 var(--display); }
.formats { list-style: none; margin: 0; padding: 0; }
.formats li {
  display: grid; grid-template-columns: 3em 1fr 1fr; align-items: baseline; gap: 16px;
  border-top: 1px solid var(--line); padding: 10px 0;
}
.formats li:last-child { border-bottom: 1px solid var(--line); }
.formats__t { font: 400 clamp(34px, 6vw, 104px)/1 var(--display); letter-spacing: -0.02em; }
.formats li:hover .formats__t { background: #000; color: #fff; }
.formats li:nth-child(3n+2):hover .formats__t { background: #0000ff; }
.formats li:nth-child(3n):hover .formats__t { background: var(--grey); color: #000; }
.formats__n, .formats__d { color: var(--dim); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--pad); margin-top: 8vh; }
.card h3, .steps h3 { margin: 0 0 8px; font: 400 clamp(20px, 1.8vw, 28px)/1.1 var(--display); }
.card p, .steps p { margin: 0; max-width: 34ch; font-size: 15px; line-height: 1.4; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--pad); }
.steps__n { display: block; font: 400 clamp(60px, 9vw, 160px)/0.9 var(--display); color: var(--red); margin-bottom: 18px; }
.cta { padding: 16vh var(--pad) 10vh; border-top: 1px solid var(--line); font: 400 clamp(40px, 9vw, 160px)/0.95 var(--display); letter-spacing: -0.02em; }
.cta p { margin: 0; }

/* ---------- Archive ---------- */
.names { min-height: 78svh; display: grid; place-items: center; padding: 110px var(--pad) 60px; }
.names__list {
  margin: 0; max-width: 1200px; text-align: center; font: 500 clamp(30px, 4.3vw, 66px)/1.12 var(--font); letter-spacing: -0.02em;
}
.names__list a:hover { text-decoration: none; color: var(--bg); background: var(--fg); }
.archive { padding: 0 var(--pad) 12vh; }
.filters { display: flex; flex-wrap: wrap; gap: 6px 22px; padding-bottom: 28px; }
.filters button { color: var(--dim); }
.filters button.is-on, .filters button:hover { color: var(--fg); }
.filters button.is-on { text-decoration: underline; text-underline-offset: 3px; }
.filters sup { font-size: 9px; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-weight: 500; font-size: var(--small); padding: 0 12px 12px 0; color: var(--fg); }
.table td { padding: 9px 12px 9px 0; border-top: 1px solid transparent; border-bottom: 1px solid transparent; vertical-align: top; }
.table td:first-child, .table th:first-child { width: 7em; font-variant-numeric: tabular-nums; }
.table tbody tr { cursor: pointer; }
.table tbody tr:hover td { border-color: var(--line); }
.table tr.is-hidden { display: none; }
.cursor-preview {
  position: fixed; z-index: 25; left: 0; top: 0; width: min(34vw, 440px); aspect-ratio: 16 / 9;
  pointer-events: none; opacity: 0; transition: opacity 0.15s; background: #000 center / cover no-repeat;
}
.cursor-preview.is-on { opacity: 1; }
.cursor-preview video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Fiche projet ---------- */
.project { padding: 0 var(--pad); }
.project__title {
  margin: 0; min-height: 52svh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding-top: 90px; font: 500 clamp(34px, 4.6vw, 72px)/1.04 var(--font); letter-spacing: -0.02em;
}
.meta { display: grid; grid-template-columns: 2fr 2fr 1fr; gap: 24px; margin: 0; padding: 0 0 36px; border-bottom: 1px solid var(--line); font-size: 15px; }
.meta dt { font-size: var(--small); margin-bottom: 8px; }
.meta dd { margin: 0; line-height: 1.35; }
.media { padding: 36px 0; display: grid; gap: 24px; }
.player {
  position: relative; aspect-ratio: 16 / 9; background: #000 var(--poster) center / cover no-repeat;
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__play { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; }
.player__play span {
  font: 400 clamp(30px, 5vw, 84px)/1 var(--display); color: #fff; background: #0000ff; padding: 0 0.12em;
}
.player__play:hover span { background: var(--red); }
.media-video { width: 100%; background: #000; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.gallery img { width: 100%; height: auto; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: end; padding: 9vh 0 6vh; border-top: 1px solid var(--line); font-size: 15px; }
.pager__next { text-align: right; }

/* ---------- Contact, légal, 404 ---------- */
.contact { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 100px var(--pad) 90px; }
.contact .kinetic { margin: 0; }
.contact__mail { margin: 5vh 0 3vh; font: 400 clamp(26px, 4vw, 64px)/1.05 var(--display); }
.contact__addr { font-style: normal; font-size: 15px; line-height: 1.4; }
.legal { max-width: 760px; padding: 120px var(--pad) 10vh; font-size: 15px; line-height: 1.5; }
.legal h1 { font: 400 clamp(34px, 5vw, 72px)/1 var(--display); margin: 0 0 6vh; }
.legal h2 { font-size: 15px; margin: 4vh 0 6px; }
.legal p { margin: 0; }
.legal a { text-decoration: underline; }
.nf { min-height: 100svh; display: grid; place-items: center; padding: var(--pad); }
.nf__box { border: 1px solid var(--fg); padding: 40px 48px; }
.nf h1 { margin: 0 0 6px; font: 500 clamp(30px, 3.4vw, 46px)/1 var(--font); }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .corners { grid-template-columns: 1fr auto; }
  .corners .tc { display: none; }
  .page-work .corners .tc { display: none; }
  .stage__media video, .stage__media img { max-width: calc(100vw - 32px); max-height: 56svh; }
  .stage__count { bottom: 46px; }
  .hide-s { display: none; }
  .table td:first-child, .table th:first-child { width: 3.4em; }
  .meta { grid-template-columns: 1fr 1fr; }
  .meta__credits { grid-column: 1 / -1; order: 3; }
  .gallery, .cards, .steps { grid-template-columns: 1fr; }
  .formats li { grid-template-columns: 2em 1fr; }
  .formats__d { grid-column: 2; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager__all { display: none; }
  .cursor-preview { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .playhead--loop { animation: none; display: none; }
  .kinetic .w { transition: none; }
}

/* =====================================================================
   V2 : accueil « Play » et studio guidé par le défilement
   (sélecteurs propres à la V2, la V1 n'en dépend pas)
   ===================================================================== */
.page-play { height: 100svh; overflow: hidden; background: #fff; color: #000; }
.play {
  position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr auto; gap: 2vh;
  padding: var(--pad) var(--pad) calc(var(--pad) + 30px);
}
.play__title { margin: 0; font: 400 clamp(40px, 6.6vw, 116px)/1 var(--display); letter-spacing: -0.01em; transition: font-size 0.5s cubic-bezier(.75,0,.2,1); }
.play__title span { display: block; }
.play__sub { color: #0000ff; }
.is-playing .play__title { font-size: clamp(22px, 2.6vw, 40px); }
.play__screen {
  align-self: stretch; overflow: hidden; align-content: center;
  font-size: clamp(30px, 6vw, 108px);
}
.play__screen.cols { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); justify-content: stretch; gap: 0.18em; }
.play__screen.has-video { font-size: clamp(20px, 3vw, 54px); }
.play__screen .w.h { grid-column: 1 / -1; justify-self: start; }
.play__screen a.w.u { color: #0000ff; }
.play__screen a.w.u:hover { background: #0000ff; color: #fff; text-decoration: none; }
.w.v { position: relative; display: block; width: 5em; aspect-ratio: 16 / 9; background: #000; overflow: hidden; padding: 0; text-decoration: none; }
.cols .w.v { width: 100%; max-height: 28svh; justify-self: center; }
.w.v video, .w.v img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v__label { position: absolute; left: 0; bottom: 0; max-width: 100%; display: flex; flex-direction: column; align-items: flex-start; font-size: max(12px, 0.36em); line-height: 1.1; }
.v__label b, .v__label small { background: #000; color: #fff; padding: 0.08em 0.25em; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.v__label small { background: #0000ff; font-size: 0.75em; }
.w.v:hover .v__label b { background: var(--red); }
.play__nav { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font: 400 clamp(28px, 4.6vw, 80px)/1 var(--display); }
.play__nav a, .play__btn { color: #0000ff; text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
.play__nav a:hover, .play__btn:hover { background: #0000ff; color: #fff; text-decoration: none; }
.play__btn { min-width: 3.4ch; text-align: left; }
.sound { text-decoration: underline; text-underline-offset: 3px; }
.page-play .corners .c [data-time] { font-variant-numeric: tabular-nums; }
.playhead--timeline { transform: translateX(0); }
.page-play [data-now] { display: inline-block; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }

/* Studio V2 */
.variant-v2.page-studio .corners--bottom { position: fixed; mix-blend-mode: difference; color: #fff; }
.scroll-meter { position: fixed; top: 0; right: 0; bottom: 0; width: 6px; z-index: 22; pointer-events: none; }
.scroll-meter div { height: 100%; background: var(--red); transform-origin: top; transform: scaleY(0); }
.scrolly { position: relative; height: calc(var(--steps) * 70svh + 100svh); }
.scrolly__sticky { position: sticky; top: 0; height: 100svh; display: flex; align-items: flex-end; padding: 90px calc(var(--pad) + 28px) 140px var(--pad); overflow: hidden; }
.scrolly__dots { position: absolute; right: calc(var(--pad) + 4px); top: 50%; transform: translateY(-50%); display: grid; gap: 10px; }
.scrolly__dots i { width: 10px; height: 10px; border: 1px solid #000; }
.scrolly__dots i.is-on { background: var(--red); border-color: var(--red); }
.scroll-cue {
  position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%);
  font: 400 clamp(22px, 2.2vw, 34px)/1 var(--display); background: #0000ff; color: #fff; padding: 0.12em 0.3em; text-decoration: none;
}
.scroll-cue:hover { background: var(--red); text-decoration: none; }
.scroll-cue__arrow { display: inline-block; animation: nudge 1.1s ease-in-out infinite; }
.scroll-cue.is-last .scroll-cue__arrow { animation-duration: 0.7s; }
@keyframes nudge { 0%, 100% { transform: translateY(-0.08em); } 50% { transform: translateY(0.16em); } }
.block--v2 { padding: 12vh var(--pad); }
.section-head { margin: 0 0 6vh; font: 400 clamp(28px, 3.4vw, 52px)/1 var(--display); }
.section-head__n { color: var(--red); margin-right: 0.3em; font-variant-numeric: tabular-nums; }
.block--v2 .statement { margin: 0; }
.cta--v2 { padding: 0; border: 0; font: 400 clamp(36px, 7vw, 120px)/1 var(--display); }
.cta--v2 a { color: #0000ff; text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }

@media (max-width: 760px) {
  .play__nav { font-size: 26px; flex-wrap: wrap; }
  .play__screen.has-video { font-size: 16px; }
  .play__screen.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols .w.v { max-height: 18svh; }
  .scrolly__sticky { padding-bottom: 130px; }
  .scroll-cue { bottom: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue__arrow { animation: none; }
  .play__title { transition: none; }
}

/* le logo en haut à gauche */
.corners .logo { display: inline-block; vertical-align: middle; }
.corners .logo img { display: block; height: 15px; width: auto; }
@media (min-width: 900px) { .corners .logo img { height: 18px; } }
