/* Page « Mes favoris » — réutilise les cartes de la boutique (shop.css). */

.page-favorites { background-color: var(--color-bg); }
.fav { padding-block: 1.75rem var(--spacing-xl); }

/* ---------- En-tête ---------- */
.fav-hero {
    position: relative;
    display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
    margin-bottom: 1.5rem; padding: clamp(1.4rem, 4vw, 2.4rem) clamp(1.25rem, 4vw, 2.6rem);
    overflow: hidden;
    border: 1px solid var(--color-line); border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 140% at 100% 0%, rgb(201 168 117 / 22%) 0%, transparent 55%),
        linear-gradient(135deg, #fffdf9 0%, var(--color-bg-alt) 100%);
}
.fav-hero .eyebrow { margin-bottom: .35rem; }
.fav-hero h1 { margin: 0 0 .5rem; font-size: clamp(2rem, 6vw, 3.2rem); line-height: 1.05; }
.fav-hero__lead { max-width: 52ch; margin: 0; color: var(--color-ink-muted); font-size: .95rem; line-height: 1.6; }
.fav-hero__stat {
    position: relative; flex: none;
    display: grid; place-items: center;
    width: clamp(84px, 14vw, 120px); aspect-ratio: 1;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft), inset 0 0 0 1px var(--color-line), inset 0 0 0 6px #fff, inset 0 0 0 7px rgb(201 168 117 / 55%);
}
.fav-hero__icon { position: absolute; top: 18%; color: #d6334a; }
.fav-hero__icon .icon { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; }
.fav-hero__number {
    margin-top: 14%;
    font-family: var(--font-display); font-size: clamp(1.7rem, 4.4vw, 2.4rem); font-weight: 500; line-height: 1;
    font-variant-numeric: tabular-nums; color: var(--color-ink);
}

/* ---------- Barre d'actions ---------- */
.fav-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem;
    margin-bottom: 1.1rem; padding-bottom: .9rem;
    border-bottom: 1px solid var(--color-line);
}
.fav-bar[hidden] { display: none; }
.fav-bar__count { margin: 0; color: var(--color-ink-soft); font-size: .88rem; font-weight: 500; }
.fav-bar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.fav-bar__link, .fav-bar__clear {
    display: inline-flex; align-items: center; gap: .45rem;
    min-height: 42px; padding: 0 1rem;
    border-radius: 999px; font-size: .82rem; font-weight: 600;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.fav-bar__link { border: 1px solid var(--color-ink); color: var(--color-ink); }
.fav-bar__link:hover { background: var(--color-ink); color: #fff; }
.fav-bar__clear { border: 1px solid var(--color-line); background: var(--color-surface); color: var(--color-ink-muted); cursor: pointer; }
.fav-bar__clear:hover { border-color: #c98f86; color: #a33a2c; }
.fav-bar .icon { width: 16px; height: 16px; stroke-linecap: round; stroke-linejoin: round; }
.fav-bar__link:focus-visible, .fav-bar__clear:focus-visible { outline: 2px solid var(--color-accent-dark); outline-offset: 3px; }

/* ---------- Articles indisponibles ---------- */
.fav-note {
    display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem;
    margin-bottom: 1.1rem; padding: .75rem 1rem;
    border: 1px solid #ecd9b8; border-left: 4px solid #a8741f; border-radius: var(--radius-sm);
    background: #fffaf0; color: #6d4c14; font-size: .85rem;
}
.fav-note[hidden] { display: none; }
.fav-note .icon { flex: none; width: 18px; height: 18px; stroke-linecap: round; }
.fav-note p { flex: 1 1 14rem; margin: 0; }
.fav-note button { min-height: 36px; padding: 0 .85rem; border: 1px solid #d9bf8f; border-radius: 999px; background: #fff; color: #6d4c14; font-size: .78rem; font-weight: 600; cursor: pointer; }
.fav-note button:hover { background: #fff3dc; }

/* ---------- Grille ---------- */
.fav-grid[hidden] { display: none; }
.fav-skel .skel--img { aspect-ratio: 4 / 5; }
.fav-grid .pcard { transition: opacity 260ms ease, transform 260ms ease; }
.fav-grid .pcard.is-leaving { opacity: 0; transform: scale(.94); pointer-events: none; }
/* Sur cette page le cœur est toujours plein : il sert à retirer le produit. */
.fav-grid .pcard__wish .icon { fill: #d6334a; stroke: #d6334a; }
.fav-grid .pcard__wish:hover::before { background-color: #fff0f2; }

/* ---------- Liste vide / erreur ---------- */
.fav-empty, .fav-error {
    display: grid; justify-items: center; gap: .75rem;
    max-width: 520px; margin: 1.5rem auto 0; padding: clamp(2rem, 6vw, 3rem) 1.25rem;
    border: 1px dashed #d9c6a6; border-radius: var(--radius-lg);
    background: var(--color-surface); text-align: center;
}
.fav-empty[hidden], .fav-error[hidden] { display: none; }
.fav-empty__icon {
    display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, #fbeef0, #f6e5d0); color: #d6334a;
    animation: fav-beat 2.4s ease-in-out infinite;
}
.fav-empty__icon .icon { width: 30px; height: 30px; stroke-linecap: round; stroke-linejoin: round; }
.fav-empty h2 { margin: .25rem 0 0; font-size: clamp(1.35rem, 4vw, 1.7rem); }
.fav-empty p, .fav-error p { max-width: 38ch; margin: 0; color: var(--color-ink-muted); font-size: .92rem; line-height: 1.6; }
.fav-empty .button { margin-top: .4rem; }
@keyframes fav-beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.09); } 24% { transform: scale(1); } 36% { transform: scale(1.06); } 48% { transform: scale(1); } }

/* ---------- Mention de confidentialité ---------- */
.fav-privacy {
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    margin: 2.25rem 0 0; color: var(--color-ink-muted); font-size: .78rem; text-align: center;
}
.fav-privacy .icon { flex: none; width: 15px; height: 15px; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Message « Annuler » ---------- */
.fav-toast {
    position: fixed; z-index: 120; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 1rem;
    max-width: min(92vw, 520px); padding: .7rem .7rem .7rem 1.1rem;
    border-radius: 999px; background: var(--color-ink); color: #fff;
    box-shadow: var(--shadow-strong); font-size: .85rem;
    opacity: 0; transform: translate(-50%, 16px);
    transition: opacity 220ms ease, transform 220ms cubic-bezier(.22, 1, .36, 1);
}
.fav-toast[hidden] { display: none; }
.fav-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.fav-toast span { min-width: 0; overflow-wrap: anywhere; }
.fav-toast button {
    flex: none; min-height: 36px; padding: 0 1rem; border-radius: 999px;
    background: var(--color-gold); color: var(--color-ink); font-size: .8rem; font-weight: 700; cursor: pointer;
}
.fav-toast button:hover { background: #d9bd8f; }
.fav-toast button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Petits écrans ---------- */
@media (max-width: 600px) {
    .fav { padding-top: 1.25rem; }
    .fav-hero { gap: 1rem; border-radius: var(--radius-md); }
    .fav-hero__lead { font-size: .88rem; }
    .fav-bar { align-items: stretch; }
    .fav-bar__count { flex: 1 0 100%; }
    .fav-bar__actions { flex: 1 0 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .fav-bar__link, .fav-bar__clear { justify-content: center; padding-inline: .8rem; font-size: .78rem; white-space: nowrap; }
    .fav-toast { left: 1rem; right: 1rem; max-width: none; justify-content: space-between; border-radius: 16px; transform: translateY(16px); }
    .fav-toast.is-visible { transform: none; }
}
@media (max-width: 360px) {
    .fav-hero__stat { display: none; }
    .fav-bar__actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .fav-empty__icon { animation: none; }
    .fav-grid .pcard, .fav-toast { transition: none; }
}

