.horizon-event-listing, .horizon-event-single {
    --agenda-ink: #20205f;
    --agenda-muted: #514d67;
    --agenda-line: #ded8e7;
    --agenda-paper: #faf8f5;
    --agenda-wash: #efebf7;
}
.horizon-event-listing .horizon-inner-hero { min-height: 0; padding-block: clamp(1.25rem, 3vw, 2.5rem); }
.horizon-event-listing .horizon-inner-hero__content { padding-block: 0; }
.horizon-event-listing .horizon-inner-hero h1 { margin: 0; }
.horizon-event-listing .horizon-inner-hero p { margin-block: .55rem 0; }
.horizon-event-listing .horizon-event-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .25rem;
    max-width: 680px;
    border-bottom: 1px solid var(--agenda-line);
    margin: 0 0 1.5rem;
}
.horizon-event-listing .horizon-event-tabs a {
    display: grid;
    align-items: center;
    text-align: center;
    padding: .6rem .25rem;
    min-height: 48px;
    color: var(--agenda-muted);
    text-decoration: none;
    border: 0;
    border-radius: .45rem .45rem 0 0;
}
.horizon-event-listing .horizon-event-tabs a[aria-current="page"] {
    color: var(--agenda-ink);
    background: var(--agenda-wash);
    box-shadow: inset 0 -2px var(--agenda-ink);
    font-weight: 700;
}
.agenda-month { margin: 1.4rem 0; }
.agenda-month h2 {
    margin: 0 0 .4rem;
    color: var(--agenda-ink);
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    text-transform: capitalize;
}
.agenda-rows { margin: 0; padding: 0; list-style: none; }
.agenda-rows li + li { border-top: 1px solid var(--agenda-line); }
.agenda-row {
    display: grid;
    grid-template-columns: minmax(74px, 6.8rem) minmax(0, 1fr) 2rem;
    gap: clamp(.5rem, 2vw, 1.35rem);
    align-items: center;
    padding: .55rem .4rem;
    min-height: 76px;
    color: var(--agenda-ink);
    text-decoration: none;
    border-radius: .5rem;
}
.agenda-row:hover, .horizon-event-tabs a:hover { background: #ede9f394; }
.agenda-row--reserved {
    margin-block: .28rem;
    background: #eff3f8;
}
.agenda-row--reserved:hover { background: #e9eef6; }
.agenda-row--reserved .agenda-tile { background: #fff9; }
.agenda-row:focus-visible, .agenda-hero a:focus-visible, .horizon-event-tabs a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}
.agenda-tile {
    display: grid;
    place-content: center;
    padding: .5rem .2rem;
    text-align: center;
    border-radius: .45rem;
    background: var(--agenda-wash);
    min-height: 50px;
}
.agenda-tile__day { font-size: clamp(.8rem, 2vw, 1.26rem); font-weight: 750; line-height: 1.1; }
.agenda-tile__month { font-size: .78rem; font-weight: 650; text-transform: uppercase; }
.agenda-tile__range { font-size: .7rem; line-height: 1.25; }
.agenda-tile--forecast { color: #4e5a74; font-style: italic; }
.agenda-date-note { margin: .4rem 0 0; color: var(--agenda-muted); font-size: .8125rem; line-height: 1.4; }
.agenda-row__title { font-size: clamp(1rem, 2vw, 1.28rem); font-weight: 740; line-height: 1.25; }
.agenda-row__notes { display: flex; flex-wrap: wrap; gap: .1rem .65rem; margin-top: .18rem; color: var(--agenda-muted); font-size: .94rem; line-height: 1.4; }
.agenda-row__hours { color: var(--agenda-ink); font-weight: 680; white-space: nowrap; }
.agenda-row__arrow { justify-self: end; font-size: 1.25rem; }
.agenda-badge { display: inline-block; margin: .22rem .5rem; padding: .16rem .5rem; border-radius: 20px; background: #f4e4ec; color: #732b43; font-size: .75rem; font-weight: 700; }
.agenda-return { padding: .9rem 0; font-size: .94rem; }
.agenda-return a { color: var(--agenda-ink); }
.agenda-hero { color: #fff; background: linear-gradient(114deg, #1e1c49, var(--agenda-tone, #302857)); }
.agenda-hero:is([data-visual="sfmu"],[data-visual="urgences"]) { --agenda-tone: #23454f; }
.agenda-hero:is([data-visual="fncdr"],[data-visual="bmpm"]) { --agenda-tone: #492a45; }
.agenda-hero[data-visual="amarante"] { --agenda-tone: #1a2847; }
.agenda-hero__inner { max-width: var(--wp--style--global--wide-size, 1160px); margin-inline: auto; padding: 1.3rem 1.35rem; }
.agenda-hero__inner--illustrated { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 35%); gap: clamp(1rem, 3vw, 3rem); align-items: center; }
.agenda-hero[data-visual="amarante"] .agenda-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 25%); }
.agenda-hero h1 { color: #fff; margin: 0; font-size: clamp(1.9rem, 4.35vw, 3.5rem); line-height: 1.07; letter-spacing: -.035em; text-wrap: pretty; }
.agenda-hero__subtitle { display: block; margin-top: .5rem; color: #fcf7df; }
.agenda-hero__jump {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 42px;
    margin: .65rem 0 0;
    padding: .2rem .62rem;
    color: #fff;
    text-decoration: none;
    border: 1px solid #e9def0a8;
    border-radius: .42rem;
}
.agenda-hero__jump:hover { background: #ffffff20; color: #fff; }
.agenda-art {
    position: relative;
    height: clamp(92px, 13vw, 160px);
    overflow: hidden;
    border: 1px solid #ffffff44;
    border-radius: .5rem;
    background: var(--art-bg, #f3f6f5);
}
.agenda-art img { position: absolute; inset: 0; width: 88%; height: 78%; margin: auto; object-fit: contain; }
[data-visual="carum"] .agenda-art { --art-bg: #fff; }
[data-visual="carum"] .agenda-art img { max-width: 208px; }
[data-visual="fncdr"] .agenda-art { --art-bg: #811553; }
[data-visual="fncdr"] .agenda-art img { max-width: 85px; }
[data-visual="bspp"] .agenda-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 64%; }
[data-visual="bmpm"] .agenda-art { height: auto; aspect-ratio: 4.6; }
.agenda-hero[data-visual="bmpm"] .agenda-art { display: block; box-sizing: border-box; width: 100%; }
.agenda-hero[data-visual="bmpm"] .agenda-hero__inner > p:has(> .agenda-art) { margin: 0; }
[data-visual="bmpm"] .agenda-art img { inset: 0 auto auto 0; width: 152%; height: auto; max-width: none; margin: 0; }
[data-visual="amarante"] .agenda-art { height: auto; aspect-ratio: 440 / 319; --art-bg: #1a2847; }
[data-visual="amarante"] .agenda-art img { inset: -15.9875% auto auto -93.1818%; width: 286.3636%; height: auto; max-width: none; margin: 0; }
.agenda-facts { color: var(--agenda-ink); padding: 1rem 0 .6rem; }
.agenda-facts h2, .agenda-programme h2 { margin: 0 0 .55rem; font-size: 1.25rem; }
.agenda-facts dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); margin: 0; gap: .5rem; padding: .9rem; border: 1px solid var(--agenda-line); border-radius: .6rem; background: var(--agenda-paper); }
.agenda-facts dt { color: var(--agenda-muted); font-size: .84rem; }
.agenda-facts dd { margin: 0; font-weight: 670; line-height: 1.4; overflow-wrap: anywhere; }
.agenda-facts__link { display: inline-block; margin-top: .6rem; color: var(--agenda-ink); }
.agenda-programme { max-width: min(100%, 780px); margin-block: 1.5rem; color: var(--agenda-ink); }
.agenda-programme__bar, .agenda-programme__controls { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: .65rem .8rem; background: var(--agenda-wash); }
.agenda-programme__controls[hidden], .agenda-programme__page[hidden] { display: none; }
.agenda-programme__controls button { min-height: 42px; color: var(--agenda-ink); background: #fff; border: 1px solid var(--agenda-line); border-radius: .4rem; cursor: pointer; }
.agenda-programme__controls button:disabled { color: var(--agenda-muted); cursor: default; }
.agenda-programme__page { margin: 0; border: 1px solid var(--agenda-line); border-radius: 0 0 .45rem .45rem; background: var(--agenda-paper); }
.agenda-programme__page img { display: block; width: 100%; height: auto; }
.agenda-programme__page figcaption { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem .75rem; }
@media (max-width: 640px) {
    .horizon-event-listing .horizon-event-tabs a { font-size: .85rem; line-height: 1.25; }
    .agenda-row { grid-template-columns: 69px minmax(0, 1fr) 1rem; }
    .agenda-row__notes { display: block; font-size: .84rem; }
    .agenda-row__location { display: block; }
    .agenda-hero__inner--illustrated { grid-template-columns: minmax(0, 1fr); }
    .agenda-hero[data-visual="amarante"] .agenda-hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 33%); }
    .agenda-facts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .agenda-facts dl > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.agenda-row--illustrated { grid-template-columns: minmax(74px, 6.8rem) minmax(0, 1fr) clamp(56px, 8.5vw, 104px) 2rem; }
.agenda-art--thumbnail { display: block; height: auto; aspect-ratio: 1.9; }
.agenda-intro-title { margin: 0 0 .55rem; color: var(--agenda-ink); font-size: 1.35rem; }
.agenda-intro { color: var(--agenda-ink); }
.agenda-programme__note { margin: 0; padding: .5rem .8rem; color: var(--agenda-muted); }
#programme-evenement { scroll-margin-top: 24px; }
.agenda-programme__dialog {
    width: min(1000px, calc(100% - 28px));
    max-height: 92dvh;
    padding: 0;
    color: var(--agenda-ink);
    background: var(--agenda-paper);
    border: 1px solid var(--agenda-line);
    border-radius: .6rem;
}
.agenda-programme__dialog::backdrop { background: #171642a8; }
.agenda-programme__dialog form { display: flex; justify-content: end; padding: .45rem .7rem; border-bottom: 1px solid var(--agenda-line); }
.agenda-programme__dialog button { min-height: 44px; padding-inline: .65rem; }
.agenda-programme__zoom { max-height: calc(92dvh - 60px); overflow: auto; }
.agenda-programme__zoom img { display: block; width: max(680px, 100%); max-width: none; height: auto; }

[data-visual="histoire"] .agenda-art,
[data-visual="unvr"] .agenda-art { height: auto; aspect-ratio: 2.45; }
[data-visual="histoire"] .agenda-art { --art-bg: #fff; }
[data-visual="histoire"] .agenda-art img { inset: -58% auto auto -166%; margin: 0; width: 432%; height: auto; max-width: none; }
[data-visual="unvr"] .agenda-art { aspect-ratio: 2.25; --art-bg: #082849; }
[data-visual="unvr"] .agenda-art img { inset: -20.5% auto auto -33.33%; margin: 0; width: 166.67%; height: auto; max-width: none; }

.agenda-badges { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .28rem; }
.agenda-hero .agenda-badges { display: flex; margin-top: .65rem; }
.agenda-badges .agenda-badge { margin: 0; }
.agenda-badge--forecast { background: #f5f0df; color: #594415; }
.agenda-hero .agenda-badge--forecast { color: #fff; background: transparent; box-shadow: inset 0 0 0 1px #ffedfd99; }

.agenda-hero[data-motif="a"] {
    --agenda-shade: #3e477d;
    --agenda-mark: #909de1;
    --agenda-lanes: repeating-linear-gradient(104deg, transparent 0 27px, var(--motif-stroke) 28px 29px, transparent 30px 56px);
}
.agenda-hero[data-motif="b"] {
    --agenda-shade: #532c54;
    --agenda-mark: #cf92b7;
    --agenda-lanes: repeating-linear-gradient(113deg, transparent 0 23px, var(--motif-stroke) 24px 25px, transparent 26px 30px, var(--motif-stroke) 31px 32px, transparent 33px 61px);
}
.agenda-hero[data-motif="c"] {
    --agenda-shade: #21464e;
    --agenda-mark: #75c4b9;
    --agenda-lanes: repeating-linear-gradient(147deg, transparent 0 47px, var(--motif-stroke) 48px 52px, transparent 53px 72px);
}
.agenda-hero[data-motif="d"] {
    --agenda-shade: #50404d;
    --agenda-mark: #d7a76e;
    --agenda-lanes: repeating-linear-gradient(170deg, transparent 0 23px, var(--motif-stroke) 24px 25px, transparent 26px 47px);
}
.agenda-hero[data-motif] {
    --motif-stroke: color-mix(in srgb, var(--agenda-mark) 21%, transparent);
    background: var(--agenda-lanes), linear-gradient(116deg, #1d1b4c, var(--agenda-shade));
}
@media (max-width: 640px) {
    .agenda-row--illustrated { grid-template-columns: 64px minmax(0, 1fr) 45px .75rem; gap: .4rem; }
    .agenda-art--thumbnail { min-height: 26px; }
}
@media (max-width: 359px) {
    .agenda-row--illustrated { grid-template-columns: 56px minmax(0, 1fr) 34px .6rem; }
    .agenda-hero[data-visual="amarante"] .agenda-hero__inner { grid-template-columns: minmax(0, 1fr); }
}
.horizon-event-listing .horizon-listing__content,
.horizon-event-single .horizon-event-content { padding-block-start: clamp(1.2rem, 2.7vw, 2rem); }
.horizon-event-listing .horizon-event-tabs { max-width: none; }
.horizon-event-single .agenda-description > h2:first-child,
.horizon-event-single .agenda-programme > h2:first-child { margin-top: 0; font-size: clamp(1.25rem, 2.3vw, 1.55rem); }
.horizon-event-single .agenda-programme a[href*=".pdf"] { padding: .25rem 0; border: 0; background: transparent; }
.horizon-event-single .agenda-programme__note { line-height: 1.45; }
@media (min-width: 900px) {
    .horizon-event-single .horizon-event-content:has(.agenda-programme) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
        align-items: start;
        gap: clamp(1.35rem, 3.5vw, 3rem);
        max-width: var(--wp--style--global--wide-size, 1160px) !important;
    }
    .horizon-event-single .horizon-event-content:has(.agenda-programme) > :is(.agenda-description,.agenda-programme) {
        width: 100%;
        max-width: none;
        margin: 0;
    }
}

/* Archive controls. */
.agenda-size {
    display: flex;
    justify-content: end;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem .6rem;
    margin-block: .4rem 1.25rem;
    color: var(--agenda-ink);
    font-size: .9rem;
}
.agenda-size label { font-weight: 650; }
.agenda-size select, .agenda-size button,
.agenda-pagination a, .agenda-pagination [aria-current="page"] {
    box-sizing: border-box;
    min-height: 44px;
    min-width: 44px;
    border: 1px solid var(--agenda-line);
    border-radius: .44rem;
    background: var(--agenda-paper);
    color: var(--agenda-ink);
    font: inherit;
}
.agenda-size select, .agenda-size button { padding-inline: .65rem; }
.agenda-size select, .agenda-size button { cursor: pointer; }
.agenda-size button { font-weight: 700; }
.agenda-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin-block: 1.65rem .5rem;
    padding-block-start: 1rem;
    border-block-start: 1px solid var(--agenda-line);
}
.agenda-pagination a, .agenda-pagination [aria-current="page"] {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: .3rem;
    padding-inline: .54rem;
    text-decoration: none;
    line-height: 1.2;
    font-size: .91rem;
    font-weight: 700;
}
.agenda-pagination [aria-current="page"] {
    border-color: var(--agenda-ink);
    background: var(--agenda-ink);
    color: #fff;
}
.agenda-pagination__gap { padding-inline: .12rem; color: var(--agenda-muted); }
.agenda-size button:hover, .agenda-pagination a:hover { background: var(--agenda-wash); }
.agenda-size :is(select, button):focus-visible, .agenda-pagination a:focus-visible {
    outline: 2px solid var(--agenda-ink);
    outline-offset: 2px;
}
@media (max-width: 640px) {
    .agenda-size { justify-content: start; }
}
