/* Ts-Immo Favoris — styles du bouton cœur, de la liste et du lanceur.
   Tout est scopé sous .tsf-* pour ne pas déborder sur le thème. La couleur
   d'accent vient de la variable --tsf-accent (injectée par le plugin). */

.tsf-toggle{
    --tsf-accent:#e11d48;
    -webkit-appearance:none;appearance:none;cursor:pointer;
    display:inline-flex;align-items:center;gap:.5rem;
    padding:.5rem .85rem;font:inherit;font-weight:600;font-size:.9rem;line-height:1.2;
    color:var(--tsv-color-fg,#1f2933);background:var(--tsv-color-bg,#fff);border:1px solid var(--tsv-color-border,#dce1e8);border-radius:999px;
    transition:border-color .15s,background .15s,color .15s,transform .05s;
}
.tsf-toggle:hover{border-color:var(--tsf-accent)}
.tsf-toggle:active{transform:translateY(1px)}
.tsf-toggle:focus-visible{outline:0;box-shadow:0 0 0 3px color-mix(in srgb,var(--tsf-accent) 25%,transparent)}
.tsf-toggle .tsf-heart{
    width:1.15em;height:1.15em;flex:0 0 auto;
    fill:none;stroke:currentColor;stroke-width:1.8;transition:fill .15s,stroke .15s,transform .15s;
}
.tsf-toggle[aria-pressed="true"]{border-color:var(--tsf-accent);color:var(--tsf-accent)}
.tsf-toggle[aria-pressed="true"] .tsf-heart{fill:var(--tsf-accent);stroke:var(--tsf-accent)}
/* petit « pop » au passage à l'état sauvegardé */
.tsf-toggle.tsf-just-saved .tsf-heart{animation:tsf-pop .3s ease}
@keyframes tsf-pop{0%{transform:scale(1)}40%{transform:scale(1.35)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.tsf-toggle.tsf-just-saved .tsf-heart{animation:none}}

.tsf-inline{margin:0 0 1rem}

/* ---- Liste des favoris ---- */
.tsf-list-wrap{--tsf-accent:#e11d48;margin:1.5rem 0}
.tsf-list-title{margin:0 0 1rem;font-size:1.4rem;font-weight:700;font-family:var(--tsv-font-head,inherit);color:var(--tsv-color-dark,#0f172a)}
.tsf-list{
    display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1.1rem;
}
.tsf-card{
    position:relative;display:flex;flex-direction:column;overflow:hidden;
    background:var(--tsv-color-bg,#fff);border:1px solid var(--tsv-color-border,#e5e7eb);border-radius:var(--tsv-radius,14px);
    box-shadow:var(--tsv-shadow-sm,0 1px 2px rgba(16,24,40,.04),0 10px 24px rgba(16,24,40,.05));
    transition:box-shadow .15s,transform .15s;
}
.tsf-card:hover{box-shadow:0 2px 4px rgba(16,24,40,.08),0 16px 32px rgba(16,24,40,.09);transform:translateY(-2px)}
.tsf-card-media{display:block;aspect-ratio:16/10;background:var(--tsv-color-bg-alt,#f1f5f9) center/cover no-repeat;text-decoration:none}
.tsf-card-media--empty{display:flex;align-items:center;justify-content:center;color:#94a3b8}
.tsf-card-media--empty .tsf-heart{width:2.2rem;height:2.2rem;fill:#e2e8f0;stroke:none}
.tsf-card-body{display:flex;flex-direction:column;gap:.35rem;padding:.9rem 1rem 1.05rem}
.tsf-card-title{margin:0;font-size:1rem;font-weight:600;line-height:1.3;color:var(--tsv-color-fg,#111827)}
.tsf-card-title a{color:inherit;text-decoration:none}
.tsf-card-title a:hover{text-decoration:underline}
.tsf-card-ref{margin:0;font-size:.78rem;color:var(--tsv-color-muted,#6b7280)}
.tsf-card-price{margin:.15rem 0 0;font-size:1.05rem;font-weight:700;color:var(--tsf-accent)}
.tsf-card-actions{margin-top:auto;padding-top:.6rem;display:flex;align-items:center;gap:.6rem}
.tsf-card-view{
    font-size:.85rem;font-weight:600;color:var(--tsf-accent);text-decoration:none;
}
.tsf-card-view:hover{text-decoration:underline}
.tsf-card-remove{
    -webkit-appearance:none;appearance:none;cursor:pointer;margin-left:auto;
    display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;
    color:var(--tsv-color-muted,#6b7280);background:var(--tsv-color-bg,#fff);border:1px solid var(--tsv-color-border,#e5e7eb);border-radius:var(--tsv-radius-sm,8px);line-height:1;
    transition:color .15s,border-color .15s,background .15s;
}
.tsf-card-remove:hover{color:#dc2626;border-color:#fca5a5;background:#fef2f2}
.tsf-card-remove svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:2}
.tsf-empty{
    margin:1rem 0;padding:1.5rem;text-align:center;color:var(--tsv-color-muted,#6b7280);
    background:var(--tsv-color-bg-alt,#f8fafc);border:1px dashed #cbd5e1;border-radius:var(--tsv-radius,12px);
}

/* ---- Compteur ---- */
.tsf-count{
    --tsf-accent:#e11d48;
    display:inline-flex;align-items:center;justify-content:center;min-width:1.4em;height:1.4em;padding:0 .35em;
    font-size:.75rem;font-weight:700;line-height:1;color:#fff;background:var(--tsf-accent);border-radius:999px;
}
.tsf-count-link{display:inline-flex;text-decoration:none}

/* ---- Lanceur flottant ---- */
.tsf-launcher{
    --tsf-accent:#e11d48;
    position:fixed;right:18px;bottom:18px;z-index:9990;
    display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px;
    color:var(--tsf-accent);background:var(--tsv-color-bg,#fff);border:1px solid var(--tsv-color-border,#e5e7eb);border-radius:50%;
    box-shadow:0 6px 20px rgba(16,24,40,.18);text-decoration:none;
    transition:transform .15s,box-shadow .15s;
}
.tsf-launcher:hover{transform:translateY(-2px);box-shadow:0 10px 26px rgba(16,24,40,.24)}
.tsf-launcher .tsf-heart{width:1.6rem;height:1.6rem;fill:var(--tsf-accent);stroke:var(--tsf-accent)}
.tsf-launcher .tsf-count{position:absolute;top:-4px;right:-4px;border:2px solid #fff}

@media (max-width:600px){
    .tsf-list{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:.8rem}
    .tsf-launcher{width:50px;height:50px;right:14px;bottom:14px}
}
