/**
 * Interrupteur « Notifications » de l'espace compte.
 * Gate in-app : tout est masqué par défaut ; seul `.its-cap-native` (ajouté
 * par le bridge quand Capacitor.isNativePlatform() est vrai) révèle.
 * Charte It's : angles droits (aucun border-radius), palette --teal/--g-bright.
 */

/* ── Masqués hors app ── */
.its-push-nav-item { display: none; }
.its-push-settings { display: none; }

/* ── Révélés en app (WebView Capacitor) ── */
.its-cap-native .its-push-nav-item { display: block; }
.its-cap-native .its-push-settings { display: block; }

/* ── Ligne interrupteur ── */
.its-push-toggle-row {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 14px 0 6px;
	flex-wrap: wrap;
}

.its-switch {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	user-select: none;
}

/* Case native masquée visuellement mais focusable (RGAA) */
.its-switch-input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.its-switch-track {
	position: relative;
	display: inline-block;
	width: 52px;
	height: 28px;
	background: var(--border, #C4C4C4);
	border: 2px solid var(--teal, #1C3D34);
	transition: background 0.15s ease;
	flex: 0 0 auto;
}

.its-switch-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 20px;
	height: 20px;
	background: var(--white, #fff);
	border: 2px solid var(--teal, #1C3D34);
	transition: transform 0.15s ease;
}

.its-switch-input:checked + .its-switch-track {
	background: var(--g-bright, #8ED968);
}
.its-switch-input:checked + .its-switch-track .its-switch-thumb {
	transform: translateX(24px);
}

/* Focus clavier visible (RGAA) */
.its-switch-input:focus-visible + .its-switch-track {
	outline: 2px solid var(--teal, #1C3D34);
	outline-offset: 2px;
}

.its-switch-input:disabled + .its-switch-track {
	opacity: 0.5;
	cursor: not-allowed;
}

.its-switch-label {
	font-weight: 700;
	font-size: 14px;
	color: var(--ink, #1A1A1A);
}

.its-push-state {
	font-size: 13px;
	font-weight: 700;
	color: var(--muted, #6B6B6B);
}
.its-push-state.is-on  { color: var(--teal, #1C3D34); }
.its-push-state.is-off { color: var(--muted, #6B6B6B); }

.its-push-help {
	font-size: 13px;
	color: var(--muted, #6B6B6B);
	margin: 4px 0 0;
}

.its-push-denied {
	margin: 12px 0 0;
	padding: 12px 14px;
	background: var(--red-lt, #FDECEA);
	border-left: 3px solid var(--red, #C0392B);
	font-size: 13px;
	color: var(--ink, #1A1A1A);
}
.its-push-denied-text { margin: 0; }

/* Bouton « Ouvrir les Réglages » (deep link iOS/Android via le plugin natif).
   Révélé par le JS seulement si le plugin NativeSettings est présent. */
.its-push-settings-btn {
	margin: 10px 0 0;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 800;
	border: 2px solid var(--red, #C0392B);
	background: var(--red, #C0392B);
	color: var(--white, #fff);
	cursor: pointer;
}
.its-push-settings-btn:focus-visible {
	outline: 2px solid var(--ink, #1A1A1A);
	outline-offset: 2px;
}

/* ────────────────────────────────────────────────────────────
 * Bandeau soft-ask (incitation à activer les notifs) — créé par le bridge JS
 * en natif uniquement, donc jamais rendu sur le web. Angles droits (charte).
 * ──────────────────────────────────────────────────────────── */
.its-push-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	background: var(--teal, #1C3D34);
	color: var(--white, #fff);
	/* Safe-area sur les 4 bords : évite que le texte/les boutons soient rognés
	   par les arrondis d'écran (gauche/droite) et le home indicator (bas). */
	padding-top: 16px;
	padding-right: calc(16px + env(safe-area-inset-right, 0px));
	padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	padding-left: calc(16px + env(safe-area-inset-left, 0px));
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
	transform: translateY(100%);
	transition: transform 0.25s ease;
}
.its-push-banner.is-visible {
	transform: translateY(0);
}
.its-push-banner-text {
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
}
.its-push-banner-actions {
	display: flex;
	gap: 10px;
}
.its-push-banner-btn {
	flex: 1 1 0;
	padding: 12px 14px;
	font-size: 14px;
	font-weight: 800;
	border: 2px solid var(--g-bright, #8ED968);
	background: var(--g-bright, #8ED968);
	color: var(--teal, #1C3D34);
	cursor: pointer;
	text-align: center;
}
.its-push-banner-btn.is-secondary {
	background: transparent;
	color: var(--white, #fff);
	border-color: rgba(255, 255, 255, 0.5);
}
.its-push-banner-btn:focus-visible {
	outline: 2px solid var(--white, #fff);
	outline-offset: 2px;
}
