/* =============================================
   Module Alertes
   ============================================= */

/* Onglets de filtrage */
.alertes-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
}

.alertes-tabs .tab {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.alertes-tabs .tab:hover {
    color: var(--primary-color);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.alertes-tabs .tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Liste des alertes */
.alertes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Carte d'alerte */
.alerte-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 20px;
    transition: all 0.3s;
    border-left: 4px solid #ddd;
}

.alerte-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateX(2px);
}

/* États lue/non lue */
.alerte-card.unread {
    background: #fffbf0;
    border-left-width: 5px;
}

.alerte-card.read {
    opacity: 0.75;
}

/* Types d'alertes */
.alerte-card.info {
    border-left-color: #2196F3;
}

.alerte-card.warning {
    border-left-color: #FF9800;
}

.alerte-card.alert {
    border-left-color: #F44336;
}

.alerte-card.success {
    border-left-color: #4CAF50;
}

.alerte-card.info.unread {
    background: #E3F2FD;
}

.alerte-card.warning.unread {
    background: #FFF3E0;
}

.alerte-card.alert.unread {
    background: #FFEBEE;
}

.alerte-card.success.unread {
    background: #E8F5E9;
}

/* Header de l'alerte */
.alerte-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.alerte-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.alerte-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    flex: 1;
}

.alerte-date {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

/* Corps de l'alerte */
.alerte-body {
    padding-left: 36px;
    margin-bottom: 15px;
}

.alerte-body p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

/* Actions de l'alerte */
.alerte-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-left: 36px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.alerte-checkbox {
    margin-right: auto;
}

.btn-icon {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.btn-icon.btn-danger {
    border-color: #f44336;
    color: #f44336;
}

.btn-icon.btn-danger:hover {
    background-color: #f44336;
    color: white;
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    font-size: 18px;
    margin: 0;
}

/* Configuration des alertes */
.config-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px 0;
}

.config-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
}

.config-item h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: var(--text-dark);
}

.config-item .form-group {
    margin-bottom: 12px;
}

.config-item .form-group:last-child {
    margin-bottom: 0;
}

.config-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.config-item input[type="number"] {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Widget pour le dashboard */
.alertes-widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alerte-widget-item {
    padding: 12px;
    border-left: 3px solid #ddd;
    margin-bottom: 10px;
    background: white;
    border-radius: 6px;
    transition: all 0.2s;
}

.alerte-widget-item:hover {
    background: #f9f9f9;
    transform: translateX(2px);
}

.alerte-widget-item.info {
    border-left-color: #2196F3;
}

.alerte-widget-item.warning {
    border-left-color: #FF9800;
}

.alerte-widget-item.alert {
    border-left-color: #F44336;
}

.alerte-widget-item.success {
    border-left-color: #4CAF50;
}

.alerte-widget-item strong {
    display: block;
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.widget-date {
    font-size: 12px;
    color: #999;
}

.widget-empty {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .alerte-header {
        flex-wrap: wrap;
    }

    .alerte-date {
        flex-basis: 100%;
        order: 3;
        margin-left: 36px;
    }

    .alerte-body,
    .alerte-actions {
        padding-left: 0;
    }

    .config-form {
        max-height: 400px;
    }
}
