/* PRIVATE EVENTS V99.60 — Messagerie Desktop V1.
   Sous 1200 px le DOM supplémentaire est neutre : la messagerie mobile reste inchangée. */
.v9960-messaging-workspace { display: contents; }
.v9960-messaging-chat-pane { display: none; }

@media (min-width: 1200px) {
    body.pe-v9958-desktop-shell.messages-index-page .v71-messaging-page {
        width: min(1540px, calc(100% - 64px));
        max-width: none;
        margin-inline: auto;
        padding-bottom: 64px;
    }

    body.pe-v9958-desktop-shell.messages-index-page .v9855-messages-hero {
        padding: 34px 0 22px;
    }

    body.pe-v9958-desktop-shell.messages-index-page .v9855-messages-title-row h1 {
        font-size: clamp(2.05rem, 2.2vw, 2.65rem);
        letter-spacing: -.035em;
    }

    .v9960-messaging-workspace {
        display: grid;
        grid-template-columns: minmax(310px, 370px) minmax(0, 1fr);
        align-items: stretch;
        gap: 18px;
        min-height: min(720px, calc(100vh - 190px));
        height: calc(100vh - 190px);
    }

    .v9960-messaging-list-pane,
    .v9960-messaging-chat-pane {
        min-width: 0;
        min-height: 0;
        overflow: hidden;
        border: 1px solid rgba(226,147,184,.18);
        border-radius: 18px;
        background: rgba(16,15,20,.78);
        box-shadow: 0 18px 44px rgba(0,0,0,.18);
    }

    .v9960-messaging-list-pane {
        display: flex;
        flex-direction: column;
    }

    .v9960-messaging-list-pane .v71-messaging-region {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        scrollbar-width: thin;
    }

    .v9960-messaging-list-pane .v71-conversation-list {
        display: grid;
        gap: 0;
        width: 100%;
    }

    .v9960-messaging-list-pane .v954-conversation-item {
        border-bottom: 1px solid rgba(226,147,184,.10);
    }

    .v9960-messaging-list-pane .v954-conversation-item:last-child {
        border-bottom: 0;
    }

    .v9960-messaging-list-pane .v71-conversation-row {
        min-height: 82px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        transition: background-color .16s ease, box-shadow .16s ease;
    }

    .v9960-messaging-list-pane .v954-conversation-item.v9960-is-open .v71-conversation-row,
    .v9960-messaging-list-pane .v71-conversation-row:hover,
    .v9960-messaging-list-pane .v71-conversation-row:focus-visible {
        background: linear-gradient(90deg, rgba(174,53,107,.20), rgba(129,42,84,.08));
        box-shadow: inset 3px 0 0 #d45d98;
        outline: none;
    }

    .v9960-messaging-list-pane .v71-conversation-avatar {
        width: 46px;
        height: 46px;
    }

    .v9960-messaging-list-pane .v71-conversation-name strong {
        font-size: .92rem;
    }

    .v9960-messaging-list-pane .v71-conversation-bottomline p {
        max-width: 220px;
        font-size: .76rem;
    }

    .v9960-messaging-list-pane #v9855-message-command-dock {
        position: relative;
        inset: auto;
        flex: 0 0 auto;
        width: auto;
        margin: 0;
        padding: 10px;
        border-top: 1px solid rgba(226,147,184,.12);
        background: rgba(20,15,20,.94);
        backdrop-filter: blur(12px);
    }

    .v9960-messaging-list-pane .v9855-selection-toggle {
        width: 100%;
    }

    .v9960-messaging-list-pane .v9855-chat-bulk-bar {
        width: 100%;
    }

    .v9960-messaging-chat-pane {
        position: relative;
        display: block;
    }

    .v9960-messaging-empty-state {
        position: absolute;
        inset: 0;
        z-index: 1;
        display: grid;
        place-content: center;
        justify-items: center;
        gap: 10px;
        padding: 48px;
        text-align: center;
        color: rgba(225,207,216,.72);
        background:
            radial-gradient(circle at 50% 20%, rgba(160,47,99,.09), transparent 34%),
            rgba(12,11,15,.34);
    }

    .v9960-messaging-empty-state[hidden] { display: none !important; }

    .v9960-messaging-empty-icon {
        width: 62px;
        height: 62px;
        display: grid;
        place-items: center;
        border: 1px solid rgba(230,151,188,.22);
        border-radius: 18px;
        background: rgba(183,54,112,.12);
        color: #e9a4c5;
        font-size: 1.65rem;
    }

    .v9960-messaging-empty-state h2 {
        margin: 4px 0 0;
        color: #fff3f8;
        font-size: 1.45rem;
    }

    .v9960-messaging-empty-state p {
        max-width: 390px;
        margin: 0;
        font-size: .86rem;
        line-height: 1.5;
    }

    .v9960-messaging-frame {
        position: absolute;
        inset: 0;
        z-index: 2;
        width: 100%;
        height: 100%;
        border: 0;
        background: transparent;
    }

    .v9960-messaging-frame[hidden] { display: none !important; }

    html[data-theme="light"] .v9960-messaging-list-pane,
    html[data-theme="light"] .v9960-messaging-chat-pane {
        border-color: rgba(108,67,84,.18);
        background: rgba(255,250,248,.78);
        box-shadow: 0 18px 40px rgba(77,48,60,.08);
    }

    html[data-theme="light"] .v9960-messaging-list-pane .v954-conversation-item {
        border-bottom-color: rgba(108,67,84,.11);
    }

    html[data-theme="light"] .v9960-messaging-list-pane .v954-conversation-item.v9960-is-open .v71-conversation-row,
    html[data-theme="light"] .v9960-messaging-list-pane .v71-conversation-row:hover,
    html[data-theme="light"] .v9960-messaging-list-pane .v71-conversation-row:focus-visible {
        background: linear-gradient(90deg, rgba(194,46,112,.12), rgba(194,46,112,.035));
        box-shadow: inset 3px 0 0 #c52b70;
    }

    html[data-theme="light"] .v9960-messaging-list-pane #v9855-message-command-dock {
        border-top-color: rgba(108,67,84,.12);
        background: rgba(255,248,246,.94);
    }

    html[data-theme="light"] .v9960-messaging-empty-state {
        color: #806d76;
        background:
            radial-gradient(circle at 50% 20%, rgba(194,46,112,.08), transparent 34%),
            rgba(255,250,248,.64);
    }

    html[data-theme="light"] .v9960-messaging-empty-state h2 { color: #2d2027; }
    html[data-theme="light"] .v9960-messaging-empty-icon {
        border-color: rgba(176,49,107,.18);
        background: rgba(194,46,112,.08);
        color: #a92060;
    }
}

/* Conversation chargée dans le panneau droit : aucune sidebar imbriquée,
   aucune dépendance à la largeur de l'iframe. */
body.v9960-chat-embed {
    min-width: 0 !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
}
body.v9960-chat-embed .v71-chat-page {
    width: 100% !important;
    max-width: none !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}
body.v9960-chat-embed .v71-chat-shell,
body.v9960-chat-embed .v71-webmaster-chat-shell {
    width: 100% !important;
    max-width: none !important;
    height: 100vh !important;
    min-height: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
body.v9960-chat-embed .v71-chat-back { display: none !important; }
body.v9960-chat-embed .site-back-button { display: none !important; }
