/* Portfolio commun « Gianni et Julien », sur le modèle de pixflystudio.com (choix de Gianni, 28/11/2026).
   Fond noir uni, le nom au centre en capitales hautes et serrées, les images d'abord,
   le titre et l'année au survol. Pas d'accent de couleur : le blanc fait le travail. */

:root {
  --bg: #111111;
  --surface: #1b1b1b;
  --ink: #ffffff;
  --muted: #aeaeae;

  --display: 'Bebas Neue', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --text: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Cinq tailles */
  --step-small: 0.9375rem;
  --step-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-ui: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
  --step-head: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --step-display: clamp(2.5rem, 1rem + 5.5vw, 6.5rem);

  --m: clamp(16px, 3.8vw, 56px);
  --gap: 6px;
  --section: clamp(96px, 11vw, 180px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
p, h1, h2, h3, figure { margin: 0; }
button { font: inherit; color: inherit; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--bg); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.soft { color: var(--muted); }
.skip { position: absolute; left: var(--m); top: -100px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 16px; }
.skip:focus { top: 10px; }

/* ---------- Capitales serrées (Bebas), comme sur pixflystudio.com ---------- */
.wordmark, .site-nav a, .h-page, .h-section, .small-head, .tile-title, .tile-year,
.filter, .footer-nav a, .footer-word, .huge-link, .text-link, .button,
.hero-statement, .project-title, .person-name, .facts dt, .footer-label {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ---------- En-tête : le menu à gauche, le nom au centre ---------- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 32px var(--m) 40px;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: var(--step-ui); }
.site-nav a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.wordmark-title { font-size: inherit; grid-column: 2; }
.wordmark { grid-column: 2; font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.25rem); line-height: 1; text-decoration: none; white-space: nowrap; }

/* ---------- La grille ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  padding: 0 var(--m);
}
.tile-link { display: block; position: relative; color: inherit; text-decoration: none; }
.tile-media { display: block; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); }
.tile-media img, .tile-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-media video { opacity: 0; transition: opacity 0.4s var(--ease); }
.tile.is-playing .tile-media video { opacity: 1; }
.tile-info { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.tile-title { font-size: clamp(1.375rem, 1.2rem + 0.4vw, 1.5rem); line-height: 1.15; min-width: 0; overflow-wrap: anywhere; text-wrap: balance; }
.tile-year { font-size: var(--step-ui); color: var(--muted); flex: none; font-variant-numeric: tabular-nums; }
.tile[hidden] { display: none; }
.tile.is-wide { grid-column: 1 / -1; }
.tile.is-wide .tile-media { aspect-ratio: 21 / 9; }

/* Survol (souris) : l'image s'assombrit, le titre et l'année apparaissent au centre. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .tile-info {
    position: absolute; inset: 0; padding: 24px;
    background: rgba(17, 17, 17, 0.62);
    opacity: 0; transition: opacity 0.35s var(--ease);
  }
  .tile-link:hover .tile-info, .tile-link:focus-visible .tile-info { opacity: 1; }
  .tile.is-playing .tile-info { background: rgba(17, 17, 17, 0.55); }
  .tile-link:focus-visible { outline-offset: -2px; }
}
/* Écran tactile : le titre reste sous l'image. */
@media not ((hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference)) {
  .tile-info { flex-direction: row; justify-content: space-between; padding: 10px 2px 18px; text-align: left; }
}


/* ---------- Accueil : le film en grand, puis la phrase et les actions ---------- */
.hero { padding: 0 var(--m); }
.hero-media { position: relative; aspect-ratio: 21 / 9; overflow: hidden; background: var(--surface); }
.hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-pause {
  position: absolute; right: 16px; bottom: 16px; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(17, 17, 17, 0.55); color: var(--ink); cursor: pointer; transition: background 0.2s;
}
.hero-pause:hover { background: rgba(17, 17, 17, 0.85); }
.hero-pause svg { width: 16px; height: 16px; }
.hero-pause .i-play, .hero-pause.is-paused .i-pause { display: none; }
.hero-pause.is-paused .i-play { display: block; }
.hero-text {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px var(--gap);
  align-items: end; padding: 36px 0 var(--section);
}
.hero-statement { grid-column: 1 / span 8; font-size: clamp(2.75rem, 1rem + 5.4vw, 6.5rem); line-height: 0.92; text-wrap: balance; }
.hero-actions { grid-column: 9 / span 4; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px 26px; }
.work .small-head { padding-bottom: 22px; }

/* ---------- Bouton ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-size: 1.25rem; letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.2s;
}
.button:hover { background: #dcdcdc; }
.button:active { transform: translateY(1px); }
.intro-lead .button { justify-self: start; margin-top: 10px; }

/* ---------- Faits (projet, présentation) ---------- */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font-size: var(--step-ui); color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; }
.facts dd p + p { margin-top: 0.7em; }
.facts-stack { grid-template-columns: 1fr; gap: 22px; }

