/**
 * Menu mobile (widget tbc-mobile-menu) : bouton + dialogue modal plein ecran.
 *
 * Charge seulement avec le widget (get_style_depends). Les peaux viennent du
 * kit (taxiboatcore-tokens.css) : .tbc-btn pour le bouton, retour, fermer,
 * contact et devis ; .tbc-pill pour les rangees ; .tbc-icon. Ce fichier ne
 * porte que le placement des trois etages et le mouvement, qui n'anime que
 * transform et opacity (aucun recalcul de mise en page pendant le geste).
 *
 * Aucune unite vh : le dialogue est en position fixed, inset 0 ; il suit la
 * zone visible, barre d'URL d'iOS comprise. Encoches : env(safe-area-inset-*).
 */

/* ---------------------------------------------------------------------------
   Bouton
   --------------------------------------------------------------------------- */
.tbc-mmenu {
	display: inline-flex;
}

/* Cible tactile : jamais sous --tbc-tap-min, quel que soit le reglage. */
.tbc-mmenu .tbc-mmenu__toggle {
	min-height: var(--tbc-tap-min);
	min-width: var(--tbc-tap-min);
}

/* Trace en ligne (HugeIcons) : taille et epaisseur pilotees par le widget. */
.tbc-mmenu__glyph {
	flex: none;
	height: var(--tbc-mmenu-icon, var(--tbc-icon-lg));
	stroke-width: var(--tbc-mmenu-stroke, 1.5);
	width: var(--tbc-mmenu-icon, var(--tbc-icon-lg));
}

/* Point de rupture : composant mobile, masque au-dela (memes paliers que
   Mobile_Menu_Widget::HIDE_FROM). L'editeur le garde visible, estompe. */
@media (min-width: 768px) {
	.tbc-mmenu--upto-mobile {
		display: none;
	}
}

@media (min-width: 1025px) {
	.tbc-mmenu--upto-tablet {
		display: none;
	}
}

@media (min-width: 1367px) {
	.tbc-mmenu--upto-laptop {
		display: none;
	}
}

@media (min-width: 768px) {
	.elementor-editor-active .tbc-mmenu--upto-mobile {
		display: inline-flex;
		opacity: 0.5;
	}
}

@media (min-width: 1025px) {
	.elementor-editor-active .tbc-mmenu--upto-tablet {
		display: inline-flex;
		opacity: 0.5;
	}
}

@media (min-width: 1367px) {
	.elementor-editor-active .tbc-mmenu--upto-laptop {
		display: inline-flex;
		opacity: 0.5;
	}
}

/* Page derriere le dialogue : plus de defilement, gouttiere gardee (pas de saut). */
html.tbc-mmenu-lock {
	overflow: hidden;
	scrollbar-gutter: stable;
}

/* ---------------------------------------------------------------------------
   Dialogue : <dialog> natif ouvert en showModal (couche superieure, focus
   contenu, page inerte). Il couvre la zone visible ; voile et feuille dedans.
   --------------------------------------------------------------------------- */
/* Reglages du widget (--tbc-mmenu-*) poses par Elementor sur le dialogue ;
   chaque usage porte son repli, jamais de valeur par defaut declaree ici
   (elle concurrencerait le CSS d'Elementor selon l'ordre de chargement). */
.tbc-mmenu__dialog {
	background: transparent;
	border: 0;
	color: var(--tbc-ink);
	height: auto;
	inset: 0;
	margin: 0;
	max-height: none;
	max-width: none;
	overflow: hidden;
	padding: 0;
	position: fixed;
	width: auto;
}

.tbc-mmenu__dialog::backdrop {
	background: transparent;
}

.tbc-mmenu__scrim {
	background: var(--tbc-mmenu-scrim, var(--tbc-ink));
	inset: 0;
	opacity: 0;
	position: absolute;
	transition: opacity var(--tbc-mmenu-out, var(--tbc-sheet-out)) var(--tbc-mmenu-ease, var(--tbc-ease-sheet));
}

.tbc-mmenu__dialog.is-open .tbc-mmenu__scrim {
	opacity: var(--tbc-mmenu-scrim-o, var(--tbc-scrim-opacity));
	transition-duration: var(--tbc-mmenu-in, var(--tbc-sheet-in));
}

/* Feuille : trois etages en colonne, seul celui du milieu defile. La duree de
   la regle d'arrivee s'applique : --in a l'ouverture, --out a la fermeture. */
.tbc-mmenu__sheet {
	background: var(--tbc-white);
	display: flex;
	flex-direction: column;
	inset: 0;
	overflow: hidden;
	padding-left: env(safe-area-inset-left, 0px);
	padding-right: env(safe-area-inset-right, 0px);
	position: absolute;
	transform: translateX(100%);
	transition: transform var(--tbc-mmenu-out, var(--tbc-sheet-out)) var(--tbc-mmenu-ease, var(--tbc-ease-sheet)), opacity var(--tbc-mmenu-out, var(--tbc-sheet-out)) var(--tbc-mmenu-ease, var(--tbc-ease-sheet));
}

