/* ==========================================
   FRYNZY NOTIFICATIONS - VERSION ELITE COMPLÈTE
   ========================================== */

:root {
    --notif-bg: #0d0d1a;
    --notif-bg-gradient: linear-gradient(180deg, #0d0d1a 0%, #050510 100%);
    --notif-primary: #5e5ce6;
    --notif-accent: #bf5af2;
    --notif-success: #32d74b;
    --notif-danger: #ff453a;
    --notif-warning: #ff9f0a;
    --notif-text: #ffffff;
    --notif-text-dim: rgba(255, 255, 255, 0.6);
    --notif-border: rgba(255, 255, 255, 0.1);
    --notif-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    --notif-panel-width: 450px;
}

/* Overlay */
.notifications-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.notifications-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Panel */
.notifications-panel {
    position: fixed;
    top: 0;
    right: calc(-1 * var(--notif-panel-width));
    width: var(--notif-panel-width);
    height: 100vh;
    background: var(--notif-bg-gradient);
    z-index: 2001;
    box-shadow: var(--notif-shadow);
    border-left: 4px solid var(--notif-primary);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.notifications-panel.show {
    right: 0;
}

@media (max-width: 768px) {
    .notifications-panel {
        width: 100%;
        right: -100%;
        border-left: none;
        border-top: 4px solid var(--notif-primary);
        top: 100%;
        height: 100vh;
        transition: top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .notifications-panel.show {
        top: 0;
        right: 0;
    }
}

/* Header */
.notifications-header {
    padding: 24px;
    height: 20%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--notif-border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--notif-primary);
    object-fit: cover;
}

.user-info-meta {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--notif-text);
}

.user-status {
    font-size: 0.8rem;
    color: var(--notif-text-dim);
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--notif-success);
}

.status-dot.offline { background: #888; }

.header-right {
    display: flex;
    gap: 10px;
}

.header-right button {
    background: rgba(255,255,255,0.05);
    border: none;
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
}

.header-right button:hover {
    background: rgba(255,255,255,0.15);
}

/* Filters */
.filters-container {
    padding: 15px 0;
    height: 12%;
    border-bottom: 1px solid var(--notif-border);
}

.filters-scroll {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding: 0 20px;
    scrollbar-width: none;
}

.filters-scroll::-webkit-scrollbar { display: none; }

.filter-chip {
    padding: 8px 16px;
    border-radius: 20px;
    background: transparent;
    border: 1px solid var(--notif-border);
    color: var(--notif-text-dim);
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.filter-chip.active {
    background: var(--notif-primary);
    border-color: var(--notif-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(94, 92, 230, 0.4);
}

.filter-chip:hover:not(.active) {
    background: rgba(255,255,255,0.05);
}

/* Content */
.notifications-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.notifications-list {
    display: flex;
    flex-direction: column;
}

/* Item */
.notification-item {
    padding: 16px 24px;
    display: flex;
    gap: 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: 0.2s;
    position: relative;
}

.notification-item:hover {
    background: rgba(255,255,255,0.03);
}

.notification-item.unread {
    background: rgba(94, 92, 230, 0.05);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--notif-primary);
}

.notif-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.notif-msg {
    font-size: 0.85rem;
    color: var(--notif-text-dim);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notif-time {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    margin-top: 5px;
}

.notif-type-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Detail Modal */
.notif-detail-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 600px;
    background: var(--notif-bg-gradient);
    z-index: 3000;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.notif-detail-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.detail-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--notif-border);
}

.detail-layout {
    display: flex;
    height: 400px;
}

@media (max-width: 600px) {
    .detail-layout { flex-direction: column; height: auto; max-height: 70vh; overflow-y: auto; }
}

.detail-sidebar {
    width: 30%;
    background: rgba(255,255,255,0.02);
    border-right: 1px solid var(--notif-border);
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.detail-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--notif-primary);
    margin-bottom: 15px;
}

.detail-main {
    width: 70%;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

@media (max-width: 600px) {
    .detail-sidebar, .detail-main { width: 100%; border-right: none; }
}

.detail-msg {
    font-size: 1rem;
    color: var(--notif-text-dim);
    margin: 15px 0;
    flex: 1;
}

.detail-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

.btn-detail {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-detail.primary { background: var(--notif-primary); color: #fff; }
.btn-detail.secondary { background: rgba(255,255,255,0.1); color: #fff; }
.btn-detail:hover { transform: translateY(-2px); }

/* Progress Bar (Capacity Warning) */
.capacity-progress-container {
    width: 100%;
    height: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    overflow: hidden;
    margin: 15px 0;
}

.capacity-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff9f0a, #ff453a);
    transition: width 1s ease-out;
}

/* Contact Circles */
.contact-item-small {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    margin-bottom: 5px;
}

.contact-initial {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--notif-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

/* Skeletons */
.skeleton-shimmer {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-item {
    padding: 16px 24px;
    display: flex;
    gap: 15px;
}

.skeleton-circle { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.05); }
.skeleton-line { height: 12px; border-radius: 4px; background: rgba(255,255,255,0.05); margin-bottom: 8px; }
.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long { width: 100%; }

/* Pulse Animation for Badge */
@keyframes pulseBadge {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 69, 58, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(255, 69, 58, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 69, 58, 0); }
}

.notification-badge.pulse {
    animation: pulseBadge 2s infinite;
}

/* Empty State Styling */
.notif-empty-state {
    padding: 80px 24px;
    text-align: center;
    color: var(--notif-text-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.notif-empty-state i {
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.15);
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

.notif-empty-state p {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* Download Links Grid */
.download-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.download-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--notif-text-main);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.download-link-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--notif-primary);
    transform: translateY(-2px);
}

.download-link-card i {
    font-size: 1.5rem;
    color: var(--notif-primary);
}

.download-link-card span {
    font-size: 0.8rem;
    font-weight: 700;
}
