:root {
  --wp--preset--color--primary: #AE9A7F;
  --wp--preset--color--grey: #BFBAB0;
  --wp--preset--color--white: #ffffff;
  --wp--preset--color--dark: #121212;
  --wp--preset--color--brown: #261912;
  --wp--preset--font-size--sm: 0.875rem;
  --wp--preset--font-size--base: 1rem;
  --wp--preset--font-size--lg: 1.125rem;
  --wp--preset--font-size--xl: 1.25rem;
  --wp--preset--font-size--2-xl: 1.5rem;
  --wp--preset--font-size--3-xl: 2rem;
  --wp--preset--font-size--4-xl: 2.25rem;
  --wp--preset--font-size--5-xl: 2.5rem;
  --wp--preset--font-size--6-xl: 3rem;
  --wp--preset--font-size--7-xl: 4.5rem;
  --wp--preset--font-size--8-xl: 6rem;
  --wp--preset--font-size--9-xl: 7.5rem;
  --wp--style--global--content-size: 960px;
  --wp--style--global--wide-size: 1280px;
}

html {
  background: #121212;
}

img.wp-image-358 {
  max-height: 80vh;
  object-fit: cover;
}

/* Asteria : les textes libres collent au bloc du dessus et gardent le padding bas de .prose. */
.page-asteria .prose {
  padding-top: calc(var(--spacing) * 39);
  padding-bottom: 0;
}

.page-asteria .slider-container + section .prose {
  padding-top: 0;
}

.page-asteria .prose p:last-child {
  margin-bottom: 0;
}

.page-garde-temps .prose,
.page-renaissance .prose,
.page-renaissance-origine .prose,
.page-renaissance-1776 .prose {
  padding-bottom: 0;
}

.page-garde-temps .prose p:last-child,
.page-renaissance .prose p:last-child,
.page-renaissance-origine .prose p:last-child,
.page-renaissance-1776 .prose p:last-child {
  margin-bottom: 0;
}

/* Image seule : pleine largeur, sans le retrait de la colonne de texte. */
.section-container:has(> .section-inner > figure.full) .section-inner {
  max-width: none;
  width: 100%;
  padding-inline: 0;
}

.section-container:has(> .section-inner > figure.full) img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 768px) {
  .section-container:has(> .section-inner > figure.full) img {
    aspect-ratio: 12 / 5;
    object-position: center 40%;
  }
}

/* Visuels portrait des collections : même hauteur de rangée que les paysages 3/2. */
img.imagetext-landscape {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}

altcha-widget {
  display: block;
  margin-bottom: 1.5rem;
  --altcha-color-base: #121212;
  --altcha-color-text: #ffffff;
  --altcha-color-border: rgba(174, 154, 127, 0.5);
  --altcha-border-radius: 0px;
  --altcha-max-width: 100%;
}

.scrollable-home-indicator {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.collection-card[data-collection="renaissance-1776"] {
  background-color: #FBE6D3;
  --collection-fade: #FBE6D3;
}

body:has(#primary-nav.opened) #header {
  background: #fff;
  --color: var(--wp--preset--color--brown, #261912);
  --transparency: 100%;
}

body:has(#primary-nav.opened) #header > .container {
  position: relative;
  padding-bottom: 1.25rem;
}

body:has(#primary-nav.opened) #header > .container::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  height: 1px;
  background: var(--wp--preset--color--brown, #261912);
}

body:has(#primary-nav.opened) #primary-nav .inner-menu {
  border-top-color: transparent;
}

@media (max-width: 1023px) {
  #primary-nav.opened {
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  #primary-nav.opened .inner-menu {
    max-height: none;
    overflow: visible;
  }

  #primary-nav.opened .container {
    min-height: 100%;
  }
}

.collection-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .collection-grid {
    grid-template-columns: repeat(var(--collection-cols, 5), minmax(0, 1fr));
  }
}

.collection-card-watch-wrap {
  position: absolute;
  inset: 24% 8% 12%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.45) 4%,
    #000 10%,
    #000 68%,
    rgba(0, 0, 0, 0.55) 82%,
    rgba(0, 0, 0, 0.2) 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.45) 4%,
    #000 10%,
    #000 68%,
    rgba(0, 0, 0, 0.55) 82%,
    rgba(0, 0, 0, 0.2) 92%,
    transparent 100%
  );
}

.collection-card-watch {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  transform: scale(1);
  transform-origin: center;
  transition: transform 1s;
}

@media (hover: hover) {
  .collection-card:hover .collection-card-watch {
    transform: scale(1.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .collection-card-watch {
    transition: none;
  }
}

/* Sur fond clair, le halo blanc du PNG devient beige via multiply,
   puis le même masque que les fonds foncés assure le fondu haut/bas. */
.collection-card.collection-card_light {
  isolation: isolate;
}

.collection-card.collection-card_light .collection-card-watch {
  mix-blend-mode: multiply;
}

.collection-card.collection-card_watch .collection-card-name {
  top: 7%;
  translate: -50% 0;
}

.collection-card.collection-card_watch .collection-card-name img {
  height: 1.75rem;
  width: auto;
  margin-inline: auto;
}

.collection-card.collection-card_watch .collection-card-name > span {
  font-size: var(--text-xl, 1.25rem);
  line-height: 1.15;
}

:where(.collection-card.collection-card_watch .collection-card-name > :not(:last-child)) {
  margin-block-end: 0.5rem;
}

.collection-card.collection-card_watch .collection-card-dates {
  bottom: 1.35rem;
}

.collection-card.collection-card_watch:hover .collection-card-dates {
  bottom: 1.75rem;
}

.collection-card:hover:before {
  inset: 0.5rem;
}

.collection-card.collection-card_light .collection-card-dates {
  color: var(--wp--preset--color--brown, #261912);
}

.collection-card.collection-card_row .collection-card-watch-wrap {
  inset: 16% 6% 12%;
}

@media (max-width: 1279px) {
  .collection-card.collection-card_row .collection-card-watch-wrap {
    inset: 8% 2% 8% 45%;
  }

  .collection-card.collection-card_row .collection-card-name,
  .collection-card.collection-card_row.collection-card_watch .collection-card-name {
    top: 50%;
    left: 33%;
    width: auto;
    max-width: 42%;
    translate: -50% -50%;
    text-align: left;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
  }

  .collection-card.collection-card_row .collection-card-name img,
  .collection-card.collection-card_row.collection-card_watch .collection-card-name img {
    margin: 0;
    height: 2rem;
    width: auto;
    flex-shrink: 0;
  }

  .collection-card.collection-card_row .collection-card-name > :not(:last-child),
  .collection-card.collection-card_row.collection-card_watch .collection-card-name > :not(:last-child) {
    margin-block-end: 0;
  }

  .collection-card.collection-card_row .collection-card-name > span,
  .collection-card.collection-card_row.collection-card_watch .collection-card-name > span {
    white-space: nowrap;
  }
}
