:root {
  --modal-open-dur: 250ms;
  --modal-close-dur: 150ms;
  --modal-scale: 0.96;
  --modal-scale-close: 0.96;
  --modal-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* transitions-dev / 06-modal : chorégraphie originale. */
.t-modal {
  transform-origin: center;
  transform: scale(var(--modal-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-open-dur) var(--modal-ease),
    opacity   var(--modal-open-dur) var(--modal-ease);
  will-change: transform, opacity;
}
.t-modal.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.t-modal.is-closing {
  transform: scale(var(--modal-scale-close));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-close-dur) var(--modal-ease),
    opacity   var(--modal-close-dur) var(--modal-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-modal { transition: none !important; }
}

.ec-event-dialog {
  box-sizing: border-box;
  width: min(960px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 26px;
  background: var(--iv-paper);
  color: var(--iv-black);
  font-family: var(--iv-font-text);
  box-shadow: 0 24px 100px rgba(0,0,0,.4);
}
.ec-event-dialog *, .ec-event-dialog *::before, .ec-event-dialog *::after { box-sizing: border-box; }
.ec-event-dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(6px); }
.ec-event-toolbar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; padding: 12px 16px; background: var(--iv-paper); }
.ec-event-close { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 11px; border: 0; border-radius: 50%; background: var(--iv-black); color: var(--iv-white); cursor: pointer; }
.ec-event-close svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.8; fill: none; }
.ec-event-content { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: clamp(24px,4vw,44px); padding: 0 clamp(20px,4vw,40px) clamp(24px,4vw,40px); }
.ec-event-art { min-width: 0; margin: 0; }
.ec-event-art img { display: block; width: 100%; max-height: 65dvh; aspect-ratio: 4/5; object-fit: contain; border-radius: 18px; background: var(--iv-black); }
.ec-event-info { min-width: 0; }
.ec-event-kicker { display: inline-block; margin: 0 0 14px; padding: 6px 10px; border-radius: 999px; background: var(--iv-orange); color: var(--iv-white); font-size: 11px; font-weight: 750; letter-spacing: .04em; }
.ec-event-info h2 { margin: 0 0 24px; font-size: clamp(26px,3.3vw,42px); line-height: 1.02; letter-spacing: -.045em; text-transform: uppercase; overflow-wrap: anywhere; }
.ec-event-facts { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px 16px; margin: 0; }
.ec-event-facts > div { min-width: 0; }
.ec-event-facts .ec-event-wide { grid-column: 1/-1; }
.ec-event-facts dt { margin-bottom: 6px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--iv-ink-soft); }
.ec-event-facts dd { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.ec-event-price { margin-top: 24px; padding: 18px; border-radius: 16px; background: var(--iv-orange); color: var(--iv-white); }
.ec-event-price h3 { margin: 0 0 6px; font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.ec-event-price strong { display: block; font-size: 20px; line-height: 1.2; }
.ec-event-price p { margin: 8px 0 0; font-size: 14px; line-height: 1.4; }
.ec-event-map { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; margin-top: 20px; padding: 10px 18px; border: 1px solid currentColor; border-radius: 999px; color: inherit; text-decoration: none; font-size: 14px; font-weight: 650; }
.ec-event-demo { margin: 18px 0 0; font-size: 12px; line-height: 1.5; color: var(--iv-ink-soft); }
.ec-event-dialog [hidden] { display: none !important; }
.ec-event-description { font-size: 16px; line-height: 1.6; }
.ec-event-description p { margin: 0 0 20px; }
.ec-event-description h3 { margin: 24px 0 12px; font-size: 18px; line-height: 1.3; }
.ec-event-description ul { margin: 12px 0 20px; padding-left: 22px; }
.ec-event-description li + li { margin-top: 8px; }
.ec-event-description .ec-event-steps { list-style: none; padding-left: 0; }
.ec-event-schedules { display: grid; gap: 20px; }
.ec-event-venue-block { min-width: 0; padding: 20px; border: 1px solid var(--iv-line-paper); border-radius: 18px; }
.ec-event-venue-block h3 { margin: 0 0 20px; font-size: 20px; line-height: 1.2; }
.ec-event-access { margin: 16px 0 0; font-size: 15px; font-weight: 650; }
.ec-event-private { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--iv-line-paper); }
.ec-event-private h3 { margin: 0 0 10px; font-size: 18px; }
.ec-event-private p { margin: 0; font-size: 15px; line-height: 1.5; }
.ec-event-private a { color: inherit; overflow-wrap: anywhere; text-underline-offset: .2em; }
.ec-event-dialog[data-program="true"] { width: min(780px, calc(100vw - 32px)); }
.ec-event-dialog[data-program="true"] .ec-event-content { grid-template-columns: minmax(0,1fr); }
.ec-event-dialog[data-program="true"] .ec-event-art { display: none; }
.ec-event-dialog[data-program="true"] .ec-event-schedules { grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); }
.ec-event-dialog :focus-visible { outline: 3px solid var(--iv-orange); outline-offset: 4px; }
.ec-event-map:hover { background: var(--iv-black); color: var(--iv-white); }
@media (max-width: 640px) {
  .ec-event-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 20px; }
  .ec-event-content { grid-template-columns: minmax(0,1fr); gap: 20px; padding: 0 20px 24px; }
  .ec-event-art { width: 128px; margin-inline: auto; }
  .ec-event-info h2 { margin-bottom: 20px; }
  .ec-event-facts { gap: 16px 12px; }
  .ec-event-facts dd { font-size: 14px; }
  .ec-event-price { margin-top: 20px; padding: 16px; }
}
@media (max-height: 500px) and (min-width: 641px) {
  .ec-event-content { grid-template-columns: minmax(0,.65fr) minmax(0,1.35fr); }
}
