/* ============================================================
   PRIVATE EVENTS V99.44 — LIGHT CONTRAST FINAL
   Cible : messagerie, conversations, profil et déconnexion.
   But : supprimer les textes trop pâles et verrouiller des
   contrastes lisibles en thème clair sans toucher au Velvet.
   ============================================================ */

html[data-theme="light"] {
    --pe44-text-main: #342930;
    --pe44-text-secondary: #6c5962;
    --pe44-text-muted: #735963;
    --pe44-border: #d8c9cf;
    --pe44-surface: #fffafc;
    --pe44-surface-2: #f5eaee;
    --pe44-sent: #c33a74;
    --pe44-sent-2: #bd336e;
    --pe44-sent-border: #ae2d62;
}

/* ============================================================
   1) LISTE DES MESSAGES — textes secondaires et séparateurs
   ============================================================ */
html[data-theme="light"] body.messages-index-page .v71-conversation-topline strong,
html[data-theme="light"] body.messages-index-page .v71-conversation-name strong {
    color: var(--pe44-text-main) !important;
}

html[data-theme="light"] body.messages-index-page .v71-conversation-topline time {
    color: #716169 !important;
}

html[data-theme="light"] body.messages-index-page .v71-conversation-bottomline p,
html[data-theme="light"] body.messages-index-page .v71-conversation-bottomline p > span:not(.v71-unread-badge),
html[data-theme="light"] body.messages-index-page .v71-conversation-subject,
html[data-theme="light"] body.messages-index-page .v71-webmaster-sender {
    color: #62525a !important;
}

html[data-theme="light"] body.messages-index-page .v71-you {
    color: #8f3c65 !important;
    font-weight: 800 !important;
    opacity: 1 !important;
}

html[data-theme="light"] body.messages-index-page .v954-conversation-item + .v954-conversation-item::before {
    background: #d9cbd1 !important;
    opacity: 1 !important;
}

html[data-theme="light"] body.messages-index-page .v71-conversation-list {
    border-color: #d5c6cc !important;
}

/* Mode sélection : aucune commande ne doit devenir blanchâtre. */
html[data-theme="light"] body.messages-index-page .v9855-message-command-dock,
html[data-theme="light"] body.messages-index-page .v9855-message-command-dock * {
    text-shadow: none !important;
}

html[data-theme="light"] body.messages-index-page .v9855-selection-toggle,
html[data-theme="light"] body.messages-index-page .v9855-selection-toggle *,
html[data-theme="light"] body.messages-index-page .v934-bulk-summary,
html[data-theme="light"] body.messages-index-page .v934-bulk-summary * {
    color: #4f3e46 !important;
    opacity: 1 !important;
}

html[data-theme="light"] body.messages-index-page .v934-bulk-link,
html[data-theme="light"] body.messages-index-page .v75-bulk-cancel {
    color: #55444c !important;
    opacity: 1 !important;
}

html[data-theme="light"] body.messages-index-page .v934-bulk-delete:not(:disabled),
html[data-theme="light"] body.messages-index-page .v934-bulk-delete:not(:disabled) * {
    color: #ffffff !important;
    opacity: 1 !important;
}

html[data-theme="light"] body.messages-index-page .v934-bulk-delete:disabled,
html[data-theme="light"] body.messages-index-page .v934-bulk-delete:disabled * {
    color: #816d76 !important;
    opacity: 1 !important;
}

/* ============================================================
   2) CONVERSATIONS — deux bulles franches et lisibles
   ============================================================ */
html[data-theme="light"] body.v71-chat-body .message-bubble-row.is-received .message-bubble,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-row.is-received .v71-webmaster-message-bubble {
    background: #ffffff !important;
    border: 1px solid #d6c8ce !important;
    color: #30262b !important;
    box-shadow: 0 9px 20px rgba(91, 70, 79, 0.10) !important;
}

html[data-theme="light"] body.v71-chat-body .message-bubble-row.is-sent .message-bubble,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-row.is-sent .v71-webmaster-message-bubble {
    background: linear-gradient(180deg, var(--pe44-sent) 0%, var(--pe44-sent-2) 100%) !important;
    border: 1px solid var(--pe44-sent-border) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(166, 42, 99, 0.18) !important;
}

html[data-theme="light"] body.v71-chat-body .message-bubble-row.is-received .message-bubble > p,
html[data-theme="light"] body.v71-chat-body .message-bubble-row.is-received .message-bubble > p > span,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-row.is-received .v71-webmaster-message-bubble > p,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-row.is-received .v71-webmaster-message-bubble > p > span {
    color: #30262b !important;
}

