/**
 * FICHIER : assets/css/notification-center.css
 * -------------------------------------------------------------------------
 * Cloche, panneau rapide et page complète des notifications.
 * -------------------------------------------------------------------------
 */

.notification-topbar {
    position: relative;
    margin-left: auto;
}

.notification-bell-button {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid #dce5f7;
    border-radius: 12px;
    background: #ffffff;
    color: var(--app-primary);
    cursor: pointer;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.notification-bell-button:hover,
.notification-bell-button.is-open {
    border-color: #b8caf2;
    background: var(--app-primary-soft);
    transform: translateY(-1px);
}

.notification-bell-svg,
.notification-item-svg,
.notification-empty-svg,
.notification-footer-svg,
.notification-page-svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-bell-svg {
    width: 20px;
    height: 20px;
}

.notification-count-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    display: grid;
    min-width: 20px;
    height: 20px;
    box-sizing: border-box;
    place-items: center;
    padding: 0 5px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #e75364;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 900;
}

.notification-panel {
    position: absolute;
    top: calc(100% + 11px);
    right: 0;
    z-index: 100;
    display: none;
    width: min(390px, calc(100vw - 24px));
    overflow: hidden;
    border: 1px solid #e0e7f2;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(23, 33, 47, 0.18);
}

.notification-panel.is-open {
    display: block;
}

.notification-panel-heading {
    position: static !important;
    display: flex;
    height: auto !important;
    min-height: 0 !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 14px;
    border-bottom: 1px solid #e8edf5;
    background: #ffffff;
}

.notification-panel-heading h2,
.notification-panel-heading p {
    margin: 0;
}

.notification-panel-heading h2 {
    color: #1d2939;
    font-size: 1rem;
}

.notification-eyebrow {
    margin-bottom: 3px !important;
    color: #3867e8;
    font-size: 0.67rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.notification-mark-all {
    border: 0;
    background: transparent;
    color: #3867e8;
    font: inherit;
    font-size: 0.77rem;
    font-weight: 850;
    cursor: pointer;
}

.notification-panel-list {
    max-height: min(460px, calc(100vh - 165px));
    overflow-y: auto;
}

.notification-panel-item {
    display: flex;
    gap: 10px;
    padding: 12px 13px;
    border-bottom: 1px solid #edf1f6;
    color: #344054;
    text-decoration: none;
    transition: background 0.18s ease;
}

.notification-panel-item:hover {
    background: #f8faff;
    color: #344054;
}

.notification-panel-item.is-unread {
    background: #f3f7ff;
}

.notification-panel-item.is-unread:hover {
    background: #eaf1ff;
}

.notification-item-icon {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 10px;
    background: #eef3ff;
    color: #3867e8;
}

.notification-item-svg {
    width: 17px;
    height: 17px;
}

.notification-item-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.notification-item-copy strong,
.notification-item-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item-copy strong {
    color: #1d2939;
    font-size: 0.84rem;
}

.notification-item-copy span {
    display: -webkit-box;
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.notification-item-copy small {
    color: #8a94a6;
    font-size: 0.7rem;
}

.notification-panel-footer {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #3867e8;
    font-size: 0.82rem;
    font-weight: 850;
    text-decoration: none;
}

.notification-footer-svg {
    width: 16px;
    height: 16px;
}

.notification-empty {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 24px 16px;
    color: #7b8798;
    text-align: center;
}

.notification-empty strong {
    color: #344054;
}

.notification-empty-svg {
    width: 28px;
    height: 28px;
    color: #3867e8;
}

/* ----------------------------------------------------------------------
 * PAGE COMPLÈTE
 * ---------------------------------------------------------------------- */

.notifications-page {
    display: grid;
    gap: 16px;
}

.notifications-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--ui-border);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(56, 103, 232, 0.14), transparent 34%),
        linear-gradient(135deg, #ffffff, #f8faff);
    box-shadow: var(--ui-shadow);
}

.notifications-page-header h1,
.notifications-page-header p {
    margin: 0;
}

