.post-display-overlay.is-mode-media {
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
        max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(245, 247, 250, .64);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.is-mode-media .post-display-dialog {
    position: relative;
    width: min(1560px, calc(100vw - 32px));
    height: min(94dvh, 1040px);
    max-height: 94dvh;
    overflow: hidden;
    background: #fff;
}

.is-mode-media .post-display-header {
    position: absolute;
    z-index: 12;
    top: 0;
    right: 0;
    left: 0;
    min-height: 68px;
    padding: 10px 14px;
    color: #f8fafc;
    border: 0;
    background: transparent;
    pointer-events: none;
}

.is-mode-media .post-display-header > * {
    pointer-events: auto;
}

.is-mode-media .post-display-heading {
    display: flex;
    align-items: center;
}

.is-mode-media .post-display-mode-label,
.is-mode-media .blog-post-modal-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.post-display-media-brand,
.post-display-media-account-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-display-media-close,
.post-display-media-round-control {
    display: grid;
    position: relative;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 23, 42, .78);
    box-shadow: 0 5px 18px rgba(0, 0, 0, .2);
    text-decoration: none;
}

.post-display-media-close {
    font-size: 1.65rem;
    line-height: 1;
}


.post-display-media-notifications-toggle {
    color: #9a6700;
    border-color: rgba(148, 163, 184, .32);
    background: rgba(248, 250, 252, .92);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .12);
}

.post-display-media-notifications-toggle:hover,
.post-display-media-notifications-toggle:focus-visible {
    color: #7c4f00;
    background: #fff;
}

.post-display-media-close:hover,
.post-display-media-close:focus-visible,
.post-display-media-round-control:hover,
.post-display-media-round-control:focus-visible {
    color: #fff;
    background: rgba(51, 65, 85, .94);
    outline: 3px solid rgba(147, 197, 253, .7);
    outline-offset: 2px;
}

.post-display-media-logo {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .2);
}

.post-display-media-logo img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.post-display-media-round-control img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.post-display-media-notification-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    padding: 1px 5px;
    border: 2px solid #0f172a;
    border-radius: 999px;
    color: #fff;
    background: #dc2626;
    font-size: .68rem;
    font-weight: 800;
    text-align: center;
}

.is-mode-media .post-display-mode-switch {
    color: #fff;
    border-color: rgba(255, 255, 255, .32);
    background: rgba(15, 23, 42, .78);
}

.is-mode-media .post-display-progress {
    position: absolute;
    z-index: 13;
    top: 0;
    right: 0;
    left: 0;
    background: transparent;
}

.is-mode-media .post-display-content,
.is-mode-media .blog-modal-post,
.is-mode-media .post-display-layout {
    height: 100%;
    min-height: 0;
}

.is-mode-media .post-display-content {
    flex: 1 1 auto;
    overflow: hidden;
    scrollbar-gutter: auto;
}

.is-mode-media .post-display-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 400px);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    padding: 0;
}

.post-display-media-stage {
    display: flex;
    min-width: 0;
    min-height: 0;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(30, 41, 59, .32), transparent 68%),
        #03060b;
}

.post-display-media-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
}

.post-display-media-empty {
    color: #94a3b8;
}

.post-display-media-panel {
    display: flex;
    min-width: 0;
    min-height: 0;
    height: 100%;
    flex-direction: column;
    color: #172033;
    background: #fff;
    box-shadow: -10px 0 28px rgba(2, 6, 23, .12);
}

.post-display-media-panel-header {
    flex: 0 0 auto;
    min-height: 112px;
    padding: 76px 18px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, .25);
}

