/* ── Admin KODA — feuille de style autonome (hors build Vite) ──────── */
:root {
  --c-cream: #F4ECD8;
  --c-paper: #FBF6EA;
  --c-ink:   #2E2A24;
  --c-muted: #6B6358;
  --c-line:  rgba(46, 42, 36, .14);
  --accent:  #C56A3E;
  --accent-d:#A9542E;
  --sage:    #7C8B6B;
  --danger:  #b23b32;
  --ok:      #4c7a4a;
  --radius:  12px;
  --radius-pill: 999px;
  --shadow:  0 10px 30px -16px rgba(46,42,36,.4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--c-ink);
  background: var(--c-cream);
  line-height: 1.5;
}
h1 { font-size: 1.7rem; margin: 0 0 .3rem; }
h2 { font-size: 1.1rem; margin: 0 0 1rem; }
a { color: var(--accent-d); }
code { background: rgba(46,42,36,.08); padding: .1em .35em; border-radius: 5px; font-size: .9em; }

/* ── Header / nav ─────────────────────────────────────── */
.adm-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: .7rem clamp(1rem, 3vw, 2rem);
  background: var(--c-ink);
  color: var(--c-paper);
  position: sticky;
  top: 0;
  z-index: 10;
}
.adm-brand { display: flex; align-items: center; gap: .5rem; color: var(--c-paper); text-decoration: none; font-weight: 600; }
.adm-brand img { height: 26px; filter: brightness(0) invert(1); }
.adm-nav { display: flex; gap: .3rem; flex: 1; flex-wrap: wrap; }
.adm-nav a {
  color: rgba(251,246,234,.8);
  text-decoration: none;
  padding: .4rem .8rem;
  border-radius: var(--radius-pill);
  font-size: .95rem;
}
.adm-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.adm-nav a.is-active { background: var(--accent); color: #fff; }
.adm-header__right { display: flex; gap: 1rem; }
.adm-link { color: rgba(251,246,234,.85); text-decoration: none; font-size: .9rem; }
.adm-link:hover { color: #fff; text-decoration: underline; }

/* ── Layout ───────────────────────────────────────────── */
.adm-main {
  max-width: 980px;
  margin-inline: auto;
  padding: clamp(1.2rem, 3vw, 2.2rem);
}
.adm-main--center { display: grid; place-items: center; min-height: 80vh; }
.adm-lead { color: var(--c-muted); margin-top: 0; }
.adm-muted { color: var(--c-muted); font-size: .9rem; }
.adm-empty { color: var(--c-muted); font-style: italic; }

/* ── Panels ───────────────────────────────────────────── */
.adm-panel {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.6rem);
  margin-block: 1.2rem;
  box-shadow: var(--shadow);
}

/* ── Cards (dashboard) ────────────────────────────────── */
.adm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1.4rem 0; }
.adm-card {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-decoration: none;
  color: var(--c-ink);
  display: grid;
  gap: .2rem;
  transition: transform .2s, box-shadow .2s;
}
.adm-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.adm-card__n { font-size: 2rem; font-weight: 600; color: var(--accent); line-height: 1; }
.adm-card__label { color: var(--c-muted); }

/* ── Forms ────────────────────────────────────────────── */
.adm-form { display: grid; gap: 1rem; }
.adm-form--grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: end; }
.adm-form label { display: grid; gap: .35rem; font-weight: 500; font-size: .92rem; }
.adm-col-2 { grid-column: 1 / -1; }
.adm-form input[type=text],
.adm-form input[type=url],
.adm-form input[type=email],
.adm-form input[type=number],
.adm-form input[type=password],
.adm-form select,
.adm-form textarea {
  font: inherit;
  padding: .55rem .7rem;
  border: 1px solid var(--c-line);
  border-radius: 9px;
  background: #fff;
  color: var(--c-ink);
  width: 100%;
}
.adm-form input:focus, .adm-form select:focus, .adm-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
.adm-form input[type=file] { font-size: .85rem; }

/* Checkbox custom (réutilisable). Surclasse `.adm-form label { display:grid }`. */
.adm-form label.adm-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  user-select: none;
}
.adm-check input[type=checkbox] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.3rem;
  height: 1.3rem;
  margin: 0;
  flex: 0 0 auto;
  border: 1.5px solid var(--c-line);
  border-radius: 6px;
  background: #fff;
  position: relative;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.adm-check input[type=checkbox]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.adm-check input[type=checkbox]:checked::after {
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.adm-check input[type=checkbox]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.adm-form__actions { grid-column: 1 / -1; display: flex; gap: .8rem; margin-top: .4rem; }

/* ── Buttons ──────────────────────────────────────────── */
.adm-btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-pill);
  padding: .6rem 1.3rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transition: background .2s, transform .1s;
}
.adm-btn:hover { background: var(--accent-d); }
.adm-btn:active { transform: translateY(1px); }
.adm-btn--ghost { background: transparent; color: var(--c-ink); border: 1px solid var(--c-line); }
.adm-btn--ghost:hover { background: rgba(46,42,36,.05); }
.adm-btn--sm { padding: .3rem .7rem; font-size: .82rem; }
.adm-btn--danger { background: transparent; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.adm-btn--danger:hover { background: var(--danger); color: #fff; }

/* ── Tables ───────────────────────────────────────────── */
.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.adm-table th, .adm-table td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--c-line); vertical-align: middle; }
.adm-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
.adm-table tr.is-off { opacity: .5; }
.adm-trunc { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-logo { height: 36px; width: 60px; object-fit: contain; background: #fff; border: 1px solid var(--c-line); border-radius: 6px; }
.adm-tag { display: inline-block; font-size: .72rem; background: var(--sage); color: #fff; padding: .1em .5em; border-radius: var(--radius-pill); margin-left: .3rem; vertical-align: middle; }
.adm-actions { display: flex; gap: .4rem; align-items: center; white-space: nowrap; }
.adm-inline { display: inline; margin: 0; }

.adm-pill { font: inherit; cursor: pointer; border: none; border-radius: var(--radius-pill); padding: .25rem .7rem; font-size: .8rem; font-weight: 600; }
.adm-pill.on { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.adm-pill.off { background: rgba(46,42,36,.1); color: var(--c-muted); }

/* ── Flash ────────────────────────────────────────────── */
.adm-flash { padding: .7rem 1rem; border-radius: 9px; margin-bottom: 1rem; font-size: .92rem; }
.adm-flash--ok   { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.adm-flash--err  { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.adm-flash--warn { background: color-mix(in srgb, #c98a1e 16%, transparent); color: #8a5e12; }

/* ── Login ────────────────────────────────────────────── */
.adm-login {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 2.2rem;
  width: min(360px, 92vw);
  box-shadow: var(--shadow);
  text-align: center;
}
.adm-login__logo { height: 54px; margin-bottom: .6rem; }
.adm-login h1 { font-size: 1.3rem; margin-bottom: 1.2rem; }
.adm-login .adm-form { text-align: left; }
.adm-login .adm-btn { width: 100%; margin-top: .4rem; }