.tbc-mmenu__dialog--left .tbc-mmenu__sheet {
	transform: translateX(-100%);
}

.tbc-mmenu__dialog--fade .tbc-mmenu__sheet {
	opacity: 0;
	transform: none;
}

.tbc-mmenu__dialog.is-open .tbc-mmenu__sheet {
	opacity: 1;
	transform: none;
	transition-duration: var(--tbc-mmenu-in, var(--tbc-sheet-in));
}

/* Tablette : panneau lateral sur le voile, du cote choisi. */
@media (min-width: 768px) {
	.tbc-mmenu__sheet {
		border-left: var(--tbc-hairline-width) solid var(--tbc-hairline);
		left: auto;
		width: min(100%, var(--tbc-sheet-w));
	}

	.tbc-mmenu__dialog--left .tbc-mmenu__sheet {
		border-left: 0;
		border-right: var(--tbc-hairline-width) solid var(--tbc-hairline);
		left: 0;
		right: auto;
	}
}

/* ---------------------------------------------------------------------------
   Etage 1 : barre. Racine = marque + fermer ; sous-vue = retour + titre
   centre + fermer (sous-vue mobile du devis, .tbc-pills__subhead).
   --------------------------------------------------------------------------- */
.tbc-mmenu__bar {
	align-items: center;
	border-bottom: var(--tbc-hairline-width) solid var(--tbc-hairline);
	display: flex;
	flex: none;
	gap: var(--tbc-spacing-2);
	padding: calc(env(safe-area-inset-top, 0px) + var(--tbc-spacing-2)) var(--tbc-spacing-3) var(--tbc-spacing-2) var(--tbc-spacing-4);
	position: relative;
}

.tbc-mmenu .tbc-mmenu__brand {
	align-items: center;
	color: var(--tbc-ink);
	display: inline-flex;
	gap: var(--tbc-spacing-2);
	min-height: var(--tbc-tap-min);
	min-width: 0;
	text-decoration: none;
}

.tbc-mmenu .tbc-mmenu__brand[hidden] {
	display: none;
}

.tbc-mmenu__logo {
	flex: none;
	height: var(--tbc-spacing-6);
	width: var(--tbc-spacing-6);
}

.tbc-mmenu__brand-name {
	font: var(--tbc-font-label-lg-bold);
}