html[data-theme="light"] body.v71-chat-body .message-bubble-row.is-sent .message-bubble > p,
html[data-theme="light"] body.v71-chat-body .message-bubble-row.is-sent .message-bubble > p > span,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-row.is-sent .v71-webmaster-message-bubble > p,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-row.is-sent .v71-webmaster-message-bubble > p > span {
    color: #ffffff !important;
}

html[data-theme="light"] body.v71-chat-body .message-bubble-row.is-sent .message-meta,
html[data-theme="light"] body.v71-chat-body .message-bubble-row.is-sent .message-meta *,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-row.is-sent .v71-message-time {
    color: rgba(255, 255, 255, 0.94) !important;
    opacity: 1 !important;
}

html[data-theme="light"] body.v71-chat-body .message-bubble-row.is-received .message-meta,
html[data-theme="light"] body.v71-chat-body .message-bubble-row.is-received .message-meta *,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-row.is-received .v71-message-time {
    color: #716169 !important;
    opacity: 1 !important;
}

html[data-theme="light"] body.v71-chat-body .v71-chat-day-separator span {
    background: #f1e5ea !important;
    border: 1px solid #d1bdc5 !important;
    color: #5b4650 !important;
    font-weight: 800 !important;
    opacity: 1 !important;
}

html[data-theme="light"] body.v71-chat-body .v71-chat-presence,
html[data-theme="light"] body.v71-chat-body .v71-chat-presence [data-presence-text],
html[data-theme="light"] body.v71-chat-body .v71-conversation-type,
html[data-theme="light"] body.v71-chat-body .v71-chat-profile-link {
    color: #62545b !important;
    opacity: 1 !important;
}

/* Demandes de photos privées : les statuts doivent gagner contre
   la couleur héritée de la bulle envoyée. */
html[data-theme="light"] body.v71-chat-body .message-bubble .private-photo-request-message,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-bubble .private-photo-request-message {
    background: #fffafc !important;
    border: 1px solid #d8cbd0 !important;
    color: #514149 !important;
}

html[data-theme="light"] body.v71-chat-body .message-bubble .private-photo-request-heading,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-bubble .private-photo-request-heading {
    color: #46363e !important;
}

html[data-theme="light"] body.v71-chat-body .message-bubble .private-photo-request-status,
html[data-theme="light"] body.v71-chat-body .message-bubble .private-photo-request-status *,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-bubble .private-photo-request-status,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-bubble .private-photo-request-status * {
    opacity: 1 !important;
    text-shadow: none !important;
}

html[data-theme="light"] body.v71-chat-body .message-bubble .private-photo-request-status.is-pending,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-bubble .private-photo-request-status.is-pending {
    background: #fff1c9 !important;
    border: 1px solid #d6b957 !important;
    color: #684f08 !important;
}

html[data-theme="light"] body.v71-chat-body .message-bubble .private-photo-request-status.is-granted,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-bubble .private-photo-request-status.is-granted {
    background: #e7f5eb !important;
    border: 1px solid #9ec8aa !important;
    color: #245f35 !important;
}

html[data-theme="light"] body.v71-chat-body .message-bubble .private-photo-request-status.is-declined,
html[data-theme="light"] body.v71-chat-body .message-bubble .private-photo-request-status.is-cancelled,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-bubble .private-photo-request-status.is-declined,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-bubble .private-photo-request-status.is-cancelled {
    background: #f0dfe6 !important;
    border: 1px solid #c9aeb9 !important;
    color: #604650 !important;
}

html[data-theme="light"] body.v71-chat-body .message-bubble .private-photo-request-status.is-declined *,
html[data-theme="light"] body.v71-chat-body .message-bubble .private-photo-request-status.is-cancelled *,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-bubble .private-photo-request-status.is-declined *,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-bubble .private-photo-request-status.is-cancelled * {
    color: #604650 !important;
}

html[data-theme="light"] body.v71-chat-body .message-bubble .message-system-badge,
html[data-theme="light"] body.v71-chat-body .v71-webmaster-message-bubble .message-system-badge {
    background: #eee3e8 !important;
    border: 1px solid #cdbcc3 !important;
    color: #58464f !important;
}

/* Champ d'écriture et barre de composition. */
html[data-theme="light"] body.v71-chat-body .v71-chat-composer,
html[data-theme="light"] body.v71-chat-body .conversation-composer {
    background: rgba(250, 241, 245, 0.97) !important;
    border-top-color: #d8c7ce !important;
}

