/* David Bismuth — reconstruction du site Readymag.
   Toutes les mesures « desktop » reprennent la maquette Readymag (cadre 1920 px)
   via l'unité --u = 1 px à 1920 de large, comme le viewer « scalable » de Readymag. */

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/inter-tight-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("fonts/inter-tight-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #c7c7c1;
  --paper: #ffffff;
  --ink: #000000;
  --rail: #a6a6a6;
  /* Aktiv Grotesk (Adobe Fonts) dans l'original ; Inter Tight en est l'équivalent libre.
     « aktiv-grotesk » ne s'active que si un kit Adobe Fonts est ajouté dans le <head>. */
  --font: "aktiv-grotesk", "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --u: calc(100vw / 1920);
  --fade: 0.5s cubic-bezier(0.45, 0, 0.55, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Soulignement au survol : style « Dark haut » de Readymag (aucun trait, trait plein au survol) */
.ul {
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: max(1px, calc(3 * var(--u)));
  text-underline-offset: 0.18em;
  transition: text-decoration-color 0.2s ease;
}
.ul:hover { text-decoration-color: currentColor; }

/* ---------- En-tête fixe ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: calc(90 * var(--u));
  pointer-events: none;
}
.site-header a { pointer-events: auto; position: absolute; white-space: nowrap; }

.h-role {
  left: calc(82 * var(--u));
  top: calc(24 * var(--u));
  font-size: calc(31 * var(--u));
  line-height: calc(37 * var(--u));
  font-weight: 700;
  letter-spacing: -0.017em;
}
.h-name {
  left: calc(545 * var(--u));
  top: calc(25 * var(--u));
  font-size: calc(29 * var(--u));
  line-height: calc(37 * var(--u));
  font-weight: 300;
  letter-spacing: 0.004em;
}
.h-about {
  right: calc(137 * var(--u));
  top: calc(28 * var(--u));
  font-size: calc(25 * var(--u));
  line-height: calc(31 * var(--u));
  letter-spacing: -0.025em;
}

/* ---------- Liens de contact, fixés en bas à gauche ---------- */

.site-contact {
  position: fixed;
  left: calc(82 * var(--u));
  bottom: calc(38 * var(--u));
  z-index: 40;
  display: flex;
  gap: calc(21 * var(--u));
  font-size: calc(25 * var(--u));
  line-height: calc(31 * var(--u));
  letter-spacing: -0.025em;
  text-transform: lowercase;
}

/* Filet blanc sous l'en-tête (pages projets) */
.rule {
  height: 1px;
  background: var(--paper);
  margin-left: calc(299 * var(--u));
  width: calc(1357 * var(--u));
}
.rule-top { position: absolute; top: calc(84 * var(--u)); }

/* ---------- Accueil : vidéo plein écran ---------- */

.hero {
  position: fixed;
  inset: 0;
  display: block;
  background: var(--bg);
}
.hero video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Grilles de projets ---------- */

main.work { position: relative; padding: calc(120 * var(--u)) 0 calc(150 * var(--u)); }

.grid {
  display: grid;
  margin: 0 calc(56 * var(--u)) 0 calc(64 * var(--u));
  grid-template-columns: repeat(2, 1fr);
  column-gap: calc(48 * var(--u));
  row-gap: calc(38 * var(--u));
}
.tile {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 876 / 490;
  background: #b9b9b2;
  cursor: pointer;
}
.tile video, .tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 4%;
  text-align: center;
  font-size: calc(63 * var(--u));
  line-height: 1.1;
  letter-spacing: 0;
  opacity: 0;
  transition: opacity var(--fade);
  pointer-events: none;
}
.tile:hover .tile-label, .tile:focus-visible .tile-label { opacity: 1; }
.tile:focus-visible { outline-offset: -4px; }

/* Page « other » : six formats verticaux bord à bord, puis deux larges */
.strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin: calc(1 * var(--u)) calc(80 * var(--u)) 0 calc(70 * var(--u));
}
.strip .tile { aspect-ratio: 295 / 490; }
.strip .tile-label { font-size: calc(36 * var(--u)); }
.grid-wide {
  margin: calc(60 * var(--u)) calc(79 * var(--u)) 0 calc(71 * var(--u));
  column-gap: calc(22 * var(--u));
}
.grid-wide .tile { aspect-ratio: 874 / 490; }

/* Lien vers les projets additionnels */
.more { margin-top: calc(110 * var(--u)); }
.more .rule { margin-left: calc(305 * var(--u)); }
.more-link {
  display: block;
  width: max-content;
  margin: calc(130 * var(--u)) auto 0;
  font-size: calc(56 * var(--u));
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ---------- Lecteur audio ---------- */

.player {
  width: min(640px, 92vw);
  margin: calc(90 * var(--u)) auto 0;
  color: var(--ink);
}
.player-head { display: flex; align-items: center; gap: 14px; }
.player-now { flex: 1; min-width: 0; }
.now-title { display: block; color: var(--paper); font-size: 15px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-artist { display: block; font-size: 12px; line-height: 1.3; font-weight: 400; }
.player-time { font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 400; }
.player-btns { display: flex; align-items: center; gap: 4px; }
.player-btns button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.player-btns button:hover { background: rgba(255, 255, 255, 0.25); }
.player-btns svg { width: 16px; height: 16px; fill: var(--ink); }
.player-btns .pp svg { width: 20px; height: 20px; }
.rail {
  position: relative;
  height: 18px;
  margin: 8px 0 14px;
  cursor: pointer;
  touch-action: none;
}
.rail::before, .rail-fill {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  height: 2px;
}
.rail::before { right: 0; background: var(--rail); }
.rail-fill { width: 0; background: var(--paper); }
.rail-fill::after {
  content: "";
  position: absolute;
  right: -5px; top: -4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--paper);
}
.tracks { list-style: none; margin: 0; padding: 6px; background: rgba(255, 255, 255, 0.16); border-radius: 10px; }
.tracks button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: 6px;
}
.tracks button:hover { background: rgba(255, 255, 255, 0.18); }
.tracks .t { display: block; color: var(--paper); font-size: 14px; line-height: 1.3; }
.tracks .a { display: block; font-size: 12px; font-weight: 400; line-height: 1.3; }
.tracks button[aria-current="true"] .t::before { content: "▸ "; }