.tbc-mmenu__title {
	left: calc(var(--tbc-tap-min) + var(--tbc-spacing-4));
	margin: 0;
	overflow: hidden;
	pointer-events: none;
	position: absolute;
	right: calc(var(--tbc-tap-min) + var(--tbc-spacing-4));
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tbc-mmenu__close {
	margin-left: auto;
}

/* ---------------------------------------------------------------------------
   Etage 2 : pile de vues, seul etage qui defile. La racine s'efface vers la
   gauche, la sous-vue entre par la droite.
   --------------------------------------------------------------------------- */
.tbc-mmenu__stack {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	position: relative;
}

.tbc-mmenu__view {
	background: var(--tbc-white);
	display: flex;
	flex-direction: column;
	inset: 0;
	outline: none;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: var(--tbc-spacing-5) var(--tbc-spacing-4);
	position: absolute;
	transition: transform var(--tbc-mmenu-out, var(--tbc-sheet-out)) var(--tbc-mmenu-ease, var(--tbc-ease-sheet)), opacity var(--tbc-mmenu-out, var(--tbc-sheet-out)) var(--tbc-mmenu-ease, var(--tbc-ease-sheet));
}

.tbc-mmenu__view[hidden] {
	display: none;
}

.tbc-mmenu__view--sub {
	transform: translateX(100%);
}

.tbc-mmenu__dialog[data-depth="1"] .tbc-mmenu__view--root {
	opacity: 0;
	transform: translateX(-24%);
	transition-duration: var(--tbc-mmenu-in, var(--tbc-sheet-in));
}

.tbc-mmenu__dialog[data-depth="1"] .tbc-mmenu__view--sub {
	transform: none;
	transition-duration: var(--tbc-mmenu-in, var(--tbc-sheet-in));
}

.tbc-mmenu__flow {
	display: flex;
	flex-direction: column;
	gap: var(--tbc-spacing-5);
}

.tbc-mmenu__lead {
	display: flex;
	flex-direction: column;
	gap: var(--tbc-spacing-1);
	padding: 0 var(--tbc-spacing-2);
}

.tbc-mmenu__lead-title {
	margin: 0;
}

.tbc-mmenu__lead-text {
	color: var(--tbc-muted);
	font: var(--tbc-font-body-md-regular);
	margin: 0;
}

.tbc-mmenu__section {
	display: flex;
	flex-direction: column;
	gap: var(--tbc-spacing-3);
}

.tbc-mmenu__sec-title {
	color: var(--tbc-muted);
	font: var(--tbc-font-label-sm-bold);
	letter-spacing: 0.06em;
	margin: 0;
	padding: 0 var(--tbc-spacing-2);
	text-transform: uppercase;
}

/* Rangees empilees comme les pilules du devis (.tbc-pills__stack). */
.tbc-mmenu .tbc-mmenu__list {
	display: flex;
	flex-direction: column;
	gap: var(--tbc-spacing-2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.tbc-mmenu .tbc-mmenu__list > li {
	margin: 0;
}

.tbc-mmenu__list--root {
	--tbc-pill-font: var(--tbc-font-label-lg-regular);
}

/* Groupes repliables (liaisons par ville de depart) : pilules-resumes
   empilees, puis les liens a plat, decales sous le libelle. */
.tbc-mmenu__groups {
	display: flex;
	flex-direction: column;
	gap: var(--tbc-spacing-2);
}

.tbc-mmenu .tbc-mmenu__list--flat {
	gap: 0;
	padding: var(--tbc-spacing-1) 0 var(--tbc-spacing-2) var(--tbc-spacing-3);
}

/* ---------------------------------------------------------------------------
   Etage 3 : pied, toujours visible. Une seule surface : la ligne d'appel
   (numero + horaires), un filet vertical, WhatsApp ; puis le devis.
   --------------------------------------------------------------------------- */
.tbc-mmenu__foot {
	background: var(--tbc-white);
	border-top: var(--tbc-hairline-width) solid var(--tbc-hairline);
	display: flex;
	flex: none;
	flex-direction: column;
	gap: var(--tbc-spacing-3);
	padding: var(--tbc-spacing-4) var(--tbc-spacing-4) max(var(--tbc-spacing-4), env(safe-area-inset-bottom, 0px));
}

.tbc-mmenu__reach {
	align-items: center;
	display: flex;
	gap: var(--tbc-spacing-3);
}

/* Appel : rangee plate du kit, numero agrandi. L'icone s'aligne sur le bord du
   devis, le fond de survol deborde dans la marge. */
.tbc-mmenu .tbc-mmenu__call.tbc-pill {
	--tbc-pill-font: var(--tbc-font-body-xl-bold);
	--tbc-pill-h: calc(var(--tbc-tap-min) + var(--tbc-spacing-2));
	flex: 1 1 auto;
	margin-left: calc(var(--tbc-spacing-3) * -1);
	min-width: 0;
}

/* Separation entre l'appel et les actions : filet vertical. */
.tbc-mmenu__acts {
	align-items: center;
	align-self: stretch;
	border-left: var(--tbc-hairline-width) solid var(--tbc-hairline);
	display: flex;
	flex: none;
	padding-left: var(--tbc-spacing-3);
}

.tbc-mmenu .tbc-mmenu__wa.tbc-btn {
	--tbc-btn-bg: var(--tbc-wa);
	--tbc-btn-bc: var(--tbc-wa);
	--tbc-btn-fg: var(--tbc-white);
}

.tbc-mmenu .tbc-mmenu__wa.tbc-btn:hover:not(:disabled) {
	--tbc-btn-bg: var(--tbc-wa-deep);
	--tbc-btn-bc: var(--tbc-wa-deep);
	opacity: 1;
}

/* Horaires (Contact_Hours) : texte pose par le script a l'ouverture. */
.tbc-mmenu__hours {
	align-items: center;
	display: flex;
	gap: var(--tbc-spacing-1);
}

.tbc-mmenu__hours[hidden] {
	display: none;
}

.tbc-mmenu__hours.is-open {
	color: var(--tbc-lieu);
}

.tbc-mmenu__dot {
	background: currentColor;
	border-radius: 50%;
	flex: none;
	height: 6px;
	width: 6px;
}

/* ---------------------------------------------------------------------------
   Mouvement reduit (reglage systeme), si le widget le respecte : ouverture,
   fermeture et changement de vue sans transition.
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.tbc-mmenu__dialog--rm .tbc-mmenu__scrim,
	.tbc-mmenu__dialog--rm .tbc-mmenu__sheet,
	.tbc-mmenu__dialog--rm .tbc-mmenu__view,
	.tbc-mmenu__dialog--rm.is-open .tbc-mmenu__scrim,
	.tbc-mmenu__dialog--rm.is-open .tbc-mmenu__sheet,
	.tbc-mmenu__dialog--rm[data-depth="1"] .tbc-mmenu__view {
		transition: none;
	}
}
