/* ================= Variables principales ================= */
:root {
  --bg:#111418;
  --card:#1b2027;
  --ring:#2a3040;
  --text:#e8ecf2;
  --muted:#97a0b0;
  --accent:#2563eb;
  --safe-top: env(safe-area-inset-top);
  --safe-bottom: env(safe-area-inset-bottom);
}

/* ================= Reset / Base ================= */
* { box-sizing:border-box; }
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden; /* supprime le scroll fantôme sur iOS */
}
body {
  background: var(--bg);
  color: var(--text);
  font: 500 15px system-ui, Segoe UI, Roboto;
  -webkit-text-size-adjust: 100%;
}

/* ================= Layout ================= */
.wrap {
  min-height: calc(100dvh - var(--safe-top) - var(--safe-bottom));
  display: grid;
  place-items: center;
  padding: 24px;
}
@supports not (height: 100dvh) {
  .wrap {
    min-height: calc(100vh - var(--safe-top) - var(--safe-bottom));
  }
}

/* ================= Carte de connexion ================= */
.card {
  width: min(380px, 92vw);
  background: var(--card);
  border: 1px solid var(--ring);
  border-radius: 14px;
  padding: 22px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  margin: 18px auto; /* pour éviter scroll fantôme */
}

h1 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 800;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.field {
  margin-bottom: 12px;
}

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--ring);
  background: #0f1318;
  color: var(--text);
  font-weight: 600;
  outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

/* ================= Checkbox ================= */
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 14px;
}
.check input {
  width: auto;
}

/* ================= Bouton ================= */
button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.1s;
}
button:active {
  transform: scale(0.98);
}

/* ================= Message d'erreur ================= */
.error {
  background: #3b1a1a;
  border: 1px solid #6b2323;
  color: #ffd7d7;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}

/* ================= Topbar (facultative) ================= */
.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fdfdfd;
  background: #0f1116;
  border-bottom: 1px solid #111;
  padding: 6px 0;
}

/* Supprime le style par défaut des liens utilisés comme cartes */
a.card.is-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--ring);
  border-radius: 14px;
  padding: 14px;
  transition: background .15s, transform .1s;
}
a.card.is-link:hover {
  background: #1d232c;
}
a.card.is-link:active {
  transform: translateY(1px);
}

.supplier-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--ring);
  background: #0f1319;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.supplier-logo img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}


