/* ============================================================
   PRIVATE EVENTS V99.45 — LIGHT GLOBAL CANVAS

   Le fond clair de référence devient celui du catalogue Membres :
   un même canevas champagne / rose poudré sur toute la hauteur des
   pages membres. Les cartes, champs, modales et composants gardent
   leurs surfaces propres afin de préserver la hiérarchie visuelle.
   ============================================================ */

html[data-theme="light"] {
    --pe45-page-bg-top: var(--pe-light-bg, #efe4e1);
    --pe45-page-bg-bottom: var(--pe-light-bg-2, #e8dbdc);
    background-color: var(--pe45-page-bg-bottom) !important;
}

/* Canevas unique pour toutes les pages publiques/membres de l'app.
   Admin et landing marketing restent volontairement indépendants. */
html[data-theme="light"] body:not(.admin-body):not(.landing-body) {
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(
            circle at 50% -12%,
            rgba(205, 65, 126, .12),
            transparent 34rem
        ),
        linear-gradient(
            180deg,
            var(--pe45-page-bg-top) 0%,
            var(--pe45-page-bg-bottom) 100%
        ) !important;
    background-color: var(--pe45-page-bg-bottom) !important;
    background-repeat: no-repeat !important;
}

/* Les conteneurs de page ne doivent jamais repeindre une grande zone
   avec une teinte différente. Les vraies cartes restent inchangées. */
html[data-theme="light"] body:not(.admin-body):not(.landing-body) > main,
html[data-theme="light"] body:not(.admin-body):not(.landing-body) main.container,
html[data-theme="light"] body:not(.admin-body):not(.landing-body) :is(
    .v71-messaging-page,
    .v71-messaging-region,
    .v71-chat-page,
    .v980-home-shell,
    .v9898-search-page,
    .v74-settings-page,
    .v88-backup-page
) {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* ------------------------------------------------------------
   Messages : le grand panneau de liste ne doit plus créer une bande
   blanc cassé au-dessus d'un fond rose différent.
   Les séparateurs V99.43/V99.44 restent visibles.
   ------------------------------------------------------------ */
html[data-theme="light"] body.messages-index-page .v71-conversation-list {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border-color: rgba(108, 67, 84, .22) !important;
    box-shadow: none !important;
}

html[data-theme="light"] body.messages-index-page :is(
    .v954-conversation-item,
    .v71-conversation-row
) {
    background-color: transparent !important;
}

html[data-theme="light"] body.messages-index-page .v71-conversation-row:hover,
html[data-theme="light"] body.messages-index-page .v71-conversation-row:focus-visible {
    background: rgba(255, 250, 247, .50) !important;
}

html[data-theme="light"] body.messages-index-page .v71-conversation-row.has-unread {
    background: linear-gradient(
        90deg,
        rgba(243, 220, 230, .72) 0%,
        rgba(255, 250, 247, .32) 44%,
        rgba(255, 250, 247, 0) 100%
    ) !important;
}

/* ------------------------------------------------------------
   Conversations : le plan de travail derrière les bulles adopte le
   même canevas que le reste de l'application.
   Les bulles et le composeur restent des composants distincts.
   ------------------------------------------------------------ */
html[data-theme="light"] body.v71-chat-body:not(.admin-body) :is(
    .v71-chat-shell,
    .conversation-shell,
    .v71-chat-messages
) {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

html[data-theme="light"] body.v71-chat-body:not(.admin-body) :is(
    .v71-chat-shell,
    .conversation-shell
) {
    border-color: transparent !important;
    box-shadow: none !important;
}

/* ------------------------------------------------------------
   Pages qui avaient historiquement leur propre fond plein écran.
   La surface intérieure (carte, formulaire, panneau) reste intacte.
   ------------------------------------------------------------ */
html[data-theme="light"] body:is(
    .auth-body,
    .create-event-body,
    .legal-page-body,
    .account-deleted-page,
    .pwa-offline-page,
    .v981-push-account-page,
    .v88-backup-body,
    .profile-edit-page,
    .v74-settings-body,
    .v9898-search-page-body,
    .v980-home-page,
    .v970-event-detail-page,
    .v970-member-detail-page,
    .v75-gallery-body,
    .participants-index-page,
    .members-index-page,
    .events-index-page,
    .messages-index-page
):not(.admin-body) {
    background:
        radial-gradient(
            circle at 50% -12%,
            rgba(205, 65, 126, .12),
            transparent 34rem
        ),
        linear-gradient(
            180deg,
            var(--pe45-page-bg-top) 0%,
            var(--pe45-page-bg-bottom) 100%
        ) !important;
    background-color: var(--pe45-page-bg-bottom) !important;
}

/* Évite une tranche blanche lors du sur-scroll en bas sur mobile. */
@media (max-width: 700px) {
    html[data-theme="light"],
    html[data-theme="light"] body:not(.admin-body):not(.landing-body) {
        background-color: var(--pe45-page-bg-bottom) !important;
    }
}
