/* =====================================================================
   CONNEXION DU COMPTOIR — même style que le dashboard :
   rectangulaire, texte normal, filet aux couleurs de la marque.
   ===================================================================== */

@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url('../assets/polices/BarlowCondensed-700.woff2') format('woff2'); }

:root {
  --fond: #f1f0ec;
  --panneau: #ffffff;
  --trait: rgba(24, 23, 20, .20);
  --encre: #16150f;
  --doux: rgba(24, 23, 20, .64);
  --pale: rgba(24, 23, 20, .44);
  --sur-encre: #fbfaf7;
  --retard: #c92a2a;
  --marque: linear-gradient(90deg, #e0217a, #ff6a1f);
  --titre: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --texte: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: var(--fond); }
body { font-family: var(--texte); font-size: 15px; color: var(--encre); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--encre); outline-offset: 2px; }

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) 16px max(24px, env(safe-area-inset-bottom, 0px));
}

.fenetre {
  position: relative;
  width: min(420px, 100%);
  padding: 28px 28px 22px;
  background: var(--panneau);
  border: 1px solid var(--trait);
}
.fenetre::before {                           /* filet aux couleurs de la marque */
  content: "";
  position: absolute;
  left: -1px; right: -1px; top: -1px;
  height: 4px;
  background: var(--marque);
}
.logo { display: block; height: 56px; width: auto; margin-bottom: 14px; }
h1 { margin: 0; font-family: var(--titre); font-weight: 700; font-size: 30px; text-transform: uppercase; letter-spacing: .03em; line-height: 1; }
.intro { margin: 6px 0 22px; color: var(--doux); }

.champ { display: block; margin-bottom: 14px; }
.champ > span:first-child {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--doux);
}
.champ input, .saisie {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--trait);
  background: var(--panneau);
}
.champ input { padding: 0 12px; font-size: 16px; border-radius: 0; }
.champ input:focus, .saisie:focus-within { outline: none; border-color: var(--encre); }
.saisie { display: flex; align-items: stretch; }
.saisie input { border: 0; min-width: 0; flex: 1; }
.voir {
  flex: 0 0 auto;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid var(--trait);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--doux);
}
.voir:hover { color: var(--encre); }

.erreur { margin: 2px 0 12px; padding: 8px 10px; border-left: 3px solid var(--retard); background: rgba(201, 42, 42, .07); color: var(--retard); font-weight: 600; }

.entrer {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
  border: 0;
  background: var(--encre);
  color: var(--sur-encre);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .03em;
}
.entrer:disabled { opacity: .6; cursor: default; }
.note { margin: 14px 0 0; font-size: 13px; color: var(--pale); }

/* Mauvais identifiants : la fenêtre fait « non » */
.secoue { animation: secoue .35s ease; }
@keyframes secoue {
  25%, 75% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
}
@media (prefers-reduced-motion: reduce) { .secoue { animation: none; } }
