/*
Theme Name: Martin Descours
Theme URI: https://art.agence-impressiv.fr
Author: Impressiv
Description: Portfolio photographique minimaliste avec scénographies horizontale, verticale et mosaïque.
Version: 1.15.0
Text Domain: martin-descours
*/

:root {
  --sidebar: 268px;
  --ink: #111;
  --paper: #f2f1ed;
  --muted: #777;
  --line: rgba(17, 17, 17, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }

.site-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  padding: 39px 28px 39px 34px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: var(--paper);
}
.site-name {
  display: inline-block;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.site-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-left: 24px; }
.project-nav { margin-top: 118px; }
.secondary-nav { margin-top: auto; gap: 20px; }
.site-nav a { position: relative; color: #777; transition: color .2s ease; }
.site-nav a:hover, .site-nav a.is-active { color: var(--ink); }
.site-nav a.is-active::before {
  content: "";
  position: absolute;
  top: .65em;
  right: calc(100% + 11px);
  width: 13px;
  height: 2px;
  background: var(--ink);
}
.sidebar-footer { margin-top: 34px; color: #8a8a8a; font-size: 11px; letter-spacing: .04em; }

.site-main {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.project-page {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 52px;
  height: 100dvh;
  min-height: 640px;
  overflow: hidden;
}
.admin-bar .project-page { height: calc(100dvh - 32px); }
.project-settings {
  position: fixed;
  z-index: 52;
  right: 24px;
  bottom: 22px;
  padding: 12px 20px;
  border: 2px solid #0666c7;
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 26px rgba(23,23,21,.16), 0 2px 5px rgba(23,23,21,.09);
  color: var(--ink);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: transform .22s ease, background .22s ease, box-shadow .22s ease;
}
.project-settings:hover {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: 0 14px 32px rgba(23,23,21,.19), 0 3px 7px rgba(23,23,21,.1);
}
.project-settings:focus-visible { outline: 2px solid #0666c7; outline-offset: 2px; }
.project-settings-panel {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  width: min(390px, calc(100vw - 24px));
  height: 100dvh;
  padding: 38px 30px 100px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: rgba(248,247,243,.98);
  box-shadow: -18px 0 50px rgba(23,23,21,.08);
  transform: translateX(105%);
  transition: transform .42s cubic-bezier(.22,1,.36,1);
}
.admin-bar .project-settings-panel { top: 32px; height: calc(100dvh - 32px); }
.project-settings-panel.is-open { transform: translateX(0); }
.settings-heading { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.settings-heading span,
.project-settings-panel legend,
.settings-select > span,
.settings-text > span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.settings-heading h2 {
  margin: 9px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.15;
}
.project-settings-panel fieldset { margin: 30px 0 0; padding: 0; border: 0; }
.settings-segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 13px;
  border: 1px solid var(--line);
}
.settings-segmented button {
  padding: 11px 5px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: #65635d;
  cursor: pointer;
  font-size: 11px;
}
.settings-segmented button:last-child { border-right: 0; }
.settings-segmented button.is-selected { background: var(--ink); color: var(--paper); }
.settings-select { display: block; margin-top: 31px; }
.settings-select > span { display: block; margin-bottom: 11px; }
.settings-select select {
  width: 100%;
  padding: 11px 36px 11px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: rgba(255,255,255,.6);
  font-size: 12px;
}
.settings-switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  cursor: pointer;
}
.settings-switch > span { display: flex; flex-direction: column; gap: 4px; }
.settings-switch strong { font-size: 13px; font-weight: 500; }
.settings-switch small { color: var(--muted); font-size: 10px; }
.settings-switch input { position: absolute; opacity: 0; }
.settings-switch i {
  position: relative;
  width: 39px;
  height: 21px;
  border-radius: 99px;
  background: #d4d2cc;
  transition: background .2s ease;
}
.settings-switch i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform .2s ease;
}
.settings-switch input:checked + i { background: var(--ink); }
.settings-switch input:checked + i::after { transform: translateX(18px); }
.settings-text { display: block; margin-top: 34px; }
.settings-text textarea {
  width: 100%;
  margin-top: 12px;
  padding: 13px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  background: rgba(255,255,255,.6);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1.5;
}
.settings-text textarea:focus { border-color: var(--ink); background: #fff; }
.settings-note,
.settings-status { margin-top: 24px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.settings-status { min-height: 15px; margin-top: 8px; }
.project-intro {
  display: grid;
  grid-template-columns: minmax(220px, .62fr) minmax(0, 1.38fr);
  grid-template-rows: auto auto;
  column-gap: clamp(56px, 7vw, 132px);
  row-gap: 0;
  padding: clamp(56px, 5.2vh, 82px) clamp(52px, 5.5vw, 104px)
    clamp(72px, 8vh, 112px) clamp(44px, 4.2vw, 80px);
}
.project-meta { display: contents; }
.project-kicker {
  display: flex;
  grid-column: 1;
  grid-row: 1;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.project-title {
  grid-column: 1;
  grid-row: 2;
  max-width: 390px;
  margin: 32px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3.2vw, 52px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.035em;
}
.project-copy {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
  max-width: 920px;
  margin: 0;
  align-self: center;
  color: #4d4b46;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.5;
}
.project-copy,
.project-copy * {
  font-family: Georgia, "Times New Roman", serif;
}
.project-copy > :first-child { margin-top: 0; }
.project-copy > :last-child { margin-bottom: 0; }

.media-stage {
  min-height: 0;
  overflow: hidden;
}
.media-track.horizontal {
  height: 100%;
  display: flex;
  align-items: center;
  gap: clamp(72px, 7vw, 138px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 0 56px;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.media-track.horizontal::-webkit-scrollbar { display: none; }
.opening-space { flex: 0 0 clamp(96px, 11vw, 220px); }
.horizontal .artwork {
  --media-height: min(56vh, 680px);
  flex: 0 0 auto;
  display: grid;
  grid-template-rows: var(--media-height) 19px;
  width: auto;
  height: calc(var(--media-height) + 19px);
  margin: 0;
  scroll-snap-align: center;
}
.horizontal .artwork img,
.horizontal .video-shell {
  width: auto;
  height: var(--media-height);
  max-width: none;
  object-fit: contain;
}
.horizontal .artwork figcaption {
  margin-top: 10px;
  color: #8b8982;
  font-size: 9px;
  letter-spacing: .14em;
}
.closing-space {
  display: flex;
  flex: 0 0 35vw;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.closing-space span {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--ink);
}
.project-progress {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 36px 24px 42px;
  background: var(--paper);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .12em;
}
.progress-line { width: min(420px, 36vw); height: 2px; background: rgba(17,17,17,.18); }
.progress-line i { display: block; height: 2px; background: var(--ink); transition: width .35s ease; }
.project-page.layout-vertical,
.project-page.layout-mosaic {
  display: block;
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}
.admin-bar .project-page.layout-vertical,
.admin-bar .project-page.layout-mosaic { height: auto; }
.layout-vertical .media-stage,
.layout-mosaic .media-stage {
  min-height: 0;
  overflow: visible;
}
.media-track.vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(88px, 12vh, 170px);
  height: auto;
  overflow: visible;
  padding: clamp(88px, 12vh, 160px) clamp(52px, 7vw, 128px) 190px;
}
.vertical .opening-space,
.vertical .closing-space,
.layout-vertical .project-progress { display: none; }
.vertical .artwork {
  width: min(59.2vw, 864px);
  margin: 0;
}
.vertical .artwork img,
.vertical .video-shell {
  width: 100%;
  height: auto;
  max-width: none;
  max-height: none;
}
.vertical .artwork figcaption,
.mosaic .artwork figcaption {
  margin-top: 10px;
  color: #8b8982;
  font-size: 9px;
  letter-spacing: .14em;
}
.mosaic .artwork figcaption {
  display: none;
}
.media-track.mosaic {
  --mosaic-gap: clamp(24px, 2.6vw, 52px);
  display: block;
  column-count: 3;
  column-gap: var(--mosaic-gap);
  height: auto;
  overflow: visible;
  padding: clamp(100px, 13vh, 180px) clamp(42px, 5vw, 96px) 210px;
}
.mosaic .opening-space,
.mosaic .closing-space,
.layout-mosaic .project-progress { display: none; }
.mosaic .artwork {
  display: inline-block;
  break-inside: avoid;
  width: 100%;
  margin: 0 0 var(--mosaic-gap);
}
.mosaic .artwork img,
.mosaic .video-shell {
  width: 100%;
  height: auto;
}
.mosaic-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  line-height: 0;
}
.mosaic .mosaic-image-button {
  cursor: zoom-in;
}
.horizontal .mosaic-image-button {
  width: auto;
  height: var(--media-height);
}
.vertical .mosaic-image-button {
  width: 100%;
}
.mosaic-lightbox {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 76px);
  background: rgba(22, 31, 38, .82);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility 0s linear .42s;
}
.mosaic-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .28s ease, visibility 0s linear 0s;
}
.mosaic-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transform:
    translate(var(--lightbox-from-x, 0), var(--lightbox-from-y, 28px))
    scale(var(--lightbox-from-scale, .82));
  transform-origin: center;
  transition:
    transform .48s cubic-bezier(.22, 1, .36, 1),
    opacity .24s ease;
  will-change: transform, opacity;
}
.mosaic-lightbox.is-ready img {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}
.mosaic-lightbox.is-moving-next img {
  opacity: 0;
  transform: translateX(-42px) scale(.98);
  transition-duration: .18s;
}
.mosaic-lightbox.is-moving-prev img {
  opacity: 0;
  transform: translateX(42px) scale(.98);
  transition-duration: .18s;
}
.mosaic-lightbox-close {
  position: fixed;
  z-index: 2;
  top: 24px;
  left: calc(100% - 72px);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid #238cff;
  border-radius: 50%;
  background: #132a3a;
  color: #fff;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .22);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
  opacity: 0;
  transform: scale(.82);
  transition:
    opacity .2s ease .16s,
    transform .34s cubic-bezier(.22, 1, .36, 1),
    background-color .2s ease;
}
.mosaic-lightbox.is-ready .mosaic-lightbox-close {
  opacity: 1;
  transform: scale(1);
}
.mosaic-lightbox-close:hover,
.mosaic-lightbox-close:focus-visible {
  background: #1b3a4e;
}
.mosaic-lightbox-arrow {
  position: fixed;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 64px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 54px;
  font-weight: 200;
  line-height: 1;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.82);
  transition:
    opacity .2s ease .16s,
    transform .34s cubic-bezier(.22, 1, .36, 1),
    color .2s ease;
}
.mosaic-lightbox-prev { left: 16.6667%; }
.mosaic-lightbox-next { left: 83.3333%; }
.mosaic-lightbox.is-ready .mosaic-lightbox-arrow {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.mosaic-lightbox-arrow:hover,
.mosaic-lightbox-arrow:focus-visible {
  color: rgba(255, 255, 255, .72);
}
.mosaic-lightbox-arrow[hidden] {
  display: none;
}
body.mosaic-lightbox-open {
  overflow: hidden;
}

.artwork.is-framed {
  padding: clamp(10px, 1.25vw, 20px);
  background: #fff;
  box-shadow: 0 5px 22px rgba(0, 0, 0, .08);
}
.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}
.video-shell img { width: 100%; height: 100%; object-fit: cover; }
.video-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 50%;
  background: rgba(0,0,0,.22);
  color: #fff;
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.video-play::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 19px;
  border-left: 17px solid #fff;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}
.empty-project { padding: 40px 3.5vw; color: var(--muted); }

.page-eyebrow {
  color: #85827a;
  font-size: 10px;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.about-page {
  position: relative;
  min-height: 100dvh;
  padding: 34px 6vw 66px 3.8vw;
}
.about-page h1 {
  max-width: 1040px;
  margin: 76px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(76px, 8.5vw, 148px);
  font-weight: 400;
  line-height: .93;
  letter-spacing: -.055em;
}
.about-copy {
  width: min(720px, 52vw);
  margin: 78px 4vw 90px auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 1.75vw, 27px);
  line-height: 1.42;
}
.about-copy p { margin: 0 0 1.55em; }
.about-signature {
  position: absolute;
  bottom: 25px;
  left: 3.8vw;
  color: #85827a;
  font-size: 10px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.contact-page {
  min-height: 100dvh;
  padding: 34px 7.5vw 90px 3.8vw;
}
.contact-page h1 {
  max-width: 1120px;
  margin: 74px 0 86px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(70px, 8.2vw, 142px);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.045em;
}
.contact-email {
  display: inline-block;
  border-bottom: 1px solid;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3.2vw, 50px);
  line-height: 1.12;
}
.contact-form-wrap {
  width: min(940px, 72vw);
  margin: 92px 0 0 auto;
}
.art-form {
  padding: clamp(38px, 4vw, 62px);
  box-shadow: 0 16px 44px rgba(17,17,17,.07);
  background: rgba(255,255,255,.9);
}
.art-form label { display: block; margin-bottom: 32px; color: #85827a; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.art-form input, .art-form textarea {
  width: 100%;
  margin-top: 7px;
  padding: 18px 0 28px;
  border: 0;
  border-bottom: 1px solid #999;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}
.art-form textarea { min-height: 180px; resize: vertical; }
.art-form button {
  display: flex;
  width: 100%;
  justify-content: space-between;
  padding: 16px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}
.art-form button span { font-size: 24px; line-height: .6; }
.form-note { margin: 14px 0 0; color: #85827a; font-size: 10px; letter-spacing: .04em; }

@media (max-width: 1180px) and (min-width: 761px) {
  :root { --sidebar: 230px; }
  .site-sidebar { padding-left: 28px; }
  .project-nav { margin-top: 92px; }
  .project-intro {
    grid-template-columns: minmax(180px, .62fr) minmax(0, 1.38fr);
    column-gap: 4vw;
    padding: 32px 34px 18px 30px;
  }
  .project-title { font-size: clamp(30px, 4vw, 46px); }
  .project-copy { font-size: clamp(14px, 1.7vw, 17px); }
  .horizontal .artwork { --media-height: min(54vh, 560px); }
}

@media (max-width: 760px) {
  :root { --sidebar: 0px; }
  .site-sidebar {
    position: relative;
    width: 100%;
    min-height: auto;
    padding: 20px 18px 16px;
    border-bottom: 1px solid var(--line);
  }
  .site-name { margin-bottom: 17px; }
  .site-nav { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; padding-left: 0; }
  .project-nav { margin-top: 0; }
  .secondary-nav { margin-top: 13px; }
  .sidebar-footer { display: none; }
  .site-main { margin-left: 0; }
  .project-page { height: auto; min-height: calc(100vh - 100px); display: block; overflow: visible; }
  .project-intro { display: block; padding: 38px 18px 32px; }
  .project-copy { margin-top: 28px; }
  .media-stage { height: 62vh; min-height: 360px; overflow: visible; }
  .media-track.horizontal {
    height: 100%;
    padding: 8px 28px 30px 18px;
    gap: 22px;
  }
  .horizontal .artwork { --media-height: min(55vh, 520px); height: calc(var(--media-height) + 19px); }
  .opening-space { display: none; }
  .project-progress { padding-left: 18px; }
  .media-track.vertical { gap: 44px; padding: 34px 18px 80px; }
  .vertical .artwork { width: min(65.6vw, 736px); }
  .layout-vertical .media-stage,
  .layout-mosaic .media-stage { height: auto; min-height: 0; }
  .media-track.mosaic {
    column-count: 2;
    column-gap: 14px;
    padding: 34px 18px 80px;
  }
  .mosaic .artwork { margin-bottom: 42px; }
  .admin-bar .project-page { height: auto; }
  .project-settings { right: 14px; bottom: 14px; }
  .project-settings-panel { width: calc(100vw - 3px); }
  .about-page { min-height: auto; padding: 48px 18px 80px; }
  .about-page h1 { margin-top: 44px; font-size: clamp(52px, 16vw, 80px); }
  .about-copy { width: 100%; margin: 56px 0 50px; font-size: 19px; }
  .about-signature { position: static; }
  .contact-page { padding: 60px 18px; }
  .contact-page h1 { margin: 44px 0 58px; font-size: clamp(52px, 15vw, 78px); }
  .contact-email { font-size: 28px; }
  .contact-form-wrap { width: 100%; margin-top: 62px; }
  .art-form { padding: 28px 22px; }
}

@media (max-width: 480px) {
  .media-track.mosaic { column-count: 1; }
}

@media screen and (max-width: 782px) {
  .admin-bar .project-page { height: auto; }
  .admin-bar .project-settings-panel { top: 46px; height: calc(100dvh - 46px); }
}
