/* =========================================================
   PokéBoard — Compte / Connexion / Inscription
   Aligné avec le PHP :
   - body_class => .pkb-account-auth-page
   - page non connectée /mon-compte/
   - header conservé
   - aucun forçage des éléments mobiles du header
========================================================= */

.pkb-account-page {
	--pkba-red:        var(--pkb-primary, var(--idd-color-primary, #fe0201));
	--pkba-red-dark:   var(--pkb-primary-hover, var(--idd-color-primary-hover, #d40000));
	--pkba-red-soft:   var(--pkb-primary-soft, #FFEBEE);
	--pkba-red-border: var(--pkb-primary-border, rgba(254,2,1,.18));
	--pkba-yellow:     var(--pkb-yellow, var(--idd-color-warning, #F0A500));
	--pkba-blue:       var(--pkb-blue, #1565C0);
	--pkba-green:      var(--pkb-green, #22c55e);
	--pkba-danger:     var(--pkb-danger, var(--idd-color-primary-hover, #d40000));
	--pkba-ink:        var(--pkb-ink, var(--idd-color-bg-dark, #0f172a));
	--pkba-text:       var(--pkb-text, var(--idd-color-bg-dark, #0f172a));
	--pkba-muted:      var(--pkb-text-muted, var(--idd-color-text-muted, #64748b));
	--pkba-light:      var(--pkb-text-light, var(--idd-color-text-muted, #94a3b8));
	--pkba-soft:       var(--pkb-bg-soft, var(--idd-color-bg-alt, #f7f9fc));
	--pkba-line:       var(--pkb-border, rgba(15,23,42,.10));
	--pkba-line-soft:  var(--pkb-border-soft, rgba(15,23,42,.06));
	--pkba-card:       var(--pkb-surface, #ffffff);
	--pkba-radius:     18px;
	--pkba-radius-lg:  24px;
	--pkba-shadow-xs:  0 1px 3px rgba(15,23,42,.04);
	--pkba-shadow-sm:  0 2px 10px rgba(15,23,42,.06);
	--pkba-shadow-md:  0 8px 24px rgba(15,23,42,.08);

	width: 100%;
	min-height: auto;
	padding: clamp(44px, 6vw, 88px) 0 clamp(56px, 7vw, 110px);
	background: transparent;
	color: var(--pkba-ink);
	font-family: inherit;
}

.pkb-account-page,
.pkb-account-page * {
	box-sizing: border-box;
}

.pkb-account-page a {
	color: inherit;
}

.pkb-account-app {
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	padding-inline: clamp(18px, 3vw, 40px);
}

/* =========================================================
   PAGE AUTH /MON-COMPTE/
========================================================= */

body.pkb-account-auth-page {
	background:
		radial-gradient(circle at 0% 0%, rgba(254,2,1,.05), transparent 34%),
		radial-gradient(circle at 100% 100%, rgba(240,165,0,.06), transparent 36%),
		linear-gradient(180deg, #fff8f8 0%, var(--idd-color-bg-alt, #f7f9fc) 100%);
}

body.pkb-account-auth-page .pb-site-header {
	position: relative;
	z-index: 40;
}

body.pkb-account-auth-page .pb-breadcrumb-wrap {
	position: relative;
	z-index: 10;
	margin-top: 0 !important;
	padding-top: 0;
	padding-bottom: 0;
}

body.pkb-account-auth-page .pkb-account-page {
	padding-top: clamp(52px, 7vw, 96px);
}

/* Important :
   on ne touche PAS à .pb-mobile-search-btn
   ni à .pb-mobile-bar
   ni à d'autres éléments du header global */

/* =========================================================
   NOTICES
========================================================= */

.pkb-account-notice {
	position: fixed;
	top: calc(var(--pb-admin-bar-h, 0px) + 18px);
	left: 50%;
	z-index: 999999;
	transform: translateX(-50%);
	max-width: min(560px, calc(100vw - 28px));
	padding: 12px 18px;
	border-radius: 999px;
	font-weight: 800;
	font-size: 14px;
	box-shadow: var(--pkba-shadow-md);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
}

.pkb-account-notice.is-error {
	background: rgba(255, 235, 235, .96);
	color: #b42318;
	border: 1px solid rgba(244, 67, 54, .22);
}

.pkb-account-notice.is-success {
	background: rgba(236, 253, 243, .96);
	color: #027a48;
	border: 1px solid rgba(52, 199, 89, .22);
}

/* =========================================================
   LAYOUT AUTH
========================================================= */

.pkb-auth-layout {
	width: 100%;
	max-width: 720px;
	margin: 0 auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.pkb-auth-hero {
	padding: 0 8px 22px;
	margin-bottom: 8px;
	text-align: center;
	background: transparent;
}

.pkb-account-kicker {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 5px 12px;
	margin-bottom: 12px;
	border-radius: 999px;
	background: var(--pkba-red-soft);
	color: var(--pkba-red);
	font-weight: 900;
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.pkb-auth-hero h1 {
	margin: 0 0 8px;
	font-size: clamp(24px, 4vw, 32px);
	line-height: 1.1;
	letter-spacing: -.025em;
	font-weight: 900;
	color: var(--pkba-ink);
}

.pkb-auth-hero p {
	margin: 0 auto;
	max-width: 420px;
	color: var(--pkba-muted);
	font-weight: 600;
	font-size: 14px;
	line-height: 1.5;
}

/* =========================================================
   TABS
========================================================= */

.pkb-auth-tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	margin-bottom: 16px;
	padding: 5px;
	background: var(--pkba-soft);
	border: 1px solid var(--pkba-line-soft);
	border-radius: 14px;
}

.pkb-auth-tabs a {
	min-height: 42px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	background: transparent;
	border: 0;
	text-decoration: none;
	color: var(--pkba-text);
	font-weight: 800;
	font-size: 13.5px;
	transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.pkb-auth-tabs a:hover {
	color: var(--pkba-red);
}

.pkb-auth-tabs a.is-active {
	background: #fff;
	color: var(--pkba-red);
	box-shadow: var(--pkba-shadow-xs);
}

/* =========================================================
   CARTE AUTH
========================================================= */

.pkb-auth-card {
	padding: clamp(26px, 4vw, 36px);
	border-radius: var(--pkba-radius-lg);
	background: var(--pkba-card);
	border: 1px solid var(--pkba-line-soft);
	box-shadow: 0 14px 38px rgba(15,23,42,.08);
}

.pkb-panel-head {
	margin-bottom: 18px;
}

.pkb-panel-head span {
	display: inline-flex;
	margin-bottom: 4px;
	color: var(--pkba-red);
	font-weight: 900;
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.pkb-panel-head h2 {
	margin: 0;
	font-size: clamp(20px, 3vw, 24px);
	line-height: 1.15;
	letter-spacing: -.02em;
	font-weight: 900;
	color: var(--pkba-ink);
}

/* =========================================================
   FORMULAIRES
========================================================= */

.pkb-account-form {
	display: grid;
	gap: 14px;
}

.pkb-form-row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.pkb-field {
	display: grid;
	gap: 6px;
	min-width: 0;
}

.pkb-field label {
	font-weight: 800;
	color: var(--pkba-text);
	font-size: 13px;
}

.pkb-field input,
.pkb-field select {
	width: 100%;
	min-height: 48px;
	border: 1px solid var(--pkba-line-soft);
	border-radius: 12px;
	background: var(--pkba-soft);
	padding: 0 14px;
	outline: none;
	color: var(--pkba-ink);
	font: inherit;
	font-weight: 600;
	font-size: 14.5px;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.pkb-field input::placeholder {
	color: var(--pkba-light);
	font-weight: 500;
}

.pkb-field input[type="file"] {
	min-height: auto;
	padding: 12px;
	background: #fff;
}

.pkb-field input:focus,
.pkb-field select:focus {
	border-color: var(--pkba-red-border);
	box-shadow: 0 0 0 3px rgba(254, 2, 1, .10);
	background: #fff;
}

.pkb-field small {
	color: var(--pkba-muted);
	font-weight: 600;
	font-size: 12px;
	line-height: 1.4;
}

/* =========================================================
   PASSWORD TOGGLE
========================================================= */

.pkb-password-wrap {
	position: relative;
	display: block;
}

.pkb-password-wrap input {
	padding-right: 48px !important;
}

.pkb-password-toggle {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	width: 38px;
	height: 38px;
	display: grid;
	place-items: center;
	background: transparent;
	border: 0;
	border-radius: 10px;
	color: var(--pkba-muted);
	cursor: pointer;
	transition: color .15s ease, background .15s ease;
}

.pkb-password-toggle:hover,
.pkb-password-toggle:focus-visible {
	color: var(--pkba-red);
	background: var(--pkba-red-soft);
	outline: none;
}

.pkb-password-toggle .pkb-eye { display: block; }
.pkb-password-toggle .pkb-eye--hide { display: none; }
.pkb-password-wrap.is-revealed .pkb-password-toggle .pkb-eye--show { display: none; }
.pkb-password-wrap.is-revealed .pkb-password-toggle .pkb-eye--hide { display: block; }

/* =========================================================
   EXTRA AUTH
========================================================= */

.pkb-auth-extra {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: -2px;
}

.pkb-auth-forgot {
	color: var(--pkba-red);
	font-weight: 800;
	font-size: 12.5px;
	text-decoration: none;
}

.pkb-auth-forgot:hover {
	text-decoration: underline;
}

.pkb-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	color: var(--pkba-text);
	font-weight: 700;
	font-size: 13px;
	line-height: 1.4;
	cursor: pointer;
}

.pkb-checkbox--inline {
	align-items: center;
	font-size: 13px;
}

.pkb-checkbox input {
	width: 16px;
	height: 16px;
	accent-color: var(--pkba-red);
	margin: 0;
	flex: 0 0 16px;
}

.pkb-auth-trust {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 4px 0 0;
	color: var(--pkba-muted);
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
}

.pkb-auth-trust svg {
	color: var(--pkba-green);
	flex-shrink: 0;
}

/* =========================================================
   BOUTONS
========================================================= */

.pkb-red-btn,
.pkb-white-btn,
.pkb-submit-btn,
.pkb-secondary-btn {
	min-height: 48px;
	padding: 0 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border-radius: 999px;
	text-decoration: none;
	border: 0;
	cursor: pointer;
	font-weight: 800;
	font-size: 14.5px;
	line-height: 1;
	letter-spacing: .01em;
	transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.pkb-red-btn,
.pkb-submit-btn {
	width: 100%;
	background: linear-gradient(135deg, var(--pkba-red), var(--pkba-red-dark));
	color: #fff;
	box-shadow: 0 6px 16px rgba(254, 2, 1, .18);
}

.pkb-red-btn:hover,
.pkb-submit-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(254, 2, 1, .25);
}

.pkb-white-btn,
.pkb-secondary-btn {
	background: #fff;
	color: var(--pkba-ink);
	border: 1px solid var(--pkba-line);
	box-shadow: var(--pkba-shadow-xs);
}

.pkb-white-btn:hover,
.pkb-secondary-btn:hover {
	transform: translateY(-1px);
	background: var(--pkba-soft);
}

/* =========================================================
   GOOGLE
========================================================= */

.pkb-google-zone {
	margin-top: 18px;
}

.pkb-google-btn-wrapper {
	display: flex;
	flex-direction: column;
	gap: 14px;
	align-items: center;
	width: 100%;
}

.pkb-google-divider {
	position: relative;
	width: 100%;
	height: 1px;
	background: var(--pkba-line-soft);
	display: flex;
	align-items: center;
	justify-content: center;
}

.pkb-google-divider span {
	position: absolute;
	padding: 0 12px;
	background: var(--pkba-card);
	color: var(--pkba-light);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.pkb-google-btn-host {
	width: 100%;
	display: flex;
	justify-content: center;
	min-height: 44px;
}

.pkb-google-btn-host > div,
.pkb-google-btn-host > iframe {
	margin: 0 auto !important;
}

/* =========================================================
   PANNEAU EDIT
========================================================= */

.pkb-edit-panel {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 999998;
	width: min(620px, 100vw);
	height: 100vh;
	padding: 28px;
	overflow-y: auto;
	background: var(--pkba-card);
	box-shadow: -8px 0 24px rgba(15, 23, 42, .12);
	transform: translateX(110%);
	transition: transform .28s ease;
}

.pkb-edit-panel.is-open {
	transform: translateX(0);
}

body.pkb-edit-open {
	overflow: hidden;
}

body.pkb-edit-open::after {
	content: "";
	position: fixed;
	inset: 0;
	z-index: 999997;
	background: rgba(15, 23, 42, .42);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
}

.pkb-edit-close {
	position: sticky;
	top: 0;
	margin-left: auto;
	z-index: 3;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 12px;
	background: var(--pkba-red);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	font-weight: 800;
	cursor: pointer;
}

/* =========================================================
   GEO
========================================================= */

.pkb-panel-separator {
	padding: 16px;
	border-radius: 14px;
	background: linear-gradient(135deg, rgba(21,101,192,.07), rgba(21,101,192,.03));
	border: 1px solid rgba(21,101,192,.15);
}

.pkb-panel-separator span {
	display: inline-flex;
	color: var(--pkba-blue);
	font-weight: 900;
	font-size: 11px;
	letter-spacing: .05em;
	text-transform: uppercase;
	margin-bottom: 4px;
}

.pkb-panel-separator h3 {
	margin: 0 0 6px;
	font-size: 18px;
	letter-spacing: -.02em;
}

.pkb-panel-separator p {
	margin: 0;
	color: var(--pkba-muted);
	font-weight: 600;
	font-size: 13px;
	line-height: 1.5;
}

.pkb-location-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.pkb-location-coords {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13px;
	color: var(--pkba-muted);
	font-weight: 700;
	margin-top: 8px;
}

.pkb-location-coords span {
	padding: 6px 10px;
	border-radius: 999px;
	background: var(--pkba-soft);
}

.pkb-location-message {
	min-height: 18px;
	font-weight: 800;
	font-size: 13px;
	color: var(--pkba-blue);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 860px) {
	.pkb-account-page {
		padding: 24px 0 42px;
	}

	body.pkb-account-auth-page .pkb-account-page {
		padding-top: 24px;
	}

	.pkb-account-app {
		padding-inline: 16px;
	}

	.pkb-auth-layout {
		max-width: 100%;
	}

	.pkb-edit-panel {
		width: 100vw;
		padding: 18px 16px 22px;
	}

	.pkb-form-row {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.pkb-auth-card {
		padding: 22px;
		border-radius: 20px;
	}

	.pkb-auth-tabs {
		margin-bottom: 14px;
	}
}

@media (max-width: 520px) {
	.pkb-account-page {
		padding: 16px 0 28px;
	}

	body.pkb-account-auth-page .pkb-account-page {
		padding-top: 16px;
	}

	.pkb-account-app {
		padding-inline: 14px;
	}

	.pkb-auth-hero {
		padding: 0 2px 14px;
	}

	.pkb-auth-hero h1 {
		font-size: 22px;
		line-height: 1.12;
	}

	.pkb-auth-hero p {
		font-size: 13px;
	}

	.pkb-auth-card {
		padding: 16px;
		border-radius: 18px;
	}

	.pkb-account-form {
		gap: 12px;
	}

	.pkb-field input,
	.pkb-field select {
		min-height: 46px;
		font-size: 14px;
		padding-inline: 13px;
	}

	.pkb-submit-btn,
	.pkb-red-btn,
	.pkb-white-btn,
	.pkb-secondary-btn {
		min-height: 48px;
	}

	.pkb-location-actions {
		flex-direction: column;
	}

	.pkb-location-actions > * {
		width: 100%;
	}

	.pkb-location-coords {
		flex-direction: column;
		align-items: stretch;
	}

	.pkb-location-coords span {
		width: 100%;
	}

	.pkb-auth-extra {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* =========================================================
   NOUVEAUX CHAMPS PROFIL ÉTENDU
========================================================= */

/* Avatar preview dans le formulaire */
.pkb-avatar-preview-wrap {
	display: flex;
	align-items: center;
	gap: 16px;
}
.pkb-avatar-preview {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--pkba-line-soft);
	flex-shrink: 0;
	background: var(--pkba-soft);
}
.pkb-avatar-file-wrap {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.pkb-avatar-file-wrap input[type="file"] {
	font-size: 13px;
}

/* Textarea */
.pkb-field textarea {
	width: 100%;
	border: 1px solid var(--pkba-line-soft);
	border-radius: 12px;
	background: var(--pkba-soft);
	padding: 12px 14px;
	outline: none;
	color: var(--pkba-ink);
	font: inherit;
	font-weight: 600;
	font-size: 14.5px;
	line-height: 1.5;
	resize: vertical;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.pkb-field textarea:focus {
	border-color: var(--pkba-red-border);
	box-shadow: 0 0 0 3px rgba(254, 2, 1, .10);
	background: #fff;
}
.pkb-field textarea::placeholder { color: var(--pkba-light); font-weight: 500; }

/* Compteur de caractères */
.pkb-char-counter {
	display: flex;
	justify-content: flex-end;
	font-size: 11.5px;
	color: var(--pkba-muted);
	font-weight: 600;
	margin-top: -2px;
}
.pkb-char-counter.is-near   { color: #b45309; }
.pkb-char-counter.is-over   { color: var(--idd-semantic-destructive, #dc2626); }

/* Bannière — champ upload */
.pkb-banner-field {
	display: grid;
	gap: 8px;
}
.pkb-banner-preview {
	position: relative;
	width: 100%;
	height: 110px;
	border-radius: 12px;
	overflow: hidden;
	background: linear-gradient(135deg, rgba(254,2,1,.06) 0%, rgba(21,101,192,.08) 100%);
	border: 1px dashed var(--pkba-line);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--pkba-muted);
	font-size: 13px;
}
.pkb-banner-preview img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.pkb-banner-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	color: var(--pkba-muted);
	font-size: 12.5px;
	font-weight: 600;
}
.pkb-banner-delete {
	position: absolute;
	bottom: 8px;
	right: 8px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 10px;
	border-radius: 999px;
	border: 1px solid var(--idd-surface-glass, rgba(255,255,255,.3));
	background: rgba(15,23,42,.55);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	backdrop-filter: blur(6px);
	transition: background .15s ease;
}
.pkb-banner-delete:hover { background: rgba(180,35,24,.75); border-color: var(--idd-surface-glass, rgba(255,255,255,.4)); }

/* Champ premium */
.pkb-premium-field { position: relative; }
.pkb-premium-field input:disabled,
.pkb-premium-field select:disabled,
.pkb-premium-field textarea:disabled {
	opacity: .55;
	cursor: not-allowed;
	background: var(--pkba-soft);
}
.pkb-premium-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 8px;
	border-radius: 999px;
	background: linear-gradient(135deg, #fbbf24, var(--idd-color-warning, #f59e0b));
	color: #fff;
	font-size: 10.5px;
	font-weight: 800;
	margin-left: 6px;
	vertical-align: middle;
}

/* Mention optionnelle / privée */
.pkb-field-optional {
	font-size: 11px;
	font-weight: 600;
	color: var(--pkba-muted);
	margin-left: 4px;
}