/* Olivia Dall’Omo — site portfolio
   Typo : Didot (titres) + grotesque suisse (texte), comme le portfolio imprimé. */

:root {
  --bg: #f6f6f4;
  --tile: #ececea;
  --hover: #ededea;
  --ink: #121212;
  --muted: #6b6b66; /* 4,9:1 sur le fond — lisible pour les petites capitales */
  --line: rgba(18, 18, 18, 0.14);
  --dark: #0b0b0d;

  --serif: "Didot", "Bodoni Moda", "Bodoni 72", "GFS Didot", serif;
  --sans: "Neue Haas Unica", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(16px, 1.6vw, 28px);
  --bar-h: 46px;
  --sec-pad: clamp(72px, 11vw, 168px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  scroll-padding-top: var(--bar-h);
}
html.is-locked { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a, button, summary { touch-action: manipulation; }
h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.caps {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.38;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 8px 12px;
}
.skip:focus { top: 8px; }

.link-u { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.4s var(--ease); }
.link-u:hover { background-size: 100% 1px; }

/* ---------- Barre ---------- */
.bar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: var(--bar-h);
  padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  backdrop-filter: saturate(1.2) blur(12px);
}
.bar__brand { justify-self: start; }
.bar__nav { display: flex; gap: clamp(16px, 2.6vw, 44px); }
.nav-open { overflow: hidden; }
.bar__nav a, .bar__brand, .bar__lang a { position: relative; }
.bar__nav a, .bar__brand, .hero__contact a, .contact__facts a, .foot__top, .pv__nav a { padding-block: 6px; }
.bar__nav a::after, .bar__brand::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.bar__nav a:hover::after, .bar__nav a.is-current::after, .bar__brand:hover::after { transform: scaleX(1); }
.bar__end { justify-self: end; display: flex; align-items: center; gap: 18px; }
.bar__lang { display: flex; align-items: center; gap: 2px; color: var(--muted); }
.bar__lang a { display: inline-grid; place-items: center; min-width: 28px; min-height: 28px; color: var(--muted); transition: color 0.2s; }
.bar__lang a:hover, .bar__lang a[aria-current] { color: var(--ink); }
.bar__lang a[aria-current] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.bar__menu { display: none; }

@media (max-width: 760px) {
  .bar { grid-template-columns: 1fr auto; }
  .bar__menu { display: block; min-height: 32px; padding: 0 4px; }
  .bar__nav {
    position: fixed; inset: var(--bar-h) 0 auto 0; height: calc(100svh - var(--bar-h));
    flex-direction: column; gap: 6px; padding: 28px var(--gutter);
    background: var(--bg);
    font-family: var(--serif); font-size: clamp(40px, 13vw, 64px); line-height: 1.05; letter-spacing: 0;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.4s var(--ease), visibility 0s linear 0.4s;
  }
  .bar__nav a::after { display: none; }
  .nav-open .bar__nav { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s ease, transform 0.4s var(--ease); }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr auto;
  column-gap: var(--gutter);
  min-height: calc(100svh - var(--bar-h));
  padding: 4px var(--gutter) var(--gutter);
}
.hero__title {
  grid-column: 1 / -1; grid-row: 1;
  font-size: clamp(46px, 8.7vw, 176px);
  line-height: 0.92;
  letter-spacing: -0.005em;
  white-space: nowrap;
  margin-left: -0.04em;
}
.hero__figure {
  grid-column: 7 / 11; grid-row: 2;
  align-self: center; justify-self: start;
  margin: clamp(28px, 5vh, 64px) 0;
}
.hero__figure img { max-height: 56svh; width: auto; }
.hero__figure figcaption {
  margin-top: 8px; color: var(--muted);
}
.hero__contact {
  grid-column: 1 / 5; grid-row: 3; align-self: end;
  display: grid; grid-template-columns: 6em 1fr; row-gap: 0;
}
.hero__intro {
  grid-column: 7 / 13; grid-row: 3; align-self: end;
  max-width: 62em;
  text-align: justify; hyphens: auto;
}

@media (max-width: 900px) {
  .hero { grid-template-rows: auto auto auto auto; min-height: 0; padding-bottom: 56px; }
  .hero__title { white-space: normal; font-size: clamp(46px, 16.5vw, 150px); }
  .hero__title span { display: block; }
  .hero__figure { grid-column: 1 / -1; justify-self: end; width: min(78%, 460px); margin: 40px 0 36px; }
  .hero__figure img { max-height: none; width: 100%; }
  .hero__intro { grid-column: 1 / -1; grid-row: 3; text-align: left; max-width: 34em; font-size: 16px; line-height: 1.5; text-transform: none; letter-spacing: 0; hyphens: manual; }
  .hero__contact { grid-column: 1 / -1; grid-row: 4; margin-top: 28px; }
}

/* ---------- En-têtes de section ---------- */
.sec-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px var(--gutter);
  border-top: 1px solid var(--line);
}
.sec-head h2 { font: inherit; }
#projects-count { color: var(--muted); }