/* ---------- Titres de page ---------- */
.page-head { padding: 24px var(--m) 48px; display: grid; gap: 20px; justify-items: start; }
.h-page { font-size: var(--step-display); line-height: 0.95; letter-spacing: -0.005em; max-width: 18ch; text-wrap: balance; }
.h-section { font-size: var(--step-head); line-height: 1.05; text-wrap: balance; }
.small-head { font-size: var(--step-ui); padding: 0 var(--m) 18px; }
.intro-text { max-width: 62ch; display: grid; gap: 1em; font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem); }
.text-link { font-size: var(--step-ui); text-decoration: underline; text-underline-offset: 0.25em; justify-self: start; }
.text-link:hover { text-decoration-thickness: 2px; }
.empty { padding: 0 var(--m) 120px; color: var(--muted); }

/* ---------- Tri des projets ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.filter { background: none; border: 0; padding: 6px 0; cursor: pointer; font-size: var(--step-ui); color: var(--muted); text-decoration: none; }
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 0.3em; }

/* ---------- Accueil : quelques lignes sous la grille ---------- */
.intro {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px var(--gap);
  padding: var(--section) var(--m) 0;
}
.intro .h-section { grid-column: 1 / span 4; }
.intro .intro-text { grid-column: 6 / span 7; }
.intro-lead { font-size: clamp(1.25rem, 1rem + 0.7vw, 1.625rem); line-height: 1.4; max-width: 34ch; }
.page-head .intro-lead { max-width: 40ch; }

/* ---------- Page projet : les images d'abord, la description dessous ---------- */
.project-media {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap);
  padding: 0 var(--m); align-items: start;
}
.pm-full, .pm-wide { grid-column: 1 / -1; }
.pm img, .pm video { width: 100%; height: auto; object-fit: cover; background: var(--surface); }
.pm-full img, .pm-full video { aspect-ratio: var(--r); }
.pm-cell img, .pm-cell video { aspect-ratio: var(--cell); }
.pm-wide img, .pm-wide video { aspect-ratio: 16 / 9; }
.project-text {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px var(--gap);
  padding: 48px var(--m) 0;
}
.project-text > * { grid-column: 1 / span 7; }
.project-head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px var(--gap);
  align-items: end; padding: 16px var(--m) 40px;
}
.project-title { grid-column: 1 / -1; font-size: clamp(2.75rem, 1rem + 5vw, 6rem); line-height: 0.92; text-wrap: balance; }
.project-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px var(--gap); align-items: start; }
.project-side .facts { grid-column: 1 / span 6; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.project-side .project-lead { grid-column: 8 / span 5; }
.project-facts { color: var(--muted); }
.project-lead { font-size: var(--step-body); line-height: 1.55; }
.see-also { padding-top: var(--section); }

/* ---------- Présentation : les deux, côte à côte, à égalité ---------- */
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 88px var(--gap); padding: 24px var(--m) 0; }
.person { display: grid; gap: 16px; align-content: start; padding-right: 40px; }
.person-name { font-size: clamp(2.25rem, 1rem + 2.6vw, 3.5rem); line-height: 0.95; }
.person-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: 10px; }
.person-role { color: var(--muted); }
.person-links { display: grid; gap: 4px; }
.person-links a { text-decoration: none; }
.person-links a:hover { text-decoration: underline; }

