/* Fiche publique Events : palette et composants EspaceRomand. */
.erc-event-page > .erc-event-article { width: 100%; max-width: 1120px; margin-inline: auto; }
.erc-event-page-header { margin: 20px 0 24px; }
.erc-event-page-header .entry-title { color: #183e64; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.2; overflow-wrap: anywhere; }
.erc-event-single { color: #183e64; margin-bottom: 36px; }
.erc-event-single *, .erc-event-single *::before, .erc-event-single *::after { box-sizing: border-box; }
.erc-event-categories { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.erc-event-categories a, .erc-event-categories span { padding: 6px 12px; border-radius: 20px; background: #e8f2f7; color: #075f7c; font-weight: 600; text-decoration: none; }
.erc-event-categories a:hover { background: #d4e8f0; }
.erc-event-overview { padding: 22px 24px; border: 1px solid #dce6e5; border-radius: 14px; background: #f7fafc; }
.erc-event-overview dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 0; }
.erc-event-overview dt { color: #526779; font-size: .875rem; margin: 0 0 5px; }
.erc-event-overview dd { margin: 0; font-weight: 600; }
.erc-event-time { display: block; font-size: 1.5rem; color: #075f7c; margin-top: 4px; }
.erc-event-overview > p, .erc-event-schedule-note { color: #526779; font-size: .875rem; margin: 14px 0 0; }
.erc-event-hero { margin: 24px 0 30px; }
.erc-event-hero img, .erc-event-featured-image { display: block; width: 100%; height: auto; max-height: 500px; object-fit: cover; border-radius: 14px; }
.erc-event-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr); gap: 30px; margin-top: 28px; align-items: start; }
.erc-event-main, .erc-event-sidebar { min-width: 0; }
.erc-event-layout.erc-event-layout-wide { grid-template-columns: minmax(0, 1fr); }
.erc-event-single h2 { margin: 0 0 18px; color: #075f7c; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.3; }
.erc-event-description-content { line-height: 1.75; overflow-wrap: anywhere; }
.erc-event-description-content img, .erc-event-description-content video, .erc-event-description-content iframe { max-width: 100%; }
.erc-event-description-content p:last-child { margin-bottom: 0; }
.erc-event-panel { padding: 22px; margin: 0 0 20px; border: 1px solid #e5eaf0; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(17, 24, 39, .04); overflow-wrap: anywhere; }
.erc-event-panel p { margin: 0 0 12px; }
.erc-event-panel p:last-child { margin-bottom: 0; }
.erc-event-venue, .erc-event-organizer { font-weight: 700; }
.erc-event-location { color: #526779; line-height: 1.6; }
.erc-event-price { color: #075f7c; font-size: 1.2rem; font-weight: 700; }
.erc-event-contact-link, .erc-event-website { color: #075f7c; text-underline-offset: 3px; }
.erc-event-ticket-link { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 12px 20px; margin-top: 6px; border-radius: 8px; background: #075f7c; color: #fff; font-weight: 700; text-decoration: none; }
.erc-event-ticket-link:hover { background: #05465c; color: #fff; }
.erc-event-gallery-viewer { margin-top: 32px; }
.erc-event-gallery-help { color: #526779; font-size: .875rem; margin-bottom: 14px; }
.erc-event-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 14px; }
.erc-event-gallery figure { margin: 0; min-width: 0; }
.erc-event-gallery a { display: block; border-radius: 10px; overflow: hidden; background: #f2f6f8; }
.erc-event-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.erc-event-gallery figcaption { margin-top: 7px; color: #526779; font-size: .8rem; text-align: center; }
.erc-event-single a:focus-visible, .erc-event-lightbox button:focus-visible { outline: 3px solid #267b96; outline-offset: 4px; }
.erc-event-lightbox { width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 18px; margin: auto; border: 0; border-radius: 14px; color: #183e64; background: #fff; box-shadow: 0 20px 70px #0005; }
.erc-event-lightbox:not([open]), .erc-event-lightbox [hidden] { display: none !important; }
.erc-event-lightbox::backdrop { background: rgba(10, 27, 41, .85); }
.erc-event-lightbox-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.erc-event-lightbox-toolbar h2 { margin: 0; font-size: 1.2rem; color: #183e64; }
.erc-event-lightbox button { min-height: 44px; padding: 10px 14px; border: 1px solid #267b96; border-radius: 7px; color: #183e64; background: #fff; font: inherit; cursor: pointer; }
.erc-event-lightbox-stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 180px; }
.erc-event-lightbox-stage img { display: block; width: 100%; height: auto; max-height: 70vh; max-height: 70dvh; object-fit: contain; }
.erc-event-lightbox [data-erc-gallery-counter] { text-align: center; font-weight: 600; margin: 14px 0 0; }
.erc-event-lightbox [data-erc-gallery-error] { padding: 14px; border: 1px solid #d8a59c; background: #fff4f1; border-radius: 8px; }
body.erc-event-gallery-open { overflow: hidden; }
.erc-event-back { margin-top: 30px; }
.erc-event-back a { display: inline-flex; padding: 12px 18px; border: 1px solid #075f7c; border-radius: 8px; color: #075f7c; background: #fff; font-weight: 600; text-decoration: none; }
.erc-event-back a:hover { background: #075f7c; color: #fff; }
@media (max-width: 767px) {
    .erc-event-layout { grid-template-columns: 1fr; gap: 24px; }
    .erc-event-overview { padding: 18px; }
    .erc-event-overview dl { gap: 16px; }
    .erc-event-panel { padding: 18px; }
    .erc-event-hero img { max-height: 340px; }
    .erc-event-ticket-link { width: 100%; }
    .erc-event-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .erc-event-lightbox { padding: 12px; }
    .erc-event-lightbox-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .erc-event-lightbox-stage img { grid-column: 1 / -1; grid-row: 1; max-height: 60vh; max-height: 60dvh; }
    .erc-event-lightbox-stage button { grid-row: 2; }
}
@media (max-width: 400px) {
    .erc-event-overview dl { grid-template-columns: 1fr; }
    .erc-event-time { font-size: 1.25rem; }
}
