/* ============================================================
   AZYLife Launcher Manager — Feuille de style principale
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@700;800&display=swap');

/* ---- Variables -------------------------------------------- */
:root {
  --bg:        #0a0c0f;
  --bg2:       #0e1117;
  --bg3:       #111520;
  --border:    #1e2330;
  --border2:   #2a2f3a;
  --accent:    #e8f542;
  --accent-dk: #b8d400;
  --text:      #e0e6f0;
  --text-muted:#888;
  --text-dim:  #444;
  --green:     #4ade80;
  --green-bg:  #0d2316;
  --red:       #f87171;
  --red-bg:    #2e1010;
  --amber:     #f59e0b;
  --discord:   #5865f2;
  --radius:    0px;
  --font-mono: 'Space Mono', monospace;
  --font-display: 'Syne', sans-serif;
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; }

/* ---- Layout ----------------------------------------------- */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---------------------------------------------- */
.sidebar {
  width: 210px;
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
}

.sidebar-brand {
  padding: 24px 20px 18px;
  border-bottom: 1px solid var(--border);
}
.brand-azy  { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--accent); }
.brand-life { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--text); }
.brand-sub  { font-size: 9px; letter-spacing: .2em; color: var(--text-dim); margin-top: 2px; }

.sidebar-nav { padding: 8px 0; flex: 1; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-dim);
  font-size: 11px;
  letter-spacing: .08em;
  border-left: 2px solid transparent;
  transition: all .15s;
}
.sidebar-link:hover  { color: var(--text-muted); background: var(--bg2); }
.sidebar-link.active { color: var(--accent); border-left-color: var(--accent); background: var(--bg2); }
.sidebar-icon { font-size: 14px; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.user-info   { display: flex; align-items: center; gap: 8px; }
.user-avatar {
  width: 28px; height: 28px;
  background: var(--accent);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.user-name { font-size: 11px; color: #ccc; }
.user-role { font-size: 9px; color: var(--text-dim); letter-spacing: .1em; }

.server-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; color: var(--text-dim); letter-spacing: .05em;
}

/* ---- Main content ----------------------------------------- */
.main-content { flex: 1; padding: 28px; overflow-y: auto; }

/* ---- Page header ------------------------------------------ */
.page-header { margin-bottom: 24px; }
.page-title  { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: #fff; }
.page-sub    { font-size: 11px; color: var(--text-dim); margin-top: 3px; }

/* ---- Cards ------------------------------------------------ */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 20px;
}
.card-title {
  font-size: 9px; letter-spacing: .15em; color: var(--text-dim);
  margin-bottom: 14px; text-transform: uppercase;
}

/* ---- Stat cards ------------------------------------------- */
.stats-row { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); padding: 18px; flex: 1; min-width: 160px; }
.stat-label { font-size: 9px; letter-spacing: .15em; color: var(--text-dim); margin-bottom: 8px; }
.stat-value { font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.stat-sub   { font-size: 10px; color: var(--text-dim); margin-top: 4px; }

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .05em; cursor: pointer;
  border: none; transition: all .15s;
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }

.btn-primary   { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: #fff; }

.btn-ghost     { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn-ghost:hover { background: var(--accent); color: var(--bg); }

.btn-secondary { background: transparent; color: var(--text-dim); border: 1px solid var(--border2); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-danger    { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-sm  { padding: 6px 14px; font-size: 10px; }
.btn-block { width: 100%; justify-content: center; }

/* ---- Forms ------------------------------------------------ */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-label { font-size: 10px; color: var(--text-dim); letter-spacing: .08em; }
.input-field, .select-field {
  background: var(--bg3); border: 1px solid var(--border2); color: var(--text);
  padding: 10px 13px; font-family: var(--font-mono); font-size: 12px;
  width: 100%; outline: none; transition: border .15s;
}
.input-field:focus, .select-field:focus { border-color: var(--accent); }
.input-field::placeholder { color: var(--text-dim); }
.form-error { color: var(--red); font-size: 11px; margin-top: 4px; }
.form-row   { display: flex; gap: 14px; }
.form-row > * { flex: 1; }

/* ---- Tables ----------------------------------------------- */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: 9px; letter-spacing: .1em; color: var(--text-dim);
  padding: 0 16px 10px 0; text-align: left; font-weight: 400;
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px; color: #ccc;
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--bg3); }
.data-table tr:last-child td { border-bottom: none; }

/* ---- Tags / Badges ---------------------------------------- */
.tag {
  display: inline-block; padding: 2px 8px;
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
}
.tag-admin   { background: var(--accent); color: var(--bg); }
.tag-user    { background: var(--border); color: var(--text-dim); }
.tag-success { background: var(--green-bg); color: var(--green); }
.tag-error   { background: var(--red-bg); color: var(--red); }
.tag-warning { background: #2e2010; color: var(--amber); }
.tag-pending { background: var(--bg3); color: var(--text-dim); border: 1px solid var(--border2); }

/* ---- Status dot ------------------------------------------- */
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.status-dot.online  { background: var(--green); animation: pulse 2s ease-in-out infinite; }
.status-dot.offline { background: var(--red); }

/* ---- Progress bar ----------------------------------------- */
.progress-wrap { margin-bottom: 8px; }
.progress-bar  { height: 5px; background: var(--border); overflow: hidden; }
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-dk));
  transition: width .4s ease;
}
.progress-meta {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--text-dim); margin-top: 5px;
}