.notifications-page-header h1 {
    color: var(--ui-text);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.notifications-page-header p:last-child {
    margin-top: 7px;
    color: var(--ui-muted);
}

.notifications-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.notifications-filter-card {
    padding: 14px;
}

.notifications-filter-form {
    display: grid;
    grid-template-columns:
        minmax(180px, 1fr)
        minmax(160px, 220px)
        auto;
    align-items: end;
    gap: 10px;
}

.notifications-filter-form label {
    display: grid;
    gap: 5px;
    color: var(--ui-muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.notifications-filter-form select {
    min-height: 42px;
    padding: 9px 10px;
}

.notifications-list {
    display: grid;
    gap: 9px;
}

.notification-page-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: #ffffff;
    color: var(--ui-text);
    text-decoration: none;
    box-shadow: 0 6px 15px rgba(30, 41, 59, 0.05);
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.notification-page-item:hover {
    border-color: #c1d0f2;
    box-shadow: var(--ui-shadow);
    color: var(--ui-text);
    transform: translateY(-1px);
}

.notification-page-item.is-unread {
    border-left: 5px solid #3867e8;
    background: #fbfcff;
}

.notification-page-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: #eef3ff;
    color: #3867e8;
}

.notification-page-svg {
    width: 20px;
    height: 20px;
}

.notification-page-copy {
    display: grid;
    align-content: start;
    gap: 4px;
}

.notification-page-copy h2,
.notification-page-copy p {
    margin: 0;
}

.notification-page-copy h2 {
    font-size: 1rem;
}

.notification-page-copy p {
    color: var(--ui-muted);
    line-height: 1.52;
}

.notification-page-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.notification-category,
.notification-level,
.notification-read-state {
    display: inline-flex;
    min-height: 23px;
    align-items: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.notification-category {
    background: #eef3ff;
    color: #3867e8;
}

.notification-level {
    background: #eef1f6;
    color: #667085;
}

.notification-level.is-important {
    background: #fff7df;
    color: #a46508;
}

.notification-level.is-urgent {
    background: #fff0f1;
    color: #b63242;
}

.notification-read-state {
    background: #eafaf5;
    color: #21896d;
}

.notification-read-state.is-unread {
    background: #fff0f1;
    color: #c84654;
}

.notification-page-date {
    color: #8a94a6;
    font-size: 0.75rem;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .notification-panel {
        position: fixed;
        top: 72px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .notifications-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .notifications-page-actions .ui-button,
    .notifications-page-actions .button,
    .notifications-page-actions .btn {
        width: 100%;
    }

    .notifications-filter-form {
        grid-template-columns: 1fr;
    }

    .notification-page-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .notification-page-date {
        grid-column: 2;
    }
}

@media (max-width: 520px) {
    .notification-topbar {
        margin-left: auto;
    }

    .notification-bell-button {
        width: 38px;
        height: 38px;
    }

    .notification-panel {
        top: 64px;
    }

    .app-topbar-profile-copy {
        display: none;
    }
}

/* =========================================================
   LOT 4 : DOSSIERS, CORBEILLE ET ACTIONS
   ========================================================= */

.notification-folder-tabs,
.notification-bulk-actions,
.notification-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.notification-folder-tabs {
    padding: 6px;
    border: 1px solid var(--ui-border);
    border-radius: 14px;
    background: #ffffff;
}

.notification-folder-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 11px;
    border-radius: 9px;
    color: var(--ui-muted);
    font-size: .84rem;
    font-weight: 850;
    text-decoration: none;
}

.notification-folder-tabs a:hover,
.notification-folder-tabs a.is-active {
    background: #eef3ff;
    color: #3867e8;
}

.notification-folder-tabs strong {
    display: grid;
    min-width: 22px;
    height: 22px;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #ffffff;
    font-size: .72rem;
}

.notification-bulk-actions {
    justify-content: flex-end;
}

.notification-item-actions {
    align-content: start;
    justify-content: flex-end;
}

.notification-item-actions .ui-button {
    text-decoration: none;
}

.notification-page-date {
    display: block;
    margin-top: 3px;
}

@media (max-width: 760px) {
    .notification-bulk-actions {
        justify-content: stretch;
    }

    .notification-bulk-actions .ui-button {
        flex: 1 1 auto;
    }

    .notification-page-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .notification-item-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .notification-item-actions .ui-button {
        flex: 1 1 auto;
    }
}