html[data-theme="light"] body.v71-chat-body .v71-chat-composer input,
html[data-theme="light"] body.v71-chat-body .conversation-composer input,
html[data-theme="light"] body.v71-chat-body .v71-chat-composer textarea,
html[data-theme="light"] body.v71-chat-body .conversation-composer textarea {
    color: #342930 !important;
    background: #ffffff !important;
    border-color: #cbbbc2 !important;
}

html[data-theme="light"] body.v71-chat-body .v71-chat-composer input::placeholder,
html[data-theme="light"] body.v71-chat-body .conversation-composer input::placeholder,
html[data-theme="light"] body.v71-chat-body .v71-chat-composer textarea::placeholder,
html[data-theme="light"] body.v71-chat-body .conversation-composer textarea::placeholder {
    color: #7b6b72 !important;
    opacity: 1 !important;
}

/* ============================================================
   3) MON PROFIL — renforcer tous les libellés encore trop pâles
   ============================================================ */
html[data-theme="light"] body.profile-edit-page .profile-panel,
html[data-theme="light"] body.profile-edit-page .profile-panel label,
html[data-theme="light"] body.profile-edit-page .profile-panel strong,
html[data-theme="light"] body.profile-edit-page .profile-panel summary,
html[data-theme="light"] body.profile-edit-page .profile-panel h1,
html[data-theme="light"] body.profile-edit-page .profile-panel h2,
html[data-theme="light"] body.profile-edit-page .profile-panel h3 {
    color: #44353d !important;
    opacity: 1 !important;
}

html[data-theme="light"] body.profile-edit-page .profile-panel .muted,
html[data-theme="light"] body.profile-edit-page .profile-panel small,
html[data-theme="light"] body.profile-edit-page .profile-panel .character-counter,
html[data-theme="light"] body.profile-edit-page .profile-panel .password-help,
html[data-theme="light"] body.profile-edit-page .v9811-profile-transfer-summary-text small,
html[data-theme="light"] body.profile-edit-page .v9811-profile-transfer-row small {
    color: #716169 !important;
    opacity: 1 !important;
}

html[data-theme="light"] body.profile-edit-page .profile-password-details > summary,
html[data-theme="light"] body.profile-edit-page .v9811-profile-transfer-details > summary,
html[data-theme="light"] body.profile-edit-page .v9811-profile-transfer-row {
    color: #493942 !important;
}

html[data-theme="light"] body.profile-edit-page .profile-password-summary-chevron,
html[data-theme="light"] body.profile-edit-page .v9811-profile-transfer-chevron,
html[data-theme="light"] body.profile-edit-page .v9811-profile-transfer-row-chevron {
    color: #9c476f !important;
    opacity: 1 !important;
}

html[data-theme="light"] body.profile-edit-page .profile-save-button,
html[data-theme="light"] body.profile-edit-page .profile-save-button * {
    color: #ffffff !important;
}

/* ============================================================
   4) DÉCONNEXION — textes et bouton Annuler réellement visibles
   ============================================================ */
html[data-theme="light"] .pe9864-logout-card,
html[data-theme="light"] .pe9864-logout-card h2,
html[data-theme="light"] .pe9864-logout-card p {
    opacity: 1 !important;
}

html[data-theme="light"] .pe9864-logout-card h2 {
    color: #342930 !important;
}

html[data-theme="light"] .pe9864-logout-card p {
    color: #64535b !important;
}

html[data-theme="light"] .pe9864-logout-cancel,
html[data-theme="light"] .pe9864-logout-cancel * {
    color: #514149 !important;
    opacity: 1 !important;
}

html[data-theme="light"] .pe9864-logout-cancel {
    background: linear-gradient(180deg, #fffdfd, #eee5e9) !important;
    border: 1px solid #d4c4ca !important;
}

html[data-theme="light"] .pe9864-logout-confirm,
html[data-theme="light"] .pe9864-logout-confirm * {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* ============================================================
   5) NAVIGATION MOBILE — labels lisibles quelle que soit la langue
   ============================================================ */
html[data-theme="light"] .v82-mobile-app-nav .v82-app-nav-label {
    color: #66545d !important;
    opacity: 1 !important;
}

html[data-theme="light"] .v82-mobile-app-nav .v82-app-nav-item.active .v82-app-nav-label {
    color: #8f2558 !important;
}
