/* Mêmes valeurs que choosia-mobile/src/colors.ts : la page prolonge
   l'application, elle ne doit pas ressembler à un site tiers. */
@font-face {
  font-family: 'Fraunces';
  src: url('polices/Fraunces-SemiBold.ttf') format('truetype');
  font-weight: 600;
  /* Le texte s'affiche tout de suite dans la police de secours, puis bascule :
     sur un réseau lent, attendre la police laisserait la page vide. */
  font-display: swap;
}

:root {
  --grenat: #7a2333;
  --ivoire: #f7f1ec;
  --ebene: #211a17;
  --gris: #b8a8a2;
  --texte-doux: #756560;
  --blanc: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--ivoire);
  color: var(--ebene);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.carte {
  width: 100%;
  max-width: 400px;
  background: var(--blanc);
  border-radius: 16px;
  padding: 32px 24px;
  box-shadow: 0 1px 4px rgba(33, 26, 23, 0.08);
  text-align: center;
}

.logo { border-radius: 14px; }

.marque {
  margin: 8px 0 24px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--grenat);
}

h1 {
  margin: 0 0 8px;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 24px;
}

/* Jamais de gris clair pour du texte : l'application s'utilise dehors, en
   plein soleil — même règle que TEXTE_DOUX côté mobile (4,9:1 sur ivoire). */
.texte {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--texte-doux);
}

form { text-align: left; }

label {
  display: block;
  margin: 12px 0 6px;
  font-size: 14px;
  font-weight: 600;
}

input[type='password'],
input[type='text'] {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* En deçà, iOS zoome sur le champ au toucher. */
  border: 1px solid var(--gris);
  border-radius: 10px;
  background: var(--blanc);
  color: var(--ebene);
}

input:focus {
  outline: 2px solid var(--grenat);
  outline-offset: 1px;
  border-color: var(--grenat);
}

.afficher {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  color: var(--texte-doux);
}

.erreur {
  min-height: 1.4em;
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--grenat);
}

button {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--ivoire);
  background: var(--grenat);
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

button:disabled { opacity: 0.5; cursor: not-allowed; }

[hidden] { display: none !important; }
