/* Courtier IA — pages d'authentification (Connexion, Mot de passe oublié, Activation, Réinitialisation)
   Réutilise les jetons de design du site (css/styles.css) + reproduit fidèlement le split-panel
   du login dans les maquettes Claude Design (panneau gauche marine, formulaire droit centré). */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font, "DM Sans", system-ui, sans-serif);
  /* Même fond que l'application (voir app/index.html, --bg) : la carte de
     connexion se détache du fond au lieu de flotter sur du blanc cassé. */
  background: #e9eef5;
  color: var(--text, #0f172a);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-left {
  background: var(--navy, #0f2744);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

.auth-left .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-left .brand img {
  height: 62.5px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

.auth-left .headline {
  font-size: 28px;
  line-height: 1.28;
  font-weight: 500;
  max-width: 420px;
}

.auth-left .headline .ser {
  font-family: var(--font-display, "Instrument Serif", serif);
  font-style: italic;
  font-weight: 400;
  color: #5eead4;
}

.auth-left .body-copy {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  max-width: 420px;
}

.auth-left .footer-copy {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.4);
}

.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.auth-card {
  width: 100%;
  max-width: 360px;
}

.auth-lang-toggle {
  display: inline-flex;
  border: 1px solid #d6dfea;
  border-radius: 999px;
  padding: 3px;
  margin-bottom: 28px;
  font-size: 11.5px;
  font-weight: 600;
}

.auth-lang-toggle a {
  padding: 5px 12px;
  border-radius: 999px;
  color: #64748b;
  text-decoration: none;
}

.auth-lang-toggle a.active {
  background: var(--navy, #0f2744);
  color: #fff;
}

.auth-card h1 {
  font-size: 21px;
  font-weight: 600;
  margin: 0 0 6px 0;
}

.auth-card .subtitle {
  font-size: 12.5px;
  color: #64748b;
  margin: 0 0 26px 0;
  line-height: 1.5;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475b73;
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  background: #fff;
  border: 1px solid #d6dfea;
  border-radius: 8px;
  padding: 11px 12px;
  font: 400 13px "DM Sans", sans-serif;
  color: #0f172a;
}

.auth-field input::placeholder { color: #94a3b8; }

.auth-field input:focus {
  outline: none;
  border-color: var(--teal, #0d9488);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

/* ---------- Afficher / masquer le mot de passe ---------- */
/* Le bouton se superpose au champ ; le padding droit de l'input l'empêche
   de recouvrir le texte saisi. */
/* display:flex plutôt que block — supprime l'espace de ligne sous un input
   inline, sinon le centre du conteneur est décalé de 3-4 px vers le bas. */
.pw-wrap { position: relative; display: flex; }

.pw-wrap input { flex: 1; min-width: 0; padding-right: 42px; }

.pw-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: none;
  color: #94a3b8;
  cursor: pointer;
}

.pw-eye:hover { color: var(--teal, #0d9488); background: #f1f5f9; }

.pw-eye:focus-visible {
  outline: none;
  color: var(--teal, #0d9488);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.pw-eye svg { width: 17px; height: 17px; }

/* Un seul des deux SVG est visible, selon l'état du bouton. */
.pw-eye .eye-off { display: none; }
.pw-eye[aria-pressed="true"] .eye-on { display: none; }
.pw-eye[aria-pressed="true"] .eye-off { display: block; }

/* Edge/IE ajoutent leur propre œil natif : on garde uniquement le nôtre. */
.pw-wrap input::-ms-reveal,
.pw-wrap input::-ms-clear { display: none; }

.auth-pb {
  width: 100%;
  background: var(--teal, #0d9488);
  color: #fff;
  font: 600 13.5px "DM Sans", sans-serif;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  margin-top: 6px;
  transition: background 0.15s var(--ease, ease);
}

.auth-pb:hover { background: var(--teal-bright, #0f766e); }
.auth-pb:disabled { opacity: 0.55; cursor: default; }

.auth-link-row {
  text-align: center;
  margin-top: 16px;
}

.auth-link-row a {
  color: var(--teal, #0d9488);
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
}

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

.auth-divider {
  border: none;
  border-top: 1px solid #eef2f7;
  margin: 22px 0;
}

.auth-notice {
  background: #fffdf9;
  border: 1px solid #f0e0c8;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 11.5px;
  line-height: 1.55;
  color: #64748b;
}

.auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 16px;
  display: none;
}

.auth-error.show { display: block; }

.auth-success {
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #0f766e;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 12.5px;
  line-height: 1.5;
  margin-bottom: 16px;
  display: none;
}

.auth-success.show { display: block; }

.auth-legal-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 11px;
  color: #94a3b8;
}

.auth-legal-footer a {
  color: #94a3b8;
  text-decoration: none;
}

.auth-legal-footer a:hover { text-decoration: underline; color: #64748b; }

.auth-legal-footer span { margin: 0 8px; }

.auth-legal-copyright {
  margin-top: 6px;
}

.auth-back-home {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 12px;
  color: #64748b;
  text-decoration: none;
}

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 32px 20px; }
}
