/* Pages de connexion et de réinitialisation. */
:root {
  --primary: #6c63ff;
  --primary-dark: #574fd6;
  --primary-light: #ede9ff;
  --bg: #f5f7fa;
  --texte: #2d3748;
  --doux: #718096;
  --bord: #e2e8f0;
  --erreur: #c53030;
  --succes: #276749;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Nunito', system-ui, 'Segoe UI', sans-serif;
  background: linear-gradient(150deg, #ede9ff 0%, var(--bg) 45%, #e6f6ff 100%);
  color: var(--texte);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.carte {
  background: #fff;
  width: 100%;
  max-width: 420px;
  border-radius: 18px;
  padding: 36px 34px 30px;
  box-shadow: 0 18px 48px rgba(45, 55, 72, 0.12);
}

.marque {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 14px;
}

h1 {
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.sous-titre {
  color: var(--doux);
  font-size: 0.95rem;
  margin-bottom: 26px;
  line-height: 1.5;
}

label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: #4a5568;
}

.champ { margin-bottom: 18px; }

input[type=email],
input[type=password],
input[type=text] {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--bord);
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: #fff;
  color: var(--texte);
}

input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.champ-mdp { position: relative; }
.champ-mdp input { padding-right: 52px; }
.voir-mdp {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 8px;
  border-radius: 8px;
  line-height: 1;
}
.voir-mdp:hover { background: var(--bg); }

button.principal {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
button.principal:hover:not(:disabled) { background: var(--primary-dark); }
button.principal:active:not(:disabled) { transform: translateY(1px); }
button.principal:disabled { opacity: 0.6; cursor: progress; }

.liens {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9rem;
}
.liens a { color: var(--primary); text-decoration: none; font-weight: 700; }
.liens a:hover { text-decoration: underline; }

.message {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  line-height: 1.45;
  display: none;
}
.message.visible { display: block; }
.message.erreur { background: #fff5f5; color: var(--erreur); border: 1px solid #feb2b2; }
.message.succes { background: #f0fff4; color: var(--succes); border: 1px solid #9ae6b4; }
.message.info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #c3bcff; }

.aide {
  font-size: 0.8rem;
  color: var(--doux);
  margin-top: 6px;
}

@media (max-width: 480px) {
  .carte { padding: 28px 22px 24px; border-radius: 14px; }
}
