@font-face {
  font-family: "SK Modernist";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Sk-Modernist-Regular.woff2") format("woff2"),
       url("../fonts/Sk-Modernist-Regular.woff") format("woff");
}

@font-face {
  font-family: "SK Modernist";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Sk-Modernist-Bold.woff2") format("woff2"),
       url("../fonts/Sk-Modernist-Bold.woff") format("woff");
}

:root {
  --color-bg: #efefef;
  --color-text: #212121;
  --header-height: 100px;
  --page-inline: 40px;
  --font: "SK Modernist", sans-serif;
}

/* —— Custom cursor —— */
.cursor-dot {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor * {
    cursor: none !important;
  }

  .cursor-dot {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: #fff;
    pointer-events: none;
    opacity: 0;
    mix-blend-mode: difference;
    transform: translate3d(-100px, -100px, 0);
    transition: opacity 0.25s ease, width 0.2s ease, height 0.2s ease, margin 0.2s ease;
    will-change: transform;
  }

  .cursor-dot.is-ready {
    opacity: 1;
  }

  .cursor-dot.is-hover {
    width: 15px;
    height: 15px;
    margin: -7.5px 0 0 -7.5px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10001;
  padding: 10px 14px;
  background: var(--color-text);
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

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

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

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;
}

/* —— Header —— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-height);
  padding: 36px var(--page-inline);
  pointer-events: none;
}

.site-header__wordmark,
.site-nav,
.site-header__burger {
  pointer-events: auto;
}

.site-header__wordmark img {
  width: 180px;
  height: auto;
}

.site-header__burger {
  display: none;
  position: relative;
  width: 28px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.site-header__burger-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--color-text);
  transition: transform 0.25s ease, top 0.25s ease, opacity 0.2s ease;
}

.site-header__burger-line:first-child {
  top: 5px;
}

.site-header__burger-line:last-child {
  top: 13px;
}

body.is-menu-open .site-header__burger-line:first-child {
  top: 9px;
  transform: rotate(45deg);
}

body.is-menu-open .site-header__burger-line:last-child {
  top: 9px;
  transform: rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav__link {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.site-nav__link.is-active {
  font-weight: 700;
}

.rgy-languages {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.rgy-languages a {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  opacity: 0.4;
  text-transform: uppercase;
}

.rgy-languages a[aria-current="true"] {
  font-weight: 700;
  opacity: 1;
}

.rgy-languages a:hover {
  opacity: 1;
}

.rgy-languages a + a::before {
  content: "/";
  display: inline-block;
  margin-right: 6px;
  opacity: 0.7;
  pointer-events: none;
}

/* Flou menu → net au hover / sélection (desktop only) */
@media (hover: hover) and (min-width: 768px) {
  .site-nav__link,
  .rgy-languages a {
    filter: blur(1.2px);
    transition: filter 0.28s ease;
  }

  .site-nav__link.is-active,
  .site-nav__link:hover,
  .site-nav__link:focus-visible,
  .rgy-languages a[aria-current="true"],
  .rgy-languages:hover a,
  .rgy-languages:focus-within a {
    filter: blur(0);
    transition-duration: 0.08s;
  }
}

@media (hover: hover) and (min-width: 768px) and (prefers-reduced-motion: reduce) {
  .site-nav__link,
  .rgy-languages a {
    filter: none;
  }
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 28px;
  height: 28px;
  color: var(--color-text);
  text-decoration: none;
  transition: font-weight 0.15s ease;
}

.social-icon + .social-icon {
  margin-left: 10px;
}

.social-icon:not(.social-icon--newsletter)::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 1px;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.social-icon:not(.social-icon--newsletter):hover::after,
.social-icon:not(.social-icon--newsletter):focus-visible::after {
  opacity: 1;
}

.social-icon:hover {
  outline: none;
}

.social-icon--button {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.social-icon--newsletter {
  width: auto;
  height: auto;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.social-icon--newsletter:hover,
.social-icon--newsletter:focus-visible {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.social-icon__label {
  display: inline-block;
}

/* —— Newsletter modal —— */
.newsletter-modal {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: calc(100vw - 32px);
  color: var(--color-text);
}

.newsletter-modal::backdrop {
  background: rgb(33 33 33 / 0.4);
}

.newsletter-modal__panel {
  position: relative;
  width: min(400px, 100%);
  margin: auto;
  padding: 36px 28px 28px;
  background: var(--color-bg);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.12);
}

.newsletter-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  color: var(--color-text);
  cursor: pointer;
}

.newsletter-modal__title {
  margin: 0 0 0.45em;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.newsletter-modal__lead {
  margin: 0 0 1.4em;
  font-size: 14px;
  line-height: 1.5;
}

.newsletter-modal .rgy-form {
  max-width: none;
  gap: 0.9rem;
}

.newsletter-modal .rgy-form input[type="text"],
.newsletter-modal .rgy-form input[type="email"],
.newsletter-modal .rgy-form textarea,
.newsletter-modal .rgy-form select {
  border-color: rgb(33 33 33 / 0.35);
  border-radius: 0;
  background: #fff;
}

.newsletter-modal .rgy-form button {
  margin-top: 0.25rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--color-text);
  background: var(--color-text);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 13px;
}

.newsletter-modal .rgy-form button:hover {
  background: transparent;
  color: var(--color-text);
}

/* —— Home diptychs —— */
body.template-home {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.page-home {
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

.diptychs {
  position: relative;
  width: 100%;
  height: 100%;
  outline: none;
  user-select: none;
  touch-action: none;
}

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

.diptychs__viewport {
  position: absolute;
  inset: 64px 0 80px;
  overflow: hidden;
}

body.is-diptych-desktop .diptychs__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior: contain;
}

body.is-diptych-desktop .diptychs__viewport::-webkit-scrollbar {
  display: none;
}

body.is-diptych-desktop .diptychs__track {
  transition: none;
  height: 100%;
}

body.is-diptych-desktop .diptych {
  flex: 0 0 auto;
  height: 100%;
  /* Remonte un peu le bloc par rapport au centre géométrique */
  padding-bottom: 3.5vh;
  box-sizing: border-box;
}

.diptychs__nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  pointer-events: none;
}

.diptychs__thumb {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0.38;
  transition: opacity 0.2s ease;
  line-height: 0;
}

.diptychs__thumb:hover,
.diptychs__thumb:focus-visible {
  opacity: 0.75;
}

.diptychs__thumb.is-active {
  opacity: 1;
}

.diptychs__thumb-pair {
  display: flex;
  gap: 2px;
  height: 36px;
}

.diptychs__thumb-pair img {
  display: block;
  width: auto;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.diptychs__thumb-pair--solo img {
  aspect-ratio: auto;
  max-width: 56px;
}

.diptychs__track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.diptychs[data-transition="fade"] .diptychs__track {
  display: grid;
  transition: none;
}

.diptychs[data-transition="fade"] .diptych {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.diptychs[data-transition="fade"] .diptych.is-active {
  opacity: 1;
  pointer-events: auto;
}

.diptych {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--diptych-gap, 24px);
  padding: 0 48px;
  box-sizing: border-box;
}

.diptych--solo,
.diptych:has(.diptych__frame:only-child) {
  gap: 0;
}

.diptych--solo .diptych__frame img,
.diptych__frame--solo img,
.diptych--solo .diptych__frame--solo-landscape img,
.diptych__frame--solo-landscape img {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
}

.diptych--align-start,
.diptych--align-end,
.diptych--align-center {
  align-items: center;
}

.diptych__frame {
  margin: 0;
  flex: 0 0 auto;
  line-height: 0;
}

.diptych__frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center center;
}

/* Facteurs utilisés par le JS (fallback visuel avant calcul) */
.diptych__frame--xs { --frame-h-factor: 0.55; }
.diptych__frame--s  { --frame-h-factor: 0.62; }
.diptych__frame--m  { --frame-h-factor: 0.70; }
.diptych__frame--l  { --frame-h-factor: 0.78; }
.diptych__frame--xl { --frame-h-factor: 0.88; }
.diptych__frame--natural { --frame-h-factor: 0.85; }

.diptychs.is-dragging .diptychs__track {
  transition: none;
}

/* —— Gallery masonry —— */
.page-gallery {
  min-height: 100vh;
  padding: 120px 40px 80px;
}

.gallery {
  position: relative;
  width: 100%;
}

.gallery__item {
  position: absolute;
  display: block;
  margin: 0;
  overflow: hidden;
}

.gallery__item img {
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.gallery:not(.is-ready) {
  display: grid;
  grid-template-columns: repeat(var(--gallery-columns, 3), 1fr);
  gap: var(--gallery-gap, 25px);
}

.gallery:not(.is-ready) .gallery__item {
  position: relative;
}

/* —— Info page —— */
.page-info {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--page-inline);
  box-sizing: border-box;
}

@media (max-height: 900px) {
  .page-info {
    align-items: flex-start;
    padding: calc(var(--header-height) - 12px) var(--page-inline) 40px;
  }
}

.page-info__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(48px, 7vw, 120px);
  align-items: stretch;
  width: min(100%, 1200px);
  margin: 0 auto;
}

.page-info__copy {
  max-width: 32rem;
}

.page-info__title,
.page-info__studio-title {
  margin: 0 0 1em;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.page-info__text p {
  margin: 0 0 1em;
  font-size: 15px;
  line-height: 1.55;
}

.page-info__text strong {
  font-weight: 700;
}

.page-info__studio {
  margin-top: 2.75em;
}

.page-info__address {
  margin: 0 0 1em;
  font-size: 15px;
  line-height: 1.55;
}

.page-info__email,
.page-info__phone {
  margin: 0.35em 0 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.page-info__email a:hover,
.page-info__phone a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-info__social {
  display: flex;
  align-items: center;
  margin-top: 1.75em;
}

.page-info__legal {
  margin: 2.75em 0 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.page-info__legal-item {
  margin: 0;
}

.page-info__legal-item + .page-info__legal-item {
  margin-top: 0.55em;
}

.page-info__legal a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page-info__media {
  margin: 0;
  width: 100%;
  min-height: 100%;
  align-self: stretch;
}

.page-info__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* —— Default —— */
.page-default {
  min-height: 100vh;
  padding: 140px 40px 80px;
}

.page-default__inner {
  max-width: 720px;
}

.page-default h1 {
  font-size: 32px;
  font-weight: 700;
}

/* —— Responsive —— */
@media (max-width: 1100px) {
  .page-info__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
    gap: 40px;
  }
}

@media (max-width: 1024px) {
  .diptych {
    gap: 28px;
    padding: 0 28px;
  }

  .diptych__frame--xs { --frame-h-factor: 0.55; }
  .diptych__frame--s  { --frame-h-factor: 0.62; }
  .diptych__frame--m  { --frame-h-factor: 0.70; }
  .diptych__frame--l  { --frame-h-factor: 0.78; }
  .diptych__frame--xl { --frame-h-factor: 0.88; }

  .page-gallery {
    --gallery-gap: 10px;
    padding: 120px 24px 60px;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 72px;
    --page-inline: 20px;
  }

  .site-header {
    min-height: var(--header-height);
    padding: 20px var(--page-inline);
  }

  .site-header__wordmark img {
    width: 132px;
  }

  .site-header__burger {
    display: block;
    z-index: 120;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 115;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin: 0;
    background: var(--color-bg);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  body.is-menu-open .site-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.is-menu-open {
    overflow: hidden;
  }

  .site-nav__link,
  .rgy-languages a {
    font-size: 22px;
    filter: none;
  }

  .rgy-languages {
    margin-left: 0;
    margin-top: 8px;
  }

  /* Accueil mobile: scroll vertical, pas de miniatures */
  body.template-home {
    overflow: auto;
    height: auto;
  }

  body.template-home.is-menu-open {
    overflow: hidden;
  }

  .page-home {
    height: auto;
    min-height: 100vh;
    display: block;
    padding: calc(var(--header-height) - 8px) 0 40px;
  }

  .diptychs {
    height: auto;
    cursor: default;
    touch-action: auto;
    user-select: auto;
  }

  .diptychs__viewport {
    position: relative;
    inset: auto;
    overflow: visible;
  }

  .diptychs__track {
    display: flex;
    flex-direction: column;
    height: auto;
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }

  .diptychs__nav {
    display: none;
  }

  .diptych {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    flex-direction: column;
    gap: 28px;
    padding: 20px var(--page-inline);
    box-sizing: border-box;
    content-visibility: auto;
    contain-intrinsic-size: 720px;
  }

  .diptych:first-child {
    padding-top: 0;
    content-visibility: visible;
  }

  .diptych:nth-child(odd) {
    align-items: flex-start;
    padding-right: clamp(48px, 22vw, 120px);
  }

  .diptych:nth-child(even) {
    align-items: flex-end;
    padding-left: clamp(48px, 22vw, 120px);
  }

  .diptych--solo:nth-child(odd),
  .diptych--solo:nth-child(even) {
    padding-left: var(--page-inline);
    padding-right: var(--page-inline);
  }

  .diptych--solo:nth-child(odd) {
    align-items: flex-start;
  }

  .diptych--solo:nth-child(even) {
    align-items: flex-end;
  }

  .diptych__frame {
    width: min(78vw, 100%);
  }

  .diptych__frame img,
  .diptych__frame--natural img,
  .diptych__frame--solo img,
  .diptych__frame--solo-landscape img,
  .diptych--solo .diptych__frame img,
  .diptych--solo .diptych__frame--solo-landscape img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
  }

  .diptychs[data-transition="fade"] .diptych {
    grid-area: auto;
    opacity: 1;
    pointer-events: auto;
  }

  .page-gallery {
    padding: 100px 16px 60px;
  }

  .page-info {
    align-items: flex-start;
    padding: calc(var(--header-height) + 24px) var(--page-inline) 48px;
  }

  .page-default {
    padding: 110px var(--page-inline) 60px;
  }

  .page-info__layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .page-info__media {
    max-width: 420px;
    min-height: 0;
    aspect-ratio: 1 / 1;
    justify-self: start;
  }

  .page-info__media img {
    height: 100%;
  }

  .page-info__title,
  .page-info__studio-title {
    font-size: 22px;
  }
}
