.cpts-event-surface {
  --cpts-event-teal: var(--wp--preset--color--teal);
  --cpts-event-light: var(--wp--preset--color--teal-light);
  --cpts-event-coral: var(--wp--preset--color--coral);
  --cpts-event-yellow: var(--wp--custom--color--event-yellow);
  clip-path: inset(-1000px 0 -1000px 0);
  font-family: var(--wp--preset--font-family--montserrat);
  overflow: visible;
  position: relative;
}

.cpts-event-hero {
  margin-bottom: 137px;
  margin-top: var(--cpts-page-breadcrumb-heading-gap);
  text-align: center;
}

.cpts-event-hero .cpts-editorial-kicker {
  margin: 0 auto var(--cpts-page-kicker-heading-gap);
}

.cpts-event-hero h1 {
  font: 700 clamp(46px, 3.65vw, 70px)/77px var(--wp--preset--font-family--montserrat);
  margin: 0;
  max-width: none;
  width: min(1014px, 100%);
}

.cpts-event-hero > p:last-child {
  color: var(--wp--preset--color--subtitle);
  font-size: 20px;
  line-height: 27px;
  margin: 44px auto 0;
  max-width: 780px;
}

.cpts-event-agenda-layout {
  align-items: start;
  display: grid;
  gap: 0 49px;
  grid-template-columns: 448px minmax(0, 1fr);
}

.cpts-event-surface > .cpts-event-agenda-layout.alignwide {
  justify-self: center;
  margin-inline: auto !important;
  max-width: var(--cpts-layout-surface-wide) !important;
  width: min(var(--cpts-layout-surface-wide), 100%) !important;
}

.cpts-event-tools {
  display: contents;
}

.cpts-event-search {
  align-self: start;
  display: flex;
  grid-column: 2;
  grid-row: 1;
  margin: 0 0 20px;
  min-width: 0;
  position: relative;
}

.cpts-event-search::before {
  background: url("images/icon-event-search-xd.webp") center/28px no-repeat;
  content: "";
  height: 32px;
  left: 20px;
  position: absolute;
  top: 18px;
  width: 32px;
}

.cpts-event-search input {
  background: var(--wp--preset--color--white);
  border: 2px solid var(--wp--custom--color--teal-muted);
  border-radius: 30px 0 0 30px;
  box-sizing: border-box;
  flex: 1;
  font: 400 18px/1.2 var(--wp--preset--font-family--montserrat);
  height: 68px;
  min-width: 0;
  padding: 0 24px 0 64px;
}

.cpts-event-search button,
.cpts-event-filter-panel button,
.cpts-event-registration button,
.cpts-event-registration__external {
  background: var(--cpts-event-coral);
  border: 0;
  border-radius: 30px;
  color: var(--wp--preset--color--white);
  cursor: pointer;
  font: 600 20px/1.2 var(--wp--preset--font-family--montserrat);
  padding: 17px 34px;
  text-decoration: none;
}

.cpts-event-search button {
  border-radius: 0 30px 30px 0;
  min-width: 160px;
}

.cpts-event-views {
  align-items: flex-start;
  align-self: start;
  display: flex;
  gap: 15px;
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  margin: 0 8px 16px 0;
}

.cpts-event-views a {
  border-bottom: 2px solid transparent;
  color: var(--cpts-event-teal);
  font-size: 18px;
  font-weight: 500;
  line-height: 27px;
  padding: 0 0 1px;
  text-decoration: none;
}

.cpts-event-views a[aria-current="page"] {
  border-bottom-color: var(--cpts-event-teal);
  font-weight: 700;
}

.cpts-event-current-range {
  align-items: baseline;
  color: var(--cpts-event-teal);
  display: flex;
  font-size: 22px;
  font-weight: 600;
  gap: 4px;
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  line-height: 27px;
  margin: 0 0 16px;
}

.cpts-event-current-range select {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  margin: 0;
  max-width: 100%;
  padding: 0;
}

.cpts-event-current-range button {
  align-items: center;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  justify-content: center;
  line-height: inherit;
  margin: -8.5px -15px;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
}

.cpts-event-active-filters {
  display: none;
}

.cpts-event-filter-panel {
  align-self: stretch;
  background: var(--cpts-event-light);
  border-radius: 30px;
  grid-column: 1;
  grid-row: 1 / span 4;
  box-sizing: border-box;
  padding: 32px;
}

.cpts-event-filter-panel > .cpts-filter-panel__trigger {
  display: none;
}

.cpts-event-filter-panel .cpts-filter-panel__heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.cpts-event-filter-panel h2 {
  color: var(--cpts-event-teal);
  font-size: 30px;
  font-weight: 700;
  line-height: 42px;
  margin: 0;
}

.cpts-event-filter-panel .cpts-filter-panel__heading a {
  color: var(--cpts-event-coral);
  font-size: 20px;
  font-weight: 600;
  line-height: 42px;
  text-decoration: none;
}

.cpts-event-filter-panel fieldset {
  border: 0;
  margin: 30px 0 0;
  padding: 0;
}

.cpts-event-filter-panel legend {
  color: var(--wp--preset--color--text);
  font-size: 22px;
  font-weight: 600;
  line-height: 42px;
  margin-bottom: 12px;
}

.cpts-event-filter-panel label {
  align-items: flex-start;
  color: var(--wp--preset--color--subtitle);
  display: flex;
  font-size: 20px;
  gap: 12px;
  line-height: 27px;
  margin: 0;
}

.cpts-event-filter-panel label + label {
  margin-top: 2px;
}

.cpts-event-filter-panel input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  background: var(--wp--preset--color--white);
  border: 2px solid var(--cpts-event-teal);
  border-radius: 4px;
  box-sizing: border-box;
  flex: 0 0 20px;
  height: 20px;
  /* (line-height 27 - box 20) / 2 : identique au centrage sur une ligne, aligné
     sur la première ligne dès que le libellé passe à la ligne. */
  margin: 3.5px 0 0;
  width: 20px;
}

