/* ========================================
   BOITE DE NOTIFICATIONS (signalement 419)
   Liste a gauche, detail a droite ; sous 768 px, le detail remplace la liste.
   Chaque panneau defile seul dans la hauteur de .list-page-container.
   ======================================== */

.notifications-filtres {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.notifications-filtre {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.75rem;
    color: var(--neutral-foreground-hint);
}

/* .form-select de Bootstrap impose width: 100% : dans le flex du header, les selects
   chasseraient le bouton hors du .page-header, qui est en overflow: hidden. */
.notifications-filtre .form-select {
    width: auto;
    min-width: 150px;
}

.notifications-onglets {
    display: flex;
    gap: 4px;
    padding: 0 20px;
    border-bottom: 1px solid var(--neutral-stroke-rest);
}

.notifications-onglet {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 14px;
    font: inherit;
    color: var(--neutral-foreground-rest);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.notifications-onglet:hover {
    background: var(--neutral-fill-stealth-hover);
}

.notifications-onglet[aria-selected="true"] {
    border-bottom-color: var(--accent-fill-rest);
    font-weight: 600;
}

.notifications-compteur {
    background: var(--accent-fill-rest);
    color: var(--foreground-on-accent-rest);
    border-radius: 10px;
    padding: 0 7px;
    font-size: 0.72rem;
    line-height: 1.5;
    font-weight: 600;
}

.notifications-boite {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 12px;
    flex: 1;
    min-height: 0;
    padding: 0 20px;
}

@media (min-width: 1600px) {
    .notifications-boite {
        grid-template-columns: 440px minmax(0, 1fr);
    }
}

.notifications-liste,
.notifications-detail {
    min-height: 0;
    overflow-y: auto;
    border: 1px solid var(--neutral-stroke-rest);
    border-radius: 6px;
    background: var(--neutral-layer-1);
}

.notifications-detail {
    padding: 16px 20px;
}

.notifications-vide {
    padding: 24px 16px;
    color: var(--neutral-foreground-hint);
    text-align: center;
}

.notifications-plus {
    display: flex;
    justify-content: center;
    padding: 8px;
}

/* En-tetes de groupe : le jour reste visible en defilant. */
.notif-jour {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 6px 12px;
    background: var(--neutral-layer-2);
    color: var(--neutral-foreground-hint);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.notif-entreprise {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 12px 2px;
    font-weight: 600;
    font-size: 0.85rem;
}

.notif-entreprise-nombre {
    color: var(--neutral-foreground-hint);
    font-weight: 400;
    font-size: 0.75rem;
}

.notif-ligne {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    border-left: 3px solid transparent;
    cursor: pointer;
    outline: none;
}

.notif-ligne:hover {
    background: var(--neutral-fill-stealth-hover);
}

.notif-ligne:focus-visible {
    box-shadow: inset 0 0 0 2px var(--accent-fill-rest);
}

.notif-ligne.est-selectionnee {
    background: color-mix(in srgb, var(--accent-fill-rest) 14%, transparent);
    border-left-color: var(--accent-fill-rest);
}

.notif-icone {
    font-size: 1rem;
    color: var(--neutral-foreground-hint);
    margin-top: 2px;
}

.notif-corps {
    flex: 1;
    min-width: 0;
}

.notif-entete {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--neutral-foreground-hint);
}

.notif-qui,
.notif-objet,
.notif-apercu,
.notif-entreprise-ligne {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notif-heure {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.notif-objet {
    color: var(--neutral-foreground-rest);
}

.notif-ligne.est-non-lue .notif-objet,
.notif-ligne.est-non-lue .notif-qui {
    font-weight: 600;
    color: var(--neutral-foreground-rest);
}

.notif-apercu,
.notif-entreprise-ligne {
    font-size: 0.8rem;
    color: var(--neutral-foreground-hint);
}

.notif-pastille {
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--accent-fill-rest);
    flex-shrink: 0;
}

/* Panneau de detail */
.notifications-detail-contenu {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.notifications-detail-entete {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--neutral-stroke-rest);
}

.notifications-detail-titre {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.notifications-detail-soustitre {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.notifications-detail-qui {
    font-weight: 600;
}

.notifications-detail-meta {
    font-size: 0.85rem;
    color: var(--neutral-foreground-hint);
}

.notifications-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.notifications-detail-grille {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    align-items: baseline;
}

/* Le bouton Retour ne sert que lorsque le detail remplace la liste. */
.notifications-retour {
    display: none;
    align-self: flex-start;
}

@media (max-width: 767.98px) {
    .notifications-boite {
        grid-template-columns: minmax(0, 1fr);
        padding: 0;
    }

    .notifications-onglets {
        padding: 0;
    }

    .notifications-boite[data-detail-ouvert="true"] .notifications-liste,
    .notifications-boite[data-detail-ouvert="false"] .notifications-detail {
        display: none;
    }

    .notifications-retour {
        display: inline-flex;
    }
}