/* ---------- À propos ---------- */

.about {
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: 0 0 0 calc(112 * var(--u));
}
/* Readymag centre verticalement les pages plus courtes que l'écran (ici 730 px de haut) */
.about-inner { min-height: calc(730 * var(--u)); padding: calc(153 * var(--u)) 0 calc(60 * var(--u)); }
.about-text {
  max-width: calc(1294 * var(--u));
  margin: 0;
  color: var(--ink);
  font-size: calc(31 * var(--u));
  line-height: calc(37 * var(--u));
  font-weight: 500;
  letter-spacing: -0.017em;
}
.about-text p { margin: 0 0 calc(37 * var(--u)); }
.about-links {
  display: flex;
  gap: calc(21 * var(--u));
  margin-top: calc(66 * var(--u));
  font-size: calc(25 * var(--u));
  line-height: calc(31 * var(--u));
  letter-spacing: -0.025em;
  text-transform: lowercase;
}
.about-phone {
  margin: calc(17 * var(--u)) 0 0;
  font-size: calc(25 * var(--u));
  line-height: calc(31 * var(--u));
  letter-spacing: -0.025em;
}

/* ---------- Lecture plein écran ---------- */

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(199, 199, 193, 0.96); }
.lightbox[open] { display: grid; place-items: center; animation: fade-in 0.25s ease both; }
.lightbox[open]::backdrop { animation: fade-in 0.25s ease both; }
@keyframes fade-in { from { opacity: 0; } }

.lb-stage { position: relative; width: min(calc(1764 * var(--u)), calc((100dvh - 200px) * 16 / 9)); }
.lb-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.lb-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.lb-frame.is-portrait { aspect-ratio: 9 / 16; height: calc(100dvh - 200px); margin: 0 auto; }
.lb-caption {
  margin: 14px 0 0;
  min-height: 1.3em;
  text-align: right;
  font-size: max(14px, calc(25 * var(--u)));
  letter-spacing: -0.03em;
}
.lb-close {
  position: fixed;
  top: calc(68 * var(--u));
  right: calc(96 * var(--u));
  width: max(40px, calc(72 * var(--u)));
  height: max(40px, calc(72 * var(--u)));
}
.lb-close svg { width: 100%; height: 100%; stroke: var(--paper); stroke-width: 1.4; }

/* ---------- Téléphone (mise en page dédiée, comme la vue mobile Readymag) ---------- */

@media (max-width: 767px) {
  :root { --u: 1px; }

  .site-header { height: 64px; }
  .h-role { left: 16px; top: 14px; font-size: 16px; line-height: 20px; }
  .h-name { left: 16px; top: 34px; font-size: 15px; line-height: 20px; }
  .h-about { right: 16px; top: 15px; font-size: 15px; line-height: 20px; }

  .site-contact { left: 16px; bottom: 14px; gap: 14px; font-size: 14px; line-height: 18px; }

  .rule { margin-left: 16px; width: calc(100% - 32px); }
  .rule-top { top: 64px; }

  main.work { padding: 84px 0 70px; }
  .grid, .grid-wide { grid-template-columns: 1fr; margin: 0 16px; row-gap: 12px; }
  .grid-wide { margin-top: 12px; }
  .strip { grid-template-columns: repeat(2, 1fr); margin: 0 16px; gap: 0; }
  .strip .tile { aspect-ratio: 3 / 4; }
  .tile-label, .strip .tile-label { font-size: 26px; }
  /* Pas de survol au doigt : les noms restent visibles, discrets */
  .tile-label { opacity: 1; place-items: end start; padding: 10px 12px; font-size: 15px !important; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35); }

  .more { margin-top: 48px; }
  .more .rule { margin-left: 16px; }
  .more-link { margin-top: 28px; font-size: 22px; }

  .player { margin-top: 40px; }

  .about { display: block; padding: 104px 16px 80px; }
  .about-inner { min-height: 0; padding: 0; }
  .about-text { font-size: 18px; line-height: 23px; letter-spacing: -0.02em; }
  .about-text p { margin-bottom: 18px; }
  .about-links { gap: 14px; margin-top: 28px; font-size: 15px; line-height: 20px; }
  .about-phone { margin-top: 8px; font-size: 15px; line-height: 20px; }

  .lb-stage { width: 100vw; }
  .lb-frame.is-portrait { height: auto; width: min(100vw, calc((100dvh - 140px) * 9 / 16)); }
  .lb-caption { padding: 0 16px; }
  .lb-close { top: 10px; right: 10px; }
}

@media (hover: none) and (min-width: 768px) {
  .tile-label { opacity: 1; place-items: end start; padding: 1.2vw 1.4vw; font-size: 2vw; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
