/*
 * Tasting Box : parcours sur téléphone (56k, en ligne depuis le 09/10/2026, GO de Mendar).
 * Chargé par mu-plugins/40-tb-parcours-mobile.php.
 */

/* ---------- 1. Barre de paiement fixe, sur téléphone et tablette ---------- */
.tbap-barre { display: none; }
@media (max-width: 900px) {
	.tbap-barre {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
		display: flex; align-items: center; justify-content: space-between; gap: .75rem;
		padding: .7rem 1.25rem calc(.7rem + env(safe-area-inset-bottom));
		background: #FFFEF4; border-top: 2px solid #2F1210;
		box-shadow: 0 -8px 24px rgba(47, 18, 16, .12);
		transition: transform .3s cubic-bezier(.16, 1, .3, 1), opacity .3s;
	}
	.tbap-barre.is-masquee { transform: translateY(110%); opacity: 0; pointer-events: none; }
	#tb-accueil p.tbap-barre__info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; margin: 0; line-height: 1.2; }
	#tb-accueil .tbap-barre__nom { font-family: "piepie", "Arial Black", sans-serif; font-size: 1.1rem; color: #2F1210; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	#tb-accueil .tbap-barre__detail { font-family: "Manrope", system-ui, sans-serif; font-size: .9rem; color: #1E1E1E; white-space: nowrap; }
	#tb-accueil .tbap-barre__detail strong { color: #2F1210; font-weight: 800; }
	#tb-accueil button.tbap-barre__btn {
		flex: none; min-height: 3rem; padding: .75rem 1.4rem; border: 0; border-radius: 999px;
		background: #2F1210 !important; color: #FFFEF4 !important; box-shadow: none !important;
		font-family: "Manrope", system-ui, sans-serif; font-weight: 800; font-size: 1rem; letter-spacing: 0; text-transform: none; cursor: pointer;
	}
	#tb-accueil button.tbap-barre__btn:active { transform: translateY(1px) scale(.98); }
	#tb-accueil button.tbap-barre__btn:focus-visible { outline: 3px solid #344672; outline-offset: 3px; }
	/* Le bas de page reste lisible au-dessus de la barre */
	body.tbap-tunnel #footer-outer { padding-bottom: calc(5rem + env(safe-area-inset-bottom)); }
	/* Le rond « préférences cookies » passe au-dessus de la barre */
	body.tbap-tunnel .cky-btn-revisit-wrapper { bottom: calc(5.5rem + env(safe-area-inset-bottom)) !important; }

	/* ---------- 3. Pages du tunnel : contenu affiché tout de suite, sans apparition animée ---------- */
	html:not(.tbm-off) body.tbap-tunnel main.tbs [data-tbm]:not(.is-in) { opacity: 1 !important; clip-path: none !important; }
	html:not(.tbm-off) body.tbap-tunnel main.tbs [data-tbm].is-in { animation: none !important; }
	html:not(.tbm-off) body.tbap-tunnel main.tbs [data-tbm="titre"] .tbm-wi { translate: none !important; animation: none !important; }
}
@media (prefers-reduced-motion: reduce) { .tbap-barre { transition: none; } }

/* Pendant la vérification d'âge : ni barre ni bandeau cookies par-dessus */
html.tbap-gate .tbap-barre,
html.tbap-gate .cky-consent-container,
html.tbap-gate .cky-btn-revisit-wrapper,
html.tbap-gate .cky-overlay { display: none !important; }

/* ---------- 2. Âge et cookies dans la même fenêtre ---------- */
.age-gate__form.tbap-fusion .age-gate__buttons { display: none !important; }
.tbap-gate { display: grid; gap: .75rem; margin-top: .35rem; text-align: center; }
.tbap-gate p.tbap-gate__cookies { margin: 0; font-family: "Manrope", system-ui, sans-serif; font-size: .8rem; line-height: 1.45; color: rgba(30, 30, 30, .8); text-wrap: pretty; }
.tbap-gate__cookies a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tbap-gate__btns { display: grid; gap: .55rem; }
.tbap-gate button.tbap-gate__btn {
	display: block !important; width: 100% !important; min-height: 2.9rem !important; margin: 0 !important; padding: .6rem 1rem !important;
	border: 2px solid #2F1210 !important; border-radius: 999px !important; background: #2F1210 !important; color: #FFFEF4 !important; box-shadow: none !important;
	font-family: "Manrope", system-ui, sans-serif !important; font-weight: 800 !important; font-size: .95rem !important; line-height: 1.2 !important; letter-spacing: 0 !important; text-transform: none !important;
	cursor: pointer; text-wrap: balance;
}
.tbap-gate button.tbap-gate__btn:active { transform: translateY(1px) scale(.98); }
.tbap-gate p.tbap-gate__liens { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem 1rem; margin: 0; }
.tbap-gate button.tbap-gate__lien {
	margin: 0 !important; padding: .35rem 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; color: #2F1210 !important; box-shadow: none !important; min-height: 0 !important; width: auto !important;
	font-family: "Manrope", system-ui, sans-serif !important; font-size: .85rem !important; font-weight: 700 !important; letter-spacing: 0 !important; text-transform: none !important;
	text-decoration: underline !important; text-underline-offset: 3px; cursor: pointer;
}
.tbap-gate button.tbap-gate__btn:focus-visible, .tbap-gate button.tbap-gate__lien:focus-visible { outline: 3px solid #344672 !important; outline-offset: 3px; }

/* ---------- 4. Icônes des réseaux sans la police d'icônes de 100 Ko (pages du tunnel) ---------- */
body.tbap-tunnel i.fa-instagram,
body.tbap-tunnel i.fa-facebook-square {
	display: inline-block; width: 1em; height: 1em; vertical-align: middle;
	background-color: currentColor;
	-webkit-mask: var(--tbap-ico) center / contain no-repeat; mask: var(--tbap-ico) center / contain no-repeat;
}
body.tbap-tunnel i.fa-instagram::before,
body.tbap-tunnel i.fa-facebook-square::before { content: none !important; }
body.tbap-tunnel i.fa-instagram {
	--tbap-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M7 2h10a5 5 0 0 1 5 5v10a5 5 0 0 1-5 5H7a5 5 0 0 1-5-5V7a5 5 0 0 1 5-5zm0 2a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3H7zm5 3.5a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9zm0 2a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zm5.25-3.75a1.25 1.25 0 1 1 0 2.5 1.25 1.25 0 0 1 0-2.5z'/%3E%3C/svg%3E");
}
body.tbap-tunnel i.fa-facebook-square {
	--tbap-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 2H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h8.6v-7.2h-2.4V12h2.4V9.9c0-2.4 1.5-3.7 3.6-3.7 1 0 1.9.1 2.2.1v2.5h-1.5c-1.2 0-1.4.6-1.4 1.4V12h2.8l-.4 2.8h-2.4V22H20a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2z'/%3E%3C/svg%3E");
}
