/* Favorites (bookmarks) — star button styling + click feedback. */

.favorite-toggle {
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease-in-out, transform 0.1s ease-in-out;
    text-decoration: none;
}

/* Icon-only variant (btn-link): grey star → amber on hover → gold when set.
   Scoped to .btn-link so the button/action variants keep their own colours. */
.favorite-toggle.btn-link {
    color: #adb5bd;            /* muted grey for an empty star */
}

.favorite-toggle.btn-link:hover {
    color: #f0ad4e;            /* warm amber on hover */
}

.favorite-toggle.btn-link.is-favorited {
    color: #f5c518;            /* gold when bookmarked */
}

.favorite-toggle:focus-visible {
    outline: 2px solid #f5c518;
    outline-offset: 2px;
    border-radius: 0.2rem;
}

/* Subtle pop when the state changes. */
@keyframes favorite-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.4); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.favorite-icon.favorite-pop {
    animation: favorite-pop 0.32s ease-in-out;
}

/* Header star sits next to a display-5 title — keep it readable, not huge. */
.favorite-star-header {
    font-size: 1.75rem;
}

/* Fade-out used on the favorites page / dashboard when un-favoriting. */
.favorite-removing {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: scale(0.95);
}

/* Button variant (e.g. parcelle div row): a dark action button whose star is
   white by default and turns gold once bookmarked — the button text stays
   white, only the star changes colour. Declared after the generic rules so it
   wins. */
.favorite-toggle-btn,
.favorite-toggle-btn:hover,
.favorite-toggle-btn:focus,
.favorite-toggle-btn.is-favorited {
    color: #fff;
}
.favorite-toggle-btn .favorite-icon {
    color: #fff;
    transition: color 0.15s ease-in-out, transform 0.1s ease-in-out;
}
.favorite-toggle-btn:hover .favorite-icon {
    color: #ffe066;
}
.favorite-toggle-btn.is-favorited .favorite-icon {
    color: #f5c518;
}

/* Action-icon variant (e.g. source div row): matches the neighbouring
   btn-outline-light action icons; Bootstrap handles the base colour, the star
   just turns gold once bookmarked. The outline variant (fiche headers) behaves
   the same way on a btn-outline-warning button. */
.favorite-toggle-action.is-favorited .favorite-icon,
.favorite-toggle-outline.is-favorited .favorite-icon {
    color: #f5c518;
}
