/* =====================================================================
 * workplace/log-in/log-in-verre.css — CONNEXION DE L'ESPACE SALARIÉS EN VERRE (9.2)
 * ---------------------------------------------------------------------
 * Renaud, 14 nov. 2026 21h05 : « le login du workplace peut-il ressembler à celui du Dashboard ? »
 * Copie de dashboard/log/login.css (piste C, écran de verrouillage : heure, logo rond, champs en verre), avec :
 *   - le fond Nuit douce écrit ici (le Workplace n'a pas de fenêtre Thème) ;
 *   - la flèche d'envoi en ORANGE CHANTIER, comme l'icône de l'espace salariés ;
 *   - « Espace salariés » sous le logo, « Retour au site » en bas à la place de « Quitter ».
 * Sert aussi aux pages « Mot de passe oublié » et « Nouveau mot de passe » (mdp_gabarit.php).
 * ===================================================================== */
:root {
	--lg-nuit: #1B1D1C;
	--lg-halos:
		radial-gradient(50vw 60vh at 20% 25%, rgba(60,105,82,.38), rgba(60,105,82,0) 72%),
		radial-gradient(52vw 62vh at 82% 80%, rgba(130,100,70,.32), rgba(130,100,70,0) 72%),
		radial-gradient(36vw 42vh at 78% 15%, rgba(70,90,115,.22), rgba(70,90,115,0) 72%);
	--lg-menu: linear-gradient(transparent, transparent);
	--lg-verre: rgba(255,255,255,.16);
	--lg-verre-fort: rgba(255,255,255,.24);
	--lg-verre-bord: rgba(255,255,255,.22);
	--lg-blanc-doux: rgba(255,255,255,.75);
	--lg-orange: oklch(.66 .15 52);                /* orange chantier de l'icône du Workplace */
	--lg-reflet: linear-gradient(rgba(255,255,255,.22), rgba(0,0,0,.06));
	--lg-logo: 150px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
	margin: 0;
	padding: 0;
	min-height: 100%;
	font-family: "Lato", sans-serif;
	font-size: 16px;
	color: #FFFFFF;
	background: var(--lg-nuit);
}
body { min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }

/* ---------- fond ---------- */
.lg_fond {
	position: fixed;
	inset: 0;
	z-index: 0;
	background: var(--lg-menu), var(--lg-halos), var(--lg-nuit);
}

