.obr-dates-poster {
  --bg: #0a0a0a;
  --ink: #ffffff;
  --accent: #f5e800;
  --watermark: #ffffff;
  --font-size-edition: 1.2rem;
  --overlap-edition: 1rem;
  --obr-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Match Elementor #2747c85 (Haut) frame */
  --obr-frame: var(--e-global-color-v4-blanc, #f6f6f6);
  background: var(--bg);
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
  display: grid;
  place-items: center;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  border-style: solid;
  border-width: 0 24px 0 24px;
  border-color: var(--obr-frame);
  border-radius: 0px 0px 70px 70px;
}

@media (max-width: 1024px) {
  .obr-dates-poster {
    border-width: 0 16px 0 16px;
  }
}

@media (max-width: 767px) {
  .obr-dates-poster {
    border-width: 0 8px 0 8px;
  }
}

.obr-dates-poster *,
.obr-dates-poster *::before,
.obr-dates-poster *::after {
  box-sizing: border-box;
}

.obr-dates-poster .poster {
  position: relative;
  width: min(100%, 72vh);
  aspect-ratio: 9 / 12.5;
  max-height: min(100vh, 900px);
  background: var(--bg);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 0 auto;
  container-type: inline-size;
  container-name: obr-poster;
  max-height: 450px;
}

/* Background watermark — same vertical stack as the date */
.obr-dates-poster .watermarks {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.obr-dates-poster .watermarks .date {
  --watermark-angle: -15deg;
  color: var(--watermark);
  opacity: 0.25;
  user-select: none;
  transform: rotate(var(--watermark-angle));
  width: 100%;
  padding-bottom: 0;
}

/* Central date block — yellow [ ] sit outside the block */
.obr-dates-poster .date-block {
  /* Stroke from poster cqw — % in a custom prop breaks calc() multiplication */
  --column-width: 38%;
  --bracket-stroke: max(2px, calc(100cqw * 0.0084));
  --bracket-arm: calc(var(--bracket-stroke) * 3.2);
  --bracket-gap: calc(var(--bracket-stroke) * 1.1);
  position: relative;
  z-index: 1;
  width: var(--column-width);
}

.obr-dates-poster .date-block::before,
.obr-dates-poster .date-block::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--bracket-arm);
  box-sizing: border-box;
  border: 0 solid var(--accent);
  pointer-events: none;
}

/* Left bracket [ */
.obr-dates-poster .date-block::before {
  left: calc(-1 * (var(--bracket-arm) + var(--bracket-gap)));
  border-top-width: var(--bracket-stroke);
  border-bottom-width: var(--bracket-stroke);
  border-left-width: var(--bracket-stroke);
}

/* Right bracket ] */
.obr-dates-poster .date-block::after {
  right: calc(-1 * (var(--bracket-arm) + var(--bracket-gap)));
  border-top-width: var(--bracket-stroke);
  border-bottom-width: var(--bracket-stroke);
  border-right-width: var(--bracket-stroke);
}

.obr-dates-poster .date {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  line-height: 0.95;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  padding-bottom: calc((var(--font-size-edition) / 2) + var(--overlap-edition));
  overflow: visible;
  margin: 0;
}

.obr-dates-poster .date > span {
  display: block;
  white-space: nowrap;
  width: 100%;
  text-align: center;
  overflow: visible;
  font-size: 100px;
}

.obr-dates-poster .date > span:first-child {
  padding-top: 0.1em;
}

.obr-dates-poster .date .month {
  letter-spacing: -0.02em;
}

.obr-dates-poster .edition {
  position: absolute;
  left: 0;
  bottom: calc(var(--font-size-edition) * -1);
  width: max-content;
  white-space: nowrap;
  /* --edition-x set by JS to align with year glyphs */
  transform: translate(var(--edition-x, 0px), -50%);
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--ink);
  line-height: 1;
  font-size: 100px;
  margin: 0;
}

/* Focus brackets entrance (HTML starts .is-pending; JS adds .is-ready) */
.obr-dates-poster.is-pending:not(.is-ready) .watermarks .date,
.obr-dates-poster.is-pending:not(.is-ready) .date-block::before,
.obr-dates-poster.is-pending:not(.is-ready) .date-block::after,
.obr-dates-poster.is-pending:not(.is-ready) .date-block .date > span,
.obr-dates-poster.is-pending:not(.is-ready) .edition {
  opacity: 0;
}

.obr-dates-poster.is-pending:not(.is-ready) .watermarks .date {
  transform: rotate(var(--watermark-angle));
}

.obr-dates-poster.is-pending:not(.is-ready) .date-block::before {
  transform: translateX(0.75em);
}

.obr-dates-poster.is-pending:not(.is-ready) .date-block::after {
  transform: translateX(-0.75em);
}

.obr-dates-poster.is-pending:not(.is-ready) .date-block .date > span {
  transform: translateY(0.5em);
}

/* Edition: opacity only — transform stays on --edition-x (glyph centering) */

.obr-dates-poster.is-ready .watermarks .date {
  animation: obr-wm-in 0.7s var(--obr-ease) both;
}

.obr-dates-poster.is-ready .date-block::before {
  animation: obr-bracket-left 0.6s var(--obr-ease) 0.1s both;
}

.obr-dates-poster.is-ready .date-block::after {
  animation: obr-bracket-right 0.6s var(--obr-ease) 0.1s both;
}

.obr-dates-poster.is-ready .date-block .date > span:nth-child(1) {
  animation: obr-line-in 0.55s var(--obr-ease) 0.28s both;
}

.obr-dates-poster.is-ready .date-block .date > span:nth-child(2) {
  animation: obr-line-in 0.55s var(--obr-ease) 0.38s both;
}

.obr-dates-poster.is-ready .date-block .date > span:nth-child(3) {
  animation: obr-line-in 0.55s var(--obr-ease) 0.48s both;
}

.obr-dates-poster.is-ready .edition {
  animation: obr-edition-in 0.55s var(--obr-ease) 0.72s both;
}

@keyframes obr-wm-in {
  from {
    opacity: 0;
    transform: rotate(var(--watermark-angle));
  }
  to {
    opacity: 0.25;
    transform: rotate(var(--watermark-angle));
  }
}

@keyframes obr-bracket-left {
  from {
    opacity: 0;
    transform: translateX(0.75em);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes obr-bracket-right {
  from {
    opacity: 0;
    transform: translateX(-0.75em);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes obr-line-in {
  from {
    opacity: 0;
    transform: translateY(0.5em);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes obr-edition-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .obr-dates-poster.is-pending:not(.is-ready) .watermarks .date,
  .obr-dates-poster.is-pending:not(.is-ready) .date-block::before,
  .obr-dates-poster.is-pending:not(.is-ready) .date-block::after,
  .obr-dates-poster.is-pending:not(.is-ready) .date-block .date > span,
  .obr-dates-poster.is-pending:not(.is-ready) .edition {
    opacity: unset;
    transform: unset;
  }

  .obr-dates-poster.is-ready .watermarks .date,
  .obr-dates-poster.is-ready .date-block::before,
  .obr-dates-poster.is-ready .date-block::after,
  .obr-dates-poster.is-ready .date-block .date > span,
  .obr-dates-poster.is-ready .edition {
    animation: none;
  }

  .obr-dates-poster .watermarks .date {
    opacity: 0.25;
    transform: rotate(var(--watermark-angle));
  }

  .obr-dates-poster .edition {
    transform: translate(var(--edition-x, 0px), -50%);
  }
}
