/* Styles transverses — chargés sur toutes les pages. */

/* ---------- Bouton « remonter en haut » (ex-WPCode 21277) ---------- */
.tb-backtotop {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: var(--tbx-orange);
	color: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s, background .2s;
}

.tb-backtotop.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.tb-backtotop:hover { background: var(--tbx-orange-dark); }
.tb-backtotop:focus-visible { outline: 2px solid var(--tbx-navy); outline-offset: 3px; }
.tb-backtotop svg { display: block; width: 22px; height: 22px; }

@media (max-width: 600px) {
	.tb-backtotop { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
	.tb-backtotop { transform: none; transition: opacity .2s ease, visibility .2s; }
}

/* ---------- Badge « À venir » (ex-WPCode 21740, repris tel quel) ---------- */
.tb-a-venir,
.tb-produit-a-venir .woocommerce-product-gallery {
	position: relative !important;
}

/* Badge commun (cartes + fiche) */
.tb-a-venir:not([id^="product-"])::before,
.tb-produit-a-venir .woocommerce-product-gallery::before {
	content: "À venir" !important;
	position: absolute !important;
	z-index: 30 !important;
	background: var(--tbx-red) !important;
	color: #fff !important;
	border: 3px solid #fff !important;
	font-family: "Open Sans", sans-serif !important;
	font-weight: 800 !important;
	text-transform: uppercase !important;
	border-radius: 999px !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .4) !important;
	pointer-events: none !important;
	animation: tbPulse 2.2s ease-in-out infinite !important;
}

@keyframes tbPulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.07); }
}

/* Taille sur les cartes (boutique + carrousel) */
.tb-a-venir:not([id^="product-"])::before {
	top: 16px !important;
	left: 16px !important;
	font-size: 15px !important;
	letter-spacing: .08em !important;
	padding: 9px 20px !important;
}

/* Taille sur la fiche produit */
.tb-produit-a-venir .woocommerce-product-gallery::before {
	top: 20px !important;
	left: 20px !important;
	font-size: 19px !important;
	letter-spacing: .1em !important;
	padding: 12px 28px !important;
}

/* Bandeau « Bientôt disponible » sur l'image des cartes */
.tb-a-venir .elementor-widget-theme-post-featured-image,
.tb-a-venir .elementor-widget-image {
	position: relative !important;
}

.tb-a-venir .elementor-widget-theme-post-featured-image::after,
.tb-a-venir .elementor-widget-image::after {
	content: "⏳ Bientôt disponible" !important;
	position: absolute !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	z-index: 25 !important;
	background: rgba(0, 75, 118, .9) !important;
	color: #fff !important;
	font-family: "Open Sans", sans-serif !important;
	font-size: 15px !important;
	font-weight: 800 !important;
	letter-spacing: .06em !important;
	text-transform: uppercase !important;
	text-align: center !important;
	padding: 12px 10px !important;
	border-radius: 0 0 12px 12px !important;
	pointer-events: none !important;
}

/* Message sur la fiche produit */
.tb-a-venir-msg {
	display: block !important;
	background: var(--tbx-cream) !important;
	color: var(--tbx-navy) !important;
	font-weight: 700 !important;
	font-size: 16px !important;
	padding: 14px 18px !important;
	border-left: 4px solid var(--tbx-red) !important;
	border-radius: 8px !important;
	margin: 16px 0 !important;
}

/* Formule + bouton panier masqués sur les produits à venir */
.tb-produit-a-venir form.cart {
	display: none !important;
}

/* Téléphone (Elsa, 2026-11-18) : html, body et le conteneur Elementor ne sont plus des zones de défilement imbriquées
 * (overflow-x: hidden de legacy-customizer.css ; main.site-main des pages Catalogue, Blog, fiche produit, compte,
 * panier) — Safari demandait parfois d'insister pour faire descendre la page.
 * « clip » coupe toujours ce qui dépasse sur le côté, sans créer de zone qui défile. Voir aussi global.js. */
@media (max-width: 767px) {
	@supports (overflow: clip) {
		html,
		html body,
		html body .elementor,
		html body main.site-main,
		html body #content.site-main,
		html body #main.site-main {
			overflow-x: clip !important;
			overflow-y: visible !important;
		}
	}
}
