/**
 * LNK Wishlist - coeurs et rappel du panier (toutes les pages). Budget : 2 Ko compresse.
 * Ne style que les classes du module. Couleurs : --lnk-wishlist-text et --lnk-wishlist-accent,
 * repliees sur le socle du theme (--lnk-text, --lnk-accent) ; les anciens noms --lnk-wishlist-color
 * et --lnk-wishlist-active restent lus. Aucune valeur posee ici : celle du theme l'emporte toujours.
 */
.lnk-wishlist-btn {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  color: var(--lnk-wishlist-text, var(--lnk-wishlist-color, var(--lnk-text, currentColor)));
  text-decoration: none;
  cursor: pointer;
}
.lnk-wishlist-btn:hover,
.lnk-wishlist-btn:focus-visible { color: var(--lnk-wishlist-accent, var(--lnk-wishlist-active, var(--lnk-accent, #d6204e))); }
.lnk-wishlist-btn__icon { width: 1.5em; height: 1.5em; flex: none; fill: currentColor; }
.lnk-wishlist-btn__on { display: none; }
.lnk-wishlist-btn.is-active { color: var(--lnk-wishlist-accent, var(--lnk-wishlist-active, var(--lnk-accent, #d6204e))); }
.lnk-wishlist-btn.is-active .lnk-wishlist-btn__on { display: inline; }
.lnk-wishlist-btn.is-active .lnk-wishlist-btn__off { display: none; }
.lnk-wishlist-btn[aria-busy="true"] { opacity: .5; pointer-events: none; }
.lnk-wishlist-btn--list .lnk-wishlist-btn__label {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.lnk-wishlist-float-host { position: relative; }
.lnk-wishlist-btn--float {
  position: absolute; top: 10px; inset-inline-end: 10px; z-index: 3; width: 40px; height: 40px; justify-content: center;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.lnk-wishlist-btn--float .lnk-wishlist-btn__icon { width: 22px; height: 22px; }
.lnk-wishlist-btn--float-low { top: 58px; }
.lnk-wishlist-btn--product { margin: .5rem 0; max-width: 100%; }
/* Fiche : sur sa propre ligne sous le bouton panier (button.js), libelle sur une ligne, zone de
   tap de 44 px de haut. Pas de cadre de focus apres un clic de souris (garde au clavier). */
.lnk-wishlist-btn--product { display: flex; width: max-content; min-height: 44px; white-space: nowrap; }
.lnk-wishlist-btn:focus:not(:focus-visible) { outline: none; }
.lnk-wishlist-list { max-inline-size: 14rem; margin-inline-start: .5rem; font: inherit; vertical-align: middle; }

.lnk-wishlist-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Rappel du panier : carte, lignes image + nom + prix, bouton panier rond (variante C). */
.lnk-wishlist-reminder {
  margin: 1.5rem 0; padding: 1.25rem 1.5rem; background: #fff;
  border: 1px solid rgba(0, 0, 0, .08); border-radius: 6px; box-shadow: 0 1px 6px rgba(0, 0, 0, .12);
}
.lnk-wishlist-reminder__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; margin: 0 0 .75rem; }
.lnk-wishlist-reminder__title { font-size: 1.1rem; margin: 0; }
.lnk-wishlist-reminder__all { display: inline-flex; align-items: center; gap: .35em; font-weight: 600; white-space: nowrap; }
.lnk-wishlist-reminder__all-icon, .lnk-wishlist-reminder__all-arrow { fill: currentColor; flex: none; }
.lang-rtl .lnk-wishlist-reminder__all-arrow { transform: scaleX(-1); }
.lnk-wishlist-reminder__list { list-style: none; margin: 0; padding: 0; }
.lnk-wishlist-reminder__item { display: flex; align-items: center; gap: 1rem; padding: .75rem 0; border-top: 1px solid rgba(0, 0, 0, .08); }
.lnk-wishlist-reminder__image { flex: none; width: 64px; height: 64px; border-radius: 4px; overflow: hidden; background: rgba(0, 0, 0, .05); }
.lnk-wishlist-reminder__image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lnk-wishlist-reminder__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lnk-wishlist-reminder__attributes { font-size: .85em; opacity: .75; }
.lnk-wishlist-reminder__price { font-weight: 600; }
.lnk-wishlist-reminder__form { margin: 0; }
.lnk-wishlist-reminder__add {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
}
.lnk-wishlist-reminder__add svg { fill: currentColor; }

/* Toast apres ajout / retrait : haut a droite, glisse depuis le bord. */
.lnk-wishlist-toast {
  position: fixed; z-index: 1060; top: 1rem; inset-inline-end: 1rem; display: flex; align-items: flex-start; gap: .75rem;
  width: 22rem; max-width: calc(100% - 2rem); padding: .9rem 1rem; border-radius: 8px; background: #fff; color: #222;
  border-inline-start: 4px solid var(--lnk-wishlist-accent, var(--lnk-accent, #d6204e)); box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  opacity: 0; visibility: hidden; transform: translateX(calc(100% + 1rem)); transition: opacity .25s, transform .25s, visibility .25s;
}
.lnk-wishlist-toast.is-on { opacity: 1; visibility: visible; transform: none; }
/* Retrait (par defaut) : bord et coeur barre gris, « Annuler ». Ajout : bord et coeur plein de
   la couleur d'accent, « Voir ma liste d'envies ». */
.lnk-wishlist-toast { border-inline-start-color: #8a8f98; }
.lnk-wishlist-toast.is-added { border-inline-start-color: var(--lnk-wishlist-accent, var(--lnk-accent, #d6204e)); }
.lnk-wishlist-toast__icon {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgba(0, 0, 0, .06); color: #8a8f98;
}
.lnk-wishlist-toast__icon svg { width: 20px; height: 20px; fill: currentColor; }
.lnk-wishlist-toast__icon .lnk-wishlist-btn__on { display: none; }
.lnk-wishlist-toast:not(.is-added) .lnk-wishlist-toast__icon::after {
  content: ''; position: absolute; width: 24px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(-45deg);
}
.lnk-wishlist-toast.is-added .lnk-wishlist-toast__icon { background: rgba(214, 32, 78, .1); color: var(--lnk-wishlist-accent, var(--lnk-accent, #d6204e)); }
.lnk-wishlist-toast.is-added .lnk-wishlist-toast__icon .lnk-wishlist-btn__on { display: inline; }
.lnk-wishlist-toast.is-added .lnk-wishlist-toast__icon .lnk-wishlist-btn__off { display: none; }
.lnk-wishlist-toast__body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; font-weight: 600; }
.lnk-wishlist-toast__action { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.lnk-wishlist-toast.is-added .lnk-wishlist-toast__action { font-weight: 400; }
.lnk-wishlist-toast__close { flex: none; margin-block: -.4rem 0; margin-inline: 0 -.4rem; border: 0; background: none; font-size: 1.4rem; line-height: 1; opacity: .6; cursor: pointer; }
.lang-rtl .lnk-wishlist-toast { transform: translateX(calc(-100% - 1rem)); }
.lang-rtl .lnk-wishlist-toast.is-on { transform: none; }
@media (max-width: 575px) { .lnk-wishlist-toast { top: .5rem; inset-inline: .5rem; width: auto; max-width: none; } }

/* Fenetre de connexion (visiteur). */
.lnk-wishlist-modal {
  position: fixed; z-index: 1070; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 1rem; background: rgba(17, 17, 17, .55); animation: lnk-wishlist-fade .2s ease-out;
}
.lnk-wishlist-modal__box {
  position: relative; width: 100%; max-width: 28rem; padding: 2.25rem 1.75rem 1.75rem; border-radius: 12px;
  background: #fff; color: #222; text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  animation: lnk-wishlist-rise .25s ease-out;
}
.lnk-wishlist-modal__box:focus { outline: none; }
.lnk-wishlist-modal__close {
  position: absolute; top: .5rem; inset-inline-end: .5rem; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%;
  background: none; color: #222; font-size: 1.5rem; line-height: 1; opacity: .55; cursor: pointer;
}
.lnk-wishlist-modal__close:hover { opacity: 1; background: rgba(0, 0, 0, .05); }
.lnk-wishlist-modal__icon {
  display: inline-flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; margin: 0 0 1rem;
  border-radius: 50%; background: rgba(214, 32, 78, .1); color: var(--lnk-wishlist-accent, var(--lnk-accent, #d6204e));
}
.lnk-wishlist-modal__icon svg { width: 28px; height: 28px; fill: currentColor; }
.lnk-wishlist-modal__icon .lnk-wishlist-btn__off { display: none; }
.lnk-wishlist-modal__icon .lnk-wishlist-btn__on { display: inline; }
.lnk-wishlist-modal__title { margin: 0 0 .6rem; color: #222; font-size: 1.25rem; font-weight: 700; line-height: 1.35; }
.lnk-wishlist-modal__text { margin: 0 0 1.5rem; color: #555; line-height: 1.5; }
.lnk-wishlist-modal__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.lnk-wishlist-modal__actions .btn { display: flex; align-items: center; justify-content: center; margin: 0; white-space: normal; }
@media (max-width: 420px) { .lnk-wishlist-modal__actions { grid-template-columns: 1fr; } }
@keyframes lnk-wishlist-fade { from { opacity: 0; } }
@keyframes lnk-wishlist-rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .lnk-wishlist-modal, .lnk-wishlist-modal__box { animation: none; } }

/* En-tete : coeur + compteur, a cote du panier. */
.lnk-wishlist-nav { display: inline-flex; align-items: center; vertical-align: middle; margin: 0 .75rem; }
.lnk-wishlist-nav__link { position: relative; display: inline-flex; align-items: center; color: inherit; }
.lnk-wishlist-nav__link svg { fill: currentColor; }
.lnk-wishlist-nav__count {
  position: absolute; top: -.45rem; inset-inline-end: -.65rem; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: .6rem;
  background: var(--lnk-wishlist-accent, var(--lnk-accent, #d6204e)); color: #fff; font-size: .7rem; font-weight: 700; line-height: 1.15rem; text-align: center;
}
.lnk-wishlist-nav__count[hidden] { display: none; }
.lnk-wishlist-nav--mobile { margin: 0; }
.lnk-wishlist-nav--mobile .lnk-wishlist-nav__count { top: .2rem; inset-inline-end: 0; }
