/*
  Ecran de connexion Merlin - design 2026 - VAB 31/07/2026
  Feuille AUTONOME : chargee par login.php quel que soit le theme de l'instance,
  donc elle ne s'appuie sur aucun token de images/themes/<theme>/theme.css.
  Les valeurs ci-dessous sont celles du theme glass, recopiees volontairement
  pour que l'ecran s'affiche a l'identique chez un client reste en newdesign.
  Markup : login.php (le bloc lg*), seul ecran de connexion depuis le 10/08/2026.
*/

/* la fonte du theme glass, chemin relatif a ce fichier (includes/css/) */
@font-face {
	font-family: 'Instrument Sans';
	src: url('../../images/themes/glass/fonts/InstrumentSans-Variable.woff2') format('woff2-variations');
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

body.lgBody {
	/* tokens locaux : pas de :root, pour ne rien imposer si la page charge autre chose */
	--lg-accent: #6355e8;
	--lg-accent-hover: #4b3cc9;
	--lg-white: #ffffff;
	--lg-black: #16182c;
	--lg-text: #3f4358;
	--lg-grey: #6f7385;
	--lg-faint: #a3a8ba;
	--lg-line: #e2e4ec;
	--lg-chip-bg: #ecebf5;
	--lg-chip-fg: #312a5e;
	--lg-alert-bg: #fdeef5;
	--lg-alert-fg: #c01268;

	margin: 0;
	min-height: 100vh;
	font-family: 'Instrument Sans', 'Segoe UI', system-ui, Arial, sans-serif;
	color: var(--lg-black);
	-webkit-font-smoothing: antialiased;
	background:
		radial-gradient(52% 62% at 14% 8%, rgba(143,132,240,.30) 0%, rgba(143,132,240,0) 62%),
		linear-gradient(135deg, #2f2a63 0%, #4839bd 55%, #7768ee 100%);
	background-attachment: fixed;
}

.lgShell {
	display: grid;
	grid-template-columns: 1fr;
	align-content: center;
	min-height: 100vh;
	padding: 24px;
	box-sizing: border-box;
	position: relative;
	z-index: 0; /* contexte d'empilement : sinon les anneaux en z-index -1 passent sous le fond du body */
	overflow: hidden;
}
/* anneaux de verre : z-index -1 obligatoire, un pseudo-element positionne se peindrait SUR la carte */
.lgShell::before, .lgShell::after {
	content: "";
	position: fixed;
	z-index: -1;
	top: 50%;
	left: 50%;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,.13);
	pointer-events: none;
}
.lgShell::before {
	width: 1120px; height: 1120px;
	transform: translate(-58%, -50%);
	background: radial-gradient(circle at 62% 58%, rgba(255,255,255,.09) 0%, rgba(255,255,255,0) 60%);
}
.lgShell::after {
	width: 720px; height: 720px;
	transform: translate(-36%, -30%);
	border-color: rgba(255,255,255,.16);
	background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 58%);
}

.lgPanel { display: flex; align-items: center; justify-content: center; }

.lgCard {
	width: 100%;
	max-width: 420px;
	box-sizing: border-box;
	padding: 36px 36px 28px;
	border-radius: 20px;
	border: 1px solid rgba(255,255,255,.7);
	background: rgba(255,255,255,.93);
	-webkit-backdrop-filter: blur(20px) saturate(1.4);
	backdrop-filter: blur(20px) saturate(1.4);
	box-shadow: 0 30px 70px rgba(12,8,42,.42);
	display: flex;
	flex-direction: column;
}

.lgHead { text-align: center; margin-bottom: 26px; }
.lgLogo { height: 74px; width: auto; display: block; margin: 0 auto 16px; }
.lgApp {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -.01em;
	color: var(--lg-black);
}
.lgChip {
	display: inline-block;
	margin-top: 8px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	color: var(--lg-chip-fg);
	background: var(--lg-chip-bg);
}

.lgIntro {
	margin: 0 0 18px;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	color: var(--lg-black);
}
.lgAlert {
	margin: 0 0 18px;
	padding: 10px 12px;
	border-radius: 10px;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--lg-alert-fg);
	background: var(--lg-alert-bg);
}

/* le formulaire en colonne flex : en flux normal, la marge haute du bouton fusionne avec la
   marge basse du dernier champ (fusion des marges) et l'espace tombe de 24 a 14 px */
.lgCard form { display: flex; flex-direction: column; }
.lgField { margin-bottom: 14px; }
.lgLabel {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 500;
	color: var(--lg-text);
}
.lgLabelRow { display: flex; align-items: baseline; justify-content: space-between; }
.lgMini { font-size: 12px; font-weight: 500; color: var(--lg-accent); text-decoration: none; }
.lgMini:hover { text-decoration: underline; }

.lgCard input[type="text"],
.lgCard input[type="password"],
.lgCard select {
	width: 100%;
	height: 40px;
	box-sizing: border-box;
	border-radius: 10px;
	border: 1px solid var(--lg-line);
	background: var(--lg-white);
	font-family: inherit;
	font-size: 13px;
	color: var(--lg-black);
	padding: 0 12px;
}
/* meme chevron que l'ERP, en SVG inline (la feuille du theme n'est pas chargee) */
.lgCard select {
	padding-right: 30px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236355e8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}
.lgCard input[type="text"]:focus,
.lgCard input[type="password"]:focus,
.lgCard select:focus {
	outline: none;
	border-color: var(--lg-accent);
	box-shadow: 0 0 0 3px rgba(99,85,232,.16);
}

/* boutons : styles en propre, la feuille du theme n'est pas chargee ici */
.lgCard button.connect, .lgCard a.connect,
.lgCard button.button, .lgCard a.button {
	display: block;
	width: 100%;
	height: 42px;
	margin: 10px 0 0;
	padding: 0;
	box-sizing: border-box;
	border: none;
	border-radius: 12px;
	background-color: var(--lg-accent);
	box-shadow: 0 4px 12px rgba(99,85,232,.28);
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--lg-white);
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease;
}
.lgCard button.connect:hover, .lgCard a.connect:hover,
.lgCard button.button:hover, .lgCard a.button:hover { background-color: var(--lg-accent-hover); }

.lgHelp { margin: 20px 0 0; text-align: center; font-size: 12px; color: var(--lg-grey); }
.lgHelp a { color: var(--lg-grey); text-decoration: none; }
.lgHelp a:hover { color: var(--lg-accent); text-decoration: underline; }
.lgSep { color: var(--lg-faint); padding: 0 4px; }
/* l'IP : meme taille et meme couleur que le lien de support, mais inerte */
.lgIp { color: var(--lg-grey); cursor: help; }

.lgSign {
	position: fixed;
	left: 0; right: 0; bottom: 22px;
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(255,255,255,.45);
}
.lgSign a { color: inherit; text-decoration: none; }
.lgSign a:hover { color: rgba(255,255,255,.75); text-decoration: underline; }
.lgSign .lgSep { color: rgba(255,255,255,.30); padding: 0 8px; }

@media (max-width: 560px) {
	.lgShell { padding: 16px; }
	.lgCard { padding: 28px 22px 22px; }
	.lgSign { display: none; }
}
