@font-face {
  font-family: "Delight";
  src: url("assets/fonts/delight-regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Delight";
  src: url("assets/fonts/delight-medium.otf") format("opentype");
  font-weight: 500 900;
  font-style: normal;
  font-display: swap;
}

body,
button,
h1,
h2,
h3,
.brand,
.contact-page h1,
#portrait-placeholder > span {
  font-family: "Delight", Arial, sans-serif;
}

body {
  font-weight: 400;
}
.header nav {
  font-size: 14px;
}
.project-info h3 {
  font-weight: 500 !important;
}
.project:has(a) .project-info {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(0, 0, 0, 0.84);
  justify-content: center;
  padding: 24px;
}
.project:has(a):hover .project-info,
.project:has(a):focus-within .project-info {
  opacity: 1;
}
.project:has(a) .project-info h3 {
  font-size: clamp(16px, 1.7vw, 25px);
  text-transform: uppercase;
  color: white;
}
.project-page {
  padding: 0 4% 50px;
}
.project-heading {
  text-align: center;
  max-width: 900px;
  margin: 10px auto 60px;
}
.project-heading h1 {
  font-family: "Delight", Arial, sans-serif;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 400;
  letter-spacing: -0.2px;
  line-height: 1.3;
  margin: 0 0 22px;
}
.project-heading p {
  white-space: pre-line;
  font-size: 17px;
  line-height: 1.6;
  color: #999;
  margin: 6px 0;
}
.project-heading p:empty {
  display: none;
}
.instagram-project-link {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.05em;
}
.instagram-project-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 16px;
}
.instagram-project-links[hidden] {
  display: none;
}
.detail-player {
  position: relative;
  aspect-ratio: 16/9;
  width: 100%;
  background: #151515;
}
.project-videos {
  display: grid;
  grid-template-columns: repeat(var(--video-columns, 1), minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
.project-videos.video-columns-2 {
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
}
.project-videos.video-columns-3 {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
}
.project-video {
  min-width: 0;
}
.project-video h2 {
  margin: 0 0 18px;
  text-align: center;
  font-size: clamp(18px, 1.8vw, 25px);
  font-weight: 400;
}
.detail-player iframe,
.detail-player img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}
.detail-local-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.detail-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  margin: 0;
  color: #aaa;
  background: #0005;
}
.detail-stills {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}
.detail-stills img {
  display: block;
  width: 100%;
  height: auto;
}
.project-pagination {
  font-weight: 400;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 45px;
  font-size: 13px;
}
@media (max-width: 700px) {
  .project-videos {
    grid-template-columns: 1fr;
  }
  .project-page {
    padding: 15px 4% 30px;
  }
  .project-heading {
    margin: 0 auto 35px;
  }
  .project-heading p {
    font-size: 14px;
  }
  .project-pagination {
    font-size: 12px;
  }
  .detail-placeholder {
    font-size: 12px;
  }
}
@media (hover: none) {
  .project:has(a) .project-info {
    opacity: 1;
    justify-content: flex-end;
    background: linear-gradient(transparent 30%, rgba(0, 0, 0, 0.85));
    padding: 18px;
  }
}

