/**
 * PEI — Favoris (localStorage)
 */

/* ── Assure le positionnement relatif sur la card ── */
.pei-bien-card {
    position: relative !important;
}

/* ── Bouton cœur sur card ── */
.pei-fav-btn {
    position: absolute !important;
    top: 10px;
    right: 10px;
    z-index: 20;
    width: 34px;
    height: 34px;
    min-width: 34px;
    max-width: 34px;
    background: rgba(255,255,255,.9) !important;
    backdrop-filter: blur(6px);
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    transition: transform .2s, box-shadow .2s;
    line-height: 1;
    flex: none !important;
}

.pei-fav-btn svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px;
    max-width: 16px;
    stroke: #94a3b8 !important;
    fill: none !important;
    display: block;
    transition: stroke .2s, fill .2s;
    pointer-events: none;
}

.pei-fav-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(0,0,0,.22);
}

.pei-fav-btn:hover svg {
    stroke: #e11d48 !important;
}

.pei-fav-btn.active {
    background: #fff0f3 !important;
}

.pei-fav-btn.active svg {
    stroke: #e11d48 !important;
    fill: #e11d48 !important;
}

/* Animation pop */
.pei-fav-btn.pop {
    animation: pei-fav-pop .3s ease;
}
@keyframes pei-fav-pop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}

/* ── Badge compteur dans la nav ── */
#pei-fav-count {
    display: none;
    background: #e11d48;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 50px;
    padding: 0 5px;
    line-height: 18px;
    text-align: center;
    vertical-align: middle;
    margin-left: 2px;
}

#pei-fav-count.visible {
    display: inline-block;
}

/* ── Toast ── */
#pei-fav-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: #0a1f38;
    color: #fff;
    padding: 11px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    z-index: 99999;
    opacity: 0;
    transition: opacity .22s, transform .22s;
    pointer-events: none;
    white-space: nowrap;
}
#pei-fav-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Bouton "Sauvegarder" sur single bien ── */
.pei-fav-single-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    color: #475569;
    transition: all .2s;
    width: 100%;
    justify-content: center;
    margin-top: 8px;
    box-sizing: border-box;
}
.pei-fav-single-btn svg {
    width: 16px;
    height: 16px;
    stroke: #94a3b8;
    fill: none;
    flex-shrink: 0;
    transition: stroke .2s, fill .2s;
}
.pei-fav-single-btn:hover {
    border-color: #fda4af;
    color: #e11d48;
}
.pei-fav-single-btn:hover svg { stroke: #e11d48; }
.pei-fav-single-btn.active {
    border-color: #e11d48;
    background: #fff0f3;
    color: #e11d48;
}
.pei-fav-single-btn.active svg { stroke: #e11d48; fill: #e11d48; }
