:root {
	--gap: 12px;
	--radius: 12px;
}

body {
	margin: 0;
	font-family: system-ui, sans-serif;
	color: #eaeef3;
	background: #0f1216;
}

header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: #161b22;
	position: sticky;
	top: 0;
	z-index: 10;
}

h1 {
	font-size: 18px;
	margin: 0;
}

.toolbar {
	display: flex;
	gap: var(--gap);
	align-items: center;
	flex-wrap: wrap;
}

.toolbar-user {
	margin-left: auto;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 12px;
	border-radius: var(--radius);
	background: #2b313a;
	border: 1px solid #394150;
	color: #eaeef3;
	cursor: pointer;
	text-decoration: none;
}

.btn[disabled] {
	opacity: .6;
	cursor: not-allowed;
}

.btn-danger {
	border-color: #7a2b2b;
	background: #3a1717;
}

.btn-danger:hover {
	filter: brightness(1.1);
}

.btn-discord {
	background: #5865f2;
	border-color: #6d78f6;
	color: #ffffff;
}

.btn-discord:hover {
	filter: brightness(1.06);
}

.user-chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 7px 12px;
	border-radius: 999px;
	background: #1b222c;
	border: 1px solid #2a3340;
	font-size: 13px;
}

.user-avatar {
	width: 24px;
	height: 24px;
	border-radius: 999px;
	display: block;
}


.filters {
	display: flex;
	gap: var(--gap);
	padding: 12px 20px;
	background: #11161c;
	border-bottom: 1px solid #1f2630;
}

.filters input[type="search"] {
	flex: 1;
	min-width: 220px;
	padding: 8px 10px;
	border-radius: var(--radius);
	border: 1px solid #394150;
	background: #0f1216;
	color: #eaeef3;
}

.chips {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.chip {
	display: inline-flex;
	gap: 6px;
	align-items: center;
	padding: 6px 10px;
	border-radius: 999px;
	background: #1b222c;
	border: 1px solid #2a3340;
	font-size: 13px;
}

main {
	padding: 16px 20px;
}

.banner {
	display: none;
	margin-bottom: 16px;
	padding: 12px;
	border-radius: var(--radius);
	background: #0d2a17;
	border: 1px solid #1a3d25;
}

.banner.show {
	display: block;
}

table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
}

thead th {
	text-align: left;
	font-weight: 600;
	border-bottom: 1px solid #273040;
	padding: 10px 8px;
	color: #aeb8c7;
	position: sticky;
	top: 64px;
	background: #0f1216;
	z-index: 5;
}

tbody td {
	border-bottom: 1px solid #1a2230;
	padding: 10px 8px;
}

.badge {
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	border: 1px solid #334155;
	background: #17202b;
}

.badge.warn {
	background: #2a1c0e;
	border-color: #5a3b1f;
	color: #ffc596;
}

.input-row {
	display: flex;
	gap: 8px;
	align-items: center;
}

.input-row .inp {
	flex: 1;
}


/* Modal */
/* Backdrop + animation */
/* Backdrop + animation */
.modal-backdrop {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .45);
	backdrop-filter: saturate(1.2) blur(4px);
	-webkit-backdrop-filter: saturate(1.2) blur(4px);
	z-index: 100;
	will-change: opacity;
	opacity: 0;
	transition: opacity .18s ease;
}

.modal-backdrop.show {
	display: flex;
	opacity: 1;
}

/* Fenêtre */
.modal {
	width: min(960px, 94vw);
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	overflow: clip;
	background: linear-gradient(180deg, #121720, #0e141c);
	border: 1px solid #273244;
	border-radius: 18px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
	transform: translateY(8px) scale(.98);
	opacity: .98;
	transition: transform .22s ease, opacity .22s ease, box-shadow .22s ease;
}

.modal-backdrop.show .modal {
	transform: translateY(0) scale(1);
	opacity: 1;
}

/* En-tête & pied collants */
.modal-header,
.modal-footer {
	position: sticky;
	z-index: 1;
	background: linear-gradient(180deg, rgba(23, 29, 40, .96), rgba(23, 29, 40, .80));
	backdrop-filter: saturate(1.05) blur(2px);
	-webkit-backdrop-filter: saturate(1.05) blur(2px);
}

.modal-header {
	top: 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 16px;
	border-bottom: 1px solid #1f2733;
}

.modal-title {
	font-size: 18px;
	font-weight: 600;
	letter-spacing: .2px;
}

.modal-footer {
	bottom: 0;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	align-items: center;
	padding: 12px 16px;
	border-top: 1px solid #1f2733;
}

/* Corps défilant */
.modal-body {
	padding: 16px;
	overflow: auto;
	max-height: calc(86vh - 110px);
	/* header+footer */
	scrollbar-width: thin;
	scrollbar-color: #2b3750 transparent;
}

.modal-body::-webkit-scrollbar {
	height: 8px;
	width: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
	background: #2b3750;
	border-radius: 999px;
}

.modal-body::-webkit-scrollbar-track {
	background: transparent;
}

/* Accessibilité */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* Grille & sections */
.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

@media (max-width: 820px) {
	.form-grid {
		grid-template-columns: 1fr;
	}
}

.form-section {
	grid-column: 1/-1;
	margin-top: 10px;
	padding: 10px 12px;
	border: 1px solid #1f2733;
	border-radius: 12px;
	background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .01));
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .02);
}

.form-section h4 {
	margin: 0 0 6px;
	font-size: 14px;
	color: #aeb8c7;
	letter-spacing: .02em;
}

/* Inputs */
.inp {
	width: -webkit-fill-available;
	padding: 9px 11px;
	margin: 5px 0;
	border-radius: 10px;
	border: 1px solid #394150;
	background: #0f1216;
	color: #eaeef3;
	transition: box-shadow .15s ease, border-color .15s ease;
}

.inp:focus {
	outline: none;
	border-color: #2b6cf6;
	box-shadow: 0 0 0 3px rgba(43, 108, 246, .20);
}

/* Indication Mojang sous le champ DB */
.mojang-hint {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	font-style: italic;
	color: #9da7b7;
	opacity: 0.85;
	user-select: text;
}

.mojang-hint::before {
	content: "Mojang : ";
	font-weight: 500;
	color: #7aa2ff;
}

/* Surlignage des champs en divergence */
.diff {
	border: 1px solid #8a543a;
	background: linear-gradient(180deg, rgba(139, 84, 58, .12), rgba(139, 84, 58, .06));
	border-radius: 12px;
	padding: 8px;
}

/* Préférence : réduit les animations */
@media (prefers-reduced-motion: reduce) {

	.modal-backdrop,
	.modal {
		transition: none;
	}
}

.auth-page {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 24px;
}

.auth-shell {
	width: min(460px, 100%);
}

.auth-card {
	padding: 28px;
	border-radius: 18px;
	background: linear-gradient(180deg, #151b24, #10161d);
	border: 1px solid #273244;
	box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

.auth-eyebrow {
	margin: 0 0 10px;
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #7aa2ff;
}

.auth-card h1 {
	margin: 0 0 12px;
	font-size: 28px;
}

.auth-copy {
	margin: 0 0 18px;
	line-height: 1.5;
	color: #aeb8c7;
}

.auth-message {
	margin: 0 0 16px;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid #334155;
	background: #17202b;
}

.auth-message--error {
	background: #2a1717;
	border-color: #6b2525;
	color: #ffc9c9;
}

.auth-message--success {
	background: #12281b;
	border-color: #245132;
	color: #b7f5c8;
}
