/* Page de CONNEXION (index.html) : carte centrée propre à cet écran. Chargée APRÈS le catalogue gaya-elements.css (variables).
   Couleurs du client : variables du catalogue (--brand, --brand-dark). */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f0eb;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* M3 recette HADÈS (18/11/2026) : marges qui suivent la largeur, la page ne déborde jamais (195 px compris) */
  padding: clamp(8px, 4vw, 24px);
}
.login-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
  padding: clamp(24px, 9vw, 48px) clamp(14px, 7vw, 40px) clamp(20px, 8vw, 40px);
  width: 100%;
  max-width: 420px;
  min-width: 0;
  border-top: 4px solid var(--brand);
}
.login-title {
  text-align: center;
  font-size: clamp(17px, 7.5vw, 30px);   /* M3 : le titre suit la largeur (« Environnement » tient entier dès 195 px) */
  overflow-wrap: anywhere;              /* « Environnement » peut se couper plutôt que sortir de la carte */
  margin-bottom: 8px;
  letter-spacing: clamp(0px, 0.4vw, 2px);
  font-weight: 700;
  color: var(--brand);
}
.login-subtitle {
  text-align: center;
  color: #888;
  font-size: 13px;
  margin-bottom: 36px;
  line-height: 1.5;
}
.login-subtitle em {
  font-style: normal;
  color: #636363;
  font-weight: 500;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}
.input-wrapper { position: relative; }
.form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 15px;
  color: #333;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  min-width: 0;
  text-overflow: ellipsis;
}
/* M3 : l'œil du mot de passe ne recouvre plus l'indication ni la saisie */
.form-group input#password { padding-right: 46px; }
.form-group input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(59, 90, 20, 0.12);
  background: white;
}
.form-group input::placeholder { color: #bbb; }
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #999;
  font-size: 18px;
  line-height: 1;
  transition: color 0.2s;
}
.password-toggle:hover { color: #666; }
.password-toggle svg { width: 20px; height: 20px; display: block; }
/* Ordinateur partagé (18/11/2026) : rien n'est gardé une fois l'onglet fermé */
.case-partage { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: #555; margin: 4px 0 14px; line-height: 1.4; cursor: pointer; }
.case-partage input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; accent-color: var(--brand); cursor: pointer; }
.btn-login {
  width: 100%;
  padding: 13px;
  background: var(--brand);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 8px;
  letter-spacing: 0.3px;
  min-width: 0;            /* M3 : le texte du bouton passe à la ligne au lieu d'être coupé */
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.btn-login:hover { background: var(--brand-dark); }
.btn-login:active { transform: scale(0.98); }
.btn-login:disabled { background: #ccc; cursor: not-allowed; transform: none; }
.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 8px;
}
.error-message.visible { display: flex; }
.error-icon { flex-shrink: 0; width: 16px; height: 16px; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}
.shake { animation: shake 0.5s ease-in-out; }
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.footer {
  text-align: center;
  margin-top: 24px;
  font-size: 11px;
  color: #6b6b6b;          /* contraste ≥ 4,5:1 sur fond blanc (M3) */
  letter-spacing: 0.3px;
  overflow-wrap: anywhere;
}
.footer .mention-suivi { display: inline-block; margin-top: 6px; font-size: 11.5px; color: #595959; line-height: 1.5; }   /* 7:1 sur blanc */
.footer .accent {
  color: var(--brand);
  font-weight: 600;
}
