/* Ganymède: isolated to the working copy and pages that use its block layout. */
.mh-ganymede-layout {
    --mh-gy-paper: #f8f5ef;
    --mh-gy-accent: #742b36;
    --mh-gy-ink: #221b17;
    color: var(--mh-gy-ink);
    background: var(--mh-gy-paper);
    margin: 0;
}

.mh-ganymede-layout :where(h2, h3, p, figure, details):where(:not(.page-hero *)) {
    margin: 0;
}

.mh-ganymede-layout :where(h2, h3) {
    font-family: var(--mh-serif, Georgia, serif);
    font-weight: 400;
    text-transform: none;
}

.mh-ganymede-layout .mh-gy-wrap {
    width: min(calc(100% - clamp(48px, 12vw, 192px)), 1240px);
    max-width: none;
    margin: 0 auto;
}

.mh-ganymede-layout .mh-gy-programmes-grid,
.mh-ganymede-layout .mh-gy-listen {
    display: grid;
    align-items: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(28px, 5.4vw, 86px);
}

.mh-ganymede-layout .mh-gy-intro > *,
.mh-ganymede-layout .mh-gy-programmes-grid > *,
.mh-ganymede-layout .mh-gy-listen > *,
.mh-ganymede-layout .mh-gy-ensemble-heading > *,
.mh-ganymede-layout .mh-gy-video-cover > * {
    min-width: 0;
    margin: 0;
}

.mh-ganymede-layout .mh-gy-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(28px, 5vw, 76px);
    padding-block: clamp(60px, 7vw, 110px);
}

.mh-ganymede-layout .mh-gy-ensemble {
    max-width: 66ch;
}

.mh-ganymede-layout .mh-gy-ensemble-heading {
    display: flex;
    align-items: center;
    gap: 1.05rem;
    margin-bottom: 1.5rem;
}

.mh-ganymede-layout .mh-gy-logo:has(img) {
    flex: 0 0 auto;
    width: clamp(54px, 6.7vw, 94px);
}

.mh-ganymede-layout .mh-gy-logo img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}

.mh-gy-content .mh-gy-logo:has(img[src*="/ganymede/logo-a-remplacer.svg"]) {
    display: none;
}

.mh-ganymede-layout h2 {
    color: var(--mh-gy-accent);
    font-size: clamp(2.5rem, 4.3vw, 4.1rem);
    line-height: 1.03;
}

.mh-ganymede-layout h3 {
    font-size: clamp(1.8rem, 2.75vw, 2.68rem);
    line-height: 1.08;
}

.mh-ganymede-layout :where(.mh-gy-ensemble, .mh-gy-myth, .mh-gy-programme) p {
    font-size: clamp(1.1rem, 1.65vw, 1.35rem);
    line-height: 1.55;
}

.mh-ganymede-layout :where(.mh-gy-ensemble, .mh-gy-myth, .mh-gy-programme) p + p {
    margin-top: 1em;
}

.mh-ganymede-layout .mh-gy-photo {
    margin: 0 0 clamp(16px, 2.1vw, 26px);
}

.mh-ganymede-layout .mh-gy-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.mh-ganymede-layout .mh-gy-myth {
    margin: 0;
    padding: clamp(38px, 6vw, 88px) clamp(21px, 6vw, 96px);
    background: #eee8df;
}

.mh-ganymede-layout .mh-gy-myth > * {
    width: min(100%, 760px);
    margin-inline: auto;
}

.mh-ganymede-layout .mh-gy-intro > .mh-gy-photo {
    margin: 0;
}

/* Older blocks still nest the myth under the two-column introduction in Gutenberg. */
.editor-styles-wrapper .mh-gy-intro .mh-gy-myth {
    grid-column: 1 / -1;
    width: 100%;
}

.mh-ganymede-layout .mh-gy-clip {
    padding-bottom: clamp(40px, 6vw, 88px);
}

.mh-ganymede-layout .mh-gy-clip-player {
    aspect-ratio: 16 / 9;
    background: #171513;
}

.mh-ganymede-layout .mh-gy-clip-player iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.mh-ganymede-layout .mh-gy-clip-caption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .25rem 1.25rem;
    margin-top: .65rem;
    color: var(--mh-gy-ink);
}

.mh-ganymede-layout .mh-gy-clip-caption a {
    color: var(--mh-gy-accent);
    text-underline-offset: .2em;
}

.mh-ganymede-layout .mh-gy-myth h3 {
    color: var(--mh-gy-accent);
    font-size: clamp(2rem, 3.5vw, 3.35rem);
}

.mh-ganymede-layout .mh-gy-myth > h3 {
    margin-bottom: 1.25rem;
}

.mh-ganymede-layout .mh-gy-myth-copy > p:first-child {
    font-size: clamp(1.25rem, 2.15vw, 1.72rem);
    line-height: 1.42;
}

.mh-ganymede-layout .mh-gy-programmes {
    padding-block: clamp(60px, 7vw, 110px) clamp(64px, 8vw, 120px);
}

.mh-ganymede-layout .mh-gy-programmes > h2 {
    margin-bottom: clamp(24px, 3.25vw, 48px);
}