.cpts-event-filter-panel input[type="checkbox"]:checked {
  background-color: var(--cpts-event-teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M2 6.5 4.5 9 10 3'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 12px 12px;
}

.cpts-event-filter-panel form > button {
  display: none;
  margin: 28px auto 0;
}

.cpts-event-query {
  align-self: start;
  grid-column: 2;
  grid-row: 4;
  min-width: 0;
}

.cpts-event-index .cpts-empty-state {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0;
  justify-content: center;
  margin-block: 0;
  min-height: 0;
  padding: 2.5rem 2rem;
}

.cpts-event-index .cpts-empty-state h3,
.cpts-event-index .cpts-empty-state p {
  margin: 0;
}

.cpts-event-index .cpts-empty-state .wp-block-button {
  margin-top: var(--cpts-empty-state-action-gap);
}

.cpts-event-query .wp-block-post-template {
  display: block;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cpts-event-query .wp-block-post { margin: 0 0 30px; }

.cpts-event-card {
  display: grid;
  grid-template-columns: 302px minmax(0, 1fr);
  min-height: 328px;
  position: relative;
}

.cpts-event-card:has(.cpts-event-month) {
  margin-top: 92px;
}

.cpts-event-month {
  background: var(--cpts-event-teal);
  border-radius: 20px;
  color: var(--wp--preset--color--white);
  font-size: 22px;
  font-weight: 600;
  left: 0;
  line-height: 1;
  margin: 0;
  padding: 13px 20px;
  position: absolute;
  right: 0;
  top: -76px;
}

.cpts-event-card-date {
  display: contents;
}

.cpts-event-card-meta__date {
  align-items: center;
  background: var(--cpts-event-teal);
  border-radius: 18px;
  color: var(--wp--preset--color--white);
  display: flex;
  flex-direction: column;
  height: 86px;
  justify-content: center;
  left: 30px;
  line-height: 1;
  position: absolute;
  top: 24px;
  width: 86px;
  z-index: 2;
}

.cpts-event-card-meta__date strong {
  font-size: 38px;
}

.cpts-event-card-meta__date span {
  font-size: 18px;
  margin-top: 5px;
}

.cpts-event-card__media {
  background: var(--wp--preset--color--teal-light) url("images/logo-cpts-brie-teal.webp") center / 180px auto no-repeat;
  background-blend-mode: multiply;
  border-radius: 30px 0 0 30px;
  grid-column: 1;
  height: 100%;
  margin: 0;
  min-height: 328px;
  overflow: hidden;
  position: relative;
}

.cpts-event-card__media img {
  border-radius: 30px 0 0 30px;
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.cpts-event-card__body {
  align-content: center;
  border: 1px solid var(--wp--custom--color--event-border);
  border-left: 0;
  border-radius: 0 30px 30px 0;
  display: grid;
  grid-column: 2;
  margin: 0;
  min-width: 0;
  padding: 19px 51px;
}

.cpts-event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

/* Only direct children own the chip surface. Nested spans remain labels so a
   long term wraps inside one continuous 30px-high chip. */
.cpts-event-tags > :is(span, a) {
  background: var(--cpts-event-light);
  border-radius: 20px;
  box-sizing: border-box;
  color: var(--cpts-event-teal);
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  min-height: 24px;
  padding: 5px 12px;
  text-transform: uppercase;
}

.cpts-event-tags > :is(span, a) > span {
  line-height: inherit;
  padding: 0;
}

.cpts-event-tags > a {
  position: relative;
  text-decoration: none;
  z-index: 1;
}

.cpts-event-tags > a:focus-visible {
  background: var(--cpts-event-teal);
  color: var(--wp--preset--color--white);
  outline: 2px solid var(--cpts-event-coral);
  outline-offset: 2px;
}

@media (min-width: 1118px) and (hover: hover) and (pointer: fine) {
  .cpts-event-tags > a:hover {
    background: var(--cpts-event-teal);
    color: var(--wp--preset--color--white);
  }
}

.cpts-event-tag__mobile {
  display: none;
}

.cpts-event-card h2.wp-block-post-title {
  font: 700 30px/37px var(--wp--preset--font-family--montserrat);
  margin: 16px 0 12px;
  overflow-wrap: normal;
}

.cpts-event-card h2 a {
  color: var(--wp--preset--color--text);
  text-decoration: none;
}

.cpts-event-card-details > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.cpts-event-card-meta__time,
.cpts-event-card-meta__venue {
  align-items: center;
  display: inline-flex;
  font-size: 20px;
  gap: 7px;
}

.cpts-event-card-meta__time {
  color: var(--cpts-event-teal);
  font-weight: 700;
}

.cpts-event-card-meta__time::before,
.cpts-event-card-meta__venue::before {
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
  height: 23px;
  width: 23px;
}

.cpts-event-card-meta__time::before { background-image: url("images/icon-event-clock-xd.webp"); }
.cpts-event-card-meta__venue::before { background-image: url("images/icon-event-location-xd.webp"); }

.cpts-event-card-meta__organizer {
  color: var(--cpts-event-teal);
  font-size: 20px;
  font-weight: 600;
  margin: 8px 0 0;
}

.cpts-event-card__link {
  background: var(--cpts-event-coral);
  border-radius: 30px;
  color: var(--wp--preset--color--white);
  display: inline-flex;
  font-size: 20px;
  font-weight: 600;
  gap: 1.25rem;
  justify-self: start;
  margin-top: 14px;
  padding: 12px 38px;
  text-decoration: none;
}

.cpts-event-calendar--all {
  position: relative;
}

.cpts-event-calendar--top {
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
  margin: 0 8px 20px;
}

.cpts-event-calendar--bottom {
  grid-column: 2;
  grid-row: 5;
  justify-self: end;
  margin: 44px 0 50px;
}

.cpts-event-agenda-layout:not(:has(.cpts-event-query .wp-block-query-pagination)) .cpts-event-calendar--bottom {
  display: none;
}

.cpts-event-query .wp-block-post + .wp-block-post:has(.cpts-event-month) .cpts-event-card {
  margin-top: 120px;
}

.cpts-event-calendar--all > .cpts-event-calendar__trigger {
  align-items: center;
  border: 2px solid var(--cpts-event-coral);
  border-radius: 10px;
  box-sizing: border-box;
  color: var(--cpts-event-coral);
  display: inline-flex;
  font-size: 20px;
  font-weight: 600;
  gap: 12px;
  line-height: 1.2;
  min-height: 52px;
  padding: 12px 24px;
  text-decoration: none;
}

.cpts-event-calendar__trigger-label {
  min-width: 0;
}

.cpts-event-calendar__count {
  align-items: center;
  background: var(--cpts-event-coral);
  border-radius: 50%;
  color: var(--wp--preset--color--white);
  display: inline-flex;
  flex: 0 0 26px;
  font-size: 14px;
  height: 26px;
  justify-content: center;
  line-height: 1;
  width: 26px;
}

.cpts-event-calendar__chevron {
  background: url("images/icon-event-down-xd.webp") center / 25px 25px no-repeat;
  display: block;
  flex: 0 0 25px;
  height: 25px;
  width: 25px;
}

.cpts-event-calendar__options {
  background: var(--wp--preset--color--white);
  border: 1px solid var(--cpts-event-light);
  border-radius: 12px;
  display: grid;
  gap: 2px;
  margin-top: 8px;
  opacity: 0;
  overflow: visible;
  padding: 10px;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 100%;
  transform: scale(0.96);
  transform-origin: top right;
  transition:
    opacity 200ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 200ms cubic-bezier(0.23, 1, 0.32, 1),
    visibility 200ms;
  visibility: hidden;
  width: min(276px, calc(100vw - 30px));
  z-index: 40;
}

.cpts-event-calendar__scope {
  background: var(--cpts-event-light);
  border-radius: 8px;
  color: var(--cpts-event-teal);
  display: grid;
  gap: 4px;
  margin: 0 0 6px;
  padding: 10px;
}

.cpts-event-calendar__scope strong {
  font-size: 14px;
  line-height: 1.3;
}

.cpts-event-calendar__scope span {
  font-size: 12px;
  line-height: 1.45;
}

.cpts-event-calendar.is-open .cpts-event-calendar__options {
  display: grid;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  visibility: visible;
}

@media (min-width: 1118px) {
  .cpts-event-calendar--all:focus-within .cpts-event-calendar__options {
    display: grid;
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    visibility: visible;
  }
}

@media (min-width: 1118px) and (hover: hover) and (pointer: fine) {
  .cpts-event-calendar--all:hover .cpts-event-calendar__options {
    display: grid;
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    visibility: visible;
  }
}

.cpts-event-calendar__options a {
  border-radius: 8px;
  color: var(--cpts-event-teal);
  padding: 8px 10px;
  text-decoration: none;
}

.cpts-event-calendar__options a:focus-visible {
  background: var(--cpts-event-light);
  outline: 2px solid var(--cpts-event-teal);
  outline-offset: -2px;
}

@media (min-width: 1118px) and (hover: hover) and (pointer: fine) {
  .cpts-event-calendar__options a:hover {
    background: var(--cpts-event-light);
  }
}

.cpts-event-cta {
  border-radius: 30px;
  box-sizing: border-box;
  margin-bottom: 150px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 45px;
  max-width: 1050px;
  overflow: hidden;
  padding: 58px 84px;
  position: relative;
}

.cpts-event-cta::before,
.cpts-event-cta::after {
  background: rgb(12 124 137);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  position: absolute;
}

.cpts-event-cta::before {
  height: 304px;
  left: -61px;
  top: -47px;
  width: 304px;
}

.cpts-event-cta::after {
  height: 304px;
  left: 429px;
  top: 133px;
  width: 304px;
}
.cpts-event-cta > * { position: relative; z-index: 1; }
.cpts-event-cta h2 { color: var(--wp--preset--color--white); font: 700 34px/1.15 var(--wp--preset--font-family--montserrat); margin: 0 0 24px; }
.cpts-event-cta p { color: var(--wp--preset--color--blue-text); font-size: 18px; margin: 0; }
.cpts-event-cta .wp-block-button__link { font-size: 20px; font-weight: 700; white-space: nowrap; }

.cpts-event-single__layout {
  gap: 76px;
  margin-bottom: 70px;
  margin-top: var(--cpts-page-breadcrumb-heading-gap);
}

.cpts-event-single__main,
.cpts-event-single__aside {
  min-width: 0;
  overflow: visible;
}

.cpts-event-single .cpts-editorial-kicker {
  margin: 0 0 var(--cpts-page-kicker-heading-gap);
}

.cpts-event-single h1 {
  font: 700 55px/65px var(--wp--preset--font-family--montserrat);
  margin: 0 0 24px;
  overflow-wrap: normal;
}

.cpts-event-single__organizer {
  color: var(--wp--preset--color--teal);
  font-size: 20px;
  font-weight: 600;
  line-height: 27px;
  margin: 0 0 28px;
}

.cpts-event-single__organizer:not(:empty)::before {
  color: rgb(116 116 116);
  content: "Organisé par ";
}

/* An empty organizer renders nothing on the front: the canvas stays identical
   instead of showing Gutenberg's « Ajouter : Organisateur » placeholder. */
.editor-styles-wrapper .cpts-event-single__organizer [data-rich-text-placeholder]::after {
  content: none;
}

.cpts-event-single__poster {
  margin: 34px 0 35px;
  max-width: none;
  width: 100%;
}

.cpts-event-single__poster:not(:has(img)) {
  aspect-ratio: 830 / 1176;
  background: var(--wp--preset--color--teal-light) url("images/logo-cpts-brie-teal.webp") center / min(22.5rem, 51%) auto no-repeat;
  background-blend-mode: multiply;
  border-radius: 30px;
}

.cpts-event-single__poster img {
  height: auto;
  object-fit: contain;
  width: 100%;
}

.cpts-event-single__main .wp-block-post-content {
  font-size: 20px;
  line-height: 1.55;
}

.cpts-event-single__main .wp-block-post-content > p {
  margin-block: 0;
}

.cpts-event-single__main .wp-block-post-content > p + p {
  margin-top: 20px;
}

.cpts-event-single__main .wp-block-post-content h2 {
  color: var(--cpts-event-teal);
  font-size: 30px;
  font-weight: 600;
  line-height: 36px;
  margin-bottom: 30px;
}

.cpts-event-single__main .wp-block-post-content > h2:first-child {
  margin-top: 5px;
}

.cpts-event-single__main .wp-block-post-content p + h2 {
  margin-top: 40px;
}

.cpts-event-callout {
  background: var(--wp--preset--color--yellow-light);
  border-radius: 24px;
  box-sizing: border-box;
  margin-top: 75px;
  min-height: 150px;
  padding: 30px;
}

.cpts-event-callout > strong {
  color: var(--wp--custom--color--event-warning-text);
  display: block;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.cpts-event-callout p { margin: 0; }

.cpts-event-booking-panel {
  background: var(--cpts-event-teal);
  border-radius: 30px;
  color: var(--wp--preset--color--white);
  overflow: visible;
  padding-bottom: 18px;
  position: relative;
  z-index: 4;
}

.cpts-event-booking-panel::before {
  background: radial-gradient(
    circle 84px at calc(100% - 12px) 30px,
    rgb(12 124 137) 84px,
    transparent 84.5px
  );
  border-radius: inherit;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.cpts-event-booking-panel > * {
  position: relative;
  z-index: 1;
}

.cpts-event-summary {
  background: transparent;
  border-radius: 30px 30px 0 0;
  padding: 31px 40px;
}

.cpts-event-summary__row {
  align-items: flex-start;
  display: flex;
  font-size: 22px;
  font-weight: 700;
  gap: 20px;
  margin: 0 0 21px;
}

.cpts-event-summary__row:last-child { margin-bottom: 0; }
.cpts-event-summary__row img { flex: 0 0 30px; height: 30px; object-fit: contain; width: 30px; }
.cpts-event-summary__row span { display: grid; }
.cpts-event-summary__row strong { font-size: 20px; font-weight: 700; margin-bottom: 3px; text-transform: uppercase; }
.cpts-event-summary__venue-link { color: inherit; min-height: 44px; text-decoration: none; }
.cpts-event-summary__venue-value { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

@media (min-width: 1118px) and (hover: hover) and (pointer: fine) {
  .cpts-event-summary__venue-link:hover .cpts-event-summary__venue-value {
    text-decoration-thickness: 2px;
  }
}

.cpts-event-registration {
  border-top: 1px solid var(--wp--preset--color--blue-text);
  margin-top: -1px;
}

.cpts-event-booking-panel .cpts-event-registration {
  border-top: none;
  margin-top: 0;
}

.cpts-event-registration__disclosure > summary,
.cpts-event-registration__external {
  background: var(--cpts-event-coral);
  border-radius: 30px;
  color: var(--wp--preset--color--white);
  cursor: pointer;
  display: block;
  font-size: 20px;
  font-weight: 700;
  list-style: none;
  margin: 24px 40px;
  padding: 16px 24px;
  text-align: center;
}

.cpts-event-registration__disclosure > summary::-webkit-details-marker { display: none; }

.cpts-event-registration__disclosure::details-content {
  content-visibility: hidden;
  height: 0;
  interpolate-size: allow-keywords;
  opacity: 0;
  overflow: hidden;
  transition:
    content-visibility 200ms allow-discrete,
    height 200ms cubic-bezier(0.23, 1, 0.32, 1),
    opacity 200ms cubic-bezier(0.23, 1, 0.32, 1);
}

.cpts-event-registration__disclosure[open]::details-content {
  content-visibility: visible;
  height: auto;
  opacity: 1;
}

@starting-style {
  .cpts-event-registration__disclosure[open]::details-content {
    height: 0;
    opacity: 0;
  }
}

.cpts-event-registration__form {
  background: var(--cpts-event-light);
  border-radius: 24px;
  box-sizing: border-box;
  color: var(--wp--preset--color--text);
  display: grid;
  gap: 18px;
  margin: 16px 40px 28px;
  min-height: 0;
  overflow: hidden;
  padding: 28px;
}

.cpts-event-registration__form h2 {
  color: var(--cpts-event-teal);
  font-size: 24px;
  line-height: 1.2;
  margin: 0;
}

.cpts-event-registration__grid { display: grid; gap: 14px; }
.cpts-event-field { margin: 0; }
.cpts-event-field label { color: var(--wp--preset--color--teal-dark); display: block; font-size: 14px; font-weight: 600; line-height: 1.35; margin-bottom: 5px; }
.cpts-event-field--checkbox .cpts-checkbox-control { display: flex; font-size: 14px; font-weight: 600; gap: 8px; line-height: 1.35; margin: 0; }
.cpts-event-field input:not([type="checkbox"]),
.cpts-event-field select,
.cpts-event-field textarea {
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--custom--color--teal-muted);
  border-radius: 10px;
  box-sizing: border-box;
  color: var(--wp--preset--color--text);
  font: inherit;
  min-height: 48px;
  padding: 10px 12px;
  width: 100%;
}

/* The same placeholder grey as the newsletter, 5.7:1 on white. */
.cpts-event-registration__form ::placeholder {
  color: var(--wp--custom--color--placeholder);
  opacity: 1;
}

.cpts-event-consent,
.cpts-event-registration__submit,
.cpts-event-registration__capacity { margin: 0; }
.cpts-event-consent label { align-items: flex-start; color: var(--wp--preset--color--text); display: flex; font-size: 13px; gap: 8px; line-height: 1.45; }
.cpts-event-consent input { accent-color: var(--cpts-event-teal); flex: 0 0 auto; height: 18px; margin: 1px 0 0; width: 18px; }
.cpts-event-registration__submit button { box-sizing: border-box; font-weight: 700; max-width: 100%; white-space: normal; }
.cpts-event-registration__capacity { color: var(--wp--preset--color--teal-dark); font-size: 16px; font-weight: 600; line-height: 1.35; }
/* Inside the booking panel the notice is a card like the form: it keeps the
   form's inset instead of running edge to edge against the rounded panel. */
.cpts-event-notice { border-radius: 20px; margin: 22px 40px; padding: 22px; }
.cpts-event-notice h2 { font-size: 24px; margin-top: 0; }
.cpts-event-notice.is-success { background: var(--wp--preset--color--teal-light); color: var(--wp--preset--color--teal-dark); }
.cpts-event-notice.is-error { background: var(--wp--preset--color--yellow-light); color: var(--wp--custom--color--event-error-text); }
.cpts-event-notice.is-full { background: var(--wp--preset--color--yellow-light); }
.cpts-event-cancel { margin: 20px 40px; text-align: center; }
.cpts-event-registration[data-cpts-outcome="confirmee"] .cpts-event-registration__disclosure,
.cpts-event-registration[data-cpts-outcome="confirmee"] .cpts-event-registration__form,
.cpts-event-registration[data-cpts-outcome="confirmee"] .cpts-event-registration__external,
.cpts-event-registration[data-cpts-outcome="annulee"] .cpts-event-registration__disclosure,
.cpts-event-registration[data-cpts-outcome="annulee"] .cpts-event-registration__form,
.cpts-event-registration[data-cpts-outcome="annulee"] .cpts-event-registration__external,
.cpts-event-registration[data-cpts-outcome="annulation"] .cpts-event-registration__disclosure,
.cpts-event-registration[data-cpts-outcome="annulation"] .cpts-event-registration__form,
.cpts-event-registration[data-cpts-outcome="annulation"] .cpts-event-registration__external {
  display: none;
}

.cpts-event-calendar--event {
  display: grid;
  gap: 14px;
  padding: 0 40px 30px;
  position: relative;
}

/* Le menu déroulant doit passer au-dessus des sections qui suivent (CTA teal).
   Le clip-path de .cpts-event-surface crée un contexte d'empilement : le
   z-index interne ne suffit pas, le main entier doit passer devant ses
   sections sœurs — sans effet visuel tant que rien d'autre ne se chevauche. */
.cpts-event-surface {
  position: relative;
  z-index: 2;
}

.cpts-event-calendar {
  overflow: visible;
  position: relative;
  z-index: 30;
}

.cpts-event-calendar--event > .cpts-event-calendar__trigger,
.cpts-event-calendar--event > .cpts-event-calendar__question {
  align-items: center;
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--preset--color--blue-text);
  border-radius: 30px;
  color: var(--cpts-event-teal);
  display: inline-flex;
  font-size: 20px;
  font-weight: 700;
  gap: 10px;
  justify-content: center;
  padding: 14px;
  text-align: center;
  text-decoration: none;
}

.cpts-event-calendar--event .cpts-event-calendar__options {
  left: 40px;
  right: 40px;
  top: 54px;
  width: auto;
}

@media (min-width: 1118px) {
.cpts-event-calendar--event > .cpts-event-calendar__trigger:focus-visible + .cpts-event-calendar__options,
.cpts-event-calendar--event .cpts-event-calendar__options:focus-within {
  display: grid;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  visibility: visible;
}
}

/* Desktop hover opens only from the trigger so the options never cover the
   adjacent question action. Narrow screens use the explicit .is-open state. */
@media (min-width: 1118px) and (hover: hover) and (pointer: fine) {
  .cpts-event-calendar--event > .cpts-event-calendar__trigger:hover + .cpts-event-calendar__options,
  .cpts-event-calendar--event .cpts-event-calendar__options:hover {
    display: grid;
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
    visibility: visible;
  }
}

.cpts-event-calendar--event .cpts-event-calendar__question {
  background: var(--cpts-event-light);
}

.cpts-event-files,
.cpts-event-related { margin-top: 40px; }
.cpts-event-related { margin-top: 42px; }
.cpts-event-related-query { margin-top: 30px; }
.cpts-event-files h2,
.cpts-event-related h2 { color: var(--cpts-event-teal); font-size: 25px; font-weight: 700; }
.cpts-event-files ul,
.cpts-event-related .wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.cpts-event-files li { margin: 10px 0 12px; }
.cpts-event-files li a {
  align-items: center;
  background: var(--cpts-event-light);
  border-radius: 24px;
  color: var(--wp--preset--color--text);
  display: flex;
  font-size: 25px;
  font-weight: 700;
  gap: 18px;
  padding: 23px 24px;
  text-decoration: none;
  transition: background-color 180ms cubic-bezier(0.23, 1, 0.32, 1), color 180ms cubic-bezier(0.23, 1, 0.32, 1);
}
.cpts-event-files img {
  background: var(--cpts-event-teal);
  border-radius: 12px;
  height: 42px;
  object-fit: contain;
  padding: 8px;
  transition: background-color 180ms cubic-bezier(0.23, 1, 0.32, 1);
  width: 42px;
}
.cpts-event-files li a:focus-visible {
  background: var(--cpts-event-teal);
  color: var(--wp--preset--color--white);
  outline: 2px solid var(--cpts-event-teal);
  outline-offset: 3px;
}
.cpts-event-files li a:focus-visible img {
  background-color: transparent;
}

@media (min-width: 1118px) and (hover: hover) and (pointer: fine) {
  .cpts-event-files li a:hover {
    background: var(--cpts-event-teal);
    color: var(--wp--preset--color--white);
  }

  .cpts-event-files li a:hover img {
    background-color: transparent;
  }
}
.cpts-event-related .wp-block-post { margin: 0; }
.cpts-event-related .wp-block-post + .wp-block-post { margin-top: 30px; }
.cpts-event-related-card {
  align-items: flex-start;
  background: var(--wp--preset--color--white);
  border: 1px solid var(--wp--custom--color--teal-border);
  border-radius: 30px;
  box-shadow: none;
  gap: 17px;
  min-height: 152px;
  padding: 25px 30px 60px;
  position: relative;
  transition: background-color 180ms cubic-bezier(0.23, 1, 0.32, 1), border-color 180ms cubic-bezier(0.23, 1, 0.32, 1);
  width: 100%;
}
/* La pastille date descend de 8px sous le titre, comme dans le XD : elle n'est
   pas centree, sa position reste constante quelle que soit la hauteur de carte. */
.cpts-event-related-card .cpts-event-card-date { display: block; flex: 0 0 92px; margin-top: 8px; }
.cpts-event-related-card .cpts-event-card-meta__date { border-radius: 20px; height: 87px; left: auto; position: relative; top: auto; width: 92px; }
.cpts-event-related-card .cpts-event-card-meta__date strong { font-size: 40px; }
.cpts-event-related-card .cpts-event-card-meta__date span { font-size: 20px; }
/* Sans largeur minimale nulle, une adresse insecable comme « Brie-Comte-Robert »
   poussait la colonne au-dela du cadre : le lieu sortait de la carte alors que le
   titre respectait la marge interieure. */
.cpts-event-related-card > .wp-block-group { min-width: 0; }
.cpts-event-related-card h3 { font: 700 25px/32px var(--wp--preset--font-family--montserrat); margin: 0 0 7px; }
.cpts-event-related-card h3 a { color: var(--wp--preset--color--text); text-decoration: none; }
/* Le survol qui signalait la carte n'existe qu'au-dessus de 1118px avec une
   souris : sur telephone rien ne disait que le bloc menait quelque part, et
   seul le titre etait cliquable. Le lien du titre couvre desormais la carte,
   sans ajouter de second lien pour les lecteurs d'ecran. */
.cpts-event-related-card h3 a::after {
  content: "";
  inset: 0;
  position: absolute;
}

.cpts-event-related-card::after {
  background-color: var(--cpts-event-teal);
  bottom: 20px;
  content: "";
  height: 1.5rem;
  mask: url("images/icon-arrow-right.svg") center / contain no-repeat;
  pointer-events: none;
  position: absolute;
  right: 30px;
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
  width: 1.5rem;
}

.cpts-event-related-card:has(a:focus-visible) {
  outline: 3px solid var(--cpts-event-teal);
  outline-offset: 3px;
}

.cpts-event-related-card h3 a:focus-visible {
  outline: 0;
}

@media (prefers-reduced-motion: reduce) {
  .cpts-event-related-card::after {
    transition: none;
  }
}
.cpts-event-related-card .cpts-event-card-details { color: var(--cpts-event-teal); font-size: 20px; }
.cpts-event-related-card .cpts-event-card-meta__time,
.cpts-event-related-card .cpts-event-card-meta__venue {
  align-items: flex-start;
  font-size: 20px;
  line-height: 27px;
}
.cpts-event-related-card .cpts-event-card-meta__time::before,
.cpts-event-related-card .cpts-event-card-meta__venue::before {
  height: 26px;
  margin-top: 1px;
  width: 26px;
}
.cpts-event-related-card .cpts-event-card-meta__venue { color: var(--wp--preset--color--text); }
.cpts-event-related-card .cpts-event-card-meta__organizer { display: none; }
.cpts-event-related .wp-block-buttons { margin-top: 42px; }
.cpts-event-related__all .wp-block-button__link { background: var(--cpts-event-light); border-radius: 30px; color: var(--cpts-event-teal); font-weight: 700; padding: 14px; }
.cpts-event-related__all .wp-block-button__link { font-size: 20px; line-height: 24px; }

/* Variante mobile du XD : carte plus compacte, radius 15 et pastille 82x78. */
@media (max-width: 599px) {
  .cpts-event-related-card { border-radius: 15px; gap: 9px; padding: 20px 12px 56px; }
  .cpts-event-related-card::after { bottom: 16px; right: 12px; }
  /* La marge negative de -14px sert aux cartes qui longent le bord de l'ecran ;
     ici elle poussait le lieu hors du cadre, alors que cette carte a sa bordure
     et sa marge interieure. */
  .cpts-event-related-card .cpts-event-card-details > div { margin-right: 0; width: 100%; }
  .cpts-event-related-card .cpts-event-card-date { flex: 0 0 82px; margin-top: 0; }
  .cpts-event-related-card .cpts-event-card-meta__date { height: 78px; width: 82px; }

  /* Beside the badge the details only had 243px, so a full street address ran
     to four lines. The card becomes a grid: badge and title share the first
     row, the details span the full width underneath and get 332px. The FSE
     group that wraps title and details carries no styling of its own, so
     display: contents promotes both to grid items without touching the
     pattern. The parent scopes the selector because core prints the group's
     own display: flex after this sheet, and it would win on equal weight. */
  .cpts-event-related .cpts-event-related-card {
    align-items: start;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .cpts-event-related-card > .wp-block-group {
    display: contents;
  }

  .cpts-event-related-card .cpts-event-card-date {
    grid-column: 1;
    grid-row: 1;
  }

  .cpts-event-related-card .wp-block-post-title {
    grid-column: 2;
    grid-row: 1;
  }

  .cpts-event-related-card .cpts-event-card-details {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Between the sidebar breakpoint and 1400px the results column shrinks to
   513-685px: keep the horizontal card but narrow the poster column and the
   body padding so the title keeps at least 245px. The related cards of the
   single aside get the compact mobile badge for the same reason. */
@media (min-width: 1198px) and (max-width: 1399px) {
  .cpts-event-card {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .cpts-event-card__body {
    padding: 19px 28px;
  }

  .cpts-event-card__link {
    gap: 0.875rem;
    padding: 12px 24px;
  }

  .cpts-event-related-card { gap: 12px; padding: 20px 16px 56px; }
  .cpts-event-related-card::after { bottom: 16px; right: 16px; }
  .cpts-event-related-card .cpts-event-card-date { flex: 0 0 82px; margin-top: 0; }
  .cpts-event-related-card .cpts-event-card-meta__date { height: 78px; width: 82px; }
  .cpts-event-related-card .cpts-event-card-meta__date strong { font-size: 34px; }
  .cpts-event-related-card .cpts-event-card-meta__date span { font-size: 18px; }
  .cpts-event-related-card h3 { font-size: 20px; line-height: 26px; }
  .cpts-event-related-card .cpts-event-card-details,
  .cpts-event-related-card .cpts-event-card-meta__time,
  .cpts-event-related-card .cpts-event-card-meta__venue { font-size: 18px; line-height: 25px; }
}

@media (max-width: 1197px) {
  .cpts-event-index::before { display: none; }
  .cpts-event-hero { margin: var(--cpts-page-breadcrumb-heading-gap) auto 38px; }
  .cpts-event-hero .cpts-editorial-kicker { margin-bottom: var(--cpts-page-kicker-heading-gap); }
  .cpts-event-hero h1 { font-size: 32px; line-height: 1.05; }
  .cpts-event-hero > p:last-child { font-size: 14px; margin-top: 20px; max-width: 330px; }
  .cpts-event-agenda-layout { display: flex; flex-direction: column; gap: 0; }
  .cpts-event-search { margin: 0 0 12px; order: 1; width: 100%; }
  .cpts-event-search::before { background-size: 20px; height: 24px; left: 10px; top: 8px; width: 24px; }
  .cpts-event-search input { border-radius: 22px; font-size: 13px; height: 40px; padding-left: 38px; width: 100%; }
  .cpts-event-search button { clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; }
  .cpts-event-views { display: none; }
  .cpts-event-current-range { font-size: 14px; margin: 0 0 12px; order: 2; }
  .cpts-event-active-filters { display: flex; flex-wrap: wrap; gap: 5px; order: 2; }
  .cpts-event-active-filters > a, .cpts-event-active-filters > span { background: var(--cpts-event-light); border-radius: 14px; color: var(--cpts-event-teal); font-size: 10px; padding: 5px 8px; }
  .cpts-event-calendar--top { align-self: flex-end; margin: 0 8px 16px; order: 3; }
  .cpts-event-query,
  .wp-block-cpts-event-month-grid {
    align-self: stretch;
    width: 100%;
  }
  .cpts-event-query { order: 4; }
  .cpts-event-query .wp-block-post-template,
  .cpts-event-query .wp-block-post,
  .cpts-event-card {
    max-width: none;
    width: 100%;
  }
  .cpts-event-calendar--bottom { align-self: flex-end; margin: 28px 8px 36px; order: 5; }
  .cpts-event-calendar--all > .cpts-event-calendar__trigger { font-size: 14px; min-height: 44px; padding: 10px 16px; }
  .cpts-event-calendar--all > .cpts-event-calendar__trigger .cpts-event-calendar__chevron { background-size: 18px; flex-basis: 18px; height: 18px; width: 18px; }
  .cpts-event-filter-panel { align-self: stretch; border-radius: 0; margin-inline: -15px; min-height: 0; order: 6; padding: 0; width: auto; }
  .cpts-event-filter-panel > .cpts-filter-panel__trigger { align-items: center; color: var(--cpts-event-teal); display: flex; font-size: 15px; font-weight: 600; gap: 8px; padding: 13px 18px; text-decoration: none; }
  .cpts-event-filter-panel > .cpts-filter-panel__trigger .cpts-filter-panel__icon { height: 18px; width: 18px; }
  .cpts-event-filter-panel .cpts-filter-panel__desktop-label { display: none; }
  .cpts-event-filter-panel form { padding: 12px 18px 34px; }
  .cpts-event-filter-panel .cpts-filter-panel__heading { display: flex; }
  .cpts-event-filter-panel h2 { font-size: 21px; }
  .cpts-event-filter-panel fieldset { margin-top: 22px; }
  .cpts-event-filter-panel legend { font-size: 13px; }
  .cpts-event-filter-panel label { font-size: 12px; margin: 7px 0; }
  .cpts-event-filter-panel form > button { display: block; font-size: 14px; min-height: 44px; padding: 12px 22px; }
  .has-cpts-filter-drawer .cpts-event-filter-panel { display: contents; }
  .has-cpts-filter-drawer .cpts-event-filter-panel > .cpts-filter-panel__trigger {
    align-items: center;
    align-self: start;
    background: var(--cpts-event-teal);
    border-radius: 24px;
    box-sizing: border-box;
    color: var(--wp--preset--color--white);
    display: flex;
    font-size: 15px;
    font-weight: 600;
    gap: 8px;
    margin: 0 0 12px;
    min-height: 48px;
    order: 1;
    padding: 0 16px;
    text-decoration: none;
    width: fit-content;
  }
  .has-cpts-filter-drawer .cpts-event-filter-panel > .cpts-filter-panel__trigger .cpts-filter-panel__icon { height: 18px; width: 18px; }
  body.cpts-filter-drawer-open .cpts-event-surface {
    clip-path: none;
    z-index: 20;
  }
  .has-cpts-filter-drawer .cpts-event-filter-panel form {
    background: transparent;
    border-radius: 0;
    box-sizing: border-box;
    margin: 0;
    min-height: 100%;
    padding: 0;
    width: 100%;
  }
  .cpts-event-card { border: 1px solid var(--wp--custom--color--event-border); border-radius: 20px; display: block; min-height: 0; width: 100%; }
  .cpts-event-query .wp-block-post { margin-bottom: 16px; }
  .cpts-event-card:has(.cpts-event-month) { margin-top: 58px; }
  .cpts-event-month { border-radius: 14px; font-size: 14px; padding: 11px 14px; top: -48px; }
  .cpts-event-card-meta__date { border-radius: 14px; height: 62px; left: 12px; top: 12px; width: 62px; }
  .cpts-event-card-meta__date strong { font-size: 27px; }
  .cpts-event-card-meta__date span { font-size: 13px; }
  .cpts-event-card__media { border-radius: 19px 19px 0 0; height: 235px; min-height: 0; width: 100%; }
  .cpts-event-card__media img { border-radius: 19px 19px 0 0; object-position: center 20%; }
  .cpts-event-card__body { border: 0; display: block; padding: 13px 14px 18px; }
  /* Card action stays on the right in the stacked layout (30/08 rule). */
  .cpts-event-card__link { display: flex; margin-left: auto; width: fit-content; }
  .cpts-event-tags { gap: 5px; }
  .cpts-event-tags > :is(span, a) { font-size: 9px; padding: 5px 7px; }
  .cpts-event-card h2.wp-block-post-title { font-size: 18px; margin: 12px 0 9px; }
  .cpts-event-card-meta__time,
  .cpts-event-card-meta__venue,
  .cpts-event-card-meta__organizer { font-size: 11px; }
  .cpts-event-card-meta__time::before,
  .cpts-event-card-meta__venue::before { height: 15px; width: 15px; }
  .cpts-event-card__link { align-items: center; box-sizing: border-box; font-size: 12px; margin-top: 12px; min-height: 44px; padding: 10px 16px; }
  .cpts-event-single__layout { display: flex; flex-direction: column; gap: 28px; margin-block: var(--cpts-page-breadcrumb-heading-gap) 80px; }
  .cpts-event-single__poster { margin: 32px 0; }
  .cpts-event-single__aside { width: 100%; }
  .cpts-event-registration__disclosure > summary,
  .cpts-event-registration__external { margin-inline: 18px; }
  .cpts-event-registration__form { margin-inline: 18px; }
  .cpts-event-notice,
  .cpts-event-cancel { margin-inline: 18px; }
  .cpts-event-calendar--event { padding-inline: 18px; }
  .cpts-event-calendar--event .cpts-event-calendar__options { left: 18px; right: 18px; }
  .cpts-event-summary { border-radius: 22px 22px 0 0; padding: 25px; }
  .cpts-event-cta { display: none; }
}

@media (max-width: 599px) {
  .cpts-event-surface {
    --cpts-chip-font-size: 1rem;
    --cpts-chip-gap: 0.625rem;
    --cpts-chip-padding-block: 0.5rem;
    --cpts-chip-padding-inline: 1.125rem;
  }

  .cpts-event-hero {
    margin: var(--cpts-page-breadcrumb-heading-gap) auto 32px;
  }

  .cpts-event-hero .cpts-editorial-kicker {
    margin-bottom: var(--cpts-page-kicker-heading-gap);
  }

  .cpts-event-hero h1 {
    font-size: 35px;
    letter-spacing: 0;
    line-height: 45px;
  }

  .cpts-event-single h1 {
    font-size: 35px;
    letter-spacing: 0;
    line-height: 45px;
    overflow-wrap: anywhere;
    text-align: center;
  }

  .cpts-event-hero > p:last-child {
    font-size: 20px;
    line-height: 27px;
    margin-top: 28px;
    max-width: 360px;
  }

  .cpts-event-agenda-layout {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    margin-top: 0;
    min-width: 0;
  }

  .cpts-event-search {
    grid-column: 1 / -1;
    grid-row: 1;
    margin-bottom: 12px;
    width: 100%;
  }

  .cpts-event-search::before {
    background-size: 22px;
    height: 26px;
    left: 12px;
    top: 10px;
    width: 26px;
  }

  .cpts-event-search input {
    border-radius: 24px;
    font-size: 20px;
    height: 48px;
    padding-left: 44px;
  }

  .cpts-event-filter-panel {
    display: contents;
  }

  .editor-styles-wrapper .cpts-event-filter-panel .cpts-filter-drawer {
    display: none;
  }

  .cpts-event-filter-panel > .cpts-filter-panel__trigger,
  .has-cpts-filter-drawer .cpts-event-filter-panel > .cpts-filter-panel__trigger {
    align-items: center;
    align-self: center;
    background: var(--cpts-event-teal);
    border-radius: 24px;
    box-sizing: border-box;
    color: var(--wp--preset--color--white);
    font-size: 16px;
    gap: 6px;
    grid-column: 1;
    grid-row: 2;
    line-height: 27px;
    margin: 0;
    min-height: 48px;
    order: 0;
    padding: 0 10px;
  }

  .cpts-event-filter-panel .cpts-filter-panel__count {
    align-items: center;
    background: var(--cpts-event-yellow);
    border-radius: 50%;
    color: var(--wp--preset--color--white);
    display: inline-flex;
    font-size: 14px;
    height: 28px;
    justify-content: center;
    margin-left: 2px;
    width: 28px;
  }

  .cpts-event-views {
    align-items: center;
    background: var(--wp--custom--color--neutral-light);
    border-radius: 24px;
    box-sizing: border-box;
    display: flex;
    font-size: 16px;
    gap: 0;
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    margin: 0;
    min-width: 0;
    padding: 2px;
    width: min(210px, 100%);
  }

  .cpts-event-views a {
    align-items: center;
    border-bottom: 0;
    border-radius: 21px;
    color: var(--wp--preset--color--subtitle);
    display: flex;
    flex: 1;
    font-size: 16px;
    justify-content: center;
    line-height: 27px;
    min-height: 44px;
    min-width: 0;
    padding: 0 8px;
  }

  .cpts-event-views a[aria-current="page"] {
    background: var(--wp--preset--color--white);
    border-bottom-color: transparent;
    color: var(--cpts-event-teal);
  }

  .cpts-event-active-filters {
    display: flex;
    gap: 8px;
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: 12px;
  }

  .cpts-event-active-filters > a,
  .cpts-event-active-filters > span {
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
    padding: 2px 8px;
  }

  .cpts-event-active-filters > a > span,
  .cpts-event-active-filters > span > span {
    background: transparent;
    border-radius: 0;
    font: inherit;
    padding: 0;
  }

  .cpts-event-current-range {
    font-size: 22px;
    grid-column: 1 / -1;
    grid-row: 4;
    line-height: 27px;
    margin: 12px 0 16px;
  }

  .cpts-event-current-range button span {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    display: block;
    font-size: 0;
    height: 11px;
    transform: rotate(45deg) translateY(-3px);
    width: 11px;
  }

  .cpts-event-query {
    grid-column: 1 / -1;
    grid-row: 6;
    min-width: 0;
  }

  .cpts-event-query .wp-block-post {
    margin-bottom: 30px;
  }

  /* The month label is absolutely placed above its card, so the breathing
     room around it is carved out of the card margin: 36px above the label and
     36px between the label and the card it opens. The following months start
     from the 30px the previous post already contributes. */
  .cpts-event-query .wp-block-post + .wp-block-post:has(.cpts-event-month) .cpts-event-card {
    margin-top: 89px;
  }

  .cpts-event-card {
    border-radius: 30px;
  }

  .cpts-event-card:has(.cpts-event-month) {
    margin-top: 119px;
  }

  .cpts-event-month {
    border-radius: 10px;
    font-size: 20px;
    line-height: 27px;
    padding: 10px 15px;
    top: -83px;
  }

  .cpts-event-card-meta__date {
    border-radius: 20px;
    height: 87px;
    left: 26px;
    top: 18px;
    width: 92px;
  }

  .cpts-event-card-meta__date strong {
    font-size: 40px;
    line-height: 44px;
  }

  .cpts-event-card-meta__date span {
    font-size: 20px;
    line-height: 24px;
  }

  .cpts-event-card__media {
    border-radius: 29px 29px 0 0;
    height: 235px;
  }

  .cpts-event-card__media img {
    border-radius: 29px 29px 0 0;
    object-position: center;
  }

  .cpts-event-card__body {
    padding: 28px 14px 30px;
  }

  .cpts-event-tags {
    gap: 6px 8px;
  }

  .cpts-event-tags > :is(span, a) {
    font-size: 16px;
    line-height: 27px;
    padding: 3px 8px;
  }

  .cpts-event-tags .cpts-event-tag__desktop {
    display: none;
  }

  .cpts-event-tags .cpts-event-tag__mobile {
    background: transparent;
    display: inline;
    padding: 0;
  }

  .cpts-event-card h2.wp-block-post-title {
    font-size: 25px;
    line-height: 32px;
    margin: 14px 0 12px;
  }

  .cpts-event-card-details > div {
    gap: 4px;
    margin-right: -14px;
    width: calc(100% + 14px);
  }

  .cpts-event-card-meta__time,
  .cpts-event-card-meta__venue {
    font-size: 18px;
    line-height: 27px;
  }

  .cpts-event-card-meta__organizer {
    font-size: 20px;
    line-height: 27px;
    margin-top: 8px;
  }

  .cpts-event-card-meta__time::before,
  .cpts-event-card-meta__venue::before {
    height: 23px;
    width: 23px;
  }

  .cpts-event-card__link {
    box-sizing: border-box;
    font-size: 20px;
    line-height: 27px;
    margin-top: 18px;
    min-height: 52px;
    padding: 12px 28px;
  }

  .cpts-event-index .is-style-cpts-pagination {
    margin-block: 30px 12px;
  }

  .cpts-event-calendar--top {
    align-self: center;
    grid-column: 1 / -1;
    grid-row: 5;
    justify-self: end;
    margin: 0 8px 16px;
  }

  .cpts-event-calendar--bottom {
    align-self: center;
    grid-column: 1 / -1;
    grid-row: 7;
    justify-self: end;
    margin: 34px 8px 50px;
  }

  .cpts-event-calendar--all > .cpts-event-calendar__trigger {
    font-size: 20px;
    font-weight: 600;
    line-height: 27px;
  }

  .cpts-event-filter-panel form {
    background: var(--cpts-event-light);
    border-radius: 30px 30px 0 0;
    box-sizing: border-box;
    grid-column: 1 / -1;
    grid-row: 8;
    margin-inline: -15px;
    padding: 55px 15px 20px;
    width: 100vw;
  }

  .cpts-event-index .cpts-empty-state {
    padding: 2rem 1.25rem;
  }

  .cpts-event-filter-panel .cpts-filter-panel__heading {
    align-items: baseline;
  }

  .cpts-event-filter-panel h2 {
    font-size: 30px;
    line-height: 42px;
  }

  .cpts-event-filter-panel .cpts-filter-panel__heading a {
    font-size: 20px;
    line-height: 42px;
  }

  .cpts-event-filter-panel fieldset {
    margin-top: 12px;
  }

  .cpts-event-filter-panel legend {
    font-size: 22px;
    line-height: 42px;
    margin-bottom: 0;
  }

  .cpts-event-filter-panel label {
    font-size: 20px;
    line-height: 27px;
    margin: 0;
  }

  .cpts-event-filter-panel label + label {
    margin-top: 2px;
  }

  .cpts-event-filter-panel input[type="checkbox"] {
    margin-top: 2px;
    flex: 0 0 23px;
    height: 23px;
    width: 23px;
  }

  .cpts-event-filter-panel form > button {
    font-size: 20px;
    margin: 11px auto 0;
    min-height: 58px;
    padding: 14px 32px;
  }

  body:has(.cpts-event-index) .cpts-home-newsletter {
    height: auto;
    margin-top: 0;
  }
}

@media (min-width: 1198px) {
  .cpts-event-index {
    --cpts-event-filter-sticky-offset: 28px;
  }

  .cpts-event-agenda-layout {
    grid-template-rows: max-content max-content max-content minmax(0, 1fr) max-content;
    min-height: calc(100vh - var(--cpts-event-filter-sticky-offset) - 28px);
  }

  .cpts-event-agenda-layout:has(.cpts-event-period-nav) {
    grid-template-rows: max-content max-content max-content max-content minmax(0, 1fr) max-content;
  }

  body.admin-bar .cpts-event-index {
    --cpts-event-filter-sticky-offset: 60px;
  }

  .cpts-event-index .cpts-event-filter-panel {
    align-self: start;
    max-height: calc(100vh - var(--cpts-event-filter-sticky-offset) - 28px);
    overflow-y: auto;
    overscroll-behavior: contain;
    position: sticky;
    top: var(--cpts-event-filter-sticky-offset);
  }

  .cpts-event-filter-panel .cpts-filter-panel__mobile-label { display: none; }
  .cpts-event-single__layout {
    gap: 74px;
  }
  .cpts-event-single__main { flex-grow: 1 !important; }
  .cpts-event-single__aside { align-self: flex-start; flex-grow: 1 !important; margin-top: 64px !important; position: sticky; top: 28px; }
  body.admin-bar .cpts-event-single__aside { top: 60px; }
}

/* Vues Mois et Jour.
   Les trois régimes de l'agenda numérotent leurs rangées ou leurs order ;
   l'insertion se fait donc sous :has() pour laisser le régime Liste, calibré
   sur le XD, strictement inchangé. */
.cpts-event-period-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: space-between;
  margin: 0 0 16px;
}

.cpts-event-period-nav strong {
  color: var(--cpts-event-teal);
  font-size: 20px;
  font-weight: 700;
}

.cpts-event-period-nav a {
  align-items: center;
  border: 2px solid var(--cpts-event-teal);
  border-radius: 10px;
  box-sizing: border-box;
  color: var(--cpts-event-teal);
  display: inline-flex;
  font-size: 18px;
  font-weight: 600;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  text-decoration: none;
  transition: background-color var(--wp--custom--transition) ease, color var(--wp--custom--transition) ease;
}

.cpts-event-period-nav a:focus-visible {
  background: var(--cpts-event-teal);
  color: var(--wp--preset--color--white);
}

@media (min-width: 1118px) and (hover: hover) and (pointer: fine) {
  .cpts-event-period-nav a:hover {
    background: var(--cpts-event-teal);
    color: var(--wp--preset--color--white);
  }
}

.cpts-event-active-filters .cpts-event-active-filter {
  text-decoration: none;
}

.wp-block-cpts-event-month-grid {
  margin-block: 0 28px;
  min-width: 0;
}

/* Month results replace the card query at every width. */
.cpts-event-agenda-layout:has(.wp-block-cpts-event-month-grid) .cpts-event-query {
  display: none;
}

@media (min-width: 1198px) {
  .cpts-event-period-nav {
    grid-column: 2;
    grid-row: 3;
    margin-right: 8px;
  }

  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .cpts-event-query,
  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .wp-block-cpts-event-month-grid {
    grid-column: 2;
    grid-row: 5;
    min-width: 0;
  }

  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .cpts-event-calendar--top {
    grid-row: 4;
  }

  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .cpts-event-calendar--bottom {
    grid-row: 6;
  }

  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .cpts-event-filter-panel {
    grid-row: 1 / span 6;
  }
}

/* Intermediate column: controls, top subscription, results, bottom reminder, filters. */
@media (min-width: 600px) and (max-width: 1197px) {
  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .cpts-event-period-nav {
    order: 3;
  }

  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .cpts-event-calendar--top {
    order: 4;
  }

  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .cpts-event-query,
  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .wp-block-cpts-event-month-grid {
    order: 5;
  }

  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .cpts-event-calendar--bottom {
    order: 6;
  }

  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .cpts-event-filter-panel {
    order: 7;
  }
}

/* Mobile grid: the period precedes the top subscription and results. */
@media (max-width: 599px) {
  .cpts-event-period-nav {
    font-size: 14px;
    gap: 8px 12px;
    grid-column: 1 / -1;
    grid-row: 5;
    margin-bottom: 18px;
  }

  .cpts-event-period-nav strong {
    font-size: 16px;
    order: -1;
    width: 100%;
  }

  /* Les deux contrôles encadrent le mois sur desktop ; en colonne étroite ils
     partagent la largeur au lieu de s'empiler. */
  .cpts-event-period-nav {
    align-items: stretch;
  }

  .cpts-event-period-nav a {
    flex: 1 1 0;
    font-size: 15px;
    justify-content: center;
    padding: 8px 10px;
    text-align: center;
  }

  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .cpts-event-query,
  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .wp-block-cpts-event-month-grid {
    grid-column: 1 / -1;
    grid-row: 6;
  }

  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .cpts-event-calendar--top {
    grid-row: 7;
  }

  .cpts-event-agenda-layout .cpts-event-calendar--bottom {
    display: none;
  }

  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .cpts-event-calendar--bottom {
    grid-row: 8;
  }

  .cpts-event-agenda-layout:has(.cpts-event-period-nav) .cpts-event-filter-panel form {
    grid-row: 9;
  }
}

/* Carte de réservation : séparateur puis les trois actions de la maquette. */
.cpts-event-booking-panel .cpts-event-summary {
  border-bottom: 1px solid var(--wp--preset--color--teal-light);
  margin-inline: 44px;
  padding-inline: 0;
}

@media (max-width: 599px) {
  .cpts-event-booking-panel .cpts-event-summary {
    margin-inline: 24px;
  }
}

/* Cartes evenement entierement cliquables et hover zoom + fleche. Les badges
   flottants (date, mois) ne portent aucune interaction : ils laissent passer
   le clic vers le lien etire. */
.cpts-event-card .wp-block-group-is-layout-constrained {
  position: static;
}

.cpts-event-card h2.wp-block-post-title a::after,
.cpts-event-related-card .wp-block-post-title a::after {
  content: "";
  inset: 0;
  position: absolute;
}

.cpts-event-card-meta__date,
.cpts-event-month {
  pointer-events: none;
}

.cpts-event-card__media img,
.cpts-event-card__link::after {
  transition: transform 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (min-width: 1118px) and (hover: hover) and (pointer: fine) {
  .cpts-event-card:hover .cpts-event-card__media img {
    transform: scale(1.04);
  }

  .cpts-event-card:hover .cpts-event-card__link::after {
    transform: var(--cpts-glyph-shift, translateX(4px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .cpts-event-card__media img,
  .cpts-event-card__link::after {
    transition: none;
  }

  .cpts-event-calendar__options {
    transform: none;
    transition: opacity 200ms cubic-bezier(0.23, 1, 0.32, 1), visibility 200ms;
  }

  .cpts-event-registration__disclosure::details-content {
    transition: content-visibility 200ms allow-discrete, opacity 200ms cubic-bezier(0.23, 1, 0.32, 1);
  }

  .cpts-event-registration__disclosure[open]::details-content {
    height: auto;
  }
}

@media (min-width: 1118px) and (hover: hover) and (pointer: fine) {
  .cpts-event-active-filter:hover {
    background: var(--cpts-event-teal);
    color: var(--wp--preset--color--white);
  }

  .cpts-event-card__link:hover,
  .cpts-event-filter-panel form > button:hover,
  .cpts-event-search button:hover,
  .cpts-event-registration button:hover,
  .cpts-event-registration__external:hover,
  .cpts-event-registration__disclosure > summary:hover {
    background: var(--wp--preset--color--coral-dark);
  }

  .cpts-event-calendar--event > .cpts-event-calendar__question:hover {
    background: var(--wp--preset--color--coral-dark);
    border-color: var(--wp--preset--color--coral-dark);
    color: var(--wp--preset--color--white);
  }

  .cpts-event-views a:hover {
    border-bottom-color: var(--cpts-event-teal);
  }

  .cpts-event-filter-panel .cpts-filter-panel__heading a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

/* Menu « Ajouter au calendrier » : ombre pour detacher le panneau du fond, et
   pont invisible au-dessus des options pour que le survol ne se perde pas en
   traversant l'interstice trigger -> menu. */
.cpts-event-calendar__options {
  box-shadow: var(--wp--custom--shadow--card, 0 12px 30px rgb(0 0 0 / 18%));
}

.cpts-event-calendar__options::before {
  content: "";
  height: 14px;
  left: 0;
  position: absolute;
  right: 0;
  top: -14px;
}


/* Meta de carte : l'icone ne doit jamais etre compressee par un lieu long ;
   sur plusieurs lignes elle se cale sur la premiere (meme regle que les
   cases du panneau de filtres). */
.cpts-event-card-meta__time,
.cpts-event-card-meta__venue {
  align-items: flex-start;
}

.cpts-event-card-meta__time::before,
.cpts-event-card-meta__venue::before {
  /* flex-basis auto : chaque regime garde sa width (23px, 15px mobile) sans
     jamais laisser un lieu long compresser l'icone. */
  flex: 0 0 auto;
  /* (line-height 27 - icone 23) / 2 : centree sur la premiere ligne. */
  margin-top: 2px;
}

/* Regime liste compacte : l'icone 15px remplit sa ligne, pas de calage. */
@media (min-width: 600px) and (max-width: 1197px) {
  .cpts-event-card-meta__time::before,
  .cpts-event-card-meta__venue::before {
    margin-top: 0;
  }
}

/* Le selecteur de periode est un vrai <select> en appearance:none : sans
   indicateur, rien ne dit qu'il se deroule. */
.cpts-event-current-range select {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%2301727e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='m2 2 5 5 5-5'/%3E%3C/svg%3E") right center / 13px 9px no-repeat;
  padding-right: 21px;
}

/* Le bouton « Appliquer » n'est qu'un repli sans JavaScript (le select se
   soumet au change) : masque accessible, le chevron du select porte seul
   l'affordance. */
.cpts-event-current-range button {
  clip-path: inset(50%);
  height: 1px;
  margin: 0;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* Uniformisation 30/08 : action de carte a droite, et retour de survol pour
   la carte d'evenement associe qui n'en avait aucun malgre son lien etire. */
.cpts-event-card__link {
  justify-self: end;
}

@media (min-width: 1118px) and (hover: hover) and (pointer: fine) {
  .cpts-event-related-card:hover {
    background: var(--cpts-event-light);
    border-color: var(--cpts-event-teal);
  }

  .cpts-event-related-card:hover .wp-block-post-title,
  .cpts-event-related-card:hover .wp-block-post-title a {
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .cpts-event-related-card:hover::after {
    transform: translateX(4px);
  }
}

/* An image attachment fills its box instead of floating inside the icon frame.
   Outer dimensions stay identical, so the XD geometry contract is untouched. */
.cpts-event-files img.is-preview {
  background: none;
  object-fit: cover;
  padding: 0;
}


/* Barre d'outils Agenda en mobile : la page porte déjà le contexte, le complément du
   libellé n'a plus à occuper toute la largeur. Il reste lisible par les lecteurs
   d'écran, et revient en entier dès qu'il y a la place. */
@media (max-width: 600px) {
  .cpts-event-calendar__trigger-scope {
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .cpts-event-calendar--all .cpts-event-calendar__trigger {
    width: auto;
  }

  /* La période mesurait 27px de haut contre 48px pour Filtres : sous la cible tactile
     et visuellement bancal. Même gabarit, même ligne. */
    .cpts-event-tools #cpts-event-range {
    height: 48px;
    min-height: 48px;
  }

  .cpts-event-tools form:has(#cpts-event-range) {
    align-items: center;
    display: flex;
    gap: 0.5rem;
  }

  .cpts-event-tools form:has(#cpts-event-range) button[type="submit"] {
    height: 48px;
    min-height: 48px;
    min-width: 48px;
  }
}

.cpts-event-registration__form .cpts-form-altcha-notice { justify-content: center; }
