/* ============================================================
   StoreLocatore — Favoris + Partage (front)
   ============================================================ */

/* ── Boutons (favori + partage) ──────────────────────────── */
.tfmsl-fav-btn,
.tfmsl-share-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	font-size: 13px;
	font-weight: 500;
	font-family: inherit;
	color: var(--tfmsl-text, #f0f0f0);
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .15);
	border-radius: 8px;
	cursor: pointer;
	line-height: 1;
	transition: background .15s, color .15s, border-color .15s, transform .05s;
}
.tfmsl-fav-btn:hover,
.tfmsl-share-btn:hover {
	background: rgba(255, 255, 255, .14);
	border-color: rgba(255, 255, 255, .25);
}
.tfmsl-fav-btn:active,
.tfmsl-share-btn:active { transform: translateY(1px); }

/* État favori actif : coeur rempli rouge accent */
.tfmsl-fav-btn.is-favorited {
	color: #fff;
	background: var(--tfmsl-accent, #e94560);
	border-color: transparent;
}
.tfmsl-fav-btn.is-favorited .tfmsl-fav-icon path {
	fill: currentColor;
	stroke: currentColor;
}
.tfmsl-fav-btn .tfmsl-fav-icon,
.tfmsl-share-btn .tfmsl-share-icon { flex-shrink: 0; }

/* Variante "icon-only" (utilisable via class additionnelle) */
.tfmsl-fav-btn--icon,
.tfmsl-share-btn--icon { padding: 9px; width: 38px; height: 38px; justify-content: center; }
.tfmsl-fav-btn--icon .tfmsl-fav-text,
.tfmsl-share-btn--icon .tfmsl-share-text { display: none; }

/* Variante "card" : surfond clair (à utiliser sur cards à fond blanc) */
.tfmsl-fav-btn--card,
.tfmsl-share-btn--card {
	color: #475569;
	background: #f3f4f6;
	border-color: transparent;
}
.tfmsl-fav-btn--card:hover,
.tfmsl-share-btn--card:hover { background: #e5e7eb; }

/* Variante "overlay" : positionné en haut-droite d'une carte (archive, locator) */
.tfmsl-fav-btn--overlay {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	background: rgba(255, 255, 255, .92);
	color: #475569;
	border-color: transparent;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.tfmsl-fav-btn--overlay:hover { background: #fff; color: var(--tfmsl-accent, #e94560); }
.tfmsl-fav-btn--overlay.is-favorited {
	background: var(--tfmsl-accent, #e94560);
	color: #fff;
}

/* ── Popover de partage ──────────────────────────────────── */
.tfmsl-share-popover {
	position: fixed;
	z-index: 99999;
	width: 280px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(15, 23, 42, .18), 0 4px 12px rgba(15, 23, 42, .06);
	padding: 14px;
	color: #1f2937;
	font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Arial, sans-serif;
	animation: tfmsl-share-pop .15s ease-out;
}
@keyframes tfmsl-share-pop {
	from { opacity: 0; transform: translateY(-6px) scale(.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
.tfmsl-share-popover__title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #6b7280;
	font-weight: 600;
	margin-bottom: 10px;
}
.tfmsl-share-popover__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	margin-bottom: 10px;
}
.tfmsl-share-popover__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 10px 6px;
	border-radius: 8px;
	font-size: 11px;
	color: #1f2937;
	text-decoration: none;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	transition: background .15s, border-color .15s, color .15s;
}
.tfmsl-share-popover__link:hover { background: #f3f4f6; border-color: #d1d5db; }
.tfmsl-share-popover__link--facebook:hover { background: #eff6ff; border-color: #1877f2; color: #1877f2; }
.tfmsl-share-popover__link--x:hover        { background: #f3f4f6; border-color: #000;    color: #000; }
.tfmsl-share-popover__link--linkedin:hover { background: #eff6ff; border-color: #0a66c2; color: #0a66c2; }
.tfmsl-share-popover__link--whatsapp:hover { background: #ecfdf5; border-color: #25d366; color: #25d366; }
.tfmsl-share-popover__link--email:hover    { background: #fef2f2; border-color: #ef4444; color: #ef4444; }
.tfmsl-share-popover__copy {
	width: 100%;
	padding: 9px 12px;
	background: #1f2937;
	color: #fff;
	border: 0;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	transition: background .15s;
}
.tfmsl-share-popover__copy:hover { background: #111827; }

/* ── FAB flottant compteur de favoris ────────────────────── */
.tfmsl-fav-fab {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 9998;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--tfmsl-accent, #e94560);
	color: #fff;
	border: 0;
	box-shadow: 0 8px 24px rgba(233, 69, 96, .35), 0 2px 6px rgba(0, 0, 0, .15);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .15s, box-shadow .15s;
}
.tfmsl-fav-fab:hover  { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(233, 69, 96, .45), 0 4px 8px rgba(0, 0, 0, .18); }
.tfmsl-fav-fab[hidden] { display: none; }
.tfmsl-fav-fab-count {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	background: #fff;
	color: var(--tfmsl-accent, #e94560);
	border-radius: 11px;
	font-size: 12px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

/* ── Drawer favoris ──────────────────────────────────────── */
.tfmsl-fav-drawer { position: fixed; inset: 0; z-index: 9999; font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Arial, sans-serif; }
.tfmsl-fav-drawer[hidden] { display: none; }
.tfmsl-fav-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .5);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: tfmsl-fade-in .2s ease-out;
}
@keyframes tfmsl-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tfmsl-slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.tfmsl-fav-drawer__panel {
	position: absolute;
	top: 0; right: 0; bottom: 0;
	width: 380px;
	max-width: 92vw;
	background: #fff;
	color: #1f2937;
	display: flex;
	flex-direction: column;
	box-shadow: -8px 0 32px rgba(15, 23, 42, .18);
	animation: tfmsl-slide-in .25s ease-out;
}
.tfmsl-fav-drawer__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 18px 20px;
	border-bottom: 1px solid #e5e7eb;
}
.tfmsl-fav-drawer__header h2 { margin: 0; font-size: 16px; font-weight: 600; color: #0f172a; }
.tfmsl-fav-drawer__close {
	background: transparent;
	border: 0;
	font-size: 22px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
	padding: 4px 10px;
	border-radius: 6px;
	transition: background .15s, color .15s;
}
.tfmsl-fav-drawer__close:hover { background: #f3f4f6; color: #1f2937; }
.tfmsl-fav-drawer__body { overflow-y: auto; flex: 1; padding: 16px 20px; }
.tfmsl-fav-drawer__empty {
	text-align: center;
	color: #6b7280;
	padding: 40px 16px;
	font-size: 14px;
}
.tfmsl-fav-drawer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tfmsl-fav-drawer__item {
	display: flex;
	gap: 12px;
	padding: 12px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	transition: background .15s, border-color .15s;
}
.tfmsl-fav-drawer__item:hover { background: #f3f4f6; border-color: #d1d5db; }
.tfmsl-fav-drawer__img {
	width: 64px;
	height: 64px;
	border-radius: 8px;
	background-size: cover;
	background-position: center;
	background-color: #e5e7eb;
	flex-shrink: 0;
}
.tfmsl-fav-drawer__img--empty { background: linear-gradient(135deg, #e5e7eb, #d1d5db); }
.tfmsl-fav-drawer__body { padding: 0; display: flex; flex-direction: column; justify-content: center; flex: 1; min-width: 0; }
.tfmsl-fav-drawer__name { font-weight: 600; font-size: 14px; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tfmsl-fav-drawer__addr { font-size: 12px; color: #6b7280; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tfmsl-fav-drawer__actions { display: flex; gap: 6px; margin-top: 8px; align-items: center; }
.tfmsl-fav-drawer__see {
	font-size: 12px;
	font-weight: 500;
	color: var(--tfmsl-accent, #e94560);
	text-decoration: none;
	padding: 4px 10px;
	border-radius: 6px;
	background: #fff;
	border: 1px solid #e5e7eb;
	transition: background .15s;
}
.tfmsl-fav-drawer__see:hover { background: #f3f4f6; }
.tfmsl-fav-drawer__remove {
	margin-left: auto;
	background: transparent;
	border: 0;
	color: #9ca3af;
	font-size: 16px;
	cursor: pointer;
	width: 26px;
	height: 26px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s, color .15s;
}
.tfmsl-fav-drawer__remove:hover { background: #fef2f2; color: #ef4444; }

body.tfmsl-fav-drawer-open { overflow: hidden; }

/* ── Widget Elementor "Mes favoris" ───────────────────────── */
.tfmsl-fav-widget__title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 16px;
	color: inherit;
}
.tfmsl-fav-widget__empty {
	text-align: center;
	padding: 40px 24px;
	color: #6b7280;
	background: #f9fafb;
	border: 1px dashed #e5e7eb;
	border-radius: 12px;
}
.tfmsl-fav-widget__empty[hidden] { display: none; }
.tfmsl-fav-widget__empty p { margin: 0 0 12px; font-size: 14px; }
.tfmsl-fav-widget__cta {
	display: inline-block;
	padding: 8px 18px;
	font-size: 13px;
	font-weight: 500;
	color: #fff;
	background: var(--tfmsl-accent, #e94560);
	border-radius: 999px;
	text-decoration: none;
	transition: opacity .15s, transform .05s;
}
.tfmsl-fav-widget__cta:hover { opacity: .9; color: #fff; }
.tfmsl-fav-widget__cta:active { transform: translateY(1px); }

.tfmsl-fav-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}
.tfmsl-fav-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.tfmsl-fav-grid[hidden], .tfmsl-fav-list[hidden] { display: none; }

.tfmsl-fav-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	color: #0f172a;
	transition: transform .15s, box-shadow .15s;
	overflow: hidden;
}
.tfmsl-fav-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }

.tfmsl-fav-list .tfmsl-fav-card { flex-direction: row; align-items: center; }

.tfmsl-fav-card__img {
	display: block;
	aspect-ratio: 16 / 10;
	border-radius: 10px;
	background-color: #f3f4f6;
	background-size: cover;
	background-position: center;
	text-decoration: none;
	color: inherit;
	flex-shrink: 0;
}
.tfmsl-fav-list .tfmsl-fav-card__img {
	width: 88px;
	height: 88px;
	aspect-ratio: 1;
}
.tfmsl-fav-card__img--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	color: #9ca3af;
}

.tfmsl-fav-card__body { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.tfmsl-fav-card__name {
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	color: inherit;
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.tfmsl-fav-card__name:hover { color: var(--tfmsl-accent, #e94560); }
.tfmsl-fav-card__addr {
	font-size: 12.5px;
	color: #6b7280;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.tfmsl-fav-card__actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.tfmsl-fav-card__see {
	font-size: 13px;
	font-weight: 500;
	color: var(--tfmsl-accent, #e94560);
	text-decoration: none;
	transition: opacity .15s;
}
.tfmsl-fav-card__see:hover { opacity: .8; }
.tfmsl-fav-card__remove {
	margin-left: auto;
	background: transparent;
	border: 0;
	color: #9ca3af;
	font-size: 18px;
	cursor: pointer;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s, color .15s;
}
.tfmsl-fav-card__remove:hover { background: #fef2f2; color: #ef4444; }

@media (max-width: 700px) {
	.tfmsl-fav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 460px) {
	.tfmsl-fav-grid { grid-template-columns: 1fr !important; }
}

/* ── Toast ───────────────────────────────────────────────── */
.tfmsl-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translate(-50%, 20px);
	background: #1f2937;
	color: #fff;
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 500;
	font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Arial, sans-serif;
	box-shadow: 0 8px 24px rgba(15, 23, 42, .25);
	opacity: 0;
	transition: opacity .2s, transform .2s;
	z-index: 100000;
	pointer-events: none;
}
.tfmsl-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
	.tfmsl-fav-fab { bottom: 16px; right: 16px; width: 50px; height: 50px; }
	.tfmsl-fav-drawer__panel { width: 100%; max-width: 100%; }
	.tfmsl-share-popover { width: calc(100vw - 32px); left: 16px !important; right: 16px; }
}