/* ---------- Grille projets ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card__text, .card__media { aspect-ratio: 595 / 842; }
.card__text {
  display: flex; flex-direction: column;
  padding: 11px 12px 14px;
  min-width: 0;
}
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.card__title { font-size: clamp(17px, 1.6vw, 26px); line-height: 1.04; overflow-wrap: anywhere; }
.card__year { font-size: clamp(15px, 1.3vw, 21px); white-space: nowrap; padding-top: 0.06em; }
.card__desc {
  margin-top: auto;
  text-align: justify; hyphens: auto;
  display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden;
}
.card__cta {
  margin-top: 12px; color: var(--muted);
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.35s ease, transform 0.45s var(--ease);
}
.card:hover .card__cta, .card:focus-visible .card__cta { opacity: 1; transform: none; }
.card__media { overflow: hidden; background: var(--tile); }
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.4s var(--ease), opacity 0.6s ease;
}
.card:hover .card__media img { transform: scale(1.04); }
.card:nth-child(4n+3) .card__media,
.card:nth-child(4n+4) .card__media { order: -1; }

@media (hover: none) { .card__cta { opacity: 1; transform: none; } }

@media (max-width: 1000px) {
  .grid { grid-template-columns: 1fr; }
  .card:nth-child(4n+3) .card__media,
  .card:nth-child(4n+4) .card__media { order: 0; }
  .card:nth-child(even) .card__media { order: -1; }
  .card__title { font-size: clamp(18px, 3vw, 28px); }
  .card__year { font-size: clamp(15px, 2.4vw, 22px); }
}
@media (max-width: 600px) {
  .card { grid-template-columns: 1fr; border-top: 1px solid var(--line); }
  .card .card__media { order: -1 !important; aspect-ratio: 4 / 5; }
  .card__text { aspect-ratio: auto; padding: 14px var(--gutter) 36px; }
  .card__desc { margin-top: 20px; -webkit-line-clamp: unset; font-size: 16px; line-height: 1.5; text-transform: none; letter-spacing: 0; text-align: left; }
  .card__title { font-size: 24px; }
  .card__year { font-size: 18px; }
}

/* ---------- Index ---------- */
.index { padding-top: var(--sec-pad); position: relative; }
.index__head, .row {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, 0.8fr) 3.5rem;
  gap: var(--gutter);
  align-items: baseline;
  padding: 0 var(--gutter);
}
.index__head { color: var(--muted); padding-bottom: 10px; }
.index__head span:last-child, .row__country { text-align: right; }
.index__list { border-top: 1px solid var(--line); }
.row {
  padding-top: 15px; padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.25s ease;
}
.row:hover, .row:focus-visible { background: var(--hover); }
.row__client { font-size: clamp(20px, 2.1vw, 34px); line-height: 1.02; }
.row__disc { color: var(--muted); }
.peek {
  position: fixed; top: 0; left: 0; z-index: 25;
  width: clamp(160px, 15vw, 240px); height: auto; aspect-ratio: 595 / 842; object-fit: cover;
  pointer-events: none; opacity: 0;
  transition: opacity 0.25s ease;
}
.peek.is-on { opacity: 1; }

@media (max-width: 800px) {
  .index__head { display: none; }
  .row { grid-template-columns: 4.6rem minmax(0, 1fr) 2.2rem; grid-template-areas: "y c n" "y t n"; row-gap: 4px; }
  .row__year { grid-area: y; }
  .row__client { grid-area: c; font-size: 24px; }
  .row__title { grid-area: t; }
  .row__disc { display: none; }
  .row__country { grid-area: n; }
}

