@font-face { font-family: "Amaranth"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/static/fonts/amaranth-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Amaranth"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("/static/fonts/amaranth-latin-700-normal.woff2") format("woff2"); }

:root {
  --page: #c4c4c4;
  --card: #d9d9d9;
  --navy: #042c5f;
  --gold: #b99447;      /* or de la maquette, légèrement assombri pour la lisibilité du texte blanc */
  --gold-dark: #a07f38;
  --ink: #111;
  --muted: #444;
  --danger: #9b1c1c;
  --font: "Amaranth", "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--page);
  color: var(--ink);
  font: 400 1.25rem/1.4 var(--font);
}

/* En-tête : logo à gauche, titre centré */
.top { position: relative; padding: 24px 16px 28px; }
.logo { position: absolute; top: 12px; left: 12px; width: 76px; height: 76px; border-radius: 50%; }
h1 { margin: 0; text-align: center; color: var(--navy); font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: 1.2; font-weight: 700; }

/* Carte */
.card {
  justify-self: center;
  align-self: start;
  width: min(700px, calc(100% - 32px));
  padding: 40px 56px 44px 30px;
  background: var(--card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 8px 24px rgba(0, 0, 0, .08);
}

.field { margin-bottom: 40px; }
label { display: block; font-size: 1.65rem; line-height: 1.2; }
.field__row { display: flex; align-items: flex-end; }

input[type="text"], input[type="password"] {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 52px;
  padding: 6px 2px 4px;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  border-radius: 0;
  transition: border-color .15s, box-shadow .15s;
}
input[type="text"]:focus, input[type="password"]:focus {
  outline: none;
  border-bottom-color: var(--navy);
  box-shadow: 0 2px 0 var(--navy);
}

.eye {
  flex: none;
  width: 72px;
  height: 40px;
  margin-left: 0;
  display: grid;
  place-items: center;
  color: #000;
  background: var(--gold);
  border: 0;
  cursor: pointer;
  transition: background-color .15s;
}
.eye:hover { background: var(--gold-dark); }

.hint { margin: 6px 0 0; font-size: .95rem; color: var(--muted); }

/* Case à cocher */
.check { display: flex; align-items: center; gap: 12px; width: fit-content; margin: 0 0 44px; font-size: 1.65rem; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none;
  flex: none;
  width: 40px; height: 40px; margin: 0;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}
.check input::after {
  content: "";
  width: 20px; height: 11px;
  border-left: 4px solid var(--navy); border-bottom: 4px solid var(--navy);
  transform: translateY(-2px) rotate(-45deg) scale(0);
  transition: transform .12s;
}
.check input:checked::after { transform: translateY(-2px) rotate(-45deg) scale(1); }

.alert { margin: 0 0 18px; color: var(--danger); font-size: 1.1rem; }

.actions { display: flex; justify-content: flex-end; }
.submit {
  min-width: 145px;
  height: 52px;
  padding: 0 22px;
  font: 400 1.65rem/1 var(--font);
  color: #fff;
  background: var(--gold);
  border: 0;
  box-shadow: 0 3px 4px rgba(0, 0, 0, .25);
  cursor: pointer;
  transition: background-color .15s, transform .05s;
}
.submit:hover { background: var(--gold-dark); }
.submit:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.submit:disabled { opacity: .7; cursor: progress; }

.foot { padding: 24px 20px 16px; text-align: right; color: var(--navy); font-weight: 400; font-size: 1.35rem; }

.welcome { margin: 0 0 4px; font-size: 1.9rem; }
.muted { margin: 0 0 20px; color: var(--muted); }

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

@media (max-width: 600px) {
  .logo { width: 52px; height: 52px; top: 10px; left: 10px; }
  .top { padding-top: 22px; }
  .card { padding: 26px 20px; }
  label, .check { font-size: 1.4rem; }
  .eye { width: 60px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
