/* Popup messagerie / notifications (utilisateurs connectés) */
.messages_overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.messages_overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.messages_popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 9999;
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(44, 18, 59, 0.2);
    border: 1px solid rgba(44, 18, 59, 0.08);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}
.messages_popup.is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.messages_popup_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(44, 18, 59, 0.1);
    flex-shrink: 0;
}
.messages_popup_title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2C123B;
}
.messages_popup_close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    color: #2C123B;
    transition: background 0.15s ease;
}
.messages_popup_close:hover {
    background: rgba(44, 18, 59, 0.08);
}
.messages_popup_close svg {
    width: 20px;
    height: 20px;
}

.messages_popup_body {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.messages_list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.messages_list_item {
    padding: 1rem;
    border-radius: 12px;
    background: rgba(44, 18, 59, 0.04);
    border: 1px solid rgba(44, 18, 59, 0.08);
}
.messages_list_item_title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #2C123B;
    margin: 0 0 0.5rem 0;
}
.messages_list_item_content {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #4a3f5c;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
    white-space: pre-wrap;
}
.messages_list_item_buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.messages_list_item_buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: #9c27b0;
    border-radius: 1000px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.1s ease;
}
.messages_list_item_buttons a:hover {
    background: #8e24aa;
    transform: translateY(-1px);
}
.messages_list_item_buttons a:focus-visible {
    outline: 2px solid #9c27b0;
    outline-offset: 2px;
}

.messages_empty {
    text-align: center;
    padding: 2rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: #6b5b7a;
}

.messages_loading {
    text-align: center;
    padding: 2rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: #6b5b7a;
}