/* ---------- À propos ---------- */
.about {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter);
  padding: var(--sec-pad) var(--gutter);
}
.about__title { grid-column: 1 / 6; font-size: clamp(48px, 7.4vw, 140px); line-height: 0.92; }
.about__body { grid-column: 7 / 13; }
.about__bio { font-size: clamp(19px, 1.65vw, 27px); line-height: 1.32; letter-spacing: -0.005em; margin-bottom: clamp(48px, 6vw, 88px); }
.about__sub { color: var(--muted); padding-bottom: 10px; }
.xp { border-top: 1px solid var(--line); margin-bottom: clamp(48px, 6vw, 88px); }
.xp li {
  display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--gutter);
  padding: 16px 0 18px; border-bottom: 1px solid var(--line);
}
.xp__years { padding-top: 0.35em; }
.xp__org { font-size: clamp(20px, 1.6vw, 26px); line-height: 1.05; margin-bottom: 8px; }
.xp__org a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
.xp__org a:hover { text-decoration-thickness: 2px; }
.xp__text { font-size: 14px; line-height: 1.45; color: #3b3b38; max-width: 36em; }
.clients { columns: 2; column-gap: var(--gutter); border-top: 1px solid var(--line); padding-top: 12px; }
.clients li { padding: 3px 0; break-inside: avoid; }

@media (max-width: 900px) {
  .about__title, .about__body { grid-column: 1 / -1; }
  .about__title { margin-bottom: 28px; }
  .xp li { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- Contact ---------- */
.contact__inner { padding: clamp(40px, 6vw, 96px) var(--gutter) var(--sec-pad); }
.contact__lead { color: var(--muted); margin-bottom: 18px; }
.contact__mail {
  display: inline-block;
  font-size: clamp(30px, 6.3vw, 124px);
  line-height: 0.98;
  text-transform: none;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.6s var(--ease);
  padding-bottom: 0.06em;
}
.contact__mail:hover { background-size: 100% 1px; }
.contact__facts { display: flex; flex-wrap: wrap; gap: 12px clamp(28px, 6vw, 96px); margin-top: clamp(36px, 5vw, 72px); }
.contact__facts dt { color: var(--muted); }

/* ---------- Pied de page ---------- */
.foot {
  display: grid; grid-template-columns: 1fr 1fr 2fr auto; gap: var(--gutter); align-items: start;
  padding: 14px var(--gutter) 22px; border-top: 1px solid var(--line);
}
.foot__credits summary { cursor: pointer; list-style: none; padding-block: 6px; margin-block: -6px; }
.foot__credits summary::-webkit-details-marker { display: none; }
.foot__credits summary::after { content: " +"; }
.foot__credits[open] summary::after { content: " –"; }
.foot__credits ul { margin-top: 10px; color: var(--muted); }
.foot__note { color: var(--muted); max-width: 52em; }
@media (max-width: 800px) {
  .foot { grid-template-columns: 1fr auto; }
  .foot__note { grid-column: 1 / -1; grid-row: 3; }
  .foot__credits { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Vue projet ---------- */
.pv {
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg);
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.45s ease, transform 0.7s var(--ease);
}
.pv[hidden] { display: none; }
.pv.is-open { opacity: 1; transform: none; }
.pv__bar {
  position: sticky; top: 0; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--gutter);
  height: var(--bar-h); padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.pv__meta { display: grid; grid-template-columns: 1fr 2fr 2fr 1fr; gap: var(--gutter); min-width: 0; }
.pv__meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv__close { display: inline-flex; gap: 8px; align-items: center; min-height: 32px; padding: 0 4px; }
.pv__close:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }

.pv__body {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter);
  padding: clamp(20px, 3vw, 44px) var(--gutter) clamp(64px, 8vw, 120px);
}
.pv__aside {
  grid-column: 1 / 5; align-self: start;
  position: sticky; top: calc(var(--bar-h) + clamp(20px, 3vw, 44px));
}
.pv__title { font-size: clamp(32px, 3.5vw, 60px); line-height: 0.98; }
.pv__title small { display: block; font-size: 0.56em; margin-top: 0.35em; line-height: 1.05; }
.pv__desc { font-size: 16px; line-height: 1.52; max-width: 32em; margin: clamp(24px, 3vw, 40px) 0; }
.pv__facts { display: grid; grid-template-columns: max-content 1fr; column-gap: 1.6em; border-top: 1px solid var(--line); }
.pv__facts dt, .pv__facts dd { padding: 7px 0; border-bottom: 1px solid var(--line); }
.pv__facts dt { color: var(--muted); }
.pv__nav { display: flex; justify-content: space-between; margin-top: 36px; }
.pv__nav a:hover span { text-decoration: underline; text-underline-offset: 3px; }

.pv__gallery {
  grid-column: 5 / 13;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter);
  align-content: start;
}
.pv__item.is-wide { grid-column: 1 / -1; }
.pv__item img { width: 100%; background: var(--tile); }
.pv__item figcaption { margin-top: 7px; color: var(--muted); }
.pv__gallery.is-single { grid-template-columns: 1fr; }
.pv__gallery.is-single img { width: auto; max-width: 100%; max-height: calc(100svh - var(--bar-h) - 96px); }

.pv__video {
  position: relative; aspect-ratio: 16 / 9; background: var(--dark); color: #f3f3f0; overflow: hidden;
}
.pv__video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.42; transition: opacity 0.5s ease, transform 1.4s var(--ease); }
.pv__play {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  color: inherit;
}
.pv__play:hover img { opacity: 0.55; }
.pv__play-icon {
  position: relative; width: 74px; height: 74px; border-radius: 50%; border: 1px solid currentColor;
  display: grid; place-items: center; transition: background-color 0.3s ease, color 0.3s ease;
}
.pv__play:hover .pv__play-icon { background: #f3f3f0; color: var(--dark); }
.pv__play-icon::before {
  content: ""; margin-left: 5px;
  border-left: 15px solid currentColor; border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}
.pv__play-label { position: relative; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 36px); text-transform: uppercase; }
.pv__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.pv__after {
  display: block; padding: 16px var(--gutter) clamp(56px, 7vw, 110px);
  border-top: 1px solid var(--line);
}
.pv__after .caps { color: var(--muted); }
.pv__after-title { display: block; margin-top: 18px; font-size: clamp(40px, 8vw, 150px); line-height: 0.92; transition: transform 0.6s var(--ease); }
.pv__after:hover .pv__after-title { transform: translateX(0.12em); }

