:root{--bg:#0f172a;--card:#111827;--muted:#9ca3af;--brand:#6366f1;--text:#e5e7eb;}
*{box-sizing:border-box}

body{
  margin:0;
  background:radial-gradient(1200px 600px at 50% 20%,#111827 0%,#0b1222 55%,#0f172a 100%);
  font-family:ui-sans-serif,system-ui,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial
}

.main{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px
}

.card{
  background:rgba(17,24,39,.85);
  border:1px solid rgba(255,255,255,.06);
  border-radius:16px;
  box-shadow:0 10px 30px rgba(0,0,0,.4);
  width:440px;               /* carte compacte */
  max-width:95%;
  padding:28px;
  overflow:hidden;           /* coupe tout dépassement visuel */
}

.badge{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  background:#1f2937;
  color:#cbd5e1;
  font-weight:600;
  font-size:12px;
  margin-bottom:14px
}

.logo{width:96px;height:96px;border-radius:999px;display:block;margin:8px auto 14px auto;object-fit:cover;box-shadow:0 6px 20px rgba(99,102,241,.35)}
h1{color:var(--text);text-align:center;margin:6px 0 8px 0}
p{color:var(--muted);text-align:center;margin:0 0 18px 0}

/* Bouton par défaut (plein largeur pour les autres endroits) */
.btn{
  display:block;
  width:100%;
  padding:14px 16px;
  border-radius:12px;
  background:var(--brand);
  color:#fff;
  text-decoration:none;
  text-align:center;
  font-weight:700;
  transition:transform .05s ease,opacity .2s
}
.btn:hover{opacity:.95}
.btn:active{transform:translateY(1px)}

.hr{height:1px;background:rgba(255,255,255,.06);margin:18px 0}

.row{
  background:#0b1222;
  border:1px solid rgba(255,255,255,.06);
  border-radius:10px;
  padding:10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px
}

.input, .input-inline{
  width:100%;
  padding:12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:#0a0f1b;
  color:#e5e7eb
}

.flex{display:flex;gap:8px;align-items:center}
.small{font-size:12px;color:#94a3b8}
.link{color:#c4b5fd;text-decoration:none}
.topnav{position:fixed;top:12px;right:12px;color:#cbd5e1;font-size:14px}
.topnav a{color:#cbd5e1;text-decoration:none;margin-left:12px}

/* ---------- FORMULAIRE D'AJOUT : RÉDUIT + CENTRÉ ---------- */
.card > form.flex{
  justify-content:center;    /* centre horizontalement */
  gap:10px;                  /* espace propre (pas de margin-right) */
  flex-wrap:nowrap;          /* reste sur une ligne dans la card */
  max-width:100%;
  margin:0 auto;
}

.card > form.flex .input-inline{
  flex:0 0 auto;
  min-width:0;
  text-align:center;
}

/* tailles compactes et fixes */
.card > form.flex .input-inline[name="ip"]{   width:200px; }
.card > form.flex .input-inline[name="port"]{ width:90px;  }

/* bouton compact, ne s'étire pas et ne rétrécit pas */
.card > form.flex .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto;
  padding:10px 14px;
  font-size:14px;
  border-radius:8px;
  flex:0 0 auto;
}

/* Sécurité responsive: si l’écran est trop étroit, on wrap proprement */
@media (max-width:520px){
  .card > form.flex{ flex-wrap:wrap; }
  .card > form.flex .btn{ width:100%; }
}
