body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background-color: #EDEDED;
    position: relative;
    overflow-x: hidden;
}

/* Background motif (2026-08-10): subtle network/node graphic behind the card, corner-anchored,
   low opacity so it never competes with the form. Lives at the webDoctor docroot root (NOT
   param/{site}/), same generic non-per-client location confirmed in the prior diagnosis --
   this cannot resolve differently per client and will never reach findel/drfindel. */
body::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 480px;
    height: 407px;
    background-image: url('motif-network.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.07;
    z-index: 0;
    pointer-events: none;
}

/* Language dropdown (2026-08-09) -- native <select>, "expandable list" per spec, not a fixed
   set of always-visible options. Fixed top-right so it doesn't disturb the centered card. */
.lang-switcher {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2;
}
.lang-select {
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #D9DBE0;
    background-color: #FFFFFF;
    color: var(--primarycolor);
    cursor: pointer;
}

/* Card unification pass (2026-08-10): matches app/public_token/home/main.css's .login-container
   shape/spacing/shadow exactly (border-radius, padding, box-shadow, max-width). Colors
   deliberately untouched -- h2/form label/form input/.forgot-password already pull from
   var(--primarycolor)/var(--secondarycolor)/var(--tertiarycolor) (shared webDoctor/theme.css,
   not edited here), and form button's own #2046E5/#1538c0 were already hardcoded before this
   pass -- neither is changed, only shape/spacing/typography-size/shadow per scope. */
.page-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    position: relative;
    z-index: 1;
}
.login-container {
    background-color: #FFFFFF;
    border-radius: 24px;
    padding: 36px 32px 32px;
    box-shadow: 0 4px 24px rgba(51, 62, 82, 0.08);
    text-align: center;
    width: 100%;
    max-width: 380px;
}

.logo {
    width: 275px;
    margin-bottom: 20px;
    /* 2026-10-07: a square or tall logo uploaded on the Paramètres page stays a reasonable height */
    max-height: 160px;
    object-fit: contain;
}

h2 {
    color: var(--primarycolor);
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 20px;
}
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

form input,
form button,
form label {
    width: calc(100% - 20px); /* Ajuste la largeur en fonction du padding */
    box-sizing: border-box;   /* Assure que padding et bordures ne dépassent pas */
}
form label {
    font-weight: bold;
    text-align: left;
    margin: 10px 0px 0px 5px;
    color: var(--primarycolor);
}
form input {
    padding: 10px;
    margin: 0px 0px 10px;
    border-radius: 2px;
    border: 1px solid var(--tertiarycolor);
    background-color: var(--secondarycolor);
}

form input::placeholder {
    color: var(--tertiarycolor);
}

form button {
    padding: 14px;
    background-color: #2046E5;
    color: white;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: 0 10px 20px -4px rgba(32, 70, 229, 0.25);
}

form button:hover {
    background-color: #1538c0;
}

