/**
 * It's Rugby — App Shell : habillage « mode app ».
 *
 * TOUTES les règles sont préfixées html.is-app : sur le web, cette feuille
 * n'a aucun effet (la barre est display:none, la chrome reste intacte).
 * Charte réutilisée depuis itsrugby-common.css : --itsclt-teal / -green /
 * -vanilla / -ink / -sec. Angles droits (jamais de border-radius).
 */

/* ── Barre d'onglets : masquée par défaut (web), affichée seulement en app ── */
.its-app-tabbar {
	display: none;
}

/* Garde-fou : jamais de scroll horizontal parasite de la page en mode app */
html.is-app body {
	overflow-x: hidden;
}

html.is-app .its-app-tabbar {
	display: flex;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9990;
	width: 100%;
	background: #fff;
	border-top: 1px solid var(--itsclt-vanilla, #E8D8C0);
	padding-bottom: env(safe-area-inset-bottom);
	touch-action: manipulation;
}

html.is-app .its-app-tab {
	flex: 1 1 0;
	/* min-width:0 : sans lui, les libellés longs (« Compétitions ») forcent
	   le débordement horizontal et les onglets se tassent inégalement */
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-height: 54px;
	padding: 8px 2px 6px;
	color: var(--itsclt-sec, #9B9382);
	font-weight: 600;
	text-decoration: none;
	position: relative;
	/* supprime le délai de tap ~300 ms → clic instantané */
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

/* Feedback immédiat au tap (avant même la navigation) */
html.is-app .its-app-tab:active {
	background: rgba(28, 61, 52, 0.08);
}

html.is-app .its-app-tab.is-active {
	color: var(--itsclt-teal, #1C3D34);
}

/* Repère d'onglet actif : trait g-bright en haut, angle droit */
html.is-app .its-app-tab.is-active::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 34px;
	height: 3px;
	background: var(--itsclt-green, #8ED968);
}

html.is-app .its-app-tab-ico {
	display: block;
	flex: 0 0 auto;
}

html.is-app .its-app-tab-label {
	line-height: 1;
	max-width: 100%;
	font-size: 10px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Masquage de la chrome « site web » + place pour la barre ────────────── */
html.is-app .site-header,
html.is-app .site-footer {
	display: none;
}

html.is-app body {
	padding-bottom: calc(58px + env(safe-area-inset-bottom));
}

/* ── Espace perso : sidebar verticale → nav mobile horizontale (pills) ───── */
html.is-app .its-account-layout {
	flex-direction: column;
	background: transparent;
	min-height: 0;
}

html.is-app .its-account-nav {
	width: auto;
	flex-direction: row;
	flex-wrap: nowrap;
	overflow-x: auto;
	gap: 6px;
	padding: 10px 12px;
	border-right: 0;
	border-bottom: 1px solid var(--itsclt-vanilla, #E8D8C0);
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

html.is-app .its-account-nav::-webkit-scrollbar {
	display: none;
}

/* Aplatir les groupes pliables : leurs items rejoignent le scroller horizontal.
   display:contents promeut les items comme enfants directs de la nav flex.
   Sélecteur plus spécifique que le [hidden] UA → pas de !important. */
html.is-app .its-account-nav-group,
html.is-app .its-account-nav-group[hidden] {
	display: contents;
}

/* Les séparateurs/chevrons de groupe n'ont plus de sens à plat → masqués */
html.is-app .its-account-nav-sep {
	display: none;
}

html.is-app .its-account-nav-item {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	flex: 0 0 auto;
	padding: 8px 14px;
	border-left: 0;
	border: 1px solid var(--itsclt-vanilla, #E8D8C0);
	font-size: 13px;
}

html.is-app .its-account-nav-item.active {
	background: var(--itsclt-teal, #1C3D34);
	border-color: var(--itsclt-teal, #1C3D34);
	color: #fff;
}

/* Pied de nav (déconnexion) : reste dans le scroller, sans bordure haute */
html.is-app .its-account-nav-foot {
	display: contents;
}

html.is-app .its-account-content {
	width: 100%;
	padding: 16px;
}
