/* ============================================================================
   NOTIFICATION SYSTEM - Styles
   ============================================================================ */

/* Bouton de notification dans le header */
.notification-btn {
    position: relative;
    background: transparent;
    border: none;
    color: white !important; /* Blanc pour être visible sur fond noir de theme-controls */
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001; /* Au-dessus du sticky-header (z-index: 1000) */
    opacity: 1 !important; /* Forcer visibilité dans theme-controls */
}

.notification-btn:hover {
    background: rgba(0, 172, 193, 0.3);
    opacity: 1 !important;
}

/* Badge de compteur */
.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    animation: pulse 2s infinite;
    z-index: 1; /* Au-dessus du bouton parent */
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Panel de notifications */
.notification-panel {
    position: fixed;
    top: 122px;
    right: 20px;
    width: 400px;
    max-height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

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

/* Header du panel */
.notification-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #00acc1 0%, #0097a7 100%);
    color: white;
}

.notification-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.btn-mark-all-read {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-mark-all-read:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Bouton paramètres */
.btn-settings {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-settings:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Paramètres de notification */
.setting-group {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.setting-group:last-child {
    border-bottom: none;
}

.setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.setting-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
}

.setting-item:last-child {
    margin-bottom: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #00acc1;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-slider:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Liste des notifications */
.notification-list {
    max-height: 500px;
    overflow-y: auto;
}

/* Item de notification */
.notification-item {
    display: flex;
    align-items: start;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

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

.notification-item.unread {
    background: #f0f9ff;
    border-left: 4px solid #00acc1;
}

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

.notification-content {
    flex: 1;
}

.notification-content strong {
    display: block;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 5px;
}

.notification-content p {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.5;
}

.notification-content small {
    display: block;
    color: #999;
    font-size: 11px;
    margin-top: 5px;
}

/* Bouton supprimer */
.btn-delete-notif {
    background: transparent;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    margin-left: 10px;
}

.btn-delete-notif:hover {
    background: #fee;
    color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .notification-panel {
        right: 10px;
        left: 10px;
        width: auto;
        max-height: 500px;
    }
}

/* Scrollbar personnalisée */
.notification-list::-webkit-scrollbar {
    width: 6px;
}

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

.notification-list::-webkit-scrollbar-thumb {
    background: #00acc1;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #0097a7;
}