.forgot-password {
    display: block;
    margin-top: 10px;
    color: var(--primarycolor);
    text-decoration: none;
    font-size: 0.9em;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Footer (2026-08-10): NEW element -- devdoctor's login screen had no footer before this pass.
   Rules reused verbatim from app/public_token/home/main.css's .page-footer/.footer-inner/
   .footer-logo-area/.footer-logo/.footer-brand -- same visual pattern, minus .footer-disclaimer
   (that GDPR/HDS sentence is questionnaire-specific copy, not reused here per instruction). */
.page-footer {
    padding: 14px 20px;
    text-align: center;
    border-top: 1px solid #E2E8F0;
    background: #FFFFFF;
    position: relative;
    z-index: 1;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.footer-logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-logo {
    height: 36px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}
.footer-brand {
    font-size: 0.85rem;
    color: #666;
}
/* ---------- devdoctor/devmobile ONLY -- .pl-devsite, added to <body> by this page's own main.js.
   Base rules above are shared by all 4 hostnames and are left untouched: findel/drfindel keep
   their exact current look. Design system (2026-09-03): the card, the two inputs, the label, the
   button (Level 1) and the title (h2) are styled by the shared param/theme/ui_base.css that
   class/page.class.php inlines; only page-specific layout remains here. ---------- */
.pl-devsite body,
body.pl-devsite {
	background: var(--ui-page-bg) !important;
	font-family: var(--ui-font-family);
}
.pl-devsite .login-container {
	width: 100%;
	max-width: 420px;
	text-align: left;
}
.pl-devsite .login-container .logo {
	display: block;
	width: 100%;
	max-width: 275px;
	margin: 0 auto var(--ui-space-card-gap);
}
.pl-devsite .login-container h2 {
	text-align: center;
	margin-bottom: var(--ui-space-card-gap);
}
.pl-devsite form input,
.pl-devsite form button,
.pl-devsite form label {
	width: 100%;
}
.pl-devsite form label {
	margin: 0 0 6px;
}
.pl-devsite form input {
	margin: 0 0 var(--ui-space-field-gap);
}
.pl-devsite form button {
	margin-top: 4px;
}
.pl-devsite .forgot-password {
	display: block;
	margin-top: var(--ui-space-card-gap);
	text-align: center;
	font-size: var(--ui-small-size);
	color: var(--ui-brand-primary);
}
.pl-devsite .lang-select {
	font-family: var(--ui-font-family);
	font-size: var(--ui-small-size);
	border: 1px solid var(--ui-border-strong);
	border-radius: var(--ui-radius-button);
	background: var(--ui-surface);
	color: var(--ui-text-primary);
}
.pl-devsite .page-footer {
	border-top: 1px solid var(--ui-border);
	background: var(--ui-surface);
}
.pl-devsite .footer-brand {
	font-family: var(--ui-font-family);
	font-size: var(--ui-small-size);
	color: var(--ui-text-muted);
}
.pl-devsite .page-main {
	padding: var(--ui-space-page-pad) var(--ui-space-card-gap);
}
/* Stage 2 (2026-09-03): the decorative corner motif (body::before, right:-60px) made the document
   60px wider than the viewport -- a horizontal scrollbar on the very first screen. Pinned inside
   the edge on devsite; findel/drfindel keep the base rule. */
body.pl-devsite::before {
	top: 0;
	right: 0;
}

/* ==== UI POLISH 2026-10-08 (public-patient) ====
   Doctor login, devsite layer only (body.pl-devsite). Style only: no markup, id, class, text or JS change.
   Where ui_base.css section 7 (motion, depth and glass) also styles these elements, its --ui-fx-* tokens are
   read with a fallback, so the values match that layer when it is present and stand alone when it is not. */

/* Required asterisk: --ui-danger is 4.83:1 on white. The shared margin-left keeps the gap. */
body.pl-devsite .login-container .field_required {
	color: var(--ui-danger);
}

/* Field focus ring (ui_base sets box-shadow:none !important on focus). */
body.pl-devsite .login-container form input:focus {
	box-shadow: 0 0 0 3px rgba(36, 80, 230, .16) !important;
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
	body.pl-devsite .login-container form input:focus {
		box-shadow: 0 0 0 3px var(--ui-fx-ring-soft, color-mix(in srgb, var(--ui-brand-primary) 18%, transparent)) !important;
	}
}
/* Invalid flag: connect() writes style.border='1px solid red' on an empty or non-e-mail field, but ui_base's
   `border: ... !important` hid it, so the button looked broken. connect() clears it with style.border='', and
   the rule then stops matching. The :focus variant outranks the focus ring, so the error stays visible. */
body.pl-devsite .login-container form input[style*='red'],
body.pl-devsite .login-container form input[style*='red']:focus {
	border-color: var(--ui-danger) !important;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, .14) !important;
}

/* 'Mot de passe oublie ?': brand_heading text (15:1 standard, 8.95:1 DEV) instead of brand_primary (DEV teal
   2.55:1), an underline as the link cue, and a padded hit area. */
body.pl-devsite .login-container .forgot-password {
	width: fit-content;
	margin: calc(var(--ui-space-card-gap) - 6px) auto 0;
	padding: 6px 8px;
	border-radius: 6px;
	color: var(--ui-brand-heading);
	text-decoration: underline;
	text-decoration-color: rgba(21, 32, 94, .35);
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
	text-underline-offset: 3px;
}
body.pl-devsite .login-container .forgot-password:hover {
	text-decoration-color: currentColor;
}
body.pl-devsite .login-container .forgot-password:focus-visible {
	outline: 2px solid var(--ui-fx-accent, var(--ui-brand-heading));
	outline-offset: 2px;
}

/* ExtJS error box: the OK button's focus ring sat outside the button and the toolbar clipped its top and
   bottom (two stray bars). Inset it. Outline only: no box change, nothing for ExtJS to measure. */
body.pl-devsite .x-message-box .x-btn.x-btn-focus,
body.pl-devsite .x-message-box .x-btn:focus-visible {
	outline-offset: -4px !important;
}

/* Card elevation (ui_base sets box-shadow:none on the card). */
body.pl-devsite .page-main .login-container {
	box-shadow: var(--ui-fx-shadow-1, 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -12px rgba(16, 24, 40, .14)) !important;
}

/* 'Se connecter': short paint transitions and a press on :active (ui_base section 1 removes both). */
body.pl-devsite .login-container form button {
	transition-property: color, background-color, border-color, box-shadow, transform !important;
	transition-duration: var(--ui-fx-dur-hover, .15s) !important;
	transition-timing-function: var(--ui-fx-ease-out, ease) !important;
}
body.pl-devsite .login-container form button:not(:disabled):active {
	transform: scale(var(--ui-fx-press-scale-wide, .98)) !important;
	transition-duration: var(--ui-fx-dur-press, .1s) !important;
}

/* Language picker: 36px target, frosted over the corner motif where backdrop-filter exists, solid otherwise. */
body.pl-devsite .lang-switcher .lang-select {
	min-height: 36px;
	padding: 6px 10px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	/* review 2026-10-08: no backdrop-filter on the <select> itself (it painted as a blank frosted box on
	   tablet / phone); a 90% white keeps the light see-through look over the motif */
	body.pl-devsite .lang-switcher .lang-select {
		background-color: rgba(255, 255, 255, .9);
	}
}
body.pl-devsite .lang-switcher .lang-select:hover {
	border-color: var(--ui-text-muted);
}
body.pl-devsite .lang-switcher .lang-select:focus-visible {
	outline: 2px solid var(--ui-fx-accent, var(--ui-brand-heading));
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	body.pl-devsite .login-container form button {
		transition: none !important;
	}
	body.pl-devsite .login-container form button:not(:disabled):active {
		transform: none !important;
		filter: brightness(.94);
	}
}
@media (prefers-reduced-transparency: reduce) {
	body.pl-devsite .lang-switcher .lang-select {
		background-color: var(--ui-surface);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}
/* ==== end UI POLISH 2026-10-08 (public-patient) ==== */
