/* ==========================================================================
   Arcade HTML5 pour phpBB — styles (compatibles prosilver et dérivés)
   ========================================================================== */

.arcade {
	--arcade-accent: #105289;
	--arcade-accent-2: #1d8a4e;
	--arcade-border: #c7d0db;
	--arcade-bg: #ffffff;
	--arcade-soft: #eef3f8;
	--arcade-muted: #5d6b7a;
	--arcade-gold: #e6b422;
	--arcade-silver: #a8b2bd;
	--arcade-bronze: #c27c4a;
	margin-bottom: 12px;
}

.arcade *, .arcade *::before, .arcade *::after { box-sizing: border-box; }

/* En-tête ------------------------------------------------------------- */
.arcade-hero {
	background: linear-gradient(135deg, #12a3eb 0%, #0076b1 55%, #1d3f6e 100%);
	color: #fff;
	border-radius: 10px;
	padding: 16px 20px;
	margin: 4px 0 12px;
}
.arcade-hero p { margin: 4px 0 0; font-size: 1.1em; opacity: .92; }
.arcade-hero .arcade-title { color: #fff; }
.arcade-hero-game { display: flex; gap: 16px; align-items: center; }
.arcade-hero-thumb { border-radius: 6px; flex: 0 0 auto; width: 120px; height: auto; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.arcade-rules { display: inline-block; margin-top: 4px; font-size: .9em; opacity: .85; }

.arcade-title {
	font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
	font-size: 2em;
	font-weight: bold;
	margin: 0;
	border: 0;
	color: var(--arcade-accent);
	text-transform: none;
}

.arcade-notice {
	background: #fff8e1;
	border: 1px solid #f0d58c;
	color: #6b5200;
	border-radius: 8px;
	padding: 8px 12px;
	margin-bottom: 12px;
	font-size: 1.1em;
}

/* Mise en page --------------------------------------------------------- */
.arcade-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 14px;
	align-items: start;
}
.arcade-main, .arcade-side { min-width: 0; }

.arcade-box {
	background: var(--arcade-bg);
	border: 1px solid var(--arcade-border);
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 14px;
}
.arcade-box h3 {
	font-size: 1.15em;
	margin: 0 0 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--arcade-soft);
	color: var(--arcade-accent);
	text-transform: none;
	font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
.arcade-box-wide { padding: 0; overflow: hidden; }
.arcade-more { text-align: right; margin: 8px 0 0; font-size: 1.05em; }
.arcade-empty { color: var(--arcade-muted); font-style: italic; padding: 8px 4px; margin: 0; }
.arcade-small { color: var(--arcade-muted); font-size: .95em; }

/* Grille des jeux ------------------------------------------------------ */
.arcade-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 14px;
}

.arcade-card {
	display: flex;
	flex-direction: column;
	background: var(--arcade-bg);
	border: 1px solid var(--arcade-border);
	border-radius: 10px;
	overflow: hidden;
	transition: transform .15s ease, box-shadow .15s ease;
}
.arcade-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(16, 82, 137, .15); }

