/* Pages d'authentification (connexion, mot de passe oublié, réinitialisation) — charte Misy v1.
   Carte centrée : logo, champs soulignés, bouton rond rouge. */
@font-face {
  font-family: 'Outfit';
  src: url("../fonts/Outfit-Variable.ttf") format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --rouge: #FC5F4E; --rouge-profond: #C73E2D; --rouge-voile: #FFEDEA;
  --encre: #2A2D31; --encre-douce: #B4B8BE;
  --vert: #0F6E66; --menthe-voile: #E8FBF3;
  --papier: #F7F8F8; --carte: #FFFFFF; --doux: #EEF1F1; --filet: #E4E7E8; --muet: #5F6B6E;
  --ombre: 0 8px 24px rgba(42, 45, 49, .08);
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 24px 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--papier);
  color: var(--encre);
  font-family: 'Outfit', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  min-height: 560px;
  background: var(--carte);
  border-radius: 20px;
  box-shadow: var(--ombre);
  padding: 56px 40px 40px;
  box-sizing: border-box;
  /* contenu centré verticalement dans une carte plus haute */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card > form { width: 100%; }

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
}

.auth-logo img {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.auth-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-align: center;
}

.auth-subtitle {
  margin: 0 0 28px;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--muet);
  text-align: center;
}

.auth-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1.5px solid var(--filet);
  margin-bottom: 20px;
  padding-bottom: 6px;
  transition: border-color .15s ease;
}

.auth-row:focus-within { border-bottom-color: var(--rouge); }

.auth-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font: 400 16px 'Outfit', 'Helvetica Neue', Arial, sans-serif;
  padding: 12px 0;
  color: var(--encre);
}

.auth-input::placeholder { color: var(--encre-douce); }

.auth-input[readonly], .auth-input:disabled { color: var(--muet); }

.auth-button {
  border: none;
  border-radius: 12px;
  height: 48px;
  padding: 0 24px;
  font: 500 15px 'Outfit', 'Helvetica Neue', Arial, sans-serif;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
}

.auth-button.icon-only {
  width: 48px;
  padding: 0;
  border-radius: 50%;
}

.auth-button.block { width: 100%; }

.auth-arrow { font-size: 22px; line-height: 1; }

.auth-button:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(252, 95, 78, .3); }

.auth-button.secondary { background: var(--doux); color: var(--encre); }

.auth-button.secondary:hover { background: var(--filet); }

.auth-button.primary { background: var(--rouge); color: #FFFFFF; }

.auth-button.primary:hover { background: var(--rouge-profond); }

.auth-button[disabled] { opacity: .7; cursor: progress; }

/* Bouton d'action principal (CTA) : rouge corail pleine largeur, sous les champs */
.auth-cta { margin: 8px 0 16px; }
.auth-row + .auth-cta, .auth-error + .auth-cta { margin-top: 12px; }

.auth-link {
  display: block;
  margin-top: 8px;
  text-align: center;
  color: var(--rouge-profond);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.auth-link:hover { text-decoration: underline; }

.auth-password-row { display: none; }
.auth-password-row.active { display: flex; }

.auth-error { margin: -12px 0 16px; font-size: 13px; color: var(--rouge-profond); }

.notice {
  margin-bottom: 24px;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.45;
}

.notice--error { background: var(--rouge-voile); color: var(--rouge-profond); }

.notice--success { background: var(--menthe-voile); color: var(--vert); }

/* Messages renvoyés en HTML par le contrôleur (<div class="alert …">, <ul class="alert …">) */
.notice .alert, .notice ul { margin: 0; padding: 0; background: none; border: 0; color: inherit; }
.notice ul { padding-left: 18px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

@media (max-width: 480px) {
  .auth-card { min-height: 0; padding: 40px 24px 32px; }
}
