/* Auth UI - dédié à /auth.php. Respecte le thème sombre existant. */

.auth-hero {
	display: grid;
	place-items: center;
	text-align: center;
	row-gap: 12px;
	padding: 40px 12px 20px;
	background: linear-gradient(135deg, rgba(236, 150, 0, 0.1) 0%, rgba(26, 26, 46, 0.1) 100%);
	border-radius: 16px;
	margin-bottom: 2rem;
}
.content-section.auth-scope {
	max-width: 1550px;
	margin: 0 auto;
	padding: 2rem 1rem;
}
.auth-hero h1 {
	font-size: 2.5rem;
	margin: 0;
	color: var(--text-primary, #ffffff);
	font-weight: 800;
	background: linear-gradient(135deg, var(--primary-color, #EC9600), var(--text-primary, #ffffff));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}
.auth-hero p {
	color: var(--text-secondary, #e0e0e0);
	margin: 0;
	font-size: 1.1rem;
}

.auth-container {
	max-width: 1400px;
	margin: 0 auto 40px;
	padding: 0 16px;
	display: grid;
	gap: 20px;
	grid-template-columns: 1fr;
}
@media (min-width: 980px) {
	.auth-container {
		grid-template-columns: 8fr 4fr; /* Colonne principale plus grande */
		align-items: start;
	}
}

.auth-card {
	background: var(--bg-card, #151a16);
	border: 1px solid var(--border-color, #2a352c);
	border-radius: 16px;
	padding: 2rem;
	box-shadow: 0 10px 40px rgba(0,0,0,0.4);
	transition: all 0.3s ease;
}
.auth-card:hover {
	box-shadow: 0 10px 30px rgba(236, 150, 0, 0.1);
	border-color: rgba(236, 150, 0, 0.2);
}
.auth-card h2, .auth-card h3 {
	margin-top: 0;
	color: var(--text-primary, #ffffff);
	font-weight: 700;
}
.auth-card h2 {
	font-size: 1.5rem;
	margin-bottom: 1rem;
}
.auth-card h3 {
	font-size: 1.1rem;
	margin-bottom: 0.75rem;
}
/* Carte de connexion plus grande */
#loginForm {
	padding: 2.5rem;
}
/* Carte d'inscription mise en évidence */
#registerForm {
	padding: 2.5rem;
	border: 2px solid var(--primary-color, #EC9600);
	background: linear-gradient(135deg, rgba(236, 150, 0, 0.1) 0%, var(--bg-card, #151a16) 100%);
}
#registerForm h2 {
	color: var(--primary-color, #EC9600);
	font-size: 1.75rem;
}
/* Colonne droite réduite */
.auth-side {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
.auth-side .auth-card {
	padding: 1.25rem;
}
.auth-side .auth-card h3 {
	font-size: 0.95rem;
	margin-bottom: 0.5rem;
}
.auth-side .auth-list {
	font-size: 0.9rem;
	margin: 0.5rem 0 0 0;
}
.auth-side .tip {
	font-size: 0.85rem;
	margin-bottom: 0.75rem;
}
.auth-side .btn-auth {
	padding: 0.75rem 1rem;
	font-size: 0.9rem;
}
.auth-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}
.auth-actions .btn {
	width: auto;
}

.btn-auth,
.btn-auth-ochre,
.btn-auth-primary,
.btn-auth-danger,
.btn-auth-danger-strong {
	position: relative;
	color: #0b1510 !important;
	border-radius: 999px;
	padding: 9px 18px;
	font-weight: 700;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: 1px solid rgba(0, 0, 0, 0.4);
	transition: transform .08s ease, box-shadow .18s ease, filter .18s ease, background .18s ease;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
	font-size: 0.95rem;
	cursor: pointer;
}
.btn-auth::after,
.btn-auth-ochre::after,
.btn-auth-primary::after,
.btn-auth-danger::after,
.btn-auth-danger-strong::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: radial-gradient(circle at 20% 0%, rgba(255,255,255,0.23), transparent 60%);
	opacity: .5;
	pointer-events: none;
}
.btn-auth {
	background: linear-gradient(135deg, #39d26a 0%, #2ea854 45%, #22763a 100%);
	color: #071509 !important;
}
.btn-auth:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 26px rgba(57,210,106,0.35);
	filter: brightness(1.03);
}
.btn-auth:active {
	transform: translateY(0);
	box-shadow: 0 4px 10px rgba(0,0,0,0.6);
	filter: brightness(0.97);
}
.btn-auth:disabled,
.btn-auth-ochre:disabled,
.btn-auth-primary:disabled,
.btn-auth-danger:disabled,
.btn-auth-danger-strong:disabled {
	opacity: .65;
	cursor: default;
	box-shadow: 0 3px 8px rgba(0,0,0,0.4);
}

/* Variante ocre (secondaire) – utilisée pour les actions sensibles (supprimer, reset, etc.) */
.btn-auth-ochre {
	background: linear-gradient(135deg, #ffc862 0%, #f4b143 45%, #c27f2b 100%);
	color: #281600 !important;
	border-color: rgba(66, 38, 0, 0.7);
}
.btn-auth-ochre:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 26px rgba(255,200,98,0.35);
	filter: brightness(1.03);
}
.btn-auth-ochre:active {
	transform: translateY(0);
	box-shadow: 0 4px 10px rgba(0,0,0,0.6);
	filter: brightness(0.97);
}

/* Bouton primaire bleu clair (ex: Mettre à jour le mot de passe) */
.btn-auth-primary {
	background: linear-gradient(135deg, #4dabff 0%, #3388ff 45%, #2462c9 100%);
	color: #021324 !important;
	border-color: rgba(6, 35, 77, 0.7);
}
.btn-auth-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 26px rgba(77,171,255,0.35);
	filter: brightness(1.03);
}
.btn-auth-primary:active {
	transform: translateY(0);
	box-shadow: 0 4px 10px rgba(0,0,0,0.6);
	filter: brightness(0.97);
}

/* Bouton rouge (Désactiver) */
.btn-auth-danger {
	background: linear-gradient(135deg, #ff6b6b 0%, #e63946 45%, #b51b2b 100%);
	color: #250408 !important;
	border-color: rgba(92, 10, 21, 0.8);
}
.btn-auth-danger:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 26px rgba(230,57,70,0.45);
	filter: brightness(1.03);
}
.btn-auth-danger:active {
	transform: translateY(0);
	box-shadow: 0 4px 10px rgba(0,0,0,0.6);
	filter: brightness(0.97);
}

/* Bouton rouge encore plus foncé (Supprimer) */
.btn-auth-danger-strong {
	background: linear-gradient(135deg, #d7263d 0%, #8b0000 50%, #4b0000 100%);
	color: #ffecec !important;
	border-color: rgba(0,0,0,0.85);
}
.btn-auth-danger-strong:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 26px rgba(139,0,0,0.65);
	filter: brightness(1.04);
}
.btn-auth-danger-strong:active {
	transform: translateY(0);
	box-shadow: 0 4px 12px rgba(0,0,0,0.75);
	filter: brightness(0.97);
}

.auth-form .form-group {
	margin-bottom: 12px;
}
.auth-form label {
	display: block;
	margin-bottom: 8px;
	color: var(--text-primary, #ffffff);
	font-weight: 600;
	font-size: 0.95rem;
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
	width: 100%;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid rgba(255,255,255,0.12);
	background: var(--bg-dark, #0a0f0b);
	color: var(--text-primary, #ffffff);
	outline: none;
}
.auth-form input[type="file"] {
	width: 100%;
	padding: 10px 12px;
	border-radius: 8px;
	border: 1px solid rgba(255,255,255,0.12);
	background: #0f1320;
	color: var(--text-secondary, #e0e0e0);
	cursor: pointer;
}
.auth-form input:focus {
	border-color: var(--primary-color, #EC9600);
	box-shadow: 0 0 0 2px rgba(236, 150, 0, 0.2);
}

.auth-form input[type="file"]::file-selector-button {
	background: linear-gradient(180deg, #34c759 0%, #2fa84e 60%, #267f3e 100%);
	color: #102014;
	border: 1px solid rgba(16, 32, 20, 0.35);
	border-radius: 8px;
	padding: 8px 12px;
	font-weight: 700;
	cursor: pointer;
	margin-right: 10px;
}
.auth-form input[type="file"]::file-selector-button:hover {
	filter: brightness(1.03);
}

/* Support Chrome/Safari */
.auth-form input[type="file"]::-webkit-file-upload-button {
	background: linear-gradient(180deg, #34c759 0%, #2fa84e 60%, #267f3e 100%);
	color: #102014;
	border: 1px solid rgba(16, 32, 20, 0.35);
	border-radius: 8px;
	padding: 8px 12px;
	font-weight: 700;
	cursor: pointer;
	margin-right: 10px;
}
.auth-form input[type="file"]::-webkit-file-upload-button:hover {
	filter: brightness(1.03);
}

.auth-side .tip {
	font-size: .95rem;
	color: var(--text-secondary, #e0e0e0);
	margin: 6px 0 0 0;
}
.auth-list {
	margin: 8px 0 0 18px;
	line-height: 1.8;
	color: var(--text-secondary, #e0e0e0);
}
.auth-list li {
	margin-bottom: 0.5rem;
}
.auth-support {
	display: grid;
	gap: 10px;
}

/* Espacement entre Aide et Support */
.auth-side .auth-card + .auth-card {
	margin-top: 24px;
}

/* Toolbar admin: champs et espacements */
.admin-toolbar {
	gap: 12px;
}
.admin-input,
.admin-select {
	background: var(--bg-dark, #0a0f0b);
	border: 1px solid var(--border-color, #2a352c);
	color: var(--text-primary, #ffffff);
	border-radius: 8px;
	outline: none;
}
.admin-input {
	padding: 10px 12px;
	min-width: 220px;
}
.admin-select {
	padding: 10px 12px;
}
.admin-input:focus,
.admin-select:focus {
	border-color: var(--primary-color, #EC9600);
	box-shadow: 0 0 0 2px rgba(236, 150, 0, 0.2);
}

/* Dashboard blocs */
.auth-grid {
	display: grid;
	gap: 16px;
	grid-template-columns: 1fr;
}
@media (min-width: 980px) {
	.auth-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.auth-status .message {
	margin: 12px 0 0 0;
	padding: 12px 16px;
	border-radius: 8px;
	color: var(--text-primary, #ffffff);
	font-weight: 500;
}
.message.info {
	background: rgba(74, 158, 255, 0.15);
	border: 1px solid rgba(74, 158, 255, 0.5);
	color: #a5d9ff;
}
.message.success {
	background: rgba(40, 167, 69, 0.15);
	border: 1px solid rgba(40, 167, 69, 0.5);
	color: #7dde9a;
}
.message.error {
	background: rgba(220, 53, 69, 0.15);
	border: 1px solid rgba(220, 53, 69, 0.5);
	color: #ff6b6b;
}
.switch-form {
	color: var(--text-secondary, #e0e0e0);
	font-size: 0.95rem;
}
.switch-form a {
	color: var(--primary-color, #EC9600);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.3s ease;
}
.switch-form a:hover {
	color: var(--primary-light, #f5a623);
	text-decoration: underline;
}

.btn.btn-small {
	padding: 8px 10px;
	font-size: .9rem;
}

/* Grand encadré translucide pour le dashboard */
.auth-wrapper {
	background: var(--bg-card, #151a16);
	border: 1px solid var(--border-color, #2a352c);
	border-radius: 16px;
	padding: 2rem;
	box-shadow: 0 12px 40px rgba(0,0,0,.4);
	margin-bottom: 1.5rem;
}

/* Espacement plus généreux entre les blocs du dashboard (user & admin) */
#dashboard .card {
	margin-bottom: 1.5rem;
	background: var(--bg-card, #151a16);
	border: 1px solid var(--border-color, #2a352c);
	border-radius: 16px;
	padding: 2rem;
	box-shadow: 0 10px 40px rgba(0,0,0,.4);
	transition: all 0.3s ease;
}
#dashboard .card:hover {
	box-shadow: 0 10px 30px rgba(236, 150, 0, 0.1);
	border-color: rgba(236, 150, 0, 0.2);
}
#dashboard .card:last-child {
	margin-bottom: 0;
}
#dashboard .card h3 {
	color: var(--text-primary, #ffffff);
	font-weight: 700;
	font-size: 1.25rem;
	margin-bottom: 1rem;
	border-bottom: 2px solid var(--primary-color, #EC9600);
	padding-bottom: 0.5rem;
}

/* (styles de popup supprimés, on laisse le message utiliser le style global dans styles.css) */

#message.success {
	background: rgba(40, 167, 69, 0.2);
	border: 1px solid rgba(40, 167, 69, 0.6);
	color: #7dde9a;
	padding: 14px 18px;
	border-radius: 8px;
	font-weight: 500;
}

#message.error {
	background: rgba(220, 53, 69, 0.2);
	border: 1px solid rgba(220, 53, 69, 0.6);
	color: #ff6b6b;
	padding: 14px 18px;
	border-radius: 8px;
	font-weight: 500;
}

#message.info {
	background: rgba(74, 158, 255, 0.2);
	border: 1px solid rgba(74, 158, 255, 0.6);
	color: #a5d9ff;
	padding: 14px 18px;
	border-radius: 8px;
	font-weight: 500;
}

/* Micro “Minecraft vibe” sans changer la charte: petits cadres */
.badge-pixel {
	border: 2px solid rgba(255,255,255,0.12);
	background: #0d111c;
	padding: 6px 10px;
	border-radius: 6px;
}

/* Admin table actions: boutons espacés et wrap */
.admin-table td.actions {
	white-space: normal;
}
.admin-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}
/* Animation hover pour le bouton d'inscription */
.btn-register-hover {
	position: relative;
	overflow: hidden;
}

.btn-register-hover::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	background: rgba(236, 150, 0, 0.2);
	border-radius: 50%;
	transform: translate(-50%, -50%);
	transition: width 0.6s ease, height 0.6s ease;
	z-index: 0;
}

.btn-register-hover:hover::before {
	width: 300px;
	height: 300px;
}

.btn-register-hover:hover {
	background: var(--primary-color, #EC9600);
	color: #ffffff !important;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(236, 150, 0, 0.4);
}

.btn-register-hover span,
.btn-register-hover {
	position: relative;
	z-index: 1;
}

.admin-actions .btn-auth.btn-small {
	margin: 2px 0;
}

/* Badges de statut actif / désactivé dans le tableau admin */
.status-badge {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 600;
}
.status-active {
	background: rgba(40, 167, 69, 0.15);
	color: #7dde9a;
	border: 1px solid rgba(40, 167, 69, 0.6);
}
.status-inactive {
	background: rgba(220, 53, 69, 0.15);
	color: #f8d7da;
	border: 1px solid rgba(220, 53, 69, 0.7);
}

/* Rôle admin / joueur */
.status-admin {
	background: rgba(52, 152, 219, 0.18);
	color: #a5d9ff;
	border: 1px solid rgba(52, 152, 219, 0.7);
}
.status-player {
	background: rgba(108, 117, 125, 0.16);
	color: #d5d7db;
	border: 1px solid rgba(108, 117, 125, 0.7);
}

/* Message d'erreur inline sous le formulaire de connexion */
.login-error {
	margin-top: 12px;
	font-size: 0.9rem;
	color: #ff6b6b;
	background: rgba(220, 53, 69, 0.15);
	border: 1px solid rgba(220, 53, 69, 0.6);
	border-radius: 8px;
	padding: 12px 14px;
	font-weight: 500;
}


/* Skin Preview */
.skin-preview {
	text-align: center;
	margin-bottom: 1.5rem;
	padding: 1.5rem;
	background: var(--bg-dark, #0a0f0b);
	border: 1px solid var(--border-color, #2a352c);
	border-radius: 12px;
}

.skin-preview img {
	max-width: 100%;
	border-radius: 8px;
	box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.skin-preview #noSkinMessage {
	color: var(--text-muted, #b0b0b0);
	font-style: italic;
	margin: 1rem 0;
}

/* Amélioration des inputs */
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
	transition: all 0.3s ease;
}

.auth-form input[type="text"]:hover,
.auth-form input[type="email"]:hover,
.auth-form input[type="password"]:hover {
	border-color: rgba(236, 150, 0, 0.4);
}

/* Amélioration du profil utilisateur */
#dashboard .card:first-child {
	background: linear-gradient(135deg, rgba(236, 150, 0, 0.1) 0%, var(--bg-card, #151a16) 100%);
	border-color: rgba(236, 150, 0, 0.3);
}

#dashboard .card:first-child h2 {
	color: var(--text-primary, #ffffff);
	font-size: 1.75rem;
	margin-bottom: 0.5rem;
}

#dashboard .card:first-child p {
	color: var(--text-secondary, #e0e0e0);
}

/* Amélioration des boutons de fichier */
.auth-form input[type="file"]::file-selector-button {
	background: linear-gradient(135deg, var(--primary-color, #EC9600), var(--primary-light, #f5a623));
	color: #ffffff;
	border: 1px solid rgba(236, 150, 0, 0.5);
}

.auth-form input[type="file"]::-webkit-file-upload-button {
	background: linear-gradient(135deg, var(--primary-color, #EC9600), var(--primary-light, #f5a623));
	color: #ffffff;
	border: 1px solid rgba(236, 150, 0, 0.5);
}

/* Tableau admin amélioré */
.admin-table-wrapper {
	overflow-x: auto;
	border-radius: 8px;
	border: 1px solid var(--border-color, #2a352c);
}

.admin-table {
	width: 100%;
	border-collapse: collapse;
}

.admin-table th {
	background: var(--bg-dark, #0a0f0b);
	color: var(--text-primary, #ffffff);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-size: 0.85rem;
	padding: 14px 12px;
	border-bottom: 2px solid var(--primary-color, #EC9600);
}

.admin-table td {
	padding: 12px;
	border-bottom: 1px solid var(--border-color, #2a352c);
	color: var(--text-primary, #ffffff);
}

.admin-table tbody tr:hover {
	background: rgba(236, 150, 0, 0.1);
}

.admin-table tbody tr:nth-child(even) {
	background: rgba(255, 255, 255, 0.02);
}

.admin-table tbody tr:nth-child(even):hover {
	background: rgba(236, 150, 0, 0.15);
}