/* ---------- Contact ---------- */
.contact-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: 100%; }
.contact-person { display: grid; gap: 6px; align-content: start; }
.contact-person .small-head { padding: 0; }
.contact-mail { overflow-wrap: normal; }
.huge-link { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.25rem); line-height: 1.05; text-decoration: none; overflow-wrap: anywhere; }
.huge-link:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.contact-page { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px var(--gap); padding: 24px var(--m) 0; align-items: start; }
.contact-text { display: grid; gap: 22px; justify-items: start; padding-right: 32px; }
.contact-picture img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ---------- Pied de page : le contact, puis le nom en grand ---------- */
.site-footer { padding: var(--section) var(--m) 24px; }
.footer-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px var(--gap);
  align-items: start; padding-bottom: 40px;
}
.footer-col { display: grid; gap: 8px; align-content: start; }
.footer-label { font-size: var(--step-ui); color: var(--muted); }
.footer-person { display: grid; gap: 2px; margin-bottom: 10px; }
.footer-person a { text-decoration: none; }
.footer-person a:hover { text-decoration: underline; }
.footer-nav { font-size: var(--step-ui); }
.footer-nav a { color: var(--ink); text-decoration: none; }
.footer-nav a:hover { color: var(--muted); }
/* Le nom occupe toute la largeur : « GIANNI ET JULIEN » mesure environ 6,1 fois sa taille en Oswald. */
.site-footer { container-type: inline-size; }
.footer-word { font-size: 15.6cqi; line-height: 0.82; text-align: center; white-space: nowrap; letter-spacing: -0.01em; overflow: hidden; }

.notfound { padding-bottom: 120px; }

/* ---------- Tablette et téléphone ---------- */
/* Écran moyen : le menu se resserre pour tenir sur une ligne à côté du nom. */
@media (max-width: 960px) and (min-width: 601px) {
  .site-nav { font-size: 0.95rem; gap: 4px 12px; flex-wrap: nowrap; white-space: nowrap; }
}

/* Deux images côte à côte jusqu'aux petits écrans, comme sur pixflystudio.com ; une seule sur téléphone. */
@media (max-width: 540px) {
  .grid, .project-media { grid-template-columns: 1fr; }
  .tile.is-wide .tile-media { aspect-ratio: 16 / 9; }
  .pm-wide img, .pm-wide video { aspect-ratio: var(--cell); }
}

@media (max-width: 600px) {
  .site-header { grid-template-columns: 1fr; justify-items: center; gap: 14px; padding: 22px var(--m) 28px; }
  .wordmark, .wordmark-title { grid-column: 1; grid-row: 1; }
  .site-nav { grid-row: 2; justify-content: center; gap: 4px 18px; }
  .intro, .project-text { grid-template-columns: 1fr; }
  .intro .h-section, .intro .intro-text, .project-text > * { grid-column: 1; }
  .people, .contact-page { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16 / 10; }
  .hero-text, .project-head { grid-template-columns: 1fr; }
  .hero-statement, .hero-actions, .project-title, .project-side { grid-column: 1; }
  .project-side { grid-template-columns: 1fr; }
  .project-side .facts, .project-side .project-lead { grid-column: 1; }
  .project-side .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-actions { justify-content: flex-start; }
  .contact-text { padding-right: 0; }
  .person { padding-right: 0; }
  .footer-row { grid-template-columns: 1fr; }
}

/* ---------- Mouvement (seulement si la personne l'accepte) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease) var(--d, 0ms), transform 0.7s var(--ease) var(--d, 0ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .tile-media img { transition: transform 0.8s var(--ease); }
  .tile-link:hover .tile-media img { transform: scale(1.03); }
}
