/* ============================================================
   alerts.css — Styles alertes légales
   CrèchePlanning v1.0
   ============================================================ */

/* ---- Items d'alerte ---- */
.alerte-item {
    padding: 0.625rem 0.875rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
    line-height: 1.4;
    border-left: 4px solid transparent;
}

.alerte-bloquant {
    background: #fef2f2;
    border-left-color: var(--color-danger);
    color: #991b1b;
}

.alerte-warning {
    background: #fffbeb;
    border-left-color: var(--color-warning);
    color: #92400e;
}

.alerte-info {
    background: #eff6ff;
    border-left-color: var(--color-info);
    color: #1e40af;
}

/* ---- Compteur d'alertes ---- */
.alerte-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.375rem;
}

.alerte-count-bloquant { background: var(--color-danger); color: white; }
.alerte-count-warning  { background: var(--color-warning); color: white; }

/* ---- Bannière alerte globale ---- */
.alerte-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.alerte-banner-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alerte-banner-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.alerte-banner-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* ---- Indicateur taux d'encadrement ---- */
.encadrement-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
}

.encadrement-ok     { background: #dcfce7; color: #166534; }
.encadrement-warn   { background: #fef3c7; color: #92400e; }
.encadrement-danger { background: #fee2e2; color: #991b1b; }

/* ---- Tooltip alerte sur cellule ---- */
.cell-slot.has-alerte::after {
    content: "!";
    position: absolute;
    top: 1px;
    right: 2px;
    background: var(--color-danger);
    color: white;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    font-size: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    line-height: 10px;
    text-align: center;
}

/* ---- Résumé alertes dans sticky counter ---- */
.counter-alerte-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--color-danger);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.counter-ok-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--color-success);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ---- Panneau alertes liste ---- */
#alertes-list {
    max-height: 500px;
    overflow-y: auto;
}

.alertes-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin: 0.75rem 0 0.375rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--color-border);
}

/* ---- Animation alerte ---- */
@keyframes alertePulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.6; }
}

.cell-slot.alerte-active {
    animation: alertePulse 1.5s ease infinite;
}