/* ---------- date et heure ---------- */
.lg_heure {
	position: fixed;
	top: 9vh;
	left: 0;
	right: 0;
	z-index: 1;
	text-align: center;
	pointer-events: none;
	transition: opacity .35s ease;
	animation: lg_apparition .6s ease-out backwards;
}
.lg_date { font-size: 19px; font-weight: 700; opacity: .85; }
.lg_hm { font-size: clamp(64px, 11vw, 96px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }

/* ---------- formulaire ---------- */
.lg_page {
	position: relative;
	z-index: 2;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 34vh 16px 120px;   /* sous l'heure, au-dessus de « Quitter » */
}
.lg_cadre {
	width: 100%;
	max-width: 320px;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.lg_logo {
	width: var(--lg-logo);
	height: var(--lg-logo);
	border-radius: 50%;
	overflow: hidden;
	background: #FFFFFF;
	box-shadow: 0 4px 18px rgba(0,0,0,.35);
	transition: opacity .45s ease, transform .45s ease;
	animation: lg_apparition .5s ease-out backwards;
}
.lg_logo img { display: block; width: 100%; height: 100%; }
.lg_logo { position: fixed; left: calc(50% - var(--lg-logo) / 2); top: 34vh; z-index: 1; }
/* plus de nom sous le logo ; logo centré entre l'heure et le champ Identifiant
   (top recalculé par placerLogo() de log/tools.js ; 34vh en attendant) */
.lg_corps {
	width: 260px;
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: opacity .35s ease, transform .35s ease;
	animation: lg_apparition .5s ease-out .05s backwards;
}
.lg_cache {   /* étiquette pour les lecteurs d'écran seulement */
	position: absolute;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.login_ipt {
	width: 260px;
	height: 38px;
	margin: 0 0 10px;
	padding: 0 16px;
	font: inherit;
	font-size: 15px;
	color: #FFFFFF;
	background: var(--lg-verre);
	border: 1px solid var(--lg-verre-bord);
	border-radius: 19px;
	outline: none;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	transition: background .2s, border-color .2s;
}
.login_ipt::placeholder { color: rgba(255,255,255,.6); }
.login_ipt:focus { background: var(--lg-verre-fort); border-color: rgba(255,255,255,.55); }
/* remplissage automatique du navigateur : garder le verre (sinon fond jaune ou blanc) */
.login_ipt:-webkit-autofill {
	-webkit-text-fill-color: #FFFFFF;
	-webkit-box-shadow: 0 0 0 40px rgba(60,60,60,.95) inset;
	caret-color: #FFFFFF;
}
.lg_mdp { position: relative; width: 260px; }
.lg_mdp .login_ipt { padding-right: 78px; margin-bottom: 0; }
.lg_oeil, .lg_envoi {
	position: absolute;
	top: 4px;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	display: grid;
	place-items: center;
}
.lg_oeil { right: 40px; background: transparent; color: rgba(255,255,255,.6); }
.lg_oeil:hover, .lg_oeil[aria-pressed="true"] { color: #FFFFFF; }
.lg_envoi {
	right: 4px;
	color: #FFFFFF;
	background: var(--lg-orange) var(--lg-reflet);
	box-shadow: inset 0 -1px 0 rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.25);
	transition: filter .15s;
}
.lg_envoi:hover { filter: brightness(1.1); }
.lg_envoi:active { filter: brightness(.85); }
.lg_oeil svg, .lg_envoi svg, .lg_rond svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.lg_envoi svg { stroke-width: 2.2; }
/* pendant la vérification : la flèche devient un petit cercle qui tourne */
.lg_attente .lg_envoi { cursor: progress; }
.lg_attente .lg_envoi svg { display: none; }
.lg_attente .lg_envoi::after {
	content: "";
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 2.2px solid rgba(255,255,255,.35);
	border-top-color: #FFFFFF;
	animation: lg_tour .8s linear infinite;
}
.lg_oubli {
	margin-top: 14px;
	font-size: 13px;
	color: var(--lg-blanc-doux);
	text-decoration: none;
}
.lg_oubli:hover, .lg_oubli:focus { color: #FFFFFF; text-decoration: underline; }
.lg_erreur {
	width: 260px;
	margin: 10px 0 0;
	padding: 8px 14px;
	font-size: 13px;
	line-height: 1.4;
	text-align: center;
	color: #FFFFFF;
	background: rgba(200,41,29,.38);
	border: 1px solid rgba(255,130,120,.45);
	border-radius: 14px;
}
.lg_erreur[hidden] { display: none; }
.lg_corps.lg_secoue { animation: lg_secoue .4s ease; }
.lg_envoi:focus-visible, .lg_oeil:focus-visible, .lg_oubli:focus-visible, .lg_quitter:focus-visible .lg_rond {
	outline: 2px solid #FFFFFF;
	outline-offset: 2px;
}

/* ---------- Quitter (en bas) ---------- */
.lg_quitter {
	position: fixed;
	left: 50%;
	bottom: 5vh;
	z-index: 2;
	transform: translateX(-50%);
	padding: 0;
	border: 0;
	background: none;
	color: #FFFFFF;
	font: inherit;
	font-size: 12px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	opacity: .85;
	transition: opacity .35s ease;
}
.lg_quitter:hover { opacity: 1; }
.lg_rond {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--lg-verre);
	border: 1px solid var(--lg-verre-bord);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}
.lg_rond svg { width: 20px; height: 20px; stroke-width: 1.8; }

/* ---------- départ vers le Dashboard : tout s'efface, le fond reste ---------- */
.lg_part .lg_heure, .lg_part .lg_quitter { opacity: 0; }
.lg_part .lg_corps { opacity: 0; transform: translateY(10px); pointer-events: none; }
.lg_part .lg_logo { opacity: 0; transform: scale(1.25); }

@keyframes lg_apparition { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes lg_tour { to { transform: rotate(360deg); } }
@keyframes lg_secoue {
	20%, 60% { transform: translateX(-6px); }
	40%, 80% { transform: translateX(6px); }
}
/* écrans bas (téléphone couché, petit portable) : l'heure rapetisse, puis disparaît */
@media (max-height: 700px) {
	:root { --lg-logo: 138px; }
	.lg_heure { top: 5vh; }
	.lg_hm { font-size: 60px; }
	.lg_page { padding-top: 30vh; padding-bottom: 96px; }
}
@media (max-height: 520px) {
	.lg_heure { display: none; }
	.lg_page { padding-top: 16px; padding-bottom: 80px; }
	.lg_quitter { bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
	.lg_heure, .lg_logo, .lg_corps { animation: none; }
}

/* pas de bande de menu sur téléphone (le Dashboard mobile n'a pas de menu à gauche) */

/* ---------- propre à l'espace salariés ---------- */
.lg_marque { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--lg-blanc-doux); }
.lg_oubli + .lg_oubli { margin-top: 6px; }
.lg_version { position: fixed; right: 14px; bottom: 10px; z-index: 2; margin: 0; font-size: 11px; color: rgba(255,255,255,.4); }
.lg_info { width: 260px; margin: 0 0 12px; font-size: 13px; line-height: 1.45; text-align: center; color: var(--lg-blanc-doux); }

/* sur téléphone et tablette, champs à 16 px comme la connexion du Dashboard (en dessous, Safari zoome la page) */
@media (max-width: 1099px) { .login_ipt, .lg_page input, .lg_page select, .lg_page textarea { font-size: 16px; } }
