/* ==========================================================================
   Cloche des notifications (<x-notification-bell />)
   Chargee par le layout public (layouts.main) et le layout connecte
   (layouts.connected) : la cloche vit dans les deux headers.
   ========================================================================== */

.notif {
    position: relative;
    flex-shrink: 0;
}

/* Meme gabarit que les boutons ronds du header public (.icon-btn) */
.notif-toggle {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e4e7ea;
    border-radius: 50%;
    background: #fff;
    color: #3f4650;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.notif-toggle i {
    font-size: 17px;
}

.notif-toggle:hover,
.notif.is-open .notif-toggle {
    border-color: #ffd3bf;
    background: #fff5f1;
    color: #ff3c00;
}

.notif-toggle:focus-visible {
    outline: 2px solid #ff3c00;
    outline-offset: 2px;
}

/* Pastille du nombre de non lues */
.notif-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #ff3c00;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
}

/* ---- Panneau ---- */
.notif-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1050;
    width: 360px;
    max-width: calc(100vw - 24px);
    overflow: hidden;
    background: #fff;
    border: 1px solid #eceef1;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(16, 24, 40, .14);
    text-align: left;
}

.notif-panel[hidden] {
    display: none;
}

.notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f1f3;
}

.notif-head strong {
    font-size: 14.5px;
    color: #16191d;
}

.notif-head form {
    margin: 0;
}

.notif-link {
    padding: 0;
    border: 0;
    background: none;
    font-size: 12.5px;
    font-weight: 600;
    color: #ff3c00;
    cursor: pointer;
}

.notif-link:hover {
    text-decoration: underline;
}

.notif-list {
    max-height: 380px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    list-style: none;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
    transition: background .15s ease;
}

.notif-item:hover {
    background: #f6f7f9;
    color: inherit;
}

.notif-item.is-unread {
    background: #fff5f1;
}

.notif-item.is-unread:hover {
    background: #ffede5;
}

.notif-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff1ec;
    color: #ff3c00;
    font-size: 14px;
}

.notif-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notif-body strong {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    color: #16191d;
}

/* Point orange devant le titre d'une notification non lue */
.notif-item.is-unread .notif-body strong::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 50%;
    background: #ff3c00;
    vertical-align: middle;
}

.notif-body small {
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
}

.notif-body time {
    font-size: 11px;
    color: #98a2b3;
}

.notif-empty {
    margin: 0;
    padding: 22px 18px;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
}

.notif-empty i {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
    color: #c3c8cf;
}

.notif-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #f0f1f3;
    background: #fafbfc;
}

.notif-foot a {
    font-size: 12.5px;
    font-weight: 600;
    color: #16191d;
    text-decoration: none;
}

.notif-foot a:hover {
    color: #ff3c00;
}

/* Petit ecran : le panneau prend la largeur, sous le header */
@media (max-width: 576px) {
    .notif-panel {
        position: fixed;
        top: 72px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
    }
}
