/**
 * Sunday - Styles pour le système de notifications
 */

/* Bannière de demande de permission */
.notification-permission-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease-out;
    z-index: 999;
}

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

.banner-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
}

.banner-text strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.banner-text p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.banner-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.banner-actions .btn {
    white-space: nowrap;
}

/* Styles pour la section notifications du profil */
.notification-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.9rem;
}

.feature-item i {
    font-size: 1.1rem;
}

/* Amélioration du dropdown de notifications */
.notifications-dropdown .dropdown-content {
    min-width: 380px;
    max-width: 420px;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

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

.notification-item.unread {
    background: #e7f3ff;
    border-left: 3px solid #007bff;
}

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

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    border-radius: 50%;
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.notification-item.unread .notification-icon {
    background: #007bff;
    color: white;
}

.notification-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e9ecef;
    position: relative;
    z-index: 2;
    background: white;
}

.notification-item.unread .notification-avatar {
    border-color: #007bff;
}

.notification-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Avatar client avec favicon */
.notification-avatar.client-avatar {
    background: #85200c;
}

.notification-avatar .client-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    background: #85200c;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content p {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.no-notifications {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
}

.no-notifications p {
    margin: 0;
}

/* Badge de compteur */
.notifications-btn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* Animation pour les nouvelles notifications */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.notifications-btn.has-new .badge {
    animation: pulse 1s ease-in-out 3;
}

/* Responsive */
@media (max-width: 768px) {
    .notification-permission-banner {
        padding: 0.75rem;
    }
    
    .banner-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .banner-actions {
        width: 100%;
        justify-content: center;
    }
    
    .notifications-dropdown .dropdown-content {
        min-width: 320px;
        max-width: 100vw;
        right: 0;
        left: auto;
    }
    
    .notification-item {
        padding: 0.75rem;
    }
}

/* Styles pour la page de paramètres de notifications */
.notification-settings-page {
    max-width: 1000px;
    margin: 0 auto;
}

.notification-settings-page .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.notification-settings-page .form-check-label {
    cursor: pointer;
    user-select: none;
}

.notification-settings-page .form-check-input {
    cursor: pointer;
    width: 3rem;
    height: 1.5rem;
}

.notification-settings-page .form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

/* Section header inline pour le profil */
.section-header-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header-inline h3 {
    margin: 0;
    font-size: 1.1rem;
}

.section-header-inline .btn {
    white-space: nowrap;
}
