/* Dashboard admin */

body.admin { padding-bottom: 0; background: var(--bg); }
/* Le décor photo de la boutique n'a pas sa place derrière le dashboard. */
html:has(body.admin)::before,
body.admin::before { content: none; }

/* ---------- login ---------- */
.login[hidden] { display: none; }
.login {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}
.login-card {
  width: min(400px, 100%);
  padding: 34px 26px 28px;
  border: 1px solid rgba(168, 85, 247, .35);
  border-radius: 22px;
  background: var(--panel);
  text-align: center;
}
.shield {
  width: 62px; height: 62px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 18px;
  border: 1px solid rgba(168, 85, 247, .5);
  color: var(--violet);
  background: rgba(168, 85, 247, .10);
}
.login-card h1 { font-family: var(--display); font-size: 28px; text-transform: uppercase; }
.login-card p { color: var(--muted); font-size: 14px; margin: 8px 0 22px; }
.login-card .back { display: block; margin-top: 20px; color: var(--muted); font-size: 13px; }
.err { min-height: 20px; margin-top: 12px; color: #ff7a7a; font-size: 13px; }

/* ---------- champs ---------- */
input[type="text"],
input[type="number"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--lime); }
input::placeholder, textarea::placeholder { color: rgba(255, 255, 255, .35); }
textarea { resize: vertical; }

.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  color: var(--muted);
}

.btn-primary {
  margin-top: 14px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--lime);
  color: #04122c;
  font-weight: 800;
  font-size: 15px;
}
.btn-primary.wide { width: 100%; }

.btn-ghost {
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.btn-danger { color: #ff7a7a; border-color: rgba(255, 122, 122, .35); }
.btn-active { color: #ffb454; border-color: rgba(255, 180, 84, .45); background: rgba(255, 180, 84, .08); }

/* ---------- dashboard ---------- */
.dash { max-width: 940px; margin: 0 auto; padding: 26px 16px 80px; }
.dash-top {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 14px; margin-bottom: 24px;
}
.dash-top h1 { font-size: clamp(30px, 8vw, 42px); line-height: .95; }
.dash-top h1 em { font-style: normal; color: var(--lime); }
.dash-actions { display: flex; gap: 10px; }

.tabs {
  display: flex; gap: 8px;
  margin-bottom: 22px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  overflow-x: auto;
}
.tab {
  flex: 1;
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.tab[aria-selected="true"] { background: var(--lime); color: #04122c; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.panel-head h2 { font-size: 26px; }
.panel-head .btn-primary { margin-top: 0; }
.hint { color: var(--muted); font-size: 13px; margin: -6px 0 16px; line-height: 1.5; }

.adm-list { display: grid; gap: 12px; }

.adm-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.adm-row .thumb {
  width: 66px; height: 66px; flex: none;
  border-radius: 12px;
  background: #081327;
  overflow: hidden;
  display: grid; place-items: center;
  font-size: 26px;
}
.adm-row .thumb img, .adm-row .thumb video { width: 100%; height: 100%; object-fit: cover; }
.adm-row .info { flex: 1; min-width: 0; }
.adm-row .info b { display: block; font-size: 16px; }
.adm-row .info small { color: var(--muted); font-size: 12.5px; }
.adm-row .acts { display: flex; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.adm-row .acts .btn-ghost { padding: 9px 14px; font-size: 13px; }

.chip-off {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  font-size: 11px;
  color: var(--muted);
  margin-left: 8px;
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0;
}

/* ---------- catégories ---------- */
.cat-row {
  display: grid;
  grid-template-columns: 70px 1fr 1fr auto;
  gap: 8px; align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.cat-row input { padding: 11px 13px; font-size: 14px; }

/* ---------- liens de contact ---------- */
.links-list { display: grid; gap: 10px; }
.link-row {
  display: grid;
  grid-template-columns: 1fr 1fr 150px;
  gap: 8px; align-items: center;
}
.link-row input, .link-row select { padding: 12px 14px; font-size: 14px; }

/* ---------- éditeur ---------- */
#editor .modal-card { padding: 26px 20px 24px; }
#editor h2 { font-size: 24px; margin-bottom: 18px; }

.drop {
  display: grid; place-items: center;
  gap: 6px;
  padding: 26px;
  margin-bottom: 8px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  cursor: pointer;
}
.preview {
  margin-bottom: 16px;
  border-radius: 14px;
  overflow: hidden;
  background: #081327;
}
.preview[hidden] { display: none; }
.preview img, .preview video { width: 100%; max-height: 260px; object-fit: cover; }

.tier-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px; align-items: center;
  margin-bottom: 8px;
}
.tier-row input { padding: 11px 13px; font-size: 14px; }

.check {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0 4px;
  font-size: 14px;
  color: var(--muted);
}
.check input { width: auto; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  z-index: 120;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--lime);
  color: #04122c;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-glow);
}
.toast[hidden] { display: none; }

@media (max-width: 560px) {
  .adm-row { flex-wrap: wrap; }
  .adm-row .acts { width: 100%; justify-content: flex-start; }
  .link-row { grid-template-columns: 1fr; }
  .cat-row { grid-template-columns: 60px 1fr auto; }
}