.post-display-media-scroll {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px 18px 28px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.post-display-media-dock {
    position: relative;
    z-index: 5;
    flex: 0 0 auto;
    min-width: 0;
    border-top: 1px solid rgba(148, 163, 184, .32);
    background: #fff;
    box-shadow: 0 -8px 22px rgba(15, 23, 42, .06);
}

.post-display-media-panel .post-display-article-title {
    margin-bottom: 12px;
    font-size: clamp(1.35rem, 1.8vw, 2rem);
}

.post-display-media-text {
    position: relative;
    margin: 14px 0;
    line-height: 1.55;
}

.post-display-media-text.is-clipped {
    max-height: var(--post-media-text-limit);
    overflow: hidden;
    mask-image: linear-gradient(to bottom, #000 80%, transparent);
}

.post-display-read-full {
    margin: 0 0 18px;
}

.post-display-media-scroll .blog-modal-comments {
    margin-top: 12px !important;
    padding-top: 12px;
    padding-bottom: 16px;
    border-top: 1px solid rgba(148, 163, 184, .3);
}

.is-mode-media .post-display-footer {
    width: 100%;
    max-height: none;
    margin: 0;
    overflow: visible;
    background: #fff;
}

.post-display-media-dock .blog-modal-comment-bar-inner {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.post-display-media-dock .blog-modal-comment-form,
.post-display-media-dock .blog-modal-comment-form > .d-flex,
.post-display-media-dock .blog-modal-comment-form .form-control {
    min-width: 0;
}

.post-display-media-dock .blog-modal-comment-form > .d-flex:last-child {
    flex: 0 0 auto;
}

:root[data-theme="dark"] .post-display-overlay.is-mode-media {
    background: rgba(15, 23, 42, .54);
}

:root[data-theme="dark"] .post-display-media-panel,
:root[data-theme="dark"] .post-display-media-dock,
:root[data-theme="dark"] .is-mode-media .post-display-footer {
    color: #e2e8f0;
    background: #111a2c;
}

@media (max-width: 900px) {
    .post-display-overlay.is-mode-media {
        padding: 0;
    }

    .is-mode-media .post-display-dialog {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .is-mode-media .post-display-layout {
        display: flex;
        height: 100%;
        flex-direction: column;
    }

    .post-display-media-stage {
        min-height: 0;
        flex: 0 0 42%;
        padding: max(12px, env(safe-area-inset-top)) 10px 10px;
    }

    .post-display-media-panel {
        min-height: 0;
        flex: 1 1 58%;
    }

    .post-display-media-panel-header {
        min-height: 0;
        padding: 10px 14px;
    }

    .post-display-media-scroll {
        padding: 14px;
    }

    .post-display-media-dock {
        max-height: 44dvh;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .post-display-media-dock .blog-modal-comment-form > .d-flex:last-child {
        position: sticky;
        bottom: 0;
        padding-top: 6px;
        background: inherit;
    }

    .is-mode-media .post-display-header {
        min-height: 58px;
        padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right))
            8px max(8px, env(safe-area-inset-left));
    }

    .post-display-media-logo,
    .post-display-media-close,
    .post-display-media-round-control {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .post-display-media-logo img {
        width: 31px;
        height: 31px;
    }

    .post-display-media-account-controls {
        gap: 6px;
    }

    .is-mode-media .post-display-mode-switch {
        max-width: 108px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
    .post-display-overlay.is-mode-media {
        background: rgba(245, 247, 250, .82);
    }

    :root[data-theme="dark"] .post-display-overlay.is-mode-media {
        background: rgba(15, 23, 42, .7);
    }
}


/* Version 2026.07.26.3 : panneau de notifications réel dans le chrome média. */
.post-display-media-notification-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.post-display-media-notifications-toggle {
    border: 1px solid rgba(255, 255, 255, .22);
}

.post-display-media-notifications-panel {
    z-index: 10040 !important;
    top: calc(100% + 10px) !important;
    right: 0 !important;
    left: auto !important;
    width: min(420px, calc(100vw - 32px)) !important;
    max-height: min(72vh, 680px);
    overflow-y: auto;
    color: #172033;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .24) !important;
}

:root[data-theme="dark"] .post-display-media-notifications-panel {
    color: #e2e8f0;
    background: #111a2c;
    border-color: #334155 !important;
}

@media (max-width: 600px) {
    .post-display-media-notifications-panel {
        position: fixed !important;
        top: max(62px, env(safe-area-inset-top)) !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        max-height: calc(100dvh - 82px);
    }
}

/* Version 2026.07.27.6.4 : scène média plus compacte et adaptative sur téléphone. */
@media (max-width: 900px) {
    .post-display-media-stage {
        height: clamp(225px, 34dvh, 310px);
        flex: 0 0 auto;
        padding: max(62px, calc(env(safe-area-inset-top) + 54px)) 8px 8px;
    }

    .post-display-media-stage.is-landscape-media {
        height: clamp(215px, 31dvh, 285px);
    }

    .post-display-media-stage.is-square-media {
        height: clamp(270px, 38dvh, 360px);
    }

    .post-display-media-stage.is-portrait-media {
        height: clamp(320px, 46dvh, 460px);
    }

    .post-display-media-image {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 100%;
    }

    .post-display-media-panel {
        flex: 1 1 auto;
    }

    .post-display-media-scroll {
        min-height: 0;
    }

    .post-display-media-dock {
        max-height: min(40dvh, 340px);
    }
}

@media (max-width: 430px) {
    .post-display-media-stage {
        height: clamp(205px, 32dvh, 275px);
    }

    .post-display-media-stage.is-landscape-media {
        height: clamp(205px, 29dvh, 255px);
    }

    .post-display-media-stage.is-square-media {
        height: clamp(255px, 36dvh, 325px);
    }

    .post-display-media-stage.is-portrait-media {
        height: clamp(300px, 44dvh, 410px);
    }

    .post-display-media-panel-header {
        padding: 8px 12px;
    }

    .post-display-media-scroll {
        padding: 12px;
    }
}


/* Version 2026.07.27.6.5 : toute la prévisualisation ouvre le lecteur long. */
.post-display-media-article-preview {
    padding: 2px 0 14px;
    cursor: pointer;
    border-radius: 10px;
}

.post-display-media-article-preview:hover {
    background: rgba(37, 99, 235, .035);
}

.post-display-media-article-preview:focus-visible {
    outline: 2px solid rgba(37, 99, 235, .55);
    outline-offset: 4px;
}

.post-display-media-article-preview .post-display-read-full,
.post-display-media-article-preview a,
.post-display-media-article-preview button {
    cursor: pointer;
}

/* ClubOS 8.12.0 — navigation dans la galerie publique d'un profil. */
.post-display-profile-gallery-nav {
    position: fixed;
    top: 50%;
    z-index: calc(var(--z-blog-modal, 110080) + 8);
    transform: translateY(-50%);
    width: clamp(3.1rem, 4.4vw, 4.25rem);
    height: clamp(3.1rem, 4.4vw, 4.25rem);
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.9);
    color: #24324a;
    box-shadow: 0 12px 30px rgba(0,0,0,.28);
    font-size: clamp(2.3rem, 4vw, 3.4rem);
    line-height: 1;
    cursor: pointer;
}
.post-display-profile-gallery-nav:hover,
.post-display-profile-gallery-nav:focus-visible { background: #fff; transform: translateY(-50%) scale(1.04); }
.post-display-profile-gallery-nav.is-prev { left: clamp(.6rem, 1.6vw, 1.8rem); }
.post-display-profile-gallery-nav.is-next { right: clamp(.6rem, 1.6vw, 1.8rem); }
:root[data-theme="dark"] .post-display-profile-gallery-nav {
    background: rgba(21,31,50,.92);
    border-color: rgba(180,205,240,.45);
    color: #f8fafc;
}
@media (max-width: 720px) {
    .post-display-profile-gallery-nav { width: 2.7rem; height: 2.7rem; font-size: 2.15rem; }
    .post-display-profile-gallery-nav.is-prev { left: .3rem; }
    .post-display-profile-gallery-nav.is-next { right: .3rem; }
}

:root[data-theme="dark"] .is-mode-media .post-display-dialog {
    background: #111a2c;
}
