/* Système de notifications */

/* Badge de notification */
#notification-btn {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(255, 107, 107, 0.6);
    }
}

/* Conteneur du dropdown de notifications */
.notification-dropdown {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 400px;
    max-width: 90vw;
    max-height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 10000;
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header du dropdown */
.notification-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notification-header h3 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 600;
}

.notification-actions {
    display: flex;
    gap: 1rem;
}

.mark-all-read {
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.3s;
    text-decoration: underline;
}

.mark-all-read:hover {
    opacity: 1;
}

/* Onglets de filtrage */
.notification-tabs {
    display: flex;
    padding: 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.notification-tabs .tab {
    flex: 1;
    padding: 1rem;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.notification-tabs .tab:hover {
    background: #e9ecef;
}

.notification-tabs .tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: white;
}

/* Liste des notifications */
.notifications-list {
    max-height: 400px;
    overflow-y: auto;
    background: white;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Item de notification */
.notification-item {
    display: flex;
    gap: 1.2rem;
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: #f0f4ff;
}

.notification-item.unread:hover {
    background: #e6edff;
}

/* Icône de notification */
.notification-icon {
    min-width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.notification-item .notification-icon i.fa-check-circle {
    color: #28a745;
}

.notification-item .notification-icon i.fa-exclamation-circle {
    color: #dc3545;
}

.notification-item .notification-icon i.fa-exclamation-triangle {
    color: #ffc107;
}

.notification-item .notification-icon i.fa-bell {
    color: #667eea;
}

.notification-item .notification-icon i.fa-user-plus {
    color: #17a2b8;
}

.notification-item .notification-icon i.fa-money-bill-wave {
    color: #28a745;
}

.notification-item .notification-icon i.fa-users {
    color: #6f42c1;
}

/* Contenu de la notification */
.notification-content-wrapper {
    flex: 1;
}

.notification-content {
    font-size: 1.4rem;
    color: #495057;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.notification-time {
    font-size: 1.2rem;
    color: #6c757d;
}

/* Indicateur non lu */
.unread-indicator {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
}

/* États vides et de chargement */
.notification-empty,
.notification-loading {
    padding: 3rem;
    text-align: center;
    color: #6c757d;
    font-size: 1.4rem;
}

.notification-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Footer avec bouton charger plus */
.notification-footer {
    padding: 1rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.load-more-btn {
    padding: 0.8rem 2rem;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* Indicateur de chargement */
.loading-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .notification-dropdown {
        top: 60px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }

    .notification-header h3 {
        font-size: 1.4rem;
    }

    .mark-all-read {
        font-size: 1.1rem;
    }

    .notification-item {
        padding: 1.2rem;
        gap: 1rem;
    }

    .notification-icon {
        min-width: 35px;
        height: 35px;
        font-size: 1.4rem;
    }

    .notification-content {
        font-size: 1.3rem;
    }
}

@media (max-width: 450px) {
    .notification-dropdown {
        top: 55px;
    }

    .notification-header {
        padding: 1.2rem;
    }

    .notification-tabs .tab {
        padding: 0.8rem;
        font-size: 1.3rem;
    }
}