/* Mixed 4:3 and 16:9 projects: preserve the entire picture. */
.header nav {
  font-size: 20px;
  font-weight: 500;
  gap: 32px;
}
.project .project-visual,
.project-1 .project-visual,
.project-2 .project-visual {
  aspect-ratio: 16 / 9;
  background: #000;
}
.project .project-visual img,
.project .project-preview,
.detail-player img {
  object-fit: contain;
  background: #000;
}
.detail-player {
  background: #000;
  max-width: 1440px;
  margin-inline: auto;
}
.detail-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 12px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}
.video-gallery[hidden] {
  display: none;
}
.video-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 0;
  border: 0;
  color: #f6f6f6;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.video-card-visual {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #151515;
}
.video-card-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease, opacity 240ms ease;
}
.video-card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding-left: 3px;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  transform: translate(-50%, -50%);
  transition: background 180ms ease, transform 180ms ease;
}
.video-card-title {
  font-size: 15px;
  line-height: 1.25;
}
.video-card:hover .video-card-visual img,
.video-card:focus-visible .video-card-visual img {
  opacity: 0.82;
  transform: scale(1.025);
}
.video-card:hover .video-card-play,
.video-card:focus-visible .video-card-play {
  background: #e62117;
  transform: translate(-50%, -50%) scale(1.06);
}
.video-lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 70px max(20px, 7vw);
  border: 0;
  background: rgba(5, 5, 5, 0.96);
}
.video-lightbox[open] {
  display: grid;
  place-items: center;
}
.video-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.92);
}
.video-modal-player {
  position: relative;
  width: min(1400px, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-modal-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #292929;
  cursor: pointer;
}
@media (max-width: 700px) {
  .header nav {
    font-size: 16px;
    gap: 20px;
  }
}
@media (max-width: 380px) {
  .header nav {
    font-size: 14px;
    gap: 14px;
  }
}

/* Le lecteur reste visible dans la fenêtre, y compris pour les films 4:3. */
.detail-player {
  max-width: min(1440px, 135svh);
}

/* Accueil : nom parfaitement centré, navigation et réseau aux extrémités. */
.gallery-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  height: 148px;
  padding: 0 4%;
  align-items: center;
  gap: 24px;
}
.gallery-header nav {
  justify-self: start;
  font-size: 18px;
  font-weight: 400;
  gap: 26px;
  text-transform: uppercase;
}
.gallery-header .header-identity {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
}
.gallery-header .header-name {
  font-family: "Delight", Arial, sans-serif;
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.gallery-header .work-nav {
  display: flex;
  gap: 24px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.gallery-header .work-nav a {
  padding-bottom: 5px;
  color: #777;
  border-bottom: 1px solid transparent;
}
.gallery-header .work-nav a:hover,
.gallery-header .work-nav a:focus-visible,
.gallery-header .work-nav a[aria-current="page"] {
  color: #fff;
  border-bottom-color: currentColor;
}
.gallery-header .instagram-link {
  justify-self: end;
}
@media (max-width: 1000px) {
  .gallery-header nav {
    font-size: 14px;
    gap: 18px;
  }
  .gallery-header .header-name {
    font-size: 27px;
  }
  .gallery-header .work-nav {
    gap: 20px;
    font-size: 12px;
  }
}
@media (max-width: 700px) {
  .gallery-header {
    height: auto;
    min-height: 135px;
    grid-template-columns: 1fr auto;
    padding: 22px 6% 18px;
    gap: 20px;
  }
  .gallery-header .header-identity {
    display: contents;
  }
  .gallery-header .header-name {
    font-size: 27px;
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }
  .gallery-header .work-nav {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: center;
    margin-top: 0;
  }
  .gallery-header nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-self: center;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 12px;
    gap: 12px 18px;
  }
  .gallery-header .instagram-link {
    grid-row: 1;
    grid-column: 2;
  }
}

/* Photogrammes sous le film, agrandissement au clic. */
.detail-stills {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1440px;
  gap: 8px;
  margin: 55px auto 0;
}
.still-row {
  display: grid;
  grid-template-columns: repeat(var(--row-columns), minmax(0, 1fr));
  gap: 8px;
}
.still-thumbnail {
  display: block;
  padding: 0;
  border: 0;
  background: #080808;
  cursor: zoom-in;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.detail-stills .still-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 60px 70px;
  background: rgba(8, 8, 8, 0.98);
}
.photo-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-lightbox > img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.photo-lightbox button {
  position: absolute;
  border: 0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  background: #292929;
  color: white;
  font-size: 23px;
}
.photo-close {
  top: 14px;
  right: 18px;
}
.photo-previous {
  left: 12px;
  top: calc(50% - 22px);
}
.photo-next {
  right: 12px;
  top: calc(50% - 22px);
}
.photo-count {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 13px;
}
@media (max-width: 1100px) {
  .video-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .still-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .video-gallery {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .video-lightbox {
    padding: 64px 10px;
  }
  .detail-stills {
    gap: 8px;
    margin-top: 32px;
  }
  .still-row {
    grid-template-columns: 1fr;
  }
  .photo-lightbox {
    padding: 64px 12px;
  }
  .photo-previous,
  .photo-next {
    top: auto;
    bottom: 10px;
  }
  .photo-count {
    pointer-events: none;
  }
}