@media (max-width: 900px) {
  .pv__aside { grid-column: 1 / -1; position: static; margin-bottom: 24px; }
  .pv__gallery { grid-column: 1 / -1; }
  .pv__meta { grid-template-columns: auto minmax(0, 1fr); }
  .pv__meta span:nth-child(3), .pv__meta span:nth-child(4) { display: none; }
}
@media (max-width: 600px) {
  .pv__gallery { grid-template-columns: 1fr; }
}

/* ---------- Apparitions ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity 0.9s ease, transform 1.1s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .pv { transform: none; }
}

.noscript { padding: 24px var(--gutter); }

/* ---------- Pages projet (une adresse par projet) ---------- */
.bar__back { justify-self: center; padding-block: 6px; }
.bar__back:hover { text-decoration: underline; text-underline-offset: 3px; }
.crumbs {
  display: flex; flex-wrap: wrap; gap: 0.6em; align-items: center;
  padding: 10px var(--gutter); border-top: 1px solid var(--line); color: var(--muted);
}
.crumbs a { color: var(--ink); padding-block: 6px; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.project-page .pv__body { min-height: calc(100svh - var(--bar-h)); }
@media (max-width: 760px) {
  .project-page .bar { grid-template-columns: 1fr auto; }
  .bar__back { display: none; }
}

/* ---------- Page introuvable ---------- */
.lost { min-height: 100svh; display: grid; place-content: center; gap: 1.6rem; padding: var(--gutter); text-align: center; }
.lost .hero__title { white-space: normal; font-size: clamp(44px, 9vw, 140px); }
.lost a { text-decoration: underline; text-underline-offset: 3px; }
