/* =========================================================
   Ma Bank — page de connexion
   Palette : encre marine + rouge signal, sur fond clair
   ========================================================= */

:root {
  --navy: #d2b48c;
  --navy-soft: #ddc4a0;
  --ink: #12151c;
  --muted: #6b7280;
  --paper: #f5f6f8;
  --white: #ffffff;
  --red: #c70039;
  --red-dark: #96002c;
  --border: #e4e7eb;
  --radius: 10px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Libre Franklin", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.page {
  display: flex;
  min-height: 100vh;
}

/* ---------- Panneau de marque ---------- */

.brand {
  position: relative;
  flex: 0 0 42%;
  max-width: 560px;
  display: flex;
  align-items: center;
  padding: 8vh 8%;
  background: var(--navy);
  color: var(--ink);
  overflow: hidden;
}

.brand__pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.brand__content {
  position: relative;
  z-index: 1;
}

.brand__logo-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 22px;
  text-decoration: none;
}

.brand__logo-img {
  display: block;
  height: clamp(88px, 11vw, 128px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.brand__logo-text {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.brand__tagline {
  max-width: 30ch;
  font-size: 17px;
  line-height: 1.65;
  color: rgba(18, 21, 28, 0.72);
}

/* ---------- Panneau formulaire ---------- */

.auth {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 8%;
  background: var(--paper);
}

.auth__form {
  width: 100%;
  max-width: 380px;
}

.auth__form h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
}

.auth__subtitle {
  margin: 0 0 26px;
  font-size: 15px;
  color: var(--muted);
}

.auth__message {
  min-height: 20px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--red);
}

.auth__message:empty {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field input {
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: #a7acb5;
}

.field input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(210, 180, 140, 0.35);
}

.btn {
  width: 100%;
  margin-top: 8px;
  padding: 13px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  background: var(--red);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.btn:hover {
  background: var(--red-dark);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
}

.auth__footer-link {
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.auth__footer-link a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

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

/* ---------- Pied de page ---------- */

.site-footer {
  padding: 18px;
  font-size: 12px;
  text-align: center;
  color: var(--muted);
  background: var(--white);
  border-top: 1px solid var(--border);
}

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .page {
    flex-direction: column;
  }

  .brand {
    flex: none;
    max-width: none;
    width: 100%;
    padding: 7vh 8% 6vh;
  }

  .brand__tagline {
    max-width: 46ch;
  }

  .auth {
    padding: 6vh 8%;
  }
}

@media (max-width: 420px) {
  .brand {
    padding: 6vh 7% 5vh;
  }

  .brand__logo-link {
    margin-bottom: 12px;
  }

  .brand__logo-img {
    height: 76px;
  }

  .brand__logo-text {
    font-size: 26px;
  }

  .brand__tagline {
    font-size: 15px;
  }

  .auth {
    padding: 5vh 6%;
  }

  .auth__form h1 {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