.arcade-card-thumb { position: relative; display: block; aspect-ratio: 16 / 10; background: #0d1b2a; }
.arcade-card-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.arcade-card-play {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	background: rgba(0, 0, 0, .35);
	color: #fff; font-size: 2.6em;
	opacity: 0; transition: opacity .15s ease;
}
.arcade-card-thumb:hover .arcade-card-play,
.arcade-card-thumb:focus .arcade-card-play { opacity: 1; }

.arcade-card-body { padding: 10px 12px 4px; flex: 1; }
.arcade-card-body h3 {
	margin: 0 0 4px; font-size: 1.35em; border: 0; text-transform: none;
	font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
.arcade-card-desc { margin: 0 0 8px; color: var(--arcade-muted); font-size: 1.05em; line-height: 1.4; }
.arcade-card-stats { margin: 0; font-size: 1.05em; }
.arcade-card-stats dt { font-weight: bold; color: var(--arcade-muted); margin-top: 4px; }
.arcade-card-stats dd { margin: 0 0 2px 0; }

.arcade-card-foot {
	display: flex; align-items: center; gap: 6px;
	padding: 8px 12px 10px;
	border-top: 1px solid var(--arcade-soft);
}
.arcade-plays { flex: 1; color: var(--arcade-muted); font-size: 1em; }

.arcade .button.arcade-btn-play,
.arcade .button.arcade-btn-play:hover {
	background: var(--arcade-accent-2);
	background-image: linear-gradient(#27a862, #1d8a4e);
	border-color: #167040;
	color: #fff;
}
.arcade .button.arcade-btn-play .icon { color: #fff; }

.arcade-score {
	font-weight: bold;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.arcade-badge {
	display: inline-block;
	background: var(--arcade-gold);
	color: #3b2a00;
	font-size: .85em;
	font-weight: bold;
	border-radius: 999px;
	padding: 1px 8px;
}

/* Médailles et tableaux ----------------------------------------------- */
.arcade-medal {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 26px; height: 26px; padding: 0 6px;
	border-radius: 999px;
	background: var(--arcade-soft);
	color: #2b3a4a;
	font-weight: bold;
	font-variant-numeric: tabular-nums;
}
.arcade-medal-1 { background: var(--arcade-gold); color: #3b2a00; }
.arcade-medal-2 { background: var(--arcade-silver); color: #1f2a35; }
.arcade-medal-3 { background: var(--arcade-bronze); color: #fff; }

.arcade-table { margin: 0; border: 0; width: 100%; border-collapse: collapse; }
.arcade .arcade-table thead th {
	background: var(--arcade-soft);
	color: var(--arcade-accent);
	font-weight: bold;
	font-size: 1em;
	text-transform: none;
	padding: 7px 8px;
	border: 0;
	border-bottom: 1px solid var(--arcade-border);
	text-align: left;
}
.arcade .arcade-table thead th.arcade-col-num { text-align: right; }
.arcade .arcade-table thead th.arcade-col-rank { text-align: center; }
.arcade-table td { border: 0; }
.arcade-table td { padding: 6px 8px; vertical-align: middle; font-size: 1.1em; }
.arcade-table tbody tr:nth-child(odd) td { background: #f6f9fc; }
.arcade-table tbody tr.arcade-me td { background: #e3f4ea; }
.arcade-col-rank { width: 48px; text-align: center; }
.arcade-col-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.arcade-date { color: var(--arcade-muted); font-size: .9em; }

.arcade-player { display: inline-flex; align-items: center; gap: 8px; }
.arcade-avatar img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; display: block; }

.arcade-side .arcade-table td { font-size: 1.05em; padding: 5px 6px; }

.arcade-latest { list-style: none; margin: 0; padding: 0; }
.arcade-latest li { padding: 6px 0; border-bottom: 1px solid var(--arcade-soft); font-size: 1.05em; line-height: 1.4; }
.arcade-latest li:last-child { border-bottom: 0; }
.arcade-latest .arcade-date { display: block; }

/* Page de jeu ---------------------------------------------------------- */
.arcade-play-head {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	gap: 8px; margin: 4px 0 10px;
}
.arcade-play-actions { display: flex; gap: 6px; }

.arcade-stage {
	position: relative;
	margin: 0 auto 14px;
	width: min(100%, calc((100vh - 190px) * var(--arcade-ratio, .75)));
	min-width: min(100%, 300px);
	aspect-ratio: var(--arcade-ratio, .75);
	background: #0d1b2a;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 6px 24px rgba(13, 27, 42, .25);
}
.arcade-stage iframe { display: block; width: 100%; height: 100%; border: 0; }

.arcade-stage:fullscreen { width: 100vw; height: 100vh; max-width: none; aspect-ratio: auto; border-radius: 0; background: #000; }
.arcade-stage:-webkit-full-screen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; background: #000; }

.arcade-toast {
	position: absolute; left: 50%; top: 12px; transform: translateX(-50%);
	max-width: calc(100% - 24px);
	background: rgba(13, 27, 42, .92);
	color: #fff;
	padding: 8px 16px;
	border-radius: 14px;
	font-size: 1.15em;
	line-height: 1.35;
	font-weight: bold;
	text-align: center;
	box-shadow: 0 4px 16px rgba(0,0,0,.3);
	pointer-events: none;
	animation: arcade-pop .25s ease-out;
}
.arcade-toast.is-record { background: linear-gradient(135deg, #f6c343, #e09b12); color: #2b1d00; }
.arcade-toast.is-good { background: rgba(29, 138, 78, .95); }
.arcade-toast.is-bad { background: rgba(160, 40, 60, .95); }
@keyframes arcade-pop { from { transform: translate(-50%, -10px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

.arcade-info p { margin: 0 0 6px; font-size: 1.1em; line-height: 1.5; }
.arcade-info p:last-child { margin-bottom: 0; }

.arcade-myrank { margin: 0 0 8px; font-size: 1.05em; }
.arcade-top { list-style: none; margin: 0; padding: 0; }
.arcade-top li {
	display: flex; align-items: center; gap: 8px;
	padding: 5px 4px;
	border-bottom: 1px solid var(--arcade-soft);
	font-size: 1.1em;
}
.arcade-top li:last-child { border-bottom: 0; }
.arcade-top li.arcade-me { background: #e3f4ea; border-radius: 6px; }
.arcade-top-user { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arcade-top li.arcade-flash { animation: arcade-flash 1.6s ease-out; }
@keyframes arcade-flash { 0% { background: #ffe9a8; } 100% { background: transparent; } }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
	.arcade-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
	.arcade-wide-only { display: none; }
	.arcade-title { font-size: 1.6em; }
	.arcade-hero-thumb { width: 80px; }
	.arcade-stage { width: 100%; border-radius: 0; }
	.arcade-play-actions .button span { display: none; }
}
