/* ============================================================================
   File: style.css
   ========================================================================== */

:root{
  --bg: #121212;
  --bg-elev: #181818;
  --border: #2a2a2a;
  --fg: #e9e9e9;
  --muted: #9a9a9a;
  --accent: #3a3a3a;
  --accent-hover: #4a4a4a;
  --ok: #3dd68c;
  --error: #ff6b6b;
  --shadow: 0 10px 30px rgba(0,0,0,.6);
  --radius: 8px;
}

*{ box-sizing:border-box; font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif; }
html,body{ height:100%; }
body{ margin:0; background: var(--bg); color:var(--fg); }

.container{ max-width: 760px; margin: 40px auto; padding: 0 16px; }
h1{ font-size: 22px; margin: 0 0 16px; color: var(--fg); }

.card{
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.row{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
label.muted{ color: var(--muted); font-size: 14px; }

select, input[type="text"], input[type="password"], textarea{
  background: #111;
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  width: 100%;
}
textarea{ min-height: 260px; font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; }

select:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible{
  outline: 2px solid #666;
  outline-offset: 2px;
}

button{
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  box-shadow: none;
  transition: background-color .15s ease, transform .05s ease;
}
button:hover{ background: var(--accent-hover); }
button:active{ transform: translateY(1px); }
button.secondary{ background: #222; color: var(--fg); border: 1px solid var(--border); }

.badge{
  background: #111;
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 14px;
}

.msg{ margin-top: 12px; padding: 10px 12px; border-radius: var(--radius); border:1px solid transparent; }
.msg.success{ background: rgba(61,214,140,.12); color: var(--ok); border-color: rgba(61,214,140,.25); }
.msg.error{ background: rgba(255,107,107,.12); color: var(--error); border-color: rgba(255,107,107,.25); }

.result{ font-size: 18px; margin-top: 12px; }
.hint{ font-size: 12px; color: var(--muted); margin-top: 6px; }

/* FAB admin bas-droite */
.admin-fab{
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  opacity: .35;
  transition: opacity .2s, transform .1s;
  z-index: 100;
}
.admin-fab:hover{ opacity: .9; transform: translateY(-1px); }
.admin-fab button{
  background: #222;
  color: #d1d1d1;
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: var(--radius);
  box-shadow:none;
}

/* Modal */
.modal{ position: fixed; inset: 0; background: rgba(0,0,0,.55); display:none; align-items:center; justify-content:center; padding: 16px; z-index: 50; }
.modal.open{ display:flex; }
.modal .panel{
  width: min(900px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.panel header{ display:flex; justify-content:space-between; align-items:center; margin-bottom: 8px; }
.panel header h2{ margin:0; font-size:18px; color: var(--fg); }
.panel header .icon{
  background:#222; border:1px solid var(--border); color: var(--muted);
  padding: 6px 10px; border-radius: var(--radius); box-shadow:none;
}
.panel footer{ display:flex; gap: 8px; justify-content:flex-end; margin-top: 8px; }

/* Validation live */
textarea.invalid{ border-color: var(--error); box-shadow: inset 0 0 0 1px rgba(255,107,107,.35); }

/* Toast */
.toast{
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: #222;
  color: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  opacity: 0;
  display: none;
  transition: transform .2s ease, opacity .2s ease;
  z-index: 120;
}
.toast.ok{ border-color: rgba(61,214,140,.4); }
.toast.err{ border-color: rgba(255,107,107,.4); }
.toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }

/* Code inline */
code{ background:#1e1e1e; color:#d1d1d1; padding:2px 6px; border-radius:6px; border:1px solid var(--border); }
