@import url('assets/fonts/fonts.css');
*
{
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Quicksand', sans-serif;
}

body 
{
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	background: #000;
}

section 
{
	position: absolute;
	width: 100vw;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 2px;
	flex-wrap: wrap;
	overflow: hidden;
}

section::before 
{
	content: '';
	position: absolute;
	width: 100%;
	height: 100%;
	background: linear-gradient(#000,#0f0,#000);
	animation: animate 5s linear infinite;
}

@keyframes animate 
{
	0%
	{
		transform: translateY(-100%);
	}
	100%
	{
		transform: translateY(100%);
	}
}
section span 
{
	position: relative;
	display: block;
	width: calc(6.25vw - 2px);
	height: calc(6.25vw - 2px);
	background: #181818;
	z-index: 2;
	transition: 1.5s;
}
section span:hover 
{
	background: #0f0;
	transition: 0s;
}

section .signin
{
	position: absolute;
	width: 400px;
    background: #222;  
	z-index: 1000;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 40px;
	border-radius: 4px;
	box-shadow: 0 15px 35px rgba(0,0,0,9);
}
section .signin .content 
{
	position: relative;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	gap: 18px;
}
section .signin .content h2 
{
	font-size: 2em;
	color: #0f0;
	text-transform: uppercase;
}
section .signin .content .form 
{
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 25px;
}
section .signin .content .form .inputBox
{
	position: relative;
	width: 100%;
}
section .signin .content .form .inputBox input 
{
	position: relative;
	width: 100%;
	background: #333;
	border: none;
	outline: none;
	padding: 25px 10px 7.5px;
	border-radius: 4px;
	color: #fff;
	font-weight: 500;
	font-size: 1em;
}
section .signin .content .form .inputBox i 
{
	position: absolute;
	left: 0;
	padding: 15px 10px;
	font-style: normal;
	color: #aaa;
	transition: 0.5s;
	pointer-events: none;
}
.signin .content .form .inputBox input:focus ~ i,
.signin .content .form .inputBox input:valid ~ i
{
	transform: translateY(-7.5px);
	font-size: 0.8em;
	color: #fff;
}
.signin .content .form .links 
{
	position: relative;
	width: 100%;
	display: flex;
	justify-content: space-between;
}
.signin .content .form .links a 
{
	color: #fff;
	text-decoration: none;
}
.signin .content .form .links a:nth-child(2)
{
	color: #0f0;
	font-weight: 600;
}
.signin .content .form .inputBox input[type="submit"]
{
	padding: 10px;
	background: #0f0;
	color: #000;
	font-weight: 600;
	font-size: 1.35em;
	letter-spacing: 0.05em;
	cursor: pointer;
}
input[type="submit"]:active
{
	opacity: 0.6;
}
@media (max-width: 900px)
{
	section span 
	{
		width: calc(10vw - 2px);
		height: calc(10vw - 2px);
	}
}
@media (max-width: 600px)
{
	section span 
	{
		width: calc(20vw - 2px);
		height: calc(20vw - 2px);
	}
}


/* --- Bouton afficher/masquer + hint --- */
.password-box { position: relative; }
.password-box input { padding-right: 44px; } /* place pour le bouton */

.toggle-password{
  position:absolute; right:8px; top:50%; transform:translateY(-50%);
  width:34px; height:34px; display:grid; place-items:center;
  border:0; border-radius:6px; background:transparent; cursor:pointer;
  transition: background .15s, transform .06s;
}
.toggle-password svg{ fill:#0f0; opacity:.85; }
.toggle-password:hover{ background:rgba(15,255,15,.12); }
.toggle-password:active{ transform:translateY(-50%) scale(.98); }
.toggle-password:focus-visible{ outline:2px solid rgba(15,255,15,.35); outline-offset:2px; }

.password-box .hint{
  position:absolute; right:48px; bottom:-18px;
  font-size:12px; color:#aaa;
}
.hint[hidden]{ display:none; }

/* --- Message d'erreur (optionnel) --- */
.error{
  margin-top: -10px;
  color: #ff6b6b;
  font-size: 14px;
}
.error[hidden]{ display:none; }

.status{
  margin-top: -10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(95, 201, 126, 0.35);
  background: rgba(35, 90, 48, 0.25);
  color: #dff7e3;
  font-size: 14px;
  line-height: 1.45;
}
.status[hidden]{ display:none; }

/* --- Ã‰tat erreur sur un champ (optionnel: .inputBox[data-invalid="true"]) --- */
.inputBox[data-invalid="true"] input{
  box-shadow: 0 0 0 2px rgba(255,107,107,.35);
}

/* --- Ã‰tat chargement sur le formulaire (optionnel: .form[aria-busy="true"]) --- */
section .signin .content .form[aria-busy="true"]{
  opacity:.7; pointer-events:none;
}


/* ============ Labels propres ============ */
section .signin .content .form .inputBox { display: grid; gap: 8px; }
section .signin .content .form .inputBox label{
  color:#9ad69f;            /* vert doux */
  font-size: 0.95rem;
  margin-bottom: 2px;
}

/* ============ Champs ============ */
section .signin .content .form .inputBox input{
  background:#333;          /* ta couleur d'origine */
  color:#fff;
  border:1px solid rgba(0,255,0,.20);
  border-radius:10px;
  padding:14px 14px;
  outline:none;
  transition:border-color .18s, box-shadow .18s, background .2s;
}
section .signin .content .form .inputBox input::placeholder{ color:#b6c2b8; }
section .signin .content .form .inputBox input:focus{
  border-color:#0f0;
  box-shadow:0 0 0 3px rgba(0,255,0,.16), inset 0 0 10px rgba(0,255,140,.08);
}

/* ============ Mot de passe + Å“il ============ */
.password-box .field{ position: relative; }
.password-box input{ padding-right: 48px; } /* place pour lâ€™Å“il */

.toggle-password{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  width:36px; height:36px; display:grid; place-items:center;
  border:0; border-radius:8px; background:transparent;
  cursor:pointer;
  transition: background .15s, transform .06s, opacity .15s;
}
.toggle-password svg{ fill:#0f0; opacity:.9; }
.toggle-password:hover{ background:rgba(0,255,0,.12); }
.toggle-password:active{ transform:translateY(-50%) scale(.98); }
.toggle-password:focus-visible{ outline:2px solid rgba(0,255,0,.35); outline-offset:2px; }

/* Hint CapsLock */
.password-box .hint{
  margin-top: 4px;
  font-size:12px; color:#a9a9a9;
}
.hint[hidden]{ display:none; }

/* ============ Bouton Se connecter ============ */
#loginButton.cta{
  display:inline-flex; align-items:center; justify-content:center;
  width:100%; padding:12px 16px;
  border:0; border-radius:12px; cursor:pointer;
  background:#0f0;                 /* conserve ta couleur */
  color:#081108; font-weight:700; letter-spacing:.3px;
  box-shadow:
    0 10px 24px rgba(0,255,100,.25),
    inset 0 -2px 0 rgba(0,0,0,.15),
    inset 0 0 0 1px rgba(0,0,0,.08);
  transition: filter .15s, transform .06s, box-shadow .15s;
}
#loginButton.cta:hover{ filter:brightness(1.05); }
#loginButton.cta:active{ transform: translateY(1px); }
#loginButton.cta:focus-visible{ outline:2px solid rgba(0,255,0,.35); outline-offset:2px; }

/* ============ Carte (lÃ©gÃ¨re retouche) ============ */
section .signin{
  background: rgba(34,34,34,.85);
  backdrop-filter: blur(8px) saturate(110%);
  -webkit-backdrop-filter: blur(8px) saturate(110%);
  border:1px solid rgba(0,255,0,.12);
  border-radius:14px;
  box-shadow:
    0 16px 36px rgba(0,0,0,.45),
    inset 0 0 0 1px rgba(0,255,0,.06);
  padding: 32px 28px;
}

/* ============ Erreur ============ */
.error{ color:#ff6b6b; font-size:14px; margin-top: -6px; }
.inputBox[data-invalid="true"] input{
  border-color:#ff6b6b;
  box-shadow:0 0 0 3px rgba(255,107,107,.18);
}

.register-link {
  margin-top: 14px;
  text-align: center;
  font-size: 0.95rem;
  color: #b6c2b8; /* gris clair lisible */
}

.register-link a {
  color: #0f0; /* vert nÃ©on */
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.register-link a:hover {
  color: #7dff8c; /* vert plus clair au hover */
  text-shadow: 0 0 6px rgba(0, 255, 0, 0.6);
}




/* cache VRAIMENT tout Ã©lÃ©ment avec lâ€™attribut hidden */
[hidden] { display: none !important; }

#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  display: flex;            /* OK : sera neutralisÃ© par [hidden] */
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.spinner {
  border: 5px solid #ccc;
  border-top: 5px solid #0f0;
  border-radius: 50%;
  width: 50px; height: 50px;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
