@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100;700&display=swap");
@import url("https://fonts.cdnfonts.com/css/east-liberty-signature");

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #20201d;
  --muted: #6f6c64;
  --line: #e6e6e6;
  --accent: #8d2f2f;
  --accent-strong: #682121;
  --shadow: 0 18px 45px rgba(48, 38, 26, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-path]:not([data-path=""]) {
  --bg: #000000;
  --surface: #000000;
  --ink: #ffffff;
  --muted: #d8d8d8;
  --line: #ffffff;
  background: #000000;
  color: #ffffff;
}

body[data-path]:not([data-path=""]) .topbar,
body[data-path]:not([data-path=""]) .hero-media,
body[data-path]:not([data-path=""]) .hero-media img,
body[data-path]:not([data-path=""]) .card,
body[data-path]:not([data-path=""]) .card img,
body[data-path]:not([data-path=""]) .gallery-item,
body[data-path]:not([data-path=""]) .gallery-item img,
body[data-path]:not([data-path=""]) .empty {
  background: #000000;
  color: #ffffff;
}

body[data-path]:not([data-path=""]) .topbar {
  border-bottom-color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  background: #ffffff;
}

.header-brand {
  width: min(1160px, calc(100% - 32px));
  min-height: 5cm;
  margin: 0 auto;
  padding-top: 2cm;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.header-signature {
  font-family: "East liberty signature", "Roboto", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 150px;
  font-weight: 400;
  line-height: 1;
  text-align: left;
}

.header-brand-visual {
  width: min(30.4vw, 336px);
}

.header-brand-image {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.header-line {
  width: 100%;
  height: 1px;
  background: currentColor;
}

.header-artist-row {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
}

.header-artist {
  width: min(30.4vw, 336px);
  margin-top: 8px;
  font-family: "Roboto", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 30px;
  font-weight: 100;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.header-image {
  width: 80%;
  height: auto;
  object-fit: contain;
}

.wrap {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: clamp(16px, 2.5vw, 30px) 0;
}

.section-title {
  margin: 0 0 18px;
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
  line-height: 1.1;
}

.home-universe-title {
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid currentColor;
  font-family: "Roboto", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 4.6rem;
  font-weight: 100;
  line-height: 0.98;
}

.lead {
  max-width: 760px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.carousel {
  position: relative;
  overflow: hidden;
  min-height: clamp(208px, 37.6vw, 448px);
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: clamp(10px, 2vw, 22px);
  background: #ffffff;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 700ms ease, transform 900ms ease;
}

.carousel img.is-active {
  opacity: 1;
  transform: scale(1);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(230, 230, 230, 0.9);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 66px;
}

.brand {
  font-weight: 780;
  letter-spacing: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  box-shadow: 0 8px 24px rgba(48, 38, 26, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.back-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent-strong);
}

.hero {
  display: grid;
  gap: 22px;
  padding: clamp(30px, 6vw, 72px) 0 clamp(28px, 4vw, 48px);
}

.hero h1 {
  margin: 0;
  font-family: "Roboto", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 4.6rem;
  font-weight: 100;
  line-height: 0.98;
}

.hero-title {
  position: relative;
  padding-bottom: 14px;
  padding-right: min(18vw, 170px);
  border-bottom: 1px solid currentColor;
}

.hero-title-image {
  position: absolute;
  right: 0;
  bottom: 8px;
  width: min(16vw, 150px);
  height: auto;
  object-fit: contain;
}

.hero-media {
  display: flex;
  gap: 20px;
  overflow: hidden;
  border-radius: 0;
  border: 0;
  background: #ffffff;
  box-shadow: none;
}

.hero-media img {
  flex: 1;
  max-height: 620px;
  object-fit: contain;
  background: #ffffff;
}

.hero-media-link {
  display: flex;
  flex: 1;
}

.hero-media-link img {
  width: 100%;
}

body[data-path="EXPOSITION/GALERIE VIRTUELLE"] .hero-media-link {
  flex: 0 1 auto;
  display: grid;
  grid-template-rows: min(38vw, 420px) auto;
  justify-items: center;
  align-items: end;
  color: inherit;
  text-decoration: none;
}

body[data-path="EXPOSITION/GALERIE VIRTUELLE"] .hero-media {
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
}

body[data-path="EXPOSITION/GALERIE VIRTUELLE"] .hero-media-link img {
  width: min(38vw, 420px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  align-self: end;
}

body[data-path="EXPOSITION/GALERIE VIRTUELLE"] .hero-media-link:first-child img {
  width: min(30.4vw, 336px);
  transform: translateY(0.2%);
}

body[data-path="EXPOSITION/GALERIE VIRTUELLE"] .hero-media-link:nth-child(2) img {
  width: min(31.5vw, 342px);
  transform: translateY(0.2%);
}

body[data-path="EXPOSITION/GALERIE VIRTUELLE"] .hero-media-link span {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 14px 15px;
  font-family: "Roboto", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 2em;
  font-weight: 100;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.card {
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: none;
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #ffffff;
}

body[data-path="EXPOSITION"] #children-grid .card[href$="GALERIE%20VIRTUELLE/"] img,
body[data-path="EXPOSITION"] #children-grid .card[href$="GALERIE%20VIRTUELLE"] img {
  transform: translateY(-2cm);
}

.card span {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 54px;
  padding: 14px 15px;
  font-family: "Roboto", Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 2.3rem;
  font-weight: 100;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: break-word;
}

body[data-path="PARCOURS"] #children-grid {
  display: flex;
  justify-content: center;
  gap: 4cm;
}

body[data-path="PARCOURS"] #children-grid .card {
  flex: 0 0 min(7cm, calc((100% - 18px) / 2));
}

body[data-path="PARCOURS"] #children-grid .card img {
  width: min(7cm, 100%);
  height: min(7cm, calc((100vw - 50px) / 2));
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
}

body[data-path="PEINTURE"] #children-grid .card img {
  width: min(7cm, 100%);
  height: min(7cm, calc((100vw - 50px) / 2));
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

body[data-path="PEINTURE"] #children-grid .card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

body[data-path="PEINTURE"] #children-grid .card span {
  order: -1;
  width: auto;
  min-height: 7cm;
  padding: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  white-space: nowrap;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.gallery-row {
  display: flex;
  justify-content: center;
  gap: 22px;
  width: 100%;
}

.gallery-item {
  display: flex;
  justify-content: center;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  max-width: 100%;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 220ms ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

body[data-path="SCULPTURE"] .gallery {
  align-items: center;
}

body[data-path="SCULPTURE"] .gallery-row {
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

body[data-path="SCULPTURE"] .gallery-frame {
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: #000000;
}

body[data-path="SCULPTURE"] .gallery-item img {
  object-fit: contain;
}

.documents {
  display: grid;
  gap: 18px;
}

.document-viewer {
  display: grid;
  gap: 12px;
}

.document-viewer iframe {
  width: 100%;
  height: min(78vh, 960px);
  min-height: 640px;
  border: 0;
  background: #ffffff;
}

.document-link {
  justify-self: center;
  padding: 10px 14px;
  border-radius: 6px;
  background: #111111;
  color: #ffffff;
  font-weight: 700;
}

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #ffffff;
}

.dark-gallery-page {
  background: #000000;
  color: #ffffff;
}

.dark-gallery-page .topbar {
  border-bottom-color: #1f1f1f;
  background: rgba(0, 0, 0, 0.92);
}

.dark-gallery-page .back-link {
  border-color: #333333;
  background: #000000;
  color: #ffffff;
  box-shadow: none;
}

.dark-gallery-page .back-link:hover {
  border-color: #ffffff;
  color: #ffffff;
}

.dark-gallery-page .hero-media,
.dark-gallery-page .hero-media img,
.dark-gallery-page .gallery-item,
.dark-gallery-page .gallery-item img,
.dark-gallery-page .empty {
  background: #000000;
}

.dark-gallery-page .empty {
  border-color: #333333;
  color: #ffffff;
}

@media (max-width: 700px) {
  .header-brand {
    width: min(100% - 22px, 1160px);
    min-height: auto;
    padding-top: 28px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  .header-signature {
    max-width: 100%;
    font-size: clamp(86px, 30vw, 130px);
    text-align: center;
    overflow-wrap: break-word;
  }

  .header-brand-visual {
    width: min(54vw, 190px);
  }

  .header-artist-row {
    width: min(100% - 22px, 1160px);
    justify-content: center;
  }

  .header-artist {
    width: 100%;
    margin-top: 10px;
    font-size: 24px;
    text-align: center;
  }

  .wrap {
    width: min(100% - 22px, 1160px);
  }

  .topbar-inner {
    align-items: flex-end;
    padding: 12px 0;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .home-universe-title {
    font-size: 2.8rem;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  body[data-path="PEINTURE"] #children-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    gap: 16px;
  }

  .gallery-row {
    gap: 16px;
  }

  .card span {
    min-height: 48px;
    padding: 11px;
    font-size: 1.4rem;
  }

  body[data-path="EXPOSITION/GALERIE VIRTUELLE"] .hero-media-link span {
    min-height: 48px;
    padding: 11px;
    font-size: 0.94rem;
  }

  body[data-path="EXPOSITION/GALERIE VIRTUELLE"] .hero-media-link img,
  body[data-path="EXPOSITION/GALERIE VIRTUELLE"] .hero-media-link:nth-child(2) img {
    width: min(44vw, 280px);
  }

  body[data-path="EXPOSITION/GALERIE VIRTUELLE"] .hero-media-link:nth-child(2) img {
    width: min(47.52vw, 302px);
  }

  body[data-path="EXPOSITION/GALERIE VIRTUELLE"] .hero-media-link:first-child img {
    width: min(35.2vw, 224px);
  }

  body[data-path="EXPOSITION/GALERIE VIRTUELLE"] .hero-media-link {
    grid-template-rows: min(44vw, 280px) auto;
  }
}
