/* gv-notifications.css — Centre de notifications (modal + badge cloche)
   S'appuie sur le socle global des modals (.gv-modal-backdrop / .gv-modal / .modal-header).
   Convention modale du site : texte/accents = var(--primary-color),
   éléments pleins = fond var(--primary-color) + texte var(--secondary-color). */

.gv-notif-modal {
    width: min(520px, 94vw);
    max-height: min(640px, 88vh);
    display: flex;
    flex-direction: column;
}

.gv-notif-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    padding-top: 4px;
}

/* ── Switch pleine largeur « Mes infos / Information Sol°Arch » ─────────
   Même langage visuel que le segmented switch des préférences. */
.gv-notif-switch {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    padding: 4px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 16%, transparent);
}

.gv-notif-switch-slider {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 9px;
    background: var(--primary-color);
    transition: transform .28s cubic-bezier(.45, 0, .25, 1);
    pointer-events: none;
}

.gv-notif-switch[data-value="solarch"] .gv-notif-switch-slider {
    transform: translateX(100%);
}

.gv-notif-switch-opt {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 10px;
    border: none;
    background: none;
    border-radius: 9px;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: color-mix(in srgb, var(--primary-color) 78%, transparent);
    cursor: pointer;
    transition: color .2s ease;
}

.gv-notif-switch-opt.is-active {
    color: var(--secondary-color);
}

.gv-notif-switch-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    background: color-mix(in srgb, var(--primary-color) 16%, transparent);
    color: var(--primary-color);
}

.gv-notif-switch-opt.is-active .gv-notif-switch-count {
    background: color-mix(in srgb, var(--secondary-color) 26%, transparent);
    color: var(--secondary-color);
}

/* ── Barre de section : libellé + « tout marquer lu » (icône, style général) ── */
.gv-notif-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 2px;
}

.gv-notif-toolbar-label {
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--primary-color) 62%, transparent);
}

/* Bouton fantôme (même langage que la croix de fermeture) :
   ni contour ni fond, le fond n'apparaît qu'au survol. */
.gv-notif-readall {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 9px;
    background: none;
    color: var(--primary-color);
    cursor: pointer;
    transition: background-color .15s ease;
}

.gv-notif-readall:hover {
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
}

.gv-notif-readall svg {
    width: 16px;
    height: 16px;
}

/* ── Liste ── */
.gv-notif-list {
    overflow-y: auto;
    min-height: 160px;
    max-height: 420px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.gv-notif-empty {
    margin: 40px 0;
    text-align: center;
    font-size: 13.5px;
    color: color-mix(in srgb, var(--primary-color) 60%, transparent);
}

.gv-notif-item {
    position: relative;
    display: flex;
    gap: 10px;
    padding: 11px 12px 11px 14px;
    border: 1px solid color-mix(in srgb, var(--primary-color) 14%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary-color) 4%, transparent);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.gv-notif-item:hover {
    background: color-mix(in srgb, var(--primary-color) 9%, transparent);
}

.gv-notif-item-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: transparent;
}

.gv-notif-item.is-unread {
    border-color: color-mix(in srgb, var(--primary-color) 30%, transparent);
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
}

.gv-notif-item.is-unread .gv-notif-item-dot {
    background: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 18%, transparent);
}

.gv-notif-item-main {
    min-width: 0;
    flex: 1;
}

.gv-notif-item-title {
    margin: 0;
    font-family: "Inter", sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.35;
}

.gv-notif-item-body {
    margin: 3px 0 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: color-mix(in srgb, var(--primary-color) 74%, transparent);
    overflow-wrap: anywhere;
}

.gv-notif-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 7px;
}

.gv-notif-item-meta {
    font-size: 11.5px;
    color: color-mix(in srgb, var(--primary-color) 55%, transparent);
}

.gv-notif-item-action {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 8px;
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    background: var(--primary-color);
    color: var(--secondary-color);
    transition: transform .12s ease, filter .15s ease;
}

.gv-notif-item-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

/* ── Badge cloche : pop à chaque changement de valeur ── */
.gv-history-notif-badge.is-pop {
    animation: gvNotifBadgePop .38s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes gvNotifBadgePop {
    0%   { transform: scale(.6); }
    60%  { transform: scale(1.25); }
    100% { transform: scale(1); }
}
