/* ============================================================
   LDS Notifications — Cloche header + Dropdown
   Composant du Centre de Notifications Unifié
   ============================================================ */

/* --- Wrapper cloche --- */
.notif-bell-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 8px;
}

/* --- Bouton cloche --- */
.notif-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease;
    color: white;
}

.notif-bell-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.notif-bell-btn:focus {
    outline: 2px solid var(--primary-blue, #4EBBBB);
    outline-offset: 2px;
}

.notif-bell-icon {
    font-size: 18px;
}

/* --- Badge compteur --- */
.notif-bell-badge {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    background: #EF4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    pointer-events: none;
    animation: notif-badge-pop 0.3s ease;
}

.notif-bell-badge.hidden {
    display: none;
}

@keyframes notif-badge-pop {
    0% { transform: scale(0.5); opacity: 0; }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); opacity: 1; }
}

/* --- Dropdown --- */
.notif-dropdown {
    display: none;
    position: absolute;
    top: 48px;
    right: -60px;
    width: 380px;
    max-height: 480px;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.notif-dropdown.open {
    display: flex;
    flex-direction: column;
    animation: notif-dropdown-slide 0.2s ease;
}

@keyframes notif-dropdown-slide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Header dropdown --- */
.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    color: #1f2937;
}

.notif-dropdown-mark-all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.15s ease, color 0.15s ease;
}

.notif-dropdown-mark-all:hover {
    background: #f3f4f6;
    color: var(--primary-blue, #4EBBBB);
}

/* --- Body dropdown --- */
.notif-dropdown-body {
    flex: 1;
    overflow-y: auto;
    max-height: 360px;
}

.notif-dropdown-loading {
    padding: 24px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

/* --- Item notification --- */
.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.15s ease;
    text-decoration: none;
    color: inherit;
}

.notif-item:hover {
    background: #f9fafb;
}

.notif-item.non-lue {
    background: #eff6ff;
}

.notif-item.non-lue:hover {
    background: #dbeafe;
}

/* Icône catégorie */
.notif-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    font-size: 14px;
}

.notif-item-icon.primary { background: #e0f2fe; color: #0284c7; }
.notif-item-icon.danger { background: #fee2e2; color: #dc2626; }
.notif-item-icon.warning { background: #fef3c7; color: #d97706; }
.notif-item-icon.success { background: #d1fae5; color: #059669; }
.notif-item-icon.info { background: #e0f2fe; color: #0284c7; }
.notif-item-icon.purple { background: #ede9fe; color: #7c3aed; }
.notif-item-icon.gray { background: #f3f4f6; color: #6b7280; }

/* Contenu */
.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item-message {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item-date {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Point non lu */
.notif-item-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: var(--primary-blue, #4EBBBB);
    margin-top: 6px;
}

/* --- Footer dropdown --- */
.notif-dropdown-footer {
    border-top: 1px solid #e5e7eb;
    padding: 10px 16px;
    text-align: center;
}

.notif-dropdown-view-all {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-blue, #4EBBBB);
    text-decoration: none;
    transition: color 0.15s ease;
}

.notif-dropdown-view-all:hover {
    color: var(--primary-blue-dark, #366092);
    text-decoration: underline;
}

/* --- État vide dropdown --- */
.notif-dropdown-empty {
    padding: 32px 16px;
    text-align: center;
    color: #9ca3af;
}

.notif-dropdown-empty i {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.notif-dropdown-empty span {
    font-size: 13px;
}

/* --- Priorité badges --- */
.notif-priorite-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.notif-priorite-badge.haute { background: #fee2e2; color: #dc2626; }
.notif-priorite-badge.moyenne { background: #fef3c7; color: #d97706; }
.notif-priorite-badge.basse { background: #f3f4f6; color: #6b7280; }

/* --- Responsive --- */
@media (max-width: 480px) {
    .notif-dropdown {
        width: calc(100vw - 20px);
        right: -100px;
    }
}