/* ---- Drop zone -------------------------------------------- */
.drop-zone {
  border: 2px dashed var(--border2); padding: 40px 20px; text-align: center;
  cursor: pointer; transition: all .2s;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent); background: var(--bg3);
}
.drop-zone-icon  { font-size: 28px; margin-bottom: 10px; opacity: .5; }
.drop-zone-label { color: var(--text-dim); font-size: 12px; }
.drop-zone-sub   { color: var(--text-dim); font-size: 10px; margin-top: 4px; opacity: .6; }

/* ---- Mod list (avant upload) ------------------------------ */
.mod-preview-list { display: flex; flex-direction: column; gap: 0; margin-top: 12px; }
.mod-preview-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.mod-preview-item:last-child { border-bottom: none; }

/* ---- Steps indicator -------------------------------------- */
.steps { display: flex; align-items: center; margin-bottom: 24px; }
.step  { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .05em; }
.step-num {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
  transition: all .3s;
}
.step-num.done    { background: var(--accent); color: var(--bg); }
.step-num.active  { background: var(--bg3); color: var(--accent); border: 1px solid var(--accent); }
.step-num.waiting { background: var(--bg3); color: var(--text-dim); border: 1px solid var(--border); }
.step-label.done    { color: var(--text-muted); }
.step-label.active  { color: var(--text); }
.step-label.waiting { color: var(--text-dim); }
.step-line { flex: 1; height: 1px; background: var(--border); margin: 0 10px; transition: background .3s; }
.step-line.done { background: var(--accent); }

/* ---- Modal ------------------------------------------------ */
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; animation: fadeIn .15s;
}
.modal {
  background: var(--bg2); border: 1px solid var(--border2);
  padding: 32px; min-width: 400px; max-width: 520px; width: 100%;
  animation: slideUp .2s;
}
.modal-title { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: #fff; margin-bottom: 20px; }
.modal-footer { display: flex; gap: 10px; margin-top: 20px; }

/* ---- Alerts / Flash --------------------------------------- */
.alert {
  padding: 12px 16px; font-size: 11px; margin-bottom: 16px;
  border-left: 3px solid;
}
.alert-success { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.alert-error   { background: var(--red-bg);   color: var(--red);   border-color: var(--red); }
.alert-warning { background: #2e2010;          color: var(--amber); border-color: var(--amber); }
.alert-info    { background: #10182e;          color: #7aa2f7;      border-color: #7aa2f7; }

/* ---- Discord log row -------------------------------------- */
.discord-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-left: 2px solid var(--discord);
  background: var(--bg3); font-size: 11px; color: var(--text-dim);
  animation: slideLeft .2s;
}

/* ---- Server status items ---------------------------------- */
.server-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border);
}
.server-item:last-child { border-bottom: none; }
.server-item-label { font-size: 12px; color: var(--text-muted); }
.server-item-val   { font-size: 11px; font-weight: 700; }
.val-ok  { color: var(--green); }
.val-err { color: var(--red); }
.val-dim { color: var(--text-dim); }

/* ---- Login page ------------------------------------------- */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); position: relative; overflow: hidden;
}
.login-grid-bg {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
                    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px; opacity: .3; pointer-events: none;
}
.login-box { position: relative; width: 400px; animation: fadeIn .4s; }
.login-brand {
  text-align: center; margin-bottom: 28px;
  font-family: var(--font-display); font-size: 26px; font-weight: 800;
}
.login-card { background: var(--bg2); border: 1px solid var(--border); padding: 32px; }
.login-footer { text-align: center; margin-top: 14px; font-size: 10px; color: var(--border2); letter-spacing: .12em; }

/* ---- Grid layouts ----------------------------------------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-auto { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- Cursor / terminal ------------------------------------ */
.cursor { animation: blink 1s step-end infinite; color: var(--accent); }
.terminal-line {
  background: var(--bg3); border: 1px solid var(--border);
  padding: 10px 14px; font-size: 11px; color: var(--text-dim); margin-bottom: 6px;
}

/* ---- Utils ------------------------------------------------ */
.text-accent  { color: var(--accent); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-muted   { color: var(--text-muted); }
.text-dim     { color: var(--text-dim); }
.text-center  { text-align: center; }
.flex         { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap     { display: flex; gap: 10px; align-items: center; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.hidden { display: none; }
.w100   { width: 100%; }

/* ---- Animations ------------------------------------------- */
@keyframes fadeIn  { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideLeft { from{opacity:0;transform:translateX(-8px)} to{opacity:1;transform:translateX(0)} }
@keyframes pulse   { 0%,100%{opacity:.4} 50%{opacity:1} }
@keyframes blink   { 0%,100%{opacity:1} 50%{opacity:0} }
@keyframes spin    { to{transform:rotate(360deg)} }

.spin { animation: spin .8s linear infinite; display: inline-block; }

/* ---- Responsive ------------------------------------------- */
@media (max-width: 900px) {
  .sidebar { width: 56px; }
  .sidebar-link span:not(.sidebar-icon) { display: none; }
  .brand-sub, .brand-life, .user-info > div, .server-status span:last-child { display: none; }
  .sidebar-brand { padding: 16px 12px; }
  .sidebar-link  { justify-content: center; padding: 12px; }
  .grid-2 { grid-template-columns: 1fr; }
}
