/* ECOS Liste de souhaits. Couleur et taille du cœur : variables --ecos-wl et --ecos-wl-s (posées par le réglage). */
.ecos-wl-svg .ecos-wl-ring { fill: none !important; stroke-width: 1.6; }
.ecos-wl-svg { width: 60%; height: 60%; display: block; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

/* cœur sur la photo des produits des listes */
.ecos-wl-host { position: relative; }
.ecos-wl-h {
  position: absolute; z-index: 6; box-sizing: border-box; margin: 0; padding: 0;
  width: var(--ecos-wl-sl, var(--ecos-wl-s, 40px)); height: var(--ecos-wl-sl, var(--ecos-wl-s, 40px)); min-width: 0; min-height: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer; line-height: 1;
  background: var(--ecos-wl-bg, rgba(255, 255, 255, .94)); color: var(--ecos-wl, #c0392b); border: 1px solid var(--ecos-wl-bd, rgba(0, 0, 0, .08));
  box-shadow: var(--ecos-wl-sh, 0 2px 8px rgba(0, 0, 0, .18)); transition: transform .15s ease, background .15s ease;
  -webkit-appearance: none; appearance: none; text-transform: none; letter-spacing: 0;
}
.ecos-wl-h:hover { transform: scale(1.08); background: var(--ecos-wl-bg, #fff); }
.ecos-wl-h:focus-visible, .ecos-wl-b:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }
.ecos-wl-p-tr { top: var(--ecos-wl-y, 10px); right: var(--ecos-wl-x, 10px); }
.ecos-wl-p-tl { top: var(--ecos-wl-y, 10px); left: var(--ecos-wl-x, 10px); }
.ecos-wl-p-br { bottom: var(--ecos-wl-y, 10px); right: var(--ecos-wl-x, 10px); }
.ecos-wl-p-bl { bottom: var(--ecos-wl-y, 10px); left: var(--ecos-wl-x, 10px); }
.ecos-wl-h.is-on .ecos-wl-svg, .ecos-wl-b.is-on .ecos-wl-svg { fill: currentColor; }

/* bouton de la fiche produit */
.ecos-wl-single { margin: 14px 0 6px; }
.ecos-wl-b {
  display: inline-flex; align-items: center; gap: 10px; box-sizing: border-box; min-height: 48px; padding: 10px 18px; cursor: pointer;
  background: #fff; color: var(--ecos-wl, #c0392b); border: 2px solid var(--ecos-wl, #c0392b); border-radius: 10px;
  font-size: 17px; font-weight: 600; line-height: 1.2; text-transform: none; letter-spacing: 0; -webkit-appearance: none; appearance: none;
}
.ecos-wl-b .ecos-wl-svg { width: 24px; height: 24px; flex: none; }
.ecos-wl-b:hover { background: var(--ecos-wl, #c0392b); color: #fff; }
.ecos-wl-b.is-on { background: var(--ecos-wl, #c0392b); color: #fff; }

/* fiche produit : le cœur seul (sans texte ni cadre) */
.ecos-wl-b--heart, .ecos-wl-b--heart:hover, .ecos-wl-b--heart.is-on { min-height: 0; padding: 0; gap: 0; border: 0; border-radius: 0; background: transparent; color: var(--ecos-wl, #c0392b); box-shadow: none; }
.ecos-wl-single--heart .ecos-wl-b--heart { width: var(--ecos-wl-s, 40px); height: var(--ecos-wl-s, 40px); justify-content: center; }
.ecos-wl-b--heart .ecos-wl-svg { width: 100%; height: 100%; transition: transform .15s ease; }
.ecos-wl-b--heart:hover .ecos-wl-svg { transform: scale(1.1); }
.ecos-wl-b--heart.is-on .ecos-wl-svg { fill: currentColor; }
/* … ou posé sur la photo principale : rond, avec le fond et la place réglés comme sur les vignettes */
.ecos-wl-b--heart.ecos-wl-g { position: absolute; z-index: 6; box-sizing: border-box; margin: 0; padding: 22%; width: var(--ecos-wl-s, 40px); height: var(--ecos-wl-s, 40px); border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--ecos-wl-bg, rgba(255, 255, 255, .94)); border: 1px solid var(--ecos-wl-bd, rgba(0, 0, 0, .08)); box-shadow: var(--ecos-wl-sh, 0 2px 8px rgba(0, 0, 0, .18)); }
.ecos-wl-b--heart.ecos-wl-g:hover, .ecos-wl-b--heart.ecos-wl-g.is-on { background: var(--ecos-wl-bg, rgba(255, 255, 255, .94)); }
.woocommerce-product-gallery__wrapper:has(> .ecos-wl-g) { position: relative; }

/* lien du code court [ecos_souhaits] */
.ecos-wl-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: inherit; }
.ecos-wl-link .ecos-wl-svg { width: 22px; height: 22px; color: var(--ecos-wl, #c0392b); }
.ecos-wl-count { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--ecos-wl, #c0392b); color: #fff; font-size: 13px; line-height: 20px; text-align: center; font-weight: 700; }
.ecos-wl-count[hidden] { display: none; }

/* popup */
html.ecos-wl-lock { overflow: hidden; }
.ecos-wl-ov { position: fixed; inset: 0; z-index: 100000; background: rgba(15, 23, 42, .62); display: flex; align-items: center; justify-content: center; padding: 14px; box-sizing: border-box; }
.ecos-wl-box {
  background: #fff; color: #1f2937; width: 100%; max-width: 620px; max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px);
  display: flex; flex-direction: column; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); font-size: 17px; line-height: 1.45; overflow: hidden;
}
.ecos-wl-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #e5e7eb; }
.ecos-wl-ttl { margin: 0; font-size: 22px; line-height: 1.25; color: #111827; }
.ecos-wl-x { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f3f4f6; color: #111827; font-size: 28px; line-height: 1; cursor: pointer; padding: 0; }
.ecos-wl-x:hover { background: #e5e7eb; }
.ecos-wl-body { padding: 16px 20px 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ecos-wl-box button:focus-visible, .ecos-wl-box a:focus-visible, .ecos-wl-box input:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

.ecos-wl-loading, .ecos-wl-empty, .ecos-wl-err, .ecos-wl-intro { margin: 0 0 14px; }
.ecos-wl-err { color: #b91c1c; }

/* lignes de la liste */
.ecos-wl-ul { list-style: none; margin: 0 0 16px; padding: 0; }
.ecos-wl-li { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid #e5e7eb; margin: 0; }
.ecos-wl-li:first-child { border-top: 1px solid #e5e7eb; }
.ecos-wl-li__img img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; display: block; background: #f3f4f6; }
.ecos-wl-li__n { color: #111827; font-weight: 700; font-size: 18px; text-decoration: none; display: block; }
.ecos-wl-li__n:hover { text-decoration: underline; }
.ecos-wl-li__p { margin-top: 3px; font-size: 17px; color: #374151; }
.ecos-wl-li__p del { opacity: .6; }
.ecos-wl-li__s { margin-top: 4px; font-size: 15px; }
.ecos-wl-li__s.is-out { color: #b45309; font-weight: 600; }
.ecos-wl-li__s.is-choose { color: #1d4ed8; display: inline-block; }
.ecos-wl-li__x { min-height: 44px; padding: 8px 14px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #374151; font-size: 16px; cursor: pointer; }
.ecos-wl-li__x:hover { background: #f3f4f6; border-color: #9ca3af; }

/* boutons */
.ecos-wl-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 52px; padding: 12px 22px; border-radius: 10px; border: 2px solid transparent; font-size: 18px; font-weight: 700; line-height: 1.2; cursor: pointer; text-decoration: none; text-transform: none; letter-spacing: 0; -webkit-appearance: none; appearance: none; }
.ecos-wl-btn--main { background: var(--ecos-wl, #c0392b); color: #fff; }
.ecos-wl-btn--main:hover { filter: brightness(.92); color: #fff; }
.ecos-wl-btn--ghost { background: #fff; color: #374151; border-color: #9ca3af; }
.ecos-wl-btn--ghost:hover { background: #f3f4f6; }
.ecos-wl-btn--danger { background: #b91c1c; color: #fff; }
.ecos-wl-btn[disabled] { opacity: .6; cursor: default; }
.ecos-wl-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ecos-wl-foot .ecos-wl-btn--main { flex: 1 1 260px; }
.ecos-wl-ask { flex: 1 1 100%; margin: 0; font-weight: 700; }
.ecos-wl-msg { margin: 0 0 12px; }
.ecos-wl-msg:empty { display: none; }
.ecos-wl-msg.is-ok, .ecos-wl-msg.is-warn, .ecos-wl-msg.is-bad { padding: 12px 14px; border-radius: 10px; }
.ecos-wl-msg.is-ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.ecos-wl-msg.is-warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.ecos-wl-msg.is-bad { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.ecos-wl-msg p { margin: 0 0 8px; }
.ecos-wl-msg .ecos-wl-btn { margin-top: 6px; }
.ecos-wl-skip { margin: 0 0 6px 18px; padding: 0; }

/* visiteur : onglets et formulaires */
.ecos-wl-tabs { display: flex; gap: 8px; margin: 0 0 14px; }
.ecos-wl-tab { flex: 1 1 0; min-height: 48px; padding: 10px 12px; border: 2px solid #d1d5db; border-radius: 10px; background: #fff; color: #374151; font-size: 17px; font-weight: 700; cursor: pointer; }
.ecos-wl-tab.is-on { border-color: var(--ecos-wl, #c0392b); color: var(--ecos-wl, #c0392b); background: #fff7f6; }
.ecos-wl-link-btn { display: inline; padding: 0; border: 0; background: none; color: #1d4ed8; text-decoration: underline; font-size: inherit; cursor: pointer; }
.ecos-wl-pane .woocommerce-form-login .woocommerce-form-row, .ecos-wl-pane .woocommerce-form-login p.form-row { margin: 0 0 12px; display: block; width: 100%; float: none; }
.ecos-wl-pane .woocommerce-form-login label { display: block; font-weight: 600; margin: 0 0 4px; }
.ecos-wl-pane .woocommerce-form-login input.input-text { width: 100%; box-sizing: border-box; min-height: 48px; padding: 8px 12px; font-size: 17px; border: 2px solid #d1d5db; border-radius: 8px; }
.ecos-wl-pane .woocommerce-form-login__submit { min-height: 52px; padding: 12px 22px; border-radius: 10px; border: 0; background: var(--ecos-wl, #c0392b); color: #fff; font-size: 18px; font-weight: 700; cursor: pointer; }
.ecos-wl-pane .woocommerce-form-login__rememberme { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 6px 0 12px; }
.ecos-wl-lost { margin: 12px 0 0; }
.ecos-wl-pane .ecos-reg { max-width: none; width: 100%; margin: 0; padding: 0; box-shadow: none; border: 0; }
.ecos-wl-pane .ecos-reg__title { display: none; }

/* page Mon compte */
.ecos-wl-inline { max-width: 760px; }

/* petit message */
.ecos-wl-toast { position: fixed; left: 50%; bottom: 22px; z-index: 100001; transform: translate(-50%, 24px); opacity: 0; pointer-events: none; max-width: min(92vw, 560px); padding: 14px 18px; border-radius: 12px; background: #111827; color: #fff; font-size: 17px; line-height: 1.4; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: opacity .2s, transform .2s; }
.ecos-wl-toast.is-show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.ecos-wl-toast.is-bad { background: #991b1b; }
.ecos-wl-toast__a { margin-left: 6px; padding: 4px 0; border: 0; background: none; color: #fff; text-decoration: underline; font-size: inherit; font-weight: 700; cursor: pointer; }

@media (max-width: 520px) {
  .ecos-wl-ov { padding: 8px; align-items: flex-end; }
  .ecos-wl-box { max-height: calc(100dvh - 16px); font-size: 16px; }
  .ecos-wl-li { grid-template-columns: 72px 1fr; }
  .ecos-wl-li__img img { width: 72px; height: 72px; }
  .ecos-wl-li__x { grid-column: 2; justify-self: start; }
  .ecos-wl-foot .ecos-wl-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .ecos-wl-h, .ecos-wl-toast { transition: none; } }

/* modèle « Feutre (animé) » : contour noir ; coché, le contour se colore puis l'intérieur est griffonné ; décoché, la couleur est gommée (animations déclenchées par le script au clic) */
.is-on:not(.ecos-wl-an-on) .ecos-wl-mk-s, .is-on:not(.ecos-wl-an-on) .ecos-wl-mk-c { stroke-dashoffset: 0 !important; }
@keyframes ecosMkDraw { from { stroke-dashoffset: 1.01; } to { stroke-dashoffset: 0; } }
@keyframes ecosMkErase { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 1.01; } }
.ecos-wl-an-on .ecos-wl-mk-c { animation: ecosMkDraw .8s ease-out both; }
.ecos-wl-an-on .ecos-wl-mk-s { animation: ecosMkDraw 1.4s ease-in-out .7s both; }
.ecos-wl-an-off .ecos-wl-mk-s { animation: ecosMkErase 1s ease-in both; }
.ecos-wl-an-off .ecos-wl-mk-c { animation: ecosMkErase .7s ease-in 1s both; }
/* cœur seul : pas de cadre noir du thème après un clic (l'anneau reste visible au clavier) */
.ecos-wl-b--heart:focus, .ecos-wl-b--heart:active { outline: 0 !important; border: 0 !important; box-shadow: none !important; }
.ecos-wl-b--heart:focus-visible { outline: 2px solid #1d4ed8 !important; outline-offset: 2px; }
/* cœur des listes : pas de cercle noir du thème qui reste après un clic (l'anneau reste visible au clavier) */
.ecos-wl-h:focus, .ecos-wl-h:active { outline: 0 !important; box-shadow: var(--ecos-wl-sh, 0 2px 8px rgba(0, 0, 0, .18)) !important; border-color: var(--ecos-wl-bd, rgba(0, 0, 0, .08)) !important; }
.ecos-wl-h:focus-visible { outline: 3px solid #1d4ed8 !important; outline-offset: 2px; }