.mh-ganymede-layout .mh-gy-programmes-grid {
    gap: clamp(24px, 3.8vw, 62px);
}

.mh-ganymede-layout .mh-gy-programme h3 {
    text-wrap: balance;
    margin-bottom: .4em;
}

.mh-ganymede-layout .mh-gy-programme .mh-gy-composers {
    color: #5c463e;
    font-style: italic;
    font-size: clamp(.98rem, 1.35vw, 1.2rem);
    margin-top: 0;
}

.mh-ganymede-layout .mh-gy-details {
    margin-top: clamp(14px, 1.65vw, 23px);
}

.mh-ganymede-layout .mh-gy-details > summary,
.mh-ganymede-layout :where(.mh-gy-video-link, .mh-gy-contact) a {
    color: var(--mh-gy-accent);
    font-size: clamp(1.04rem, 1.5vw, 1.23rem);
    text-decoration: underline;
    text-decoration-color: #742b3673;
    text-underline-offset: .28em;
    text-decoration-thickness: 1px;
}

.mh-ganymede-layout .mh-gy-details > summary {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    min-height: 44px;
    list-style: none;
    cursor: pointer;
}

.mh-ganymede-layout .mh-gy-details > summary::-webkit-details-marker {
    display: none;
}

.mh-ganymede-layout .mh-gy-details > summary::after {
    content: "+" / "";
    text-decoration: none;
}

.mh-ganymede-layout .mh-gy-details[open] > summary::after {
    content: "−" / "";
}

.mh-ganymede-layout :where(summary, a):focus-visible,
.mh-gy-dialog button:focus-visible {
    outline: 2px solid #742b36;
    outline-offset: 4px;
}

.mh-ganymede-layout .mh-gy-listen-band {
    background: #eee8df;
    padding-block: clamp(39px, 5vw, 70px);
}

.mh-ganymede-layout .mh-gy-listen {
    align-items: center;
    grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr);
    gap: clamp(26px, 5vw, 72px);
}

.mh-ganymede-layout .mh-gy-video-cover {
    position: relative;
    isolation: isolate;
}

.mh-ganymede-layout .mh-gy-video-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.mh-ganymede-layout .mh-gy-video-play a {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    font-size: 0;
    text-decoration: none;
}

.mh-ganymede-layout .mh-gy-video-play a::before {
    content: "";
    width: 3.3rem;
    height: 3.3rem;
    border: 1px solid #fff;
    border-radius: 50%;
    background: #211a15aa;
}

.mh-ganymede-layout .mh-gy-video-play a::after {
    content: "";
    position: absolute;
    border-top: .51rem solid transparent;
    border-bottom: .51rem solid transparent;
    border-left: .79rem solid #fff;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -50%);
}

.mh-ganymede-layout .mh-gy-listen-caption {
    margin-top: .85rem;
    margin-bottom: .45rem;
    font-size: clamp(1.34rem, 2.4vw, 2rem);
    line-height: 1.2;
}

.mh-ganymede-layout .mh-gy-video-link {
    margin-top: .5rem;
}

.mh-ganymede-layout .mh-gy-contact {
    padding-block: clamp(26px, 4vw, 52px);
    text-align: right;
}

.site-main:has(.mh-ganymede-layout) + .site-footer {
    margin-top: 0;
}

@media (max-width: 760px) {
    .mh-ganymede-layout .mh-gy-wrap {
        width: calc(100% - 42px);
    }

    .mh-ganymede-layout .mh-gy-intro,
    .mh-ganymede-layout .mh-gy-programmes-grid,
    .mh-ganymede-layout .mh-gy-listen {
        grid-template-columns: minmax(0, 1fr);
        gap: clamp(32px, 8vw, 64px);
    }
}

/* The programme is opened in a native modal, outside the document flow. */
html.mh-gy-dialog-open {
    overflow: hidden;
}

.mh-gy-dialog {
    width: min(760px, calc(100% - 28px));
    max-height: 84vh;
    max-height: 84dvh;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    color: #221b17;
    background: #f8f5ef;
    font-family: var(--mh-serif, Georgia, serif);
    box-shadow: 0 16px 68px #211a154d;
}

.mh-gy-dialog[open] {
    display: flex;
    flex-direction: column;
}

.mh-gy-dialog::backdrop {
    background: #171310b3;
}

.mh-gy-dialog__header {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
    padding: clamp(20px, 4vw, 42px) clamp(20px, 4vw, 48px) .7rem;
}

.mh-gy-dialog__title {
    margin: 0;
    color: #742b36;
    font-weight: 400;
    font-size: clamp(1.55rem, 4vw, 2.9rem);
    line-height: 1.08;
}

.mh-gy-dialog__close {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #742b3655;
    background: transparent;
    color: #742b36;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.mh-gy-dialog__body {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .4rem clamp(20px, 4vw, 48px) clamp(20px, 4vw, 42px);
    font-size: clamp(1.06rem, 1.65vw, 1.26rem);
    line-height: 1.62;
}

.mh-gy-dialog__body p {
    margin: 0 0 1em;
}

.mh-gy-dialog__body p:last-child {
    margin-bottom: 0;
}
