/* N.R Cars — espace admin */
:root {
  --text: #fff; --primary: #3359d6; --primary-light: #5c7df2; --muted: #a1a1a1; --subtle: #6b6b6b;
  --bg: #101010; --surface: #171717; --surface-2: #1f1f1f; --border: #2a2a2a; --danger: #e5484d;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 "Manrope", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, p { margin: 0; }
.display { font-family: "Archivo", "Arial Black", sans-serif; font-weight: 900; font-style: italic; text-transform: uppercase; line-height: 1; }
h1.display { font-size: clamp(28px, 4vw, 40px); }
.muted { color: var(--muted); font-size: 15px; }
:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 8px; border: 1px solid transparent; cursor: pointer;
  font: 600 12px/1 "Unbounded", Arial, sans-serif; letter-spacing: .04em; text-transform: uppercase; color: var(--text);
  transition: background-color .2s, border-color .2s, opacity .2s; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: progress; }
.btn--primary { background: var(--primary); }
.btn--primary:hover { background: #3d63e3; }
.btn--ghost { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.22); }
.btn--ghost:hover { background: rgba(255,255,255,.08); }
.btn--danger { background: transparent; border-color: rgba(229,72,77,.45); color: #ff8a8d; }
.btn--danger:hover { background: rgba(229,72,77,.15); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 32px; }
.alert { padding: 14px 18px; border-radius: 10px; font-size: 15px; margin-bottom: 20px; }
.alert p + p { margin-top: 4px; }
.alert--ok { background: rgba(51,89,214,.15); border: 1px solid rgba(51,89,214,.5); }
.alert--error { background: rgba(229,72,77,.12); border: 1px solid rgba(229,72,77,.5); color: #ffb3b5; }
.back { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.back:hover { color: var(--text); }
.tag { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 100px; background: rgba(51,89,214,.2); color: var(--primary-light); font-size: 12px; font-weight: 600; width: fit-content; }

/* Connexion */
.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 32px 16px; }
.auth .panel { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.auth .panel h1 { font-size: 30px; }
.auth .alert { margin-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }

/* Barre du haut */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px clamp(16px, 4vw, 48px); border-bottom: 1px solid var(--border); background: #0b0b0b; position: sticky; top: 0; z-index: 5; }
.topbar__nav { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 600; color: var(--muted); }
.topbar__nav a:hover, .topbar__nav button:hover { color: var(--text); }
.topbar__nav form { margin: 0; }
.topbar__nav button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }

.wrap { max-width: 980px; margin: 0 auto; padding: 40px 16px 80px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.head .muted { margin-top: 10px; }

/* Liste */
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.item { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.item__thumb { width: 120px; height: 84px; border-radius: 10px; overflow: hidden; background: linear-gradient(143.9deg, #29292b 0%, #121214 83%); display: flex; align-items: center; justify-content: center; color: var(--subtle); font-size: 12px; }
.item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.item__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item__body strong { font-size: 17px; }
.item__body .muted { font-size: 14px; }
.item__actions { display: flex; gap: 8px; }
.item__actions form { margin: 0; }

/* Formulaire */
.form { display: flex; flex-direction: column; gap: 22px; }
.form--narrow { max-width: 480px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span { font-weight: 600; font-size: 14px; }
.field small, .form small { color: var(--subtle); font-size: 13px; }
input[type=text], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 13px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 15px;
}
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
.photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.photo { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: opacity .2s; }
.check { display: flex; align-items: center; gap: 8px; padding: 8px 12px 0; font-size: 13px; cursor: pointer; }
.check:last-child { padding-bottom: 10px; }
.check--danger { color: #ff8a8d; }
.photo:has(.check--danger input:checked) img { opacity: .3; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 1.5px dashed #3a3a3a; border-radius: 12px; text-align: center; cursor: pointer; transition: border-color .2s, background-color .2s; }
.drop:hover, .drop:focus-within { border-color: var(--primary); background: rgba(51,89,214,.06); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop strong { color: var(--primary-light); }
.form__actions { display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--border); }

@media (max-width: 700px) {
  .panel { padding: 22px; }
  .grid { grid-template-columns: 1fr; }
  .item { grid-template-columns: 84px minmax(0, 1fr); }
  .item__thumb { width: 84px; height: 64px; }
  .item__actions { grid-column: 1 / -1; }
  .item__actions > * { flex: 1; }
  .item__actions .btn { width: 100%; }
  .topbar__nav { gap: 14px; font-size: 13px; }
  .topbar__nav a[target] { display: none; }
  .head .btn, .form__actions .btn { width: 100%; }
}
