/* Version mobile (ajout de la version JS) : en dessous de 760 px, le cadre du site d'origine (972 px de large,
   décors positionnés au pixel) est remplacé par une mise en page en une colonne ; les zones de jeu (canvas)
   se réduisent à la largeur de l'écran. Le site de bureau n'est pas modifié. */

/* Zones de jeu : jamais plus larges que leur conteneur (sans effet quand la place suffit) */
.mt-flash {
	max-width : 100%;
}
.mt-flash > canvas {
	max-width : 100%;
	height : auto !important;
}

@media (max-width : 760px) {
	body {
		font-size : 15px;
	}
	.mt-flash {
		height : auto !important;
	}
	/* --- Cadre : décors masqués, contenu sur toute la largeur */
	.site {
		width : auto;
		margin : 0px;
		padding : 0px 6px;
	}
	.sp, .pleft, .pright, .ptop, .arthead, .camera, .ptopleft, .pbottomleft, .mt, .art_mouse {
		display : none !important;
	}
	a.logo {
		position : relative;
		margin : 6px auto 0px auto;
		width : 200px;
		height : 77px;
		background-size : contain;
	}
	.frame {
		margin-top : 4px;
		background : #f3e0b8;
		border : 2px solid #86623e;
		border-radius : 8px;
		overflow : hidden;
	}
	.ptopsite {
		background : none;
	}
	#content {
		min-height : 0px;
		padding : 8px;
		font-size : 0.95em;
	}
	.bottomsite {
		background : none;
		padding-bottom : 12px;
	}
	.dbottom {
		background : none;
		padding-bottom : 0px;
		margin-top : 8px;
	}
	.dbg {
		background : #4f5b7f;
		height : auto;
		border-radius : 8px;
		overflow : hidden;
	}
	.mtFoot {
		flex-direction : column;
		height : auto;
		padding : 10px;
		gap : 8px;
		text-align : center;
	}
	.mtCopy {
		text-align : center;
		font-size : 0.8em;
	}
	body:has(#mtBeta) {
		padding-bottom : 60px;
	}

	/* --- Cadre d'une armée : crédits, puissance, titre, colonne du menu puis contenu */
	.home {
		padding : 0px;
		text-align : center;
	}
	.money, .power {
		position : relative;
		display : inline-block;
		margin : 0px 4px;
		text-align : left;
	}
	a.company {
		position : relative;
		display : block;
		width : auto;
		max-width : 480px;
		margin : 6px auto 0px auto;
		padding : 10px 6px 8px 6px;
		height : auto;
		background-size : 100% 100%;
		font-size : 1.1em;
	}
	table.panels, table.panels > tbody, table.panels > tbody > tr, table.panels td.left, table.panels td.right {
		display : block;
		width : auto;
		margin : 0px;
		padding : 0px;
		text-align : left;
	}
	table.panels {
		margin-top : 10px;
	}
	/* contenu de la page d'abord, puis « Mes troopers » et le menu */
	table.panels > tbody > tr {
		display : flex;
		flex-direction : column-reverse;
	}
	table.panels td.left {
		margin-top : 14px;
	}
	table.panels td.left .box1 {
		margin : 0px auto 10px auto;
	}
	table.panels td.left > .mtClock {
		margin : 0px auto 12px auto;
	}
	table.panels td.left > ul.history {
		margin : 0px auto 12px auto;
	}
	.box2, .box10 {
		display : block;
		margin : 0px auto 10px auto;
	}
	.mtEvent {
		margin : 0px 0px 10px 0px;
	}
	/* back office : un event par carte */
	.mtAdmin table, .mtAdmin tbody, .mtAdmin tr, .mtAdmin td {
		display : block;
		width : auto;
	}
	.mtAdmin th {
		display : none;
	}
	.mtAdmin tr {
		padding : 6px 0px;
		border-bottom : 1px dashed #b9a27a;
	}
	.mtAdmin td {
		padding : 2px 0px;
		border : none;
	}
	.mtAdmin td.acts br {
		display : none;
	}
	.mtAdmin td.acts a {
		margin-right : 12px;
	}

	/* --- Tableaux et blocs larges */
	.ranks table, table.log, table.choose, table.tablesheet, table.levelup, .sheet ul.skills, .sheet .trStats {
		width : 100%;
		max-width : 100%;
		margin-left : 0px;
	}
	.ranks table td {
		padding : 6px 3px;
	}
	table.log, table.log > tbody, table.log > tbody > tr, table.log > tbody > tr > td,
	table.choose, table.choose > tbody, table.choose > tbody > tr, table.choose > tbody > tr > td,
	table.tablesheet, table.tablesheet > tbody, table.tablesheet > tbody > tr, table.tablesheet > tbody > tr > td {
		display : block;
		width : auto;
		padding : 0px;
	}
	table.log .history {
		width : auto;
	}
	table.log td.right {
		padding-left : 0px;
	}
	table.choose td.choosetd {
		padding : 8px 0px;
	}
	table.choose .backchoose {
		margin : 0px auto;
	}
	table.choose .mate .backchoose {
		height : auto;
		padding-bottom : 8px;
		text-align : center;
	}
	table.choose .mate .field {
		margin : 4px 0px;
	}
	table.choose .mate .button5 {
		position : static;
		display : inline-block;
		margin : 4px 0px 0px 0px;
	}
	.sheet ul.skills {
		display : flex;
		flex-wrap : wrap;
		justify-content : center;
	}
	.sheet ul.skills li.soldier {
		flex-basis : 100%;
		width : auto;
		display : flex;
		justify-content : center;
		margin-bottom : 6px;
	}
	td.sheetright {
		margin-top : 10px;
	}
	.sheet .trRow {
		flex-direction : column;
		gap : 2px;
	}
	.sheet .trRowLabel {
		width : auto;
	}

	/* --- Page d'un combat : cadre réduit à la largeur de l'écran */
	.game .swfframe, .game .nam {
		width : auto;
		height : auto;
		margin : 8px 0px 0px 0px;
		padding : 0px 4px 4px 4px;
		background : #6e5232;
		border-radius : 8px;
	}
	.game h1 {
		height : auto;
		padding : 6px 4px;
		font-size : 1em;
	}
	.game .button5 {
		display : block;
		margin : 12px auto 0px auto;
	}

	/* --- Page d'accueil (création d'une armée) */
	.subscribe {
		background : none;
		height : auto;
	}
	.subscribe .box4, .subscribe .box5 {
		margin : 0px 0px 10px 0px;
		width : auto;
		height : auto;
		padding : 12px;
		background : #4f5b7f;
		border-radius : 8px;
	}
	.subscribe .box4 .field {
		max-width : 100%;
	}
	.subscribe ul.troopers {
		margin : 10px 0px 0px 0px;
		text-align : center;
	}
	.subscribe .button4 {
		display : block;
		margin : 10px auto;
	}
	.alreadyhave {
		position : static !important;
		margin : 10px auto !important;
		text-align : center;
	}

	/* --- Listes de cartes, wiki, modales */
	ul.troopers {
		text-align : center;
	}
	ul.troopers li.trooper {
		margin : 0px 2px 8px 2px;
	}
	.wikiMain {
		margin : 8px 0px;
		padding : 10px;
	}
	.wikiHead .wikiIcon {
		width : 72px;
		height : 72px;
		margin : 6px 14px 6px 0px;
	}
	.mtModal #notification .poptop, #notification .poptop {
		width : calc(100vw - 20px);
		margin : 60px 0px 0px 0px;
		left : 10px;
		background-size : 100% auto;
	}
	.popcontent {
		width : auto;
		padding-left : 60px;
		padding-right : 16px;
	}
	#notification .button5 {
		margin-left : 0px;
	}
}
