.bdgt-minijeu {
	position: relative;
	width: 100%;
	max-width: 640px;
	aspect-ratio: 3 / 4;
	margin: 0 auto;
	border-radius: 12px;
	overflow: hidden;
	background: #1b170f;
	touch-action: none;
}

/* Plein écran (déclenché au clic sur "Jouer") : occupe tout l'écran du
   téléphone, sans les contraintes de largeur/ratio de l'affichage normal
   dans la page. */
.bdgt-minijeu:fullscreen,
.bdgt-minijeu:-webkit-full-screen {
	width: 100vw;
	height: 100vh;
	max-width: none;
	aspect-ratio: auto;
	border-radius: 0;
}

.bdgt-minijeu-frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.bdgt-minijeu-hud {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 12px;
	display: flex;
	justify-content: space-between;
	font-family: 'Bastardo Grotesk', sans-serif;
	color: #ece7e2;
	pointer-events: none;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.bdgt-minijeu-score {
	font-size: 18px;
	font-weight: 700;
}

/* Barre de puissance du service : oscille automatiquement, on tape au bon
   moment pour capter le niveau de puissance (comme le jeu de référence). */
.bdgt-minijeu-powerbar {
	position: absolute;
	left: 16px;
	bottom: 16px;
	width: 46%;
	max-width: 220px;
	height: 14px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(236, 231, 226, 0.5);
	overflow: hidden;
	pointer-events: none;
}

.bdgt-minijeu-powerbar-fill {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #d7e600, #ff8a1f);
	border-radius: 999px;
}

/* Stick virtuel de déplacement du personnage (avant/arrière/gauche/droite). */
.bdgt-minijeu-joystick {
	position: absolute;
	left: 20px;
	bottom: 20px;
	width: 90px;
	height: 90px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(236, 231, 226, 0.4);
	touch-action: none;
	z-index: 4;
}

.bdgt-minijeu-joystick-knob {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px;
	border-radius: 50%;
	background: rgba(236, 231, 226, 0.75);
	pointer-events: none;
}

.bdgt-minijeu-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
	text-align: center;
	background: rgba(27, 23, 15, 0.72);
	color: #ece7e2;
}

.bdgt-minijeu-overlay.bdgt-hidden {
	display: none;
}

.bdgt-minijeu-overlay-title {
	font-family: 'Bastardo Grotesk', sans-serif;
	font-size: clamp(24px, 6vw, 32px);
	margin: 0;
}

.bdgt-minijeu-overlay-text {
	font-family: 'Bastardo Grotesk', sans-serif;
	font-size: 15px;
	max-width: 32ch;
	opacity: 0.85;
	margin: 0;
}

.bdgt-minijeu-play,
.bdgt-minijeu-retry {
	font-family: 'Bastardo Grotesk', sans-serif;
	font-weight: 600;
	background-color: #1863dc;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 14px 30px;
	font-size: 16px;
	cursor: pointer;
}

/* Panneau de réglages temporaire — pour ajuster la physique/le ressenti du
   jeu directement en jeu, sans repasser par un déploiement de code. */
.bdgt-minijeu-tune-toggle {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 1px solid rgba(236, 231, 226, 0.5);
	background: rgba(0, 0, 0, 0.45);
	color: #ece7e2;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	z-index: 7;
}

.bdgt-minijeu-tune-panel {
	position: absolute;
	inset: 8px;
	z-index: 6;
	background: rgba(20, 17, 12, 0.94);
	border: 1px solid rgba(236, 231, 226, 0.3);
	border-radius: 10px;
	padding: 12px;
	overflow-y: auto;
	font-family: 'Bastardo Grotesk', sans-serif;
	color: #ece7e2;
}

.bdgt-minijeu-tune-row {
	margin-bottom: 12px;
}

.bdgt-minijeu-tune-row label {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	margin-bottom: 3px;
	opacity: 0.9;
}

.bdgt-minijeu-tune-row input[type="range"] {
	width: 100%;
}

.bdgt-minijeu-tune-actions {
	display: flex;
	gap: 8px;
	margin-top: 8px;
	position: sticky;
	bottom: 0;
	background: rgba(20, 17, 12, 0.94);
	padding-top: 6px;
}

.bdgt-minijeu-tune-actions button {
	flex: 1;
	font-family: 'Bastardo Grotesk', sans-serif;
	font-size: 12px;
	padding: 8px;
	border-radius: 6px;
	border: 1px solid rgba(236, 231, 226, 0.4);
	background: rgba(255, 255, 255, 0.08);
	color: #ece7e2;
	cursor: pointer;
}
