:root {
  --bg: #0e0e10;
  --surface: #18181b;
  --surface-2: #202024;
  --text: #f2f2f2;
  --muted: #9a9aa2;
  --accent: #8bb9ab;
  --danger: #d9534f;
  --border: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.admin {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 48px;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

.admin-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin-bottom: 28px;
}

.admin-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.btn:hover {
  background: #2a2a2f;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0e0e10;
}

.btn-primary:hover {
  opacity: 0.9;
  background: var(--accent);
}

.btn-ghost {
  background: transparent;
}

.btn-danger {
  background: transparent;
  border-color: rgba(217, 83, 79, 0.5);
  color: #e98683;
}

.btn-danger:hover {
  background: rgba(217, 83, 79, 0.15);
}

/* Liste des cartes */
.grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}

.thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-info {
  flex: 1;
  min-width: 0;
}

.card-info h2 {
  font-size: 1.02rem;
  font-weight: 600;
}

.card-info .muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.card-info .slug {
  color: var(--accent);
  font-size: 0.8rem;
  margin-top: 2px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-actions form {
  margin: 0;
}

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty p {
  margin-bottom: 16px;
}

/* Formulaire */
.alert {
  background: rgba(217, 83, 79, 0.15);
  border: 1px solid rgba(217, 83, 79, 0.5);
  color: #e98683;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.form fieldset {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.form legend {
  padding: 0 8px;
  font-weight: 600;
  color: var(--accent);
}

.form label {
  display: block;
  margin-bottom: 16px;
  font-size: 0.88rem;
  font-weight: 500;
}

.form label:last-child {
  margin-bottom: 0;
}

.req {
  color: var(--danger);
}

.form input[type="text"],
.form input[type="email"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.form input[type="text"]:focus,
.form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

.form input[type="file"] {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.current {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.current img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
