/* Exclu Vision — panel admin.
   Toutes les classes sont préfixées « adm- ». Couleurs thémables = tokens de base.css uniquement.
   Mobile d'abord ; les mises en page « tableau » s'activent via container queries sur .adm-page. */

/* ================================================================ */
/* Racine & mise en page                                             */
/* ================================================================ */

.adm {
  --adm-top: 0px;
  --adm-offset: 0px;
  --adm-side-w: 252px;
  --adm-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, Consolas, monospace;
  --adm-act-w: 108px;
  position: relative;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--adm-offset) + 4px) var(--gutter) calc(112px + var(--safe-bottom));
  min-height: 70vh;
}
@media (min-width: 1024px) {
  .adm {
    display: grid;
    grid-template-columns: var(--adm-side-w) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    padding-top: calc(var(--adm-offset) + 28px);
    padding-bottom: 72px;
  }
}
.adm.adm-is-gate { display: block; }
.adm-main { min-width: 0; }
.adm-page {
  container: admpage / inline-size;
  min-width: 0;
  animation: adm-in 380ms var(--ease-out) both;
}
@keyframes adm-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.adm-mono { font-family: var(--adm-mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* ---------------- Barre latérale (desktop) ---------------- */

.adm-side { display: none; }
@media (min-width: 1024px) {
  .adm-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: calc(var(--adm-top) + 20px);
    max-height: calc(100dvh - var(--adm-top) - 40px);
    overflow-y: auto;
    padding: 18px 14px 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background:
      radial-gradient(130% 50% at 0% 0%, var(--accent-soft), transparent 65%),
      linear-gradient(180deg, var(--surface), var(--bg-elev));
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.035);
    scrollbar-width: none;
  }
  .adm-side::-webkit-scrollbar { display: none; }
}

.adm-logo { display: flex; align-items: center; gap: 12px; padding: 2px 6px; min-width: 0; }
.adm-logo-mark {
  display: grid; place-items: center; flex-shrink: 0;
  width: 42px; height: 42px; border-radius: 12px;
  color: var(--on-accent);
  background: radial-gradient(circle at 30% 25%, var(--accent-hot), var(--accent) 55%, var(--accent-deep));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 8px 26px -6px var(--accent-glow);
}
.adm-logo-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.adm-logo-name {
  font-family: var(--font-brand); font-size: 23px; letter-spacing: 0.04em;
  color: var(--accent-hot); text-shadow: var(--glow-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-logo-sub { margin-top: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-mute); }
.adm-side-cta { min-height: 42px; font-size: 14px; }

.adm-nav { display: flex; flex-direction: column; gap: 14px; }
.adm-nav-sec { display: flex; flex-direction: column; gap: 2px; }
.adm-nav-label { padding: 0 12px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-mute); }
.adm-nav-link {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 42px; padding: 0 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim); font-size: 14px; font-weight: 600;
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.adm-nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.adm-nav-link.is-active { color: var(--text); background: linear-gradient(90deg, var(--accent-soft), transparent 90%); }
.adm-nav-link.is-active::before {
  content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--accent-hot); box-shadow: 0 0 14px var(--accent-glow);
}
.adm-nav-link.is-active .icon { color: var(--accent-hot); filter: drop-shadow(0 0 6px var(--accent-glow)); }

.adm-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.adm-side-user {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 10px; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
}
.adm-side-user-text { min-width: 0; }
.adm-side-user-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-side-user-role { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--ember); }

/* ---------------- Onglets (mobile / tablette) ---------------- */

.adm-tabs {
  position: sticky; top: var(--adm-top); z-index: 30;
  display: flex; gap: 6px;
  margin: 0 calc(var(--gutter) * -1) 20px;
  padding: 10px var(--gutter);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tab {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dim); font-size: 14px; font-weight: 600; white-space: nowrap;
  scroll-snap-align: start;
  transition: background var(--t) var(--ease), color var(--t), border-color var(--t), box-shadow var(--t);
}
.adm-tab:hover { color: var(--text); border-color: var(--border-strong); }
.adm-tab.is-active {
  background: linear-gradient(180deg, var(--accent-hot), var(--accent));
  border-color: transparent; color: var(--on-accent);
  box-shadow: 0 6px 20px -6px var(--accent-glow);
}
.adm-tab-site { color: var(--text-mute); }
@media (min-width: 1024px) { .adm-tabs { display: none; } }

/* Cibles de scrollIntoView({ block: 'start' }) : jamais cachées sous le header fixe (+ les onglets collants < 1024 px). */
.adm-card, .adm-clist, .adm-comments, .adm-ulist { scroll-margin-top: calc(var(--adm-top) + 76px); }
@media (min-width: 1024px) { .adm-card, .adm-clist, .adm-comments, .adm-ulist { scroll-margin-top: calc(var(--adm-top) + 16px); } }

/* ---------------- En-tête de page ---------------- */

.adm-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 14px 20px; margin-bottom: 22px;
}
.adm-head-text { flex: 1 1 260px; min-width: 0; }
.adm-eyebrow { margin-bottom: 6px; font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-hot); }
.adm-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: 40px; font-size: clamp(34px, 7cqi, 50px); letter-spacing: 0.04em; line-height: 0.95;
  text-transform: uppercase; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  padding-top: 0.12em; margin-top: -0.12em; /* place pour les accents des capitales (È, É) malgré overflow: hidden */
}
.adm-sub { margin-top: 8px; max-width: 660px; font-size: 14px; color: var(--text-dim); }
.adm-head-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.adm-crumbs { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--text-mute); }
.adm-crumbs a { color: var(--text-dim); transition: color var(--t); }
.adm-crumbs a:hover { color: var(--accent-hot); }
.adm-crumbs [aria-current] { color: var(--text-mute); }

/* ---------------- Cartes ---------------- */

.adm-card {
  position: relative; min-width: 0;
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-elev));
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.adm-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 16px 18px 0; }
.adm-card-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; letter-spacing: 0.01em; }
.adm-card-ico {
  display: grid; place-items: center; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 9px;
  color: var(--accent-hot); background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.adm-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.adm-card-body { padding: 16px 18px 18px; }
.adm-card-body.adm-flush { padding: 8px 0 4px; }
.adm-card-link { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; font-size: 13px; font-weight: 600; color: var(--text-dim); transition: color var(--t); }
.adm-card-link:hover { color: var(--accent-hot); }
.adm-card-sub { font-size: 12px; color: var(--text-mute); }

/* ---------------- Contrôle segmenté ---------------- */

.adm-seg {
  display: inline-flex; gap: 2px; padding: 3px; max-width: 100%;
  border-radius: var(--radius-pill);
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  overflow-x: auto; scrollbar-width: none;
}
.adm-seg::-webkit-scrollbar { display: none; }
.adm-seg-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  min-height: 38px; padding: 0 15px;
  border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600; color: var(--text-dim); white-space: nowrap;
  transition: background var(--t) var(--ease), color var(--t), box-shadow var(--t);
}
.adm-seg-btn:hover { color: var(--text); }
.adm-seg-btn[aria-checked="true"] {
  background: linear-gradient(180deg, var(--accent-hot), var(--accent));
  color: var(--on-accent); box-shadow: 0 4px 14px -4px var(--accent-glow);
}
.adm-seg-sm .adm-seg-btn { min-height: 34px; padding: 0 12px; font-size: 12.5px; }

/* ---------------- Barre d'outils / recherche ---------------- */

.adm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.adm-search { position: relative; display: flex; align-items: center; flex: 1 1 260px; min-width: 0; }
.adm-search > .icon { position: absolute; left: 15px; color: var(--text-mute); pointer-events: none; }
.adm-search-input { padding-left: 44px; padding-right: 46px; border-radius: var(--radius-pill); }
.adm-search-input::-webkit-search-cancel-button,
.adm-search-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.adm-search-clear {
  position: absolute; right: 5px; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: 50%; color: var(--text-mute);
}
.adm-search-clear:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.adm-toolbar .adm-seg { flex: 0 0 auto; }

/* ---------------- Pagination ---------------- */

.adm-pager-zone { margin-top: 16px; }
.adm-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.adm-pager-info { font-size: 13px; color: var(--text-mute); }
.adm-pager-btns { display: flex; align-items: center; gap: 4px; }
.adm-pager-num {
  display: inline-grid; place-items: center;
  min-width: 42px; height: 42px; padding: 0 8px;
  border-radius: 11px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; color: var(--text-dim); font-variant-numeric: tabular-nums;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.adm-pager-num:hover:not(:disabled) { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.adm-pager-num.is-active { color: var(--text); background: var(--accent-soft); border-color: var(--border-strong); box-shadow: inset 0 -2px 0 var(--accent-hot); }
.adm-pager-num:disabled { opacity: 0.3; cursor: default; }
.adm-pager-gap { padding: 0 2px; color: var(--text-mute); }
@container admpage (max-width: 520px) {
  .adm-pager { justify-content: center; }
  .adm-pager-info { width: 100%; text-align: center; }
  .adm-pager-num:not(.is-active):not(.adm-pager-arrow), .adm-pager-gap { display: none; }
  .adm-pager-btns { gap: 10px; }
}

/* ---------------- Éléments communs ---------------- */

.adm-ava {
  position: relative; display: inline-grid; place-items: center; flex-shrink: 0;
  border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 30% 25%, var(--accent-hot), var(--accent-deep));
  color: var(--on-accent); font-weight: 800; line-height: 1;
  box-shadow: 0 0 0 2px var(--surface-3);
}
.adm-ava > * { width: 100% !important; height: 100% !important; max-width: none; border-radius: 50%; }
.adm-ava > img { object-fit: cover; }
.adm-ava > .avatar-photo { --av-zoom: 1.04; } /* portrait rond dans un avatar rond : presque pas de zoom (styles.css) */
.adm-ava-initial { display: grid; place-items: center; }

.adm-provider {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
  color: var(--text-dim); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-strong);
}
.adm-provider.is-discord { color: #c7cbff; background: rgba(88, 101, 242, 0.18); border-color: rgba(88, 101, 242, 0.42); }
.adm-provider.is-google { color: var(--text); background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.16); }
.adm-provider.is-dev { color: var(--ember); background: var(--ember-soft); border-color: transparent; }

.adm-pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums;
  color: var(--text-dim); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
}
.adm-pill.is-on { color: var(--text); background: var(--accent-soft); border-color: var(--border-strong); }

.adm-badge-quality { color: var(--text); background: var(--surface-3); border-color: var(--border-strong); letter-spacing: 0.05em; }
.adm-badge-danger { color: var(--danger); background: rgba(255, 77, 79, 0.15); border-color: transparent; }
.adm-chip-static, .adm-chip-static:hover { cursor: default; color: var(--text-dim); border-color: var(--border-strong); }
.adm-c-cats .chip:hover { color: var(--text-dim); border-color: var(--border-strong); }

.adm-danger-ghost:hover { color: var(--danger); background: rgba(255, 77, 79, 0.12); }
.adm-icon-link { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px; color: var(--text-mute); transition: color var(--t), background var(--t); }
.adm-icon-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.adm-btn-spin {
  width: 16px; height: 16px; flex-shrink: 0; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: currentColor;
  animation: ev-spin 0.7s linear infinite;
}
.adm-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-mute); }
.adm-error { padding: 8px 0; }
.adm .toggle-input:disabled + .toggle-track { opacity: 0.4; }
.adm .toggle:has(.toggle-input:disabled) { cursor: not-allowed; }
.adm-toggle-danger .toggle-input:checked + .toggle-track { background: var(--danger); border-color: var(--danger); box-shadow: 0 0 16px -2px rgba(255, 77, 79, 0.6); }
@container admpage (max-width: 420px) { .adm-hide-xs { display: none; } }

/* ---------------- Squelettes ---------------- */

.adm-skel-list { display: flex; flex-direction: column; gap: 10px; }
.adm-skel-row { height: 140px; border-radius: var(--radius); }
.adm-skel-row.is-short { height: 66px; }
.adm-skel-row.is-tall { height: 124px; }
.adm-skel-kpi { height: 106px; border-radius: var(--radius); }
.adm-skel-kpi-lg { height: 158px; }
.adm-skel-line { height: 54px; border-radius: var(--radius-sm); }
.adm-skel-head { height: 84px; max-width: 520px; margin-bottom: 20px; border-radius: var(--radius); }
.adm-skel-block { height: 260px; margin-bottom: 16px; border-radius: var(--radius-lg); }
.adm-skel-block.is-tall { height: 340px; }
@container admpage (min-width: 720px) { .adm-skel-row { height: 68px; } }

/* ================================================================ */
/* Tableau de bord                                                   */
/* ================================================================ */

.adm-kpi-zone { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.adm-kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.adm-kpis-hero > :first-child { grid-column: 1 / -1; }
@container admpage (min-width: 700px) {
  .adm-kpis-hero, .adm-kpis-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-kpis-hero > :first-child { grid-column: auto; }
}
@container admpage (min-width: 1080px) { .adm-kpis-mini { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.adm-kpi {
  position: relative; overflow: hidden; min-width: 0;
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 14px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface-2), var(--bg-elev) 72%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t);
  animation: adm-in 480ms var(--ease-out) both;
}
.adm-kpis > .adm-kpi:nth-child(2) { animation-delay: 50ms; }
.adm-kpis > .adm-kpi:nth-child(3) { animation-delay: 100ms; }
.adm-kpis > .adm-kpi:nth-child(4) { animation-delay: 150ms; }
.adm-kpis > .adm-kpi:nth-child(5) { animation-delay: 200ms; }
.adm-kpis > .adm-kpi:nth-child(6) { animation-delay: 250ms; }
.adm-kpi::after {
  content: ""; position: absolute; right: -48px; top: -48px; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%); pointer-events: none;
}
.adm-kpi:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 14px 34px -18px var(--accent-glow); }
.adm-kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.adm-kpi-label { font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--text-dim); }
.adm-kpi-icon {
  position: relative; z-index: 1;
  display: grid; place-items: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: 10px;
  color: var(--accent-hot); background: var(--accent-soft);
  box-shadow: 0 0 18px -6px var(--accent-glow);
}
.adm-kpi.is-ember .adm-kpi-icon { color: var(--ember); background: var(--ember-soft); }
.adm-kpi-value {
  margin-top: 6px;
  font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1; letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-kpi-value small { font-size: 0.58em; color: var(--text-mute); letter-spacing: 0.02em; }
.adm-kpi-sub { font-size: 12px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-kpi-lg { padding: 16px 16px 0; min-height: 158px; }
.adm-kpi-lg .adm-kpi-icon { width: 38px; height: 38px; border-radius: 12px; }
.adm-kpi-lg .adm-kpi-label { font-size: 13px; }
.adm-kpi-lg .adm-kpi-value { font-size: 46px; }
.adm-kpi-spark { height: 46px; margin: auto -16px 0; padding-top: 8px; }
.adm-spark { display: block; width: 100%; height: 100%; }
.adm-spark-line { fill: none; stroke: var(--accent-hot); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.adm-kpi.is-ember .adm-spark-line { stroke: var(--ember); }

.adm-delta {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px 2px 4px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.adm-delta.is-up { color: var(--success); background: rgba(61, 220, 132, 0.12); }
.adm-delta.is-down { color: var(--danger); background: rgba(255, 77, 79, 0.12); }
.adm-delta.is-flat { padding: 2px 8px; color: var(--text-mute); background: rgba(255, 255, 255, 0.05); }

/* ---------------- Graphique ---------------- */

.adm-chart-card .adm-card-actions { gap: 8px; }
.adm-chart-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.adm-chart-stat {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--border);
}
.adm-chart-stat-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-mute); }
.adm-chart-stat-value { font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-chart-stat-sub { font-size: 11px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.adm-chart {
  position: relative; height: 230px;
  border-radius: var(--radius-sm); outline: none;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  transition: opacity var(--t) var(--ease);
}
@container admpage (min-width: 700px) { .adm-chart { height: 300px; } }
.adm-chart:focus-visible { box-shadow: 0 0 0 2px var(--accent-hot); }
.adm-chart.is-loading { opacity: 0.4; pointer-events: none; }
.adm-chart-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; touch-action: pan-y; }
.adm-chart-grid line { stroke: var(--border); stroke-dasharray: 3 5; }
.adm-chart-grid line.is-base { stroke: var(--border-strong); stroke-dasharray: none; }
.adm-chart-axis { fill: var(--text-mute); font-family: var(--font-body); font-size: 11px; font-variant-numeric: tabular-nums; }
.adm-chart-stop { stop-color: var(--accent); }
.adm-chart-line { fill: none; stroke: var(--accent-hot); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.adm-chart-glow { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; opacity: 0.2; }
.adm-chart-line.is-anim, .adm-chart-glow.is-anim { stroke-dasharray: 1; stroke-dashoffset: 1; animation: adm-draw 1100ms var(--ease-out) forwards; }
.adm-chart-area.is-anim { animation: adm-fade 900ms var(--ease) both; }
@keyframes adm-draw { to { stroke-dashoffset: 0; } }
@keyframes adm-fade { from { opacity: 0; } }
.adm-chart-last { fill: var(--accent-hot); stroke: var(--bg); stroke-width: 2; }
.adm-chart-halo { fill: var(--accent-hot); transform-box: fill-box; transform-origin: center; animation: adm-pulse 2.4s ease-out infinite; }
@keyframes adm-pulse { from { transform: scale(1); opacity: 0.6; } to { transform: scale(3.6); opacity: 0; } }
.adm-chart-cross { stroke: var(--text-mute); stroke-width: 1; stroke-dasharray: 4 4; }
.adm-chart-dot { fill: var(--bg); stroke: var(--accent-hot); stroke-width: 3; filter: drop-shadow(0 0 6px var(--accent-glow)); }
.adm-chart-hit { fill: transparent; cursor: crosshair; }
.adm-chart-tip {
  position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none;
  min-width: 156px; padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow), 0 0 30px -10px var(--accent-glow);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 12px;
  transition: transform 80ms linear;
}
.adm-chart-tip-date { margin-bottom: 6px; font-weight: 700; color: var(--text); }
.adm-chart-tip-date::first-letter { text-transform: uppercase; }
.adm-chart-tip-row { display: flex; align-items: center; gap: 8px; line-height: 1.75; color: var(--text-mute); }
.adm-chart-tip-row strong { margin-left: auto; padding-left: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.adm-chart-tip-row.is-active, .adm-chart-tip-row.is-active strong { color: var(--text); }
.adm-chart-tip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border-strong); }
.adm-chart-tip-row.is-active .adm-chart-tip-dot { background: var(--accent-hot); box-shadow: 0 0 8px var(--accent-glow); }
.adm-chart-empty {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 8px; max-width: 90%;
  padding: 8px 14px; border-radius: var(--radius-pill);
  font-size: 13px; color: var(--text-dim); text-align: center; pointer-events: none;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
}
.adm-chart-empty .icon { color: var(--accent-hot); }

/* ---------------- Classement & flux ---------------- */

.adm-dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.adm-dash-grid .adm-card { margin-bottom: 0; }
.adm-dash-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@container admpage (min-width: 980px) {
  .adm-dash-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
}
.adm-dash-grid .empty { padding: 28px 12px; }
.adm-dash-grid .empty-icon { width: 64px; height: 64px; }
.adm-dash-grid .empty-title { font-size: 22px; }

.adm-top { display: flex; flex-direction: column; gap: 2px; }
.adm-top-item {
  display: grid; grid-template-columns: 26px 42px minmax(0, 1fr); align-items: center; gap: 12px;
  margin: 0 -8px; padding: 8px; border-radius: var(--radius-sm);
  transition: background var(--t);
}
.adm-top-item:hover { background: rgba(255, 255, 255, 0.03); }
.adm-rank { font-family: var(--font-display); font-size: 24px; line-height: 1; text-align: center; color: var(--text-mute); }
.adm-rank.is-podium { color: var(--accent-hot); text-shadow: 0 0 14px var(--accent-glow); }
.adm-top-thumb { display: block; width: 42px; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--surface-3); box-shadow: var(--shadow-sm); }
.adm-top-thumb img { width: 100%; height: 100%; }
.adm-top-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.adm-top-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.adm-top-title { min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color var(--t); }
.adm-top-title:hover { color: var(--accent-hot); }
.adm-top-line .adm-icon-link { margin-left: auto; }
.adm-top-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-mute); }
.adm-top-stats span { display: inline-flex; align-items: center; gap: 4px; }
.adm-bar { height: 5px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.adm-bar span {
  display: block; height: 100%; border-radius: inherit; transform-origin: left;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-hot));
  box-shadow: 0 0 10px var(--accent-glow);
  animation: adm-grow 1s var(--ease-out) both;
}
@keyframes adm-grow { from { transform: scaleX(0); } }

.adm-feed { display: flex; flex-direction: column; }
.adm-feed-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.adm-feed-item:first-child { padding-top: 2px; border-top: 0; }
.adm-feed-item:last-child { padding-bottom: 0; }
.adm-feed-item.is-user { align-items: center; }
.adm-feed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.adm-feed-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; min-width: 0; }
.adm-feed-head strong { max-width: 100%; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-feed-time { margin-left: auto; font-size: 12px; color: var(--text-mute); white-space: nowrap; }
.adm-feed-body { font-size: 13px; color: var(--text-dim); overflow-wrap: anywhere; }
.adm-feed-on { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; font-size: 12px; font-weight: 600; color: var(--text-mute); transition: color var(--t); }
.adm-feed-on:hover { color: var(--accent-hot); }
.adm-feed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--text-mute); }

/* ================================================================ */
/* Liste des contenus (cartes → tableau)                             */
/* ================================================================ */

.adm-clist, .adm-ulist, .adm-comments { display: flex; flex-direction: column; gap: 10px; transition: opacity var(--t) var(--ease); }
.adm-clist.is-busy, .adm-ulist.is-busy, .adm-comments.is-busy { opacity: 0.5; pointer-events: none; }

.adm-crow {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto auto;
  grid-template-areas:
    "poster title title title"
    "poster cats  cats  cats"
    "poster stats stats stats"
    "pub    pub   star  actions";
  align-items: center;
  gap: 8px 12px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-elev));
  transition: background var(--t) var(--ease), border-color var(--t);
}
.adm-crow-head { display: none; }
.adm-c-poster { grid-area: poster; align-self: start; display: block; width: 72px; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--surface-3); box-shadow: var(--shadow-sm); }
.adm-c-poster img { width: 100%; height: 100%; transition: filter var(--t); }
/* Affiche introuvable (lien mort) : fond neutre plutôt que l'icône « image cassée » du navigateur. */
.adm-c-poster img.img-broken { visibility: hidden; }
.adm-c-noposter {
  display: grid; place-items: center; width: 100%; height: 100%;
  color: var(--text-mute);
  background: radial-gradient(circle, var(--accent-soft), transparent 70%), var(--surface-3);
}
.adm-c-title { grid-area: title; min-width: 0; }
.adm-c-name {
  font-size: 15px; font-weight: 700; line-height: 1.3; transition: color var(--t);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere;
}
.adm-c-name:hover { color: var(--accent-hot); }
.adm-c-slug { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; margin-top: 3px; font-size: 12px; color: var(--text-mute); }
.adm-c-slug .badge { height: 20px; }
.adm-c-cats { grid-area: cats; display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.adm-c-cats .chip { cursor: default; }
/* Mobile : la qualité se pose en badge sur l'affiche. */
.adm-c-quality { grid-area: poster; align-self: start; justify-self: start; z-index: 1; margin: 5px 0 0 5px; pointer-events: none; }
.adm-c-quality .adm-badge-quality { height: 20px; padding: 0 6px; font-size: 10px; color: #fff; background: rgba(0, 0, 0, 0.66); border-color: rgba(255, 255, 255, 0.25); backdrop-filter: blur(6px); }
.adm-c-quality.is-empty { display: none; }
.adm-c-stats { grid-area: stats; display: flex; gap: 12px; font-size: 12.5px; font-weight: 600; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.adm-c-stats span { display: inline-flex; align-items: center; gap: 4px; }
.adm-c-stats .icon { color: var(--text-mute); }
.adm-c-pub { grid-area: pub; }
.adm-c-star { grid-area: star; }
.adm-c-actions { grid-area: actions; justify-content: flex-end; gap: 2px; }
.adm-c-pub, .adm-c-star, .adm-c-actions { display: flex; align-items: center; align-self: stretch; padding-top: 10px; border-top: 1px solid var(--border); }
.adm-c-pub, .adm-c-star { margin-right: -12px; padding-right: 12px; }
.adm-crow.is-draft { border-style: dashed; border-color: var(--border-strong); }
.adm-crow.is-draft .adm-c-poster img { filter: grayscale(0.85) brightness(0.65); }

.adm-star {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--text-mute);
  transition: color var(--t), background var(--t), transform var(--t-fast) var(--ease);
}
.adm-star:hover { color: var(--ember); background: rgba(255, 255, 255, 0.05); }
.adm-star:active { transform: scale(0.88); }
.adm-star.is-on { color: var(--ember); filter: drop-shadow(0 0 8px var(--ember)); }
.adm-star.is-on .icon { fill: currentColor; }
.adm-star:disabled { opacity: 0.5; cursor: progress; }

@container admpage (min-width: 720px) {
  .adm-clist {
    gap: 0; overflow: hidden;
    border-radius: var(--radius-lg); border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface), var(--bg-elev));
  }
  .adm-crow {
    grid-template-columns: 46px minmax(0, 1fr) 70px 100px 56px 44px var(--adm-act-w);
    grid-template-areas:
      "poster title quality stats pub star actions"
      "poster cats  quality stats pub star actions";
    gap: 3px 12px;
    padding: 10px 16px;
    border: 0; border-top: 1px solid var(--border); border-radius: 0;
    background: none;
  }
  .adm-crow:hover { background: rgba(255, 255, 255, 0.025); }
  .adm-crow.is-draft { border-style: solid; border-color: var(--border); background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, 0.012) 14px 28px); }
  .adm-crow-head {
    display: grid;
    grid-template-areas: "poster title quality stats pub star actions";
    padding: 12px 16px; border-top: 0;
    font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute);
    background: rgba(255, 255, 255, 0.02);
  }
  .adm-crow-head:hover { background: rgba(255, 255, 255, 0.02); }
  .adm-crow-head > * { padding: 0 !important; margin: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; aspect-ratio: auto !important; font: inherit !important; color: inherit !important; }
  .adm-crow-head .adm-c-cats { display: none; }
  .adm-c-poster { width: 46px; align-self: center; }
  .adm-c-quality, .adm-c-quality.is-empty { grid-area: quality; display: block; align-self: center; margin: 0; z-index: auto; pointer-events: auto; }
  .adm-c-quality .adm-badge-quality { height: 22px; padding: 0 8px; font-size: 11px; color: var(--text); background: var(--surface-3); border-color: var(--border-strong); backdrop-filter: none; }
  .adm-c-title { align-self: end; }
  .adm-c-cats { align-self: start; }
  .adm-c-pub, .adm-c-star, .adm-c-actions { padding: 0; margin: 0; border-top: 0; align-self: center; }
  .adm-c-pub .toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .adm-c-name { -webkit-line-clamp: 1; line-clamp: 1; font-size: 14.5px; }
}
@container admpage (min-width: 1100px) {
  .adm-crow {
    grid-template-columns: 46px minmax(0, 1.5fr) minmax(0, 1fr) 82px 116px 64px 48px var(--adm-act-w);
    gap: 3px 14px;
    grid-template-areas: "poster title cats quality stats pub star actions";
  }
  .adm-crow-head { grid-template-areas: "poster title cats quality stats pub star actions"; }
  .adm-crow-head .adm-c-cats { display: block; }
  .adm-c-title, .adm-c-cats { align-self: center; }
}

/* ---------------- Bouton flottant « + » ---------------- */

.adm-fab {
  position: fixed; z-index: 60;
  right: max(18px, env(safe-area-inset-right, 0px));
  bottom: calc(18px + var(--safe-bottom));
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--on-accent);
  background: radial-gradient(circle at 32% 26%, var(--accent-hot), var(--accent) 58%, var(--accent-deep));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 14px 34px -6px var(--accent-glow), 0 0 0 6px var(--accent-soft);
  transition: transform var(--t) var(--ease-out), box-shadow var(--t);
  animation: adm-fab-in 460ms var(--ease-out) both;
}
.adm-fab::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  animation: adm-ring 2.8s ease-out infinite;
}
.adm-fab .icon { transition: transform var(--t) var(--ease-out); }
.adm-fab:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 18px 40px -6px var(--accent-glow), 0 0 0 8px var(--accent-soft); }
.adm-fab:hover .icon { transform: rotate(90deg); }
.adm-fab:active { transform: scale(0.93); }
body.modal-open .adm-fab { visibility: hidden; }
@keyframes adm-fab-in { from { transform: scale(0.3); opacity: 0; } }
@keyframes adm-ring { from { box-shadow: 0 0 0 0 var(--accent-glow); } to { box-shadow: 0 0 0 18px transparent; } }
/* Desktop : la barre latérale et l'en-tête ont déjà leur bouton « Ajouter ». */
@media (min-width: 1024px) { .adm-fab { display: none; } }

/* ================================================================ */
/* Formulaire de contenu                                             */
/* ================================================================ */

.adm-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.adm-editor-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.adm-editor-main .adm-card, .adm-settings .adm-card { margin-bottom: 0; }
.adm-form-fields { display: flex; flex-direction: column; gap: 20px; }
.adm-field { min-width: 0; }
.adm-field .label { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.adm-field-error:not([hidden]) { animation: adm-shake 320ms var(--ease); }
@keyframes adm-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.adm-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@container admpage (min-width: 640px) { .adm-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.adm-input-lg { min-height: 54px; font-size: 18px; font-weight: 600; }
.adm-slug-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.adm-slug-hint > .icon { flex: none; align-self: flex-start; margin-top: 3px; } /* centré sur la 1re ligne */
.adm-slug-hint > span:last-child { flex: 1 1 12ch; min-width: 0; }
.adm-slug-path { min-width: 0; max-width: 100%; padding: 1px 6px; border-radius: 5px; font-family: var(--adm-mono); font-size: 11.5px; color: var(--text-dim); background: rgba(255, 255, 255, 0.05); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-field-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.adm-counter { margin-left: auto; font-size: 12px; color: var(--text-mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-counter.is-warn { color: var(--warning); }
.adm-count-pill { margin-left: 8px; padding: 1px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; color: var(--accent-hot); background: var(--accent-soft); }

/* Date */
.adm-date { display: flex; align-items: center; gap: 8px; }
.adm-date-box { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.adm-date-box .input { padding-right: 54px; }
.adm-date-pick {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 42px; height: 38px; border-radius: 8px; overflow: hidden;
  display: grid; place-items: center; color: var(--accent-hot);
  transition: background var(--t);
}
.adm-date-pick:hover { background: var(--accent-soft); }
.adm-date-pick:focus-within { outline: 2px solid var(--accent-hot); outline-offset: 0; }
.adm-date-native { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.adm-date-native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.adm-date-clear { flex-shrink: 0; color: var(--text-dim); }
.adm-date-echo { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--success); }
.adm-date-echo:empty { display: none; }

/* Auteurs & catégories */
.adm-chips-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-catfield { display: flex; flex-direction: column; gap: 12px; }
.adm-catpick { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-catchip { min-height: 40px; padding: 0 14px 0 10px; }
.adm-catchip-check {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.07); transition: background var(--t);
}
.adm-catchip[aria-pressed="true"] .adm-catchip-check { background: rgba(255, 255, 255, 0.24); }
.adm-newcat { display: flex; gap: 8px; }
.adm-newcat-group { flex: 1; min-width: 0; }
.adm-newcat .btn { flex-shrink: 0; }

/* Images */
.adm-media { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 12px; align-items: start; }
.adm-media.is-wide { grid-template-columns: minmax(0, 1fr); }
@container admpage (max-width: 639px) {
  .adm-media.is-wide .adm-imgprev[data-state="empty"] { display: none; }
}
@container admpage (min-width: 640px) {
  .adm-media { grid-template-columns: minmax(0, 1fr) 108px; }
  .adm-media.is-wide { grid-template-columns: minmax(0, 1fr) 210px; }
}
.adm-media-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.adm-media-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.adm-paste { color: var(--text-dim); }
.adm-imgprev {
  position: relative; overflow: hidden; border-radius: 10px;
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--surface) 10px 20px);
  border: 1px dashed var(--border-strong);
}
.adm-imgprev.is-poster { aspect-ratio: 2 / 3; }
.adm-imgprev.is-wide { aspect-ratio: 16 / 9; }
.adm-imgprev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 320ms var(--ease); }
.adm-imgprev-ph {
  position: absolute; inset: 0; padding: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 11px; font-weight: 600; line-height: 1.3; text-align: center; color: var(--text-mute);
}
.adm-imgprev[data-state="ok"] { border-style: solid; border-color: var(--border); }
.adm-imgprev[data-state="ok"] img { opacity: 1; }
.adm-imgprev[data-state="ok"] .adm-imgprev-ph { display: none; }
.adm-imgprev[data-state="error"] { border-color: rgba(255, 77, 79, 0.45); }
.adm-imgprev[data-state="error"] .adm-imgprev-ph { color: var(--danger); }
.adm-imgprev[data-state="loading"]::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: ev-shimmer 1.2s infinite; transform: translateX(-100%);
}

/* Qualité */
.adm-qual { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.adm-qual-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-qual .chip { min-height: 42px; padding: 0 16px; font-variant-numeric: tabular-nums; }
.adm-qual-input { flex: 1 1 160px; min-width: 0; max-width: 280px; }

/* Lien iframe */
.adm-iframe { display: flex; flex-direction: column; gap: 8px; }
.adm-iframe-input { min-height: 58px; font-family: var(--adm-mono); line-height: 1.45; word-break: break-all; resize: vertical; }
@media (pointer: fine) { .adm-iframe-input { font-size: 14px; } }
.adm-iframe-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.adm-iframe-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; line-height: 1.5; color: var(--text-mute); }
.adm-iframe-status > .icon { flex-shrink: 0; }
.adm-iframe-status.is-ok > .icon { color: var(--success); }
.adm-iframe-status.is-ok > span { color: var(--text-dim); }
.adm-iframe-status.is-bad { color: var(--danger); }
.adm-iframe-src {
  display: block; width: 100%; margin-top: 2px; padding: 7px 10px;
  border-radius: 8px; background: var(--bg-elev); border: 1px solid var(--border);
  font-family: var(--adm-mono); font-size: 12px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-player-zone { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.adm-player-zone:empty { display: none; }
.adm-player {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); background: #000;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow), 0 0 60px -20px var(--accent-glow);
  animation: adm-in 320ms var(--ease-out) both;
}
.adm-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.adm-player-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }

/* Interrupteurs */
.adm-switch {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02);
  transition: border-color var(--t), background var(--t);
}
.adm-switch:has(.toggle-input:checked) { border-color: var(--border-strong); background: var(--accent-soft); }
.adm-switch-ico { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; color: var(--accent-hot); background: var(--accent-soft); }
.adm-switch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.adm-switch-text strong { font-size: 14px; }
.adm-switch-text span { font-size: 12px; color: var(--text-mute); }
.adm-switch .toggle { flex-shrink: 0; }

/* Aperçu (colonne de droite) */
.adm-editor-aside { min-width: 0; }
.adm-aside-card { overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--border); background: linear-gradient(180deg, var(--surface), var(--bg-elev)); }
.adm-aside-head { display: none; }
.adm-aside-toggle { width: 100%; min-height: 54px; padding: 0 18px; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; text-align: left; }
.adm-aside-toggle > .icon:first-child { color: var(--accent-hot); }
.adm-aside-chev { margin-left: auto; color: var(--text-mute); transition: transform var(--t) var(--ease); }
.adm-editor-aside.is-open .adm-aside-chev { transform: rotate(180deg); }
.adm-aside-body { display: none; padding: 0 16px 16px; }
.adm-editor-aside.is-open .adm-aside-body { display: block; animation: adm-in 260ms var(--ease-out) both; }

.adm-pv-label { margin: 14px 0 8px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); }
.adm-pv-label:first-child { margin-top: 4px; }
.adm-pv-cardwrap {
  display: flex; justify-content: center; padding: 18px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: radial-gradient(90% 80% at 50% 0%, var(--accent-soft), transparent 70%), var(--bg);
}
.adm-pv-card { width: 148px; }
.adm-pv-poster { position: relative; overflow: hidden; border-radius: 10px; box-shadow: var(--shadow), 0 0 0 1px var(--border); }
.adm-pv-poster .adm-imgprev { border: 0; border-radius: 0; }
.adm-pv-quality { position: absolute; top: 8px; left: 8px; }
.adm-pv-ribbon {
  position: absolute; left: 8px; bottom: 8px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--on-accent); background: var(--accent); box-shadow: 0 4px 14px -4px var(--accent-glow);
}
.adm-pv-card-title { margin-top: 9px; font-size: 13px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.adm-pv-card-meta { margin-top: 2px; font-size: 11px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-pv-hero { position: relative; overflow: hidden; aspect-ratio: 16 / 11; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); }
.adm-pv-hero .adm-imgprev { position: absolute; inset: 0; aspect-ratio: auto; border: 0; border-radius: 0; background: radial-gradient(100% 90% at 80% 10%, var(--accent-deep), var(--bg) 70%); }
.adm-pv-hero .adm-imgprev-ph { display: none; }
.adm-pv-hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, var(--bg) 8%, rgba(0, 0, 0, 0.62) 52%, rgba(0, 0, 0, 0.18) 100%), var(--hero-tint);
}
.adm-pv-hero-content { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.adm-pv-hero-kicker { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-hot); }
.adm-pv-hero-kicker span { display: inline-flex; align-items: center; gap: 4px; }
.adm-pv-hero-title {
  font-family: var(--font-display); font-size: 28px; line-height: 0.95; letter-spacing: 0.03em; text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  padding-top: 0.14em; /* accents des capitales (« MÂCHOIRES ») non coupés par overflow: hidden */
}
.adm-pv-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 11px; font-weight: 600; color: var(--text-dim); }
.adm-pv-hero-meta .badge { height: 18px; padding: 0 6px; font-size: 9px; }
.adm-pv-hero-syn { font-size: 11px; line-height: 1.45; color: var(--text-dim); }
.adm-pv-hero-syn.is-placeholder { font-style: italic; color: var(--text-mute); }
.adm-pv-hero-btns { display: flex; gap: 6px; margin-top: 2px; }
.adm-pv-btn { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--text); background: rgba(255, 255, 255, 0.14); }
.adm-pv-btn.is-primary { color: var(--bg); background: var(--text); }
.adm-pv-draft {
  display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px;
  border-radius: var(--radius-sm); font-size: 12px; font-weight: 600;
  color: var(--ember); background: var(--ember-soft);
}
.adm-pv-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.adm-pv-stats > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); }
.adm-pv-stats span { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.adm-pv-stats strong { font-size: 13px; line-height: 1.25; white-space: normal; font-variant-numeric: tabular-nums; }

@container admpage (min-width: 940px) {
  .adm-editor { grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; }
  .adm-editor-main { grid-column: 1; grid-row: 1; }
  .adm-editor-aside { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: calc(var(--adm-top) + 20px); }
  .adm-editor > .adm-savebar { grid-column: 1; grid-row: 2; }
  .adm-aside-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 2px; font-size: 13px; font-weight: 700; }
  .adm-aside-head .icon { color: var(--accent-hot); }
  .adm-aside-toggle { display: none; }
  .adm-aside-body, .adm-editor-aside.is-open .adm-aside-body { display: block; animation: none; }
}

/* ---------------- Barre d'enregistrement collante ---------------- */

.adm-savebar {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 12px var(--gutter) calc(12px + var(--safe-bottom));
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-top: 1px solid var(--border-strong);
  box-shadow: 0 -14px 34px -14px rgba(0, 0, 0, 0.7);
  transition: border-color var(--t), box-shadow var(--t);
}
.adm-savebar.is-dirty { border-top-color: var(--accent); box-shadow: 0 -14px 34px -14px rgba(0, 0, 0, 0.7), 0 -8px 34px -18px var(--accent-glow); }
.adm-savebar-status { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 13px; color: var(--text-dim); }
.adm-savebar-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-savebar-dot { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.15); }
.adm-savebar.is-dirty .adm-savebar-dot { background: var(--accent-hot); box-shadow: 0 0 0 4px var(--accent-soft), 0 0 12px var(--accent-glow); animation: adm-blink 1.6s ease-in-out infinite; }
.adm-savebar.is-hint .adm-savebar-dot { background: var(--text-mute); box-shadow: none; }
@keyframes adm-blink { 50% { opacity: 0.35; } }
.adm-savebar-btns { display: flex; gap: 8px; flex-shrink: 0; }
.adm-save-btn { min-width: 140px; }
@container admpage (max-width: 480px) {
  .adm-savebar-auto:not(.is-dirty) { display: none; }
  .adm-savebar-status { display: none; }
  .adm-savebar-btns { flex: 1; }
  .adm-savebar-btns > :first-child { flex: 1 1 0; }
  .adm-savebar-btns > .adm-save-btn { flex: 2 1 0; min-width: 0; }
}
@container admpage (min-width: 720px) {
  .adm-savebar {
    bottom: 16px; margin: 0; padding: 12px 12px 12px 18px;
    border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
  }
  .adm-savebar.is-dirty { border-color: var(--accent); box-shadow: var(--shadow), 0 0 0 1px var(--accent-soft), 0 12px 40px -14px var(--accent-glow); }
}

/* ================================================================ */
/* Catégories                                                        */
/* ================================================================ */

.adm-addcat { display: flex; gap: 10px; }
.adm-addcat .input-group { min-width: 0; }
.adm-addcat .btn { flex-shrink: 0; }
.adm-addcat + .field-error { margin-top: 8px; }
.adm-cats { display: flex; flex-direction: column; }
.adm-cat {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 12px;
  padding: 12px 16px; border-top: 1px solid var(--border);
  transition: background var(--t);
}
.adm-cat.has-grip { grid-template-columns: auto auto minmax(0, 1fr) auto; }
.adm-cat:first-child { border-top: 0; }
.adm-cat:hover { background: rgba(255, 255, 255, 0.02); }
.adm-cat-grip { display: grid; place-items: center; width: 22px; height: 40px; color: var(--text-mute); cursor: grab; touch-action: none; }
.adm-cat-grip:active { cursor: grabbing; }
.adm-cat-pos { width: 30px; text-align: center; font-family: var(--font-display); font-size: 24px; line-height: 1; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.adm-cat-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.adm-cat-name { min-width: 0; }
.adm-cat-namebtn {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  min-height: 34px; margin-left: -6px; padding: 0 6px; border-radius: 8px;
  font-size: 15px; font-weight: 700; text-align: left;
  transition: background var(--t);
}
.adm-cat-namebtn:hover { background: rgba(255, 255, 255, 0.05); }
.adm-cat-namebtn .icon { color: var(--text-mute); opacity: 0; transition: opacity var(--t); }
.adm-cat-namebtn:hover .icon, .adm-cat-namebtn:focus-visible .icon { opacity: 1; }
@media (hover: none) { .adm-cat-namebtn .icon { opacity: 0.6; } }
.adm-cat-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-cat-edit { display: flex; align-items: center; gap: 6px; }
.adm-cat-input { min-height: 40px; padding: 6px 12px; }
.adm-cat-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--text-mute); min-width: 0; }
.adm-cat-meta a { transition: color var(--t); }
.adm-cat-meta a:hover { color: var(--accent-hot); }
.adm-cat-counts { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.adm-cat-actions { display: flex; align-items: center; gap: 2px; }
.adm-cat.is-dragging { opacity: 0.55; background: var(--accent-soft); }
.adm-cat.is-flash { animation: adm-flash 1.5s var(--ease); }
@keyframes adm-flash {
  0%, 35% { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent-hot); }
  100% { background: transparent; box-shadow: inset 0 0 0 transparent; }
}
.adm-order-status { font-size: 12px; font-weight: 600; color: var(--text-mute); }
.adm-order-status.is-pending { color: var(--ember); }
.adm-order-status.is-ok { color: var(--success); }
@container admpage (max-width: 520px) {
  .adm-cat-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: -2px; }
  .adm-addcat .btn { padding: 0 14px; }
}

/* ================================================================ */
/* Commentaires                                                      */
/* ================================================================ */

.adm-comment {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start;
  padding: 14px; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-elev));
  animation: adm-in 320ms var(--ease-out) both;
}
.adm-comment-main { min-width: 0; }
.adm-comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.adm-comment-author { font-weight: 700; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-comment-time { font-size: 12px; color: var(--text-mute); }
.adm-comment-on { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--accent-hot); }
.adm-comment-on span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.adm-comment-on:hover { text-decoration: underline; text-underline-offset: 3px; }
.adm-comment-body {
  margin-top: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); border-left: 2px solid var(--accent-deep);
  background: rgba(255, 255, 255, 0.025);
  font-size: 14px; color: var(--text-dim); white-space: pre-wrap; overflow-wrap: anywhere;
}
.adm-comment-del { margin: -4px -4px 0 0; }

/* ================================================================ */
/* Utilisateurs (cartes → tableau)                                   */
/* ================================================================ */

.adm-urow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "who   who"
    "prov  counts"
    "dates dates"
    "admin ban";
  align-items: center;
  gap: 10px 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-elev));
}
.adm-urow-head { display: none; }
.adm-u-who { grid-area: who; display: flex; align-items: center; gap: 12px; min-width: 0; }
.adm-u-id { min-width: 0; }
.adm-u-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-weight: 700; min-width: 0; }
.adm-u-name-text { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-u-name .badge { height: 20px; }
.adm-u-email { font-size: 12px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-u-prov { grid-area: prov; }
.adm-u-dates { grid-area: dates; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-mute); }
.adm-u-dates span { display: inline-flex; align-items: center; gap: 5px; }
.adm-u-counts { grid-area: counts; display: flex; gap: 6px; justify-content: flex-end; }
.adm-u-admin { grid-area: admin; }
.adm-u-ban { grid-area: ban; justify-content: flex-end; }
.adm-u-admin, .adm-u-ban { display: flex; align-items: center; align-self: stretch; padding-top: 10px; border-top: 1px solid var(--border); }
.adm-u-admin { margin-right: -12px; padding-right: 12px; }
.adm-urow.is-banned { border-color: rgba(255, 77, 79, 0.3); }
.adm-urow.is-banned .adm-u-who .adm-ava { filter: grayscale(1) opacity(0.6); }
.adm-urow.is-self { box-shadow: inset 3px 0 0 var(--ember); }

@container admpage (min-width: 860px) {
  .adm-ulist {
    gap: 0; overflow: hidden;
    border-radius: var(--radius-lg); border: 1px solid var(--border);
    background: linear-gradient(180deg, var(--surface), var(--bg-elev));
  }
  .adm-urow {
    grid-template-columns: minmax(0, 1.7fr) 100px minmax(0, 1fr) 118px 72px 72px;
    grid-template-areas: "who prov dates counts admin ban";
    gap: 12px 14px; padding: 12px 16px;
    border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none;
  }
  .adm-urow:hover { background: rgba(255, 255, 255, 0.025); }
  .adm-urow.is-banned { background: rgba(255, 77, 79, 0.04); }
  .adm-urow-head {
    display: grid; padding: 12px 16px; border-top: 0;
    font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute);
    background: rgba(255, 255, 255, 0.02);
  }
  .adm-urow-head:hover { background: rgba(255, 255, 255, 0.02); }
  .adm-urow-head > * { padding: 0 !important; margin: 0 !important; border: 0 !important; display: block !important; font: inherit !important; color: inherit !important; }
  .adm-u-dates { flex-direction: column; gap: 2px; }
  .adm-u-counts { justify-content: flex-start; }
  .adm-u-admin, .adm-u-ban { padding: 0; margin: 0; border-top: 0; justify-content: flex-start; align-self: center; }
  .adm-u-admin .toggle-label, .adm-u-ban .toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ================================================================ */
/* Paramètres                                                        */
/* ================================================================ */

.adm-settings { display: flex; flex-direction: column; gap: 16px; }
.adm-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.adm-settings-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@container admpage (min-width: 900px) { .adm-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }

.adm-themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@container admpage (min-width: 820px) { .adm-themes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.adm-theme {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; text-align: left; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--bg-elev);
  transition: border-color var(--t), box-shadow var(--t), transform var(--t) var(--ease);
}
.adm-theme:hover { border-color: var(--accent); transform: translateY(-2px); }
.adm-theme[aria-checked="true"] { border-color: var(--accent-hot); box-shadow: 0 0 0 1px var(--accent-hot), 0 14px 34px -12px var(--accent-glow); }
.adm-theme-check {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  color: var(--on-accent); background: var(--accent); box-shadow: 0 0 12px var(--accent-glow);
  opacity: 0; transform: scale(0.5); transition: opacity var(--t), transform var(--t) var(--ease-out);
}
.adm-theme[aria-checked="true"] .adm-theme-check { opacity: 1; transform: none; }
.adm-theme-text { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.adm-theme-text strong { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 14px; }
.adm-theme-text > span { font-size: 12px; line-height: 1.4; color: var(--text-mute); }
.adm-theme-now { padding: 1px 7px; border-radius: var(--radius-pill); font-size: 10px; font-weight: 700; white-space: nowrap; color: var(--accent-hot); background: var(--accent-soft); }

.adm-theme-mini { display: flex; height: 96px; overflow: hidden; border-bottom: 1px solid var(--border); }
.adm-theme-mini.is-auto .adm-tm-slice { flex: 1; min-width: 0; display: flex; overflow: hidden; }
.adm-theme-mini.is-auto .adm-tm-slice + .adm-tm-slice { border-left: 1px solid rgba(255, 255, 255, 0.1); }
.adm-tm {
  flex: 1; min-width: 0; height: 100%;
  display: flex; flex-direction: column; gap: 6px; padding: 9px;
  color: var(--text);
  background: radial-gradient(120% 90% at 0% 100%, var(--accent-soft), transparent 60%), var(--bg);
}
.adm-tm { position: relative; overflow: hidden; }
.adm-tm > :not(.adm-tm-deco) { position: relative; }
.adm-tm-deco { position: absolute; right: -6px; bottom: -8px; color: var(--accent-hot); opacity: 0.22; transform: rotate(-12deg); filter: drop-shadow(0 0 10px var(--accent-glow)); pointer-events: none; }
.is-auto .adm-tm-deco { right: -10px; bottom: -10px; }
.adm-tm-bar { display: flex; align-items: center; gap: 5px; }
.adm-tm-logo { font-family: var(--font-brand); font-size: 16px; line-height: 1; letter-spacing: 0.03em; color: var(--accent-hot); text-shadow: var(--glow-text); }
.adm-tm-nav { width: 12px; height: 3px; border-radius: 2px; background: var(--text-mute); opacity: 0.7; }
.adm-tm-nav:nth-child(2) { margin-left: auto; }
.adm-tm-hero { display: flex; flex-direction: column; gap: 3px; margin-top: auto; }
.adm-tm-title { width: 62%; height: 6px; border-radius: 2px; background: var(--text); }
.adm-tm-line { width: 82%; height: 3px; border-radius: 2px; background: var(--text-mute); }
.adm-tm-btn { width: 26px; height: 7px; margin-top: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.adm-tm-row { display: flex; gap: 3px; }
.adm-tm-row span { flex: 1; height: 16px; border-radius: 2px; background: var(--surface-3); }
.adm-tm-row span:first-child { background: var(--accent-deep); }
.is-auto .adm-tm { padding: 7px; }
.is-auto .adm-tm-logo { font-size: 13px; }
.is-auto .adm-tm-nav { display: none; }

.adm-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.adm-inline > .grow { flex: 1 1 220px; }
.adm-ad-count { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.adm-stepper { display: inline-flex; align-items: center; padding: 3px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: var(--bg-elev); }
.adm-stepper-btn { display: grid; place-items: center; width: 44px; height: 42px; border-radius: var(--radius-pill); font-size: 24px; line-height: 1; color: var(--text); transition: background var(--t), color var(--t); }
.adm-stepper-btn:hover:not(:disabled) { color: var(--accent-hot); background: var(--accent-soft); }
.adm-stepper-btn:disabled { opacity: 0.3; cursor: default; }
.adm-stepper-val { min-width: 40px; text-align: center; font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--accent-hot); text-shadow: 0 0 14px var(--accent-glow); font-variant-numeric: tabular-nums; }
.adm-adflow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--text-mute); }
.adm-adflow-step { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 700; white-space: nowrap; color: var(--text-dim); background: var(--surface-3); border: 1px solid var(--border); }
.adm-adflow-step.is-play { color: var(--on-accent); background: var(--accent); border-color: transparent; box-shadow: 0 4px 14px -4px var(--accent-glow); }
.adm-ad-explain { padding: 12px 14px; border-radius: var(--radius-sm); border-left: 3px solid var(--accent); background: rgba(255, 255, 255, 0.025); font-size: 13px; color: var(--text-dim); }

.adm-annonce-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--accent-deep), var(--accent), var(--accent-deep));
  color: var(--on-accent); font-size: 13px; font-weight: 600; text-align: center;
  box-shadow: 0 8px 24px -10px var(--accent-glow);
}
.adm-annonce-bar .icon { flex-shrink: 0; }
.adm-annonce-bar span { overflow-wrap: anywhere; }
.adm-annonce-empty { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px dashed var(--border-strong); font-size: 12px; color: var(--text-mute); }

/* ================================================================ */
/* Écrans d'accès (connexion / clé admin)                            */
/* ================================================================ */

.adm-gate { display: grid; place-items: center; min-height: calc(100dvh - var(--adm-top) - 140px); padding: 28px 0; }
.adm-gate-card {
  position: relative; overflow: hidden;
  width: 100%; max-width: 440px;
  padding: 34px 22px 24px;
  border-radius: 24px; text-align: center;
  border: 1px solid var(--border-strong);
  background: linear-gradient(180deg, var(--surface-2), var(--bg-elev));
  box-shadow: var(--shadow-lg), 0 0 120px -40px var(--accent-glow);
  animation: adm-in 460ms var(--ease-out) both;
}
@media (min-width: 480px) { .adm-gate-card { padding: 40px 34px 28px; } }
.adm-gate-glow { position: absolute; left: -20%; right: -20%; top: -45%; height: 280px; border-radius: 50%; background: radial-gradient(closest-side, var(--accent-glow), transparent); opacity: 0.35; pointer-events: none; }
.adm-gate-card > :not(.adm-gate-glow) { position: relative; }
.adm-gate-logo { display: flex; justify-content: center; margin-bottom: 16px; }
.adm-gate-logo .adm-logo-mark { width: 66px; height: 66px; border-radius: 20px; animation: adm-heartbeat 3.4s ease-in-out infinite; }
@keyframes adm-heartbeat { 0%, 60%, 100% { transform: scale(1); } 66% { transform: scale(1.07); } 72% { transform: scale(0.98); } 78% { transform: scale(1.05); } }
.adm-gate .adm-eyebrow { margin-bottom: 4px; }
.adm-gate-title { font-family: var(--font-brand); font-weight: 400; font-size: 44px; line-height: 1.02; letter-spacing: 0.04em; color: var(--accent-hot); text-shadow: var(--glow-text); }
.adm-gate-text { max-width: 360px; margin: 12px auto 22px; font-size: 14px; color: var(--text-dim); }
.adm-gate-text code, .adm-gate-more code { padding: 1px 6px; border-radius: 5px; font-family: var(--adm-mono); font-size: 0.88em; color: var(--accent-hot); background: var(--accent-soft); }
.adm-gate-actions { display: flex; flex-direction: column; gap: 10px; }
.adm-gate-note, .adm-gate-foot { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; font-size: 12px; text-align: left; color: var(--text-mute); }
.adm-gate-note { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ember-soft); color: var(--ember); }
.adm-gate-note .icon, .adm-gate-foot .icon { margin-top: 2px; }
.adm-gate-back { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; min-height: 36px; font-size: 13px; font-weight: 600; color: var(--text-dim); transition: color var(--t); }
.adm-gate-back:hover { color: var(--accent-hot); }
.adm-gate-user { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin-bottom: 16px; padding: 6px 16px 6px 6px; border-radius: var(--radius-pill); text-align: left; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); }
.adm-gate-user > div { min-width: 0; }
.adm-gate-user-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-gate-user .tiny { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-gate-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.adm-key { position: relative; display: flex; align-items: center; }
.adm-key > .icon { position: absolute; left: 14px; color: var(--text-mute); pointer-events: none; }
.adm-key-input { padding-left: 44px; padding-right: 52px; font-family: var(--adm-mono); letter-spacing: 0.05em; }
.adm-key-eye { position: absolute; right: 4px; display: grid; place-items: center; width: 42px; height: 38px; border-radius: 8px; color: var(--text-mute); }
.adm-key-eye:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.adm-gate-error { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; color: var(--text-dim); background: rgba(255, 77, 79, 0.1); border: 1px solid rgba(255, 77, 79, 0.38); animation: adm-shake 320ms var(--ease); }
.adm-gate-error-title { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-weight: 700; color: var(--danger); }
.adm-gate-more { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; text-align: left; color: var(--text-dim); }
.adm-gate-more summary { display: flex; align-items: center; gap: 8px; min-height: 36px; font-weight: 600; cursor: pointer; list-style: none; }
.adm-gate-more summary::-webkit-details-marker { display: none; }
.adm-gate-more summary:hover { color: var(--text); }
.adm-gate-more ul { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.adm-gate-more li { position: relative; padding-left: 16px; }
.adm-gate-more li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-hot); box-shadow: 0 0 8px var(--accent-glow); }
.adm-code { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 5px 5px 5px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border-strong); }
.adm-code code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 0; background: none; font-family: var(--adm-mono); font-size: 12.5px; color: var(--text); scrollbar-width: none; }
.adm-code-copy { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px; color: var(--text-dim); }
.adm-code-copy:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }

/* ================================================================ */
/* Formulaire : infos détaillées (repliable)                         */
/* ================================================================ */

.adm-more-toggle {
  width: 100%; display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 12px 18px; border-radius: var(--radius-lg);
  text-align: left; transition: background var(--t);
}
.adm-more-toggle:hover { background: rgba(255, 255, 255, 0.02); }
.adm-more-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.adm-more-title strong { font-size: 15px; font-weight: 700; }
.adm-more-title span { font-size: 12px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-more-count { flex-shrink: 0; margin-left: 0; }
.adm-more-count.is-empty { color: var(--text-mute); background: rgba(255, 255, 255, 0.05); }
.adm-more-chev { flex-shrink: 0; color: var(--text-mute); transition: transform var(--t) var(--ease); }
.adm-more-card.is-open .adm-more-chev { transform: rotate(180deg); }
.adm-more-body { display: none; }
.adm-more-card.is-open .adm-more-body { display: flex; padding-top: 4px; border-top: 1px solid var(--border); animation: adm-in 260ms var(--ease-out) both; }
.adm-more-card.is-open .adm-more-toggle { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.adm-echo:empty { display: none; }
.adm-extlink { flex-shrink: 0; color: var(--text-dim); }
.adm-inline .grow { min-width: 0; }
.adm-pv-hero-orig { margin-top: -3px; font-size: 11px; font-style: italic; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-pv-rating, .adm-pv-dur { display: inline-flex; align-items: center; gap: 3px; }
.adm-pv-rating { color: var(--ember); font-weight: 800; }
.adm-pv-rating .icon { fill: currentColor; }

/* ================================================================ */
/* Import .zip                                                       */
/* ================================================================ */

.adm-empty-actions { justify-content: center; }

/* Couleur par statut (créé, mis à jour, ignoré, erreur, échec réseau, en attente, IA). */
:is(.adm-irow, .adm-ist, .adm-isum-chip, .adm-iprog-count, .adm-idone-stat) { --st: var(--text-mute); --st-bg: rgba(255, 255, 255, 0.05); }
:is(.adm-irow, .adm-ist, .adm-isum-chip, .adm-iprog-count, .adm-idone-stat).is-all { --st: var(--text); --st-bg: rgba(255, 255, 255, 0.07); }
:is(.adm-irow, .adm-ist, .adm-isum-chip, .adm-iprog-count, .adm-idone-stat).is-create { --st: var(--success); --st-bg: rgba(61, 220, 132, 0.12); }
:is(.adm-irow, .adm-ist, .adm-isum-chip, .adm-iprog-count, .adm-idone-stat).is-update { --st: var(--ember); --st-bg: var(--ember-soft); }
:is(.adm-irow, .adm-ist, .adm-isum-chip, .adm-iprog-count, .adm-idone-stat).is-error { --st: var(--danger); --st-bg: rgba(255, 77, 79, 0.13); }
:is(.adm-irow, .adm-ist, .adm-isum-chip, .adm-iprog-count, .adm-idone-stat).is-failed { --st: var(--warning); --st-bg: rgba(255, 176, 32, 0.13); }
:is(.adm-irow, .adm-ist, .adm-isum-chip, .adm-iprog-count, .adm-idone-stat).is-ai { --st: var(--accent-hot); --st-bg: var(--accent-soft); }

/* ---------------- Étapes ---------------- */

.adm-isteps { display: flex; align-items: center; margin: -4px 0 18px; }
.adm-istep { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text-mute); white-space: nowrap; }
.adm-istep + .adm-istep { flex: 1 1 0; }
.adm-istep + .adm-istep::before { content: ""; flex: 1 1 auto; min-width: 14px; height: 2px; margin: 0 4px; border-radius: 2px; background: var(--border-strong); transition: background var(--t); }
.adm-istep.is-done::before, .adm-istep.is-current::before { background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }
.adm-istep-num {
  display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums;
  border: 1px solid var(--border-strong); background: var(--bg-elev);
}
.adm-istep.is-done { color: var(--text-dim); }
.adm-istep.is-done .adm-istep-num { color: var(--accent-hot); background: var(--accent-soft); border-color: transparent; }
.adm-istep.is-current { color: var(--text); }
.adm-istep.is-current .adm-istep-num { color: var(--on-accent); border-color: transparent; background: linear-gradient(180deg, var(--accent-hot), var(--accent)); box-shadow: 0 0 0 4px var(--accent-soft), 0 6px 18px -4px var(--accent-glow); }

/* ---------------- Notices ---------------- */

.adm-inotices { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.adm-inotices:empty { display: none; }
.adm-inotice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.45; color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-strong);
}
.adm-inotice > .icon { flex-shrink: 0; color: var(--accent-hot); }
.adm-inotice > span { flex: 1 1 200px; min-width: 0; }
.adm-inotice > .btn { flex-shrink: 0; }
.adm-inotice.is-warn { background: rgba(255, 176, 32, 0.07); border-color: rgba(255, 176, 32, 0.3); }
.adm-inotice.is-warn > .icon { color: var(--warning); }
.adm-inotice.is-bad { background: rgba(255, 77, 79, 0.08); border-color: rgba(255, 77, 79, 0.36); }
.adm-inotice.is-bad > .icon { color: var(--danger); }

/* ---------------- Zone de dépôt ---------------- */

.adm-izone .adm-card-body { padding: 12px; }
.adm-ifile-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.adm-drop {
  position: relative; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 268px; padding: 30px 18px; text-align: center;
  border-radius: var(--radius); border: 2px dashed var(--border-strong);
  background:
    radial-gradient(80% 70% at 50% 0%, var(--accent-soft), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.014) 0 14px, transparent 14px 28px),
    var(--bg-elev);
  color: var(--text);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.adm-drop:hover { border-color: var(--accent); }
.adm-drop.is-over { border-color: var(--accent-hot); transform: scale(0.99); box-shadow: inset 0 0 0 4px var(--accent-soft), 0 0 60px -18px var(--accent-glow); }
.adm-drop-ico {
  display: grid; place-items: center; width: 78px; height: 78px; border-radius: 50%;
  color: var(--accent-hot);
  background: radial-gradient(circle, var(--accent-soft), transparent 72%);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  filter: drop-shadow(0 0 14px var(--accent-glow));
  animation: ev-float 4s ease-in-out infinite;
}
.adm-drop-title { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; }
.adm-drop-sub { max-width: 440px; font-size: 14px; color: var(--text-dim); }
.adm-drop-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.adm-drop-tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px;
  border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 600; white-space: nowrap;
  color: var(--text-mute); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
}
.adm-drop-coarse { display: none; }
@media (pointer: coarse) {
  .adm-drop-fine { display: none; }
  .adm-drop-coarse { display: inline; }
}

/* Calque plein écran pendant un glisser de fichier. */
.adm-idrag {
  position: fixed; inset: 0; z-index: 900;
  display: grid; place-items: center; padding: 24px;
  pointer-events: none; opacity: 0; visibility: hidden;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: opacity var(--t) var(--ease), visibility var(--t);
}
.adm-idrag.is-on { opacity: 1; visibility: visible; }
.adm-idrag-box {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 40px 56px; border-radius: var(--radius-lg);
  border: 2px dashed var(--accent-hot); background: var(--surface);
  color: var(--accent-hot); text-align: center;
  box-shadow: var(--shadow-lg), 0 0 90px -10px var(--accent-glow);
}
.adm-idrag-box strong { font-family: var(--font-display); font-weight: 400; font-size: 36px; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); }
.adm-idrag-box span { font-size: 14px; color: var(--text-dim); }

/* Lecture en cours */
.adm-iload { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 18px 8px; }
.adm-iload > .adm-iprog-track { grid-column: 1 / -1; }
.adm-iload-spin {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  border: 3px solid var(--surface-3); border-top-color: var(--accent);
  box-shadow: 0 0 18px -4px var(--accent-glow);
  animation: ev-spin 0.8s linear infinite;
}
.adm-iload-text { display: flex; flex-direction: column; min-width: 0; }
.adm-iload-kicker { font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-hot); }
.adm-iload-name { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-iload-count { font-size: 12px; color: var(--text-mute); font-variant-numeric: tabular-nums; }

/* Fichiers lus */
.adm-ifiles { display: flex; flex-direction: column; gap: 12px; padding: 4px; }
.adm-ifiles-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adm-ifiles-ico {
  display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; border-radius: 14px;
  color: var(--accent-hot); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--border-strong);
}
.adm-ifiles-ico.is-bad { color: var(--danger); background: rgba(255, 77, 79, 0.12); }
.adm-ifiles-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-ifiles-text strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-ifiles-text span { font-size: 12.5px; color: var(--text-dim); }
.adm-ifiles-head .btn { flex-shrink: 0; }
.adm-ierrs { border-radius: var(--radius-sm); border: 1px solid rgba(255, 77, 79, 0.3); background: rgba(255, 77, 79, 0.05); }
.adm-ierrs summary {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  font-size: 13px; font-weight: 700; color: var(--danger); cursor: pointer; list-style: none;
}
.adm-ierrs summary::-webkit-details-marker { display: none; }
.adm-ierrs-chev { margin-left: auto; transition: transform var(--t) var(--ease); }
.adm-ierrs[open] .adm-ierrs-chev { transform: rotate(180deg); }
.adm-ierrs ul { display: flex; flex-direction: column; gap: 10px; max-height: 280px; overflow-y: auto; padding: 0 12px 12px; }
.adm-ierrs li { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12.5px; color: var(--text-dim); }
.adm-ierr-file { display: block; font-family: var(--adm-mono); font-size: 12px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- Options ---------------- */

.adm-iopts { display: flex; flex-direction: column; gap: 10px; transition: opacity var(--t); }
.adm-iopts-card.is-locked .adm-iopts { opacity: 0.6; }
.adm-iopt {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-areas: "ico text ctl";
  align-items: center; gap: 6px 14px;
  padding: 12px 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02);
  transition: border-color var(--t), background var(--t);
}
.adm-iopt > .adm-switch-ico { grid-area: ico; align-self: start; }
.adm-iopt-text { grid-area: text; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
label.adm-iopt-text { cursor: pointer; }
.adm-iopt-text strong { font-size: 14px; }
.adm-iopt-text > span { font-size: 12px; line-height: 1.45; color: var(--text-mute); }
.adm-iopt-ctl { grid-area: ctl; min-width: 0; display: flex; }
.adm-iopt:has(.toggle-input:checked) { border-color: var(--border-strong); background: var(--accent-soft); }
.adm-iopt.is-off { opacity: 0.8; }
.adm-iopt.is-off .adm-switch-ico { color: var(--text-mute); background: rgba(255, 255, 255, 0.05); }
.adm-iopt.is-stack { grid-template-columns: 38px minmax(0, 1fr); grid-template-areas: "ico text" "ctl ctl"; }
.adm-iopt.is-stack .adm-iopt-ctl { padding-top: 4px; }
.adm-iopt-model {
  display: block; width: fit-content; max-width: 100%; margin-top: 4px; padding: 1px 6px; border-radius: 5px;
  font-family: var(--adm-mono); font-size: 11px; color: var(--text-dim); background: rgba(255, 255, 255, 0.05);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-iopt .adm-qual { width: 100%; }

/* ---------------- Progression ---------------- */

.adm-iprog-track {
  position: relative; display: block; height: 12px; overflow: hidden;
  border-radius: var(--radius-pill); background: var(--surface-3);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
}
.adm-iprog-track.is-thin { height: 6px; }
.adm-iprog-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent), var(--accent-hot));
  box-shadow: 0 0 16px var(--accent-glow);
  transition: width 420ms var(--ease-out);
}
.adm-iprog-fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-100%); animation: ev-shimmer 1.4s infinite;
}
.adm-iprog .adm-card-body { display: flex; flex-direction: column; gap: 12px; }
.adm-iprog-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adm-iprog-head .adm-iload-spin { width: 22px; height: 22px; border-width: 2px; }
.adm-iprog-title { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-iprog-pct { font-family: var(--font-display); font-size: 32px; line-height: 1; color: var(--accent-hot); text-shadow: 0 0 14px var(--accent-glow); font-variant-numeric: tabular-nums; }
.adm-iprog-sub { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.adm-iprog-counts { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-iprog-count {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums;
  color: var(--st); background: var(--st-bg);
}

/* ---------------- Rapport final ---------------- */

.adm-idone { overflow: hidden; display: flex; flex-direction: column; gap: 16px; padding: 22px 18px 18px; }
.adm-idone > :not(.adm-idone-glow) { position: relative; }
.adm-idone-glow { position: absolute; left: -10%; right: -10%; top: -62%; height: 280px; border-radius: 50%; background: radial-gradient(closest-side, var(--accent-glow), transparent); opacity: 0.3; pointer-events: none; }
.adm-idone-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.adm-idone-ico { display: grid; place-items: center; flex-shrink: 0; width: 58px; height: 58px; border-radius: 50%; }
.adm-idone-ico.is-ok { color: var(--success); background: rgba(61, 220, 132, 0.14); box-shadow: 0 0 0 6px rgba(61, 220, 132, 0.06), 0 0 32px -6px rgba(61, 220, 132, 0.6); }
.adm-idone-ico.is-warn { color: var(--warning); background: rgba(255, 176, 32, 0.14); box-shadow: 0 0 0 6px rgba(255, 176, 32, 0.06); }
.adm-idone-text { min-width: 0; }
.adm-idone-title { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; overflow-wrap: anywhere; }
.adm-idone-text p { margin-top: 6px; font-size: 13px; color: var(--text-dim); }
.adm-idone-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@container admpage (min-width: 620px) { .adm-idone-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.adm-idone-stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0;
  padding: 12px 14px; border-radius: var(--radius); text-align: left;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 3px 0 -1px var(--st);
  transition: border-color var(--t), background var(--t);
}
.adm-idone-stat strong { font-family: var(--font-display); font-weight: 400; font-size: 40px; line-height: 1; color: var(--st); font-variant-numeric: tabular-nums; }
.adm-idone-stat span { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); }
.adm-idone-stat:hover, .adm-idone-stat[aria-pressed="true"] { border-color: var(--st); background: var(--st-bg); }
.adm-idone-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@container admpage (max-width: 520px) { .adm-idone-actions > * { flex: 1 1 100%; } }

/* ---------------- Tableau des fiches ---------------- */

.adm-isum { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.adm-isum-chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 0 5px 0 13px;
  border-radius: var(--radius-pill); border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px; font-weight: 600; color: var(--text-dim); white-space: nowrap;
  transition: color var(--t), border-color var(--t), background var(--t), box-shadow var(--t);
}
.adm-isum-chip > .icon { color: var(--st); margin-right: -3px; }
.adm-isum-chip:hover { color: var(--text); border-color: var(--st); }
.adm-isum-chip[aria-pressed="true"] { color: var(--text); border-color: var(--st); background: var(--st-bg); box-shadow: inset 0 0 0 1px var(--st); }
.adm-isum-n {
  display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px;
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: var(--st); background: var(--st-bg);
}
.adm-itoolbar { margin-bottom: 12px; }
.adm-iresults .adm-inotice { margin-bottom: 12px; }

.adm-ilist { display: flex; flex-direction: column; gap: 8px; }
.adm-irow {
  position: relative;
  display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-areas: "thumb main" "thumb side";
  gap: 8px 12px; padding: 10px 10px 10px 13px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--bg-elev));
  box-shadow: inset 3px 0 0 var(--st);
  transition: border-color var(--t);
}
.adm-irow.is-running { animation: adm-irow-pulse 1.3s ease-in-out infinite; }
@keyframes adm-irow-pulse { 50% { border-color: var(--accent); } }
.adm-i-thumb { grid-area: thumb; align-self: start; display: block; width: 46px; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 6px; background: var(--surface-3); box-shadow: var(--shadow-sm); }
.adm-i-thumb img { width: 100%; height: 100%; }
.adm-i-nothumb { display: grid; place-items: center; width: 100%; height: 100%; color: var(--text-mute); background: radial-gradient(circle, var(--accent-soft), transparent 70%), var(--surface-3); }
.adm-i-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.adm-i-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.adm-i-title strong {
  min-width: 0; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.adm-i-year { flex-shrink: 0; font-size: 12px; font-weight: 600; color: var(--text-mute); font-variant-numeric: tabular-nums; }
.adm-i-file { min-width: 0; font-family: var(--adm-mono); font-size: 11.5px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-i-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.adm-i-cats .chip { min-height: 22px; padding: 0 8px; font-size: 11px; }
.adm-i-cats .adm-chip-new, .adm-i-cats .adm-chip-new:hover { gap: 3px; padding-left: 6px; border-style: dashed; border-color: var(--accent); color: var(--accent-hot); }
.adm-i-notes { display: flex; flex-direction: column; gap: 4px; margin-top: 5px; }
.adm-i-notes li { display: flex; align-items: flex-start; gap: 6px; min-width: 0; font-size: 12.5px; line-height: 1.4; color: var(--text-dim); overflow-wrap: anywhere; }
.adm-i-notes li > .icon { margin-top: 2px; color: var(--text-mute); }
.adm-i-notes li > span { min-width: 0; }
.adm-i-notes .is-error { color: #ff9c9d; }
.adm-i-notes .is-error > .icon { color: var(--danger); }
.adm-i-notes .is-warn > .icon { color: var(--warning); }
.adm-i-notes .is-ai { color: var(--text); }
.adm-i-notes .is-ai > .icon { color: var(--accent-hot); filter: drop-shadow(0 0 4px var(--accent-glow)); }
.adm-i-trad { margin-top: 6px; font-size: 12.5px; }
.adm-i-trad summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; cursor: pointer; list-style: none;
  border-radius: 999px; border: 1px solid var(--border); color: var(--text-dim); font-weight: 600;
}
.adm-i-trad summary::-webkit-details-marker { display: none; }
.adm-i-trad summary:hover { color: var(--text); border-color: var(--border-strong); }
.adm-i-trad summary .icon:first-child { color: var(--accent-hot); }
.adm-i-trad-chev { transition: transform var(--t) var(--ease); }
.adm-i-trad[open] .adm-i-trad-chev { transform: rotate(180deg); }
.adm-i-trad p {
  margin-top: 8px; padding: 10px 12px; border-left: 2px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-2, rgba(255, 255, 255, 0.03)); color: var(--text); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere;
}
.adm-i-side { grid-area: side; display: flex; align-items: center; gap: 6px; min-width: 0; }
.adm-i-links { display: flex; gap: 2px; margin-left: auto; }
.adm-ist {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px;
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; white-space: nowrap;
  color: var(--st); background: var(--st-bg);
  border: 1px solid var(--border-strong);
  border-color: color-mix(in srgb, var(--st) 32%, transparent);
}
.adm-ist-spin { width: 12px; height: 12px; flex-shrink: 0; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ev-spin 0.7s linear infinite; }
.adm-iempty {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 28px 14px;
  border-radius: var(--radius); border: 1px dashed var(--border-strong);
  font-size: 14px; color: var(--text-mute); text-align: center;
}

@container admpage (min-width: 600px) {
  .adm-irow { grid-template-columns: 46px minmax(0, 1fr) auto; grid-template-areas: "thumb main side"; }
  .adm-i-side { flex-direction: column; align-items: flex-end; align-self: start; }
  .adm-i-links { margin-left: 0; }
}
@container admpage (min-width: 760px) {
  .adm-iopt.is-stack-sm { grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-areas: "ico text ctl"; }
  .adm-iopt.is-stack-sm .adm-iopt-ctl { padding-top: 0; }
  .adm-ilist { gap: 0; }
  .adm-irow { border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; padding: 12px 6px 12px 15px; }
  .adm-irow:first-child { border-top: 0; }
  .adm-irow:hover { background: rgba(255, 255, 255, 0.02); }
  .adm-irow.is-running { animation: none; background: var(--accent-soft); }
}

/* ---------------- Barre d'action collante ---------------- */

.adm-ibar {
  position: sticky; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 18px calc(var(--gutter) * -1) 0;
  padding: 12px var(--gutter) calc(12px + var(--safe-bottom));
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border-top: 1px solid var(--border-strong);
  box-shadow: 0 -14px 34px -14px rgba(0, 0, 0, 0.7);
}
.adm-ibar-prog { position: absolute; left: 0; right: 0; top: -1px; height: 3px; overflow: hidden; border-radius: inherit; pointer-events: none; }
.adm-ibar-prog > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-hot)); box-shadow: 0 0 12px var(--accent-glow); transition: width 420ms var(--ease-out); }
/* Les toasts passent au-dessus des barres collantes du panel (import, formulaire). */
body:has(.adm-ibar:not([hidden])) #toasts, body:has(.adm-savebar) #toasts { bottom: calc(124px + var(--safe-bottom)); }
@media (min-width: 1024px) { body:has(.adm-ibar:not([hidden])) #toasts, body:has(.adm-savebar) #toasts { bottom: 104px; } }
.adm-ibar-text { min-width: 0; font-size: 13px; font-weight: 600; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.adm-ibar-btns { display: flex; gap: 8px; flex-shrink: 0; }
@container admpage (max-width: 520px) {
  .adm-ibar { flex-wrap: wrap; gap: 8px; padding-top: 10px; }
  .adm-ibar-text { width: 100%; text-align: center; font-size: 12px; }
  .adm-ibar-btns { flex: 1 1 100%; min-width: 0; }
  .adm-ibar-main { flex: 1 1 auto; min-width: 0; }
  .adm-ibar-btns > .btn-ghost { flex-shrink: 0; }
}
@container admpage (min-width: 720px) {
  .adm-ibar {
    bottom: 16px; margin: 18px 0 0; padding: 12px 12px 12px 18px;
    border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
  }
  .adm-ibar-prog { left: 18px; right: 18px; border-radius: 0 0 3px 3px; }
}

/* ---------------- Aide : format des fichiers (modale, hors .adm) ---------------- */

.adm-ifmt-intro { margin-bottom: 14px; font-size: 14px; }
.adm-ifmt { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.adm-ifmt li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; font-size: 13px; color: var(--text-dim); }
.adm-ifmt code { font-family: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, Consolas, monospace; font-size: 12px; color: var(--accent-hot); overflow-wrap: anywhere; }
@media (min-width: 640px) { .adm-ifmt li { grid-template-columns: 230px minmax(0, 1fr); gap: 12px; } }
.adm-ifmt-sample {
  margin: 0; max-height: 300px; overflow: auto; padding: 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--bg);
  font-family: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, Consolas, monospace; font-size: 12px; line-height: 1.5; color: var(--text-dim);
}

/* ================================================================ */
/* Écrans tactiles : zones de toucher généreuses                     */
/* ================================================================ */

@media (pointer: coarse) {
  .adm { --adm-act-w: 136px; }
  .adm .btn-sm, .adm-cat-namebtn, .adm .toggle, .adm-catchip, .adm-seg-btn, .adm-seg-sm .adm-seg-btn, .adm-pager-num { min-height: 44px; }
  .adm .btn-sm.btn-icon, .adm-pager-num { width: 44px; min-width: 44px; }
  .adm-icon-link { width: 44px; height: 44px; }
  .adm-mono, .adm-feed-on, .adm-comment-on, .adm-card-link { display: inline-flex; align-items: center; min-height: 44px; }
}

/* ================================================================ */
/* TMDB : bandeau, réparation, outils, import, formulaire, statut    */
/* (SPEC §8.4 — logique dans js/admin/tmdb.js, classes adm-tmdb-*)   */
/* ================================================================ */

/* Statut de chaque fiche réparée (réparé, déjà bon, introuvable, erreur). */
:is(.adm-tmdb-count, .adm-tmdb-st, .adm-tmdb-res) { --st: var(--text-mute); --st-bg: rgba(255, 255, 255, 0.05); }
:is(.adm-tmdb-count, .adm-tmdb-st, .adm-tmdb-res).is-fixed { --st: var(--success); --st-bg: rgba(61, 220, 132, 0.12); }
:is(.adm-tmdb-count, .adm-tmdb-st, .adm-tmdb-res).is-unchanged { --st: var(--text-dim); --st-bg: rgba(255, 255, 255, 0.06); }
:is(.adm-tmdb-count, .adm-tmdb-st, .adm-tmdb-res).is-not_found { --st: var(--warning); --st-bg: rgba(255, 176, 32, 0.13); }
:is(.adm-tmdb-count, .adm-tmdb-st, .adm-tmdb-res).is-error { --st: var(--danger); --st-bg: rgba(255, 77, 79, 0.13); }
:is(.adm-irow, .adm-ist, .adm-isum-chip, .adm-iprog-count, .adm-idone-stat).is-poster { --st: var(--warning); --st-bg: rgba(255, 176, 32, 0.13); }

/* ---------------- Miniatures ---------------- */

.adm-tmdb-thumb {
  position: relative; display: block; flex-shrink: 0; width: 34px; aspect-ratio: 2 / 3; overflow: hidden;
  border-radius: 5px; background: var(--surface-3); box-shadow: 0 0 0 1px var(--border);
}
.adm-tmdb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.adm-tmdb-thumb.is-empty { color: var(--text-mute); background: radial-gradient(circle, var(--accent-soft), transparent 70%), var(--surface-3); }
.adm-tmdb-thumb-ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 4px; font-size: 10px; font-weight: 600; line-height: 1.2; text-align: center;
}

/* ---------------- Note « non configuré » ---------------- */

.adm-tmdb-lock {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0;
  padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong); background: rgba(0, 0, 0, 0.22);
  font-size: 13px; line-height: 1.45; color: var(--text-dim);
}
.adm-tmdb-lock > .icon { flex-shrink: 0; color: var(--ember); }
.adm-tmdb-lock > span { flex: 1 1 190px; min-width: 0; overflow-wrap: anywhere; }
.adm-tmdb-lock strong { color: var(--text); }
.adm-tmdb-lock-link { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; font-weight: 700; color: var(--accent-hot); white-space: nowrap; }
.adm-tmdb-lock-link:hover { text-decoration: underline; }

/* ---------------- Bandeau d'alerte (tableau de bord, contenus) ---------------- */

.adm-tmdb-banner {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 70px minmax(0, 1fr); grid-template-areas: "fan text" "act act";
  align-items: center; gap: 14px;
  margin-bottom: 18px; padding: 16px 14px 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  border-color: color-mix(in srgb, var(--accent) 48%, transparent);
  background:
    radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 62%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.012) 0 12px, transparent 12px 24px),
    linear-gradient(180deg, var(--surface), var(--bg-elev));
  box-shadow: var(--shadow-sm), inset 3px 0 0 var(--accent-hot), 0 18px 50px -30px var(--accent-glow);
  animation: adm-in 420ms var(--ease-out) both;
}
.adm-tmdb-banner > :not(.adm-tmdb-banner-glow):not(.adm-tmdb-banner-x) { position: relative; }
.adm-tmdb-banner-glow {
  position: absolute; right: -90px; top: -100px; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-glow), transparent); opacity: 0.22; pointer-events: none;
  animation: adm-tmdb-pulse 4.5s ease-in-out infinite;
}
@keyframes adm-tmdb-pulse { 50% { opacity: 0.38; transform: scale(1.08); } }
.adm-tmdb-fan { grid-area: fan; position: relative; align-self: start; width: 70px; height: 88px; }
.adm-tmdb-fan .adm-tmdb-thumb { position: absolute; top: 4px; width: 50px; box-shadow: var(--shadow-sm), 0 0 0 1px rgba(0, 0, 0, 0.6); }
.adm-tmdb-fan .is-0 { left: 0; transform: rotate(-10deg); filter: brightness(0.5) saturate(0.5); }
.adm-tmdb-fan .is-1 { left: 9px; transform: rotate(-2deg); filter: brightness(0.72) saturate(0.75); }
.adm-tmdb-fan .is-2 { left: 18px; transform: rotate(7deg); box-shadow: var(--shadow), 0 0 0 1px var(--accent), 0 0 20px -4px var(--accent-glow); }
.adm-tmdb-fan-n {
  position: absolute; right: -6px; bottom: -4px; z-index: 1;
  padding: 2px 7px 0; border-radius: var(--radius-pill);
  font-family: var(--font-display); font-size: 17px; line-height: 1.1; letter-spacing: 0.04em; font-variant-numeric: tabular-nums;
  color: var(--on-accent); background: var(--accent); box-shadow: 0 4px 14px -4px var(--accent-glow), 0 0 0 2px var(--bg-elev);
}
.adm-tmdb-banner-text { grid-area: text; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.adm-tmdb-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-hot); }
.adm-tmdb-banner-title {
  padding-right: 30px; font-family: var(--font-display); font-weight: 400; font-size: 26px; line-height: 1; letter-spacing: 0.04em;
  text-transform: uppercase; overflow-wrap: anywhere; text-shadow: 0 0 22px var(--accent-glow);
}
.adm-tmdb-banner-sub { font-size: 13px; line-height: 1.45; color: var(--text-dim); }
.adm-tmdb-banner-detail { font-size: 12px; line-height: 1.45; color: var(--text-mute); overflow-wrap: anywhere; }
@container admpage (max-width: 519px) {
  .adm-tmdb-banner-detail { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
}
.adm-tmdb-banner-actions, .adm-tmdb-banner-lock { grid-area: act; }
.adm-tmdb-banner-actions { display: flex; }
.adm-tmdb-banner-actions .btn { flex: 1 1 auto; }
.adm-tmdb-banner-x { position: absolute; top: 6px; right: 6px; z-index: 1; color: var(--text-mute); }
.adm-tmdb-banner-x:hover { color: var(--text); }
@container admpage (min-width: 720px) {
  .adm-tmdb-banner { grid-template-columns: 78px minmax(0, 1fr) auto; grid-template-areas: "fan text act"; gap: 14px 20px; padding: 16px 54px 16px 20px; }
  .adm-tmdb-fan { width: 78px; }
  .adm-tmdb-fan .adm-tmdb-thumb { width: 56px; }
  .adm-tmdb-banner-title { padding-right: 0; font-size: 30px; }
  .adm-tmdb-banner-actions .btn { flex: 0 0 auto; }
  .adm-tmdb-banner-lock { max-width: 360px; }
}

/* ---------------- Modale de réparation (hors .adm-page : media queries) ---------------- */

.adm-tmdb-run { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.adm-tmdb-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; width: 100%; }
@media (max-width: 600px) {
  .adm-tmdb-foot > .btn { flex: 1 1 auto; min-width: 0; }
  .adm-tmdb-foot > .btn-ghost { flex: 0 0 auto; }
}
.adm-tmdb-label { margin-bottom: -6px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-mute); }

.adm-tmdb-intro {
  display: flex; align-items: flex-start; gap: 14px; padding: 14px;
  border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: radial-gradient(100% 130% at 0% 0%, var(--accent-soft), transparent 70%), var(--bg-elev);
}
.adm-tmdb-intro > div { min-width: 0; }
.adm-tmdb-intro-ico {
  display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  color: var(--accent-hot); background: var(--accent-soft); box-shadow: 0 0 24px -6px var(--accent-glow);
}
.adm-tmdb-intro strong { display: block; font-size: 15px; line-height: 1.35; }
.adm-tmdb-intro p { margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--text-dim); }

.adm-tmdb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-tmdb-chip { min-height: 40px; padding: 0 14px 0 8px; gap: 7px; }
.adm-tmdb-chip:disabled { opacity: 0.45; cursor: not-allowed; }
.adm-tmdb-chip:disabled:hover { color: var(--text-dim); border-color: var(--border-strong); }
.adm-tmdb-chip-check { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, 0.07); transition: background var(--t); }
.adm-tmdb-chip[aria-pressed="true"] .adm-tmdb-chip-check { background: rgba(255, 255, 255, 0.24); }
.adm-tmdb-chip small { font-size: 11px; font-weight: 600; opacity: 0.8; }

.adm-tmdb-rules { display: flex; flex-direction: column; gap: 8px; }
.adm-tmdb-rules li { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--text-dim); }
.adm-tmdb-rules li > .icon { margin-top: 2px; color: var(--accent-hot); }

.adm-tmdb-prog { display: flex; flex-direction: column; gap: 10px; }
.adm-tmdb-prog-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.adm-tmdb-prog-head .adm-iload-spin { width: 22px; height: 22px; border-width: 2px; }
.adm-tmdb-prog-title { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-tmdb-prog-pct { font-family: var(--font-display); font-size: 34px; line-height: 1; color: var(--accent-hot); text-shadow: 0 0 14px var(--accent-glow); font-variant-numeric: tabular-nums; }
.adm-tmdb-prog-sub { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.adm-tmdb-prog-note { margin: 0; }

.adm-tmdb-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 520px) { .adm-tmdb-counts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.adm-tmdb-count {
  display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 3px 0 -1px var(--st);
}
.adm-tmdb-count strong { font-family: var(--font-display); font-weight: 400; font-size: 32px; line-height: 1; color: var(--st); font-variant-numeric: tabular-nums; }
.adm-tmdb-count span { font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 519px) {
  .adm-tmdb-count { flex-direction: row; align-items: baseline; gap: 8px; padding: 8px 10px; }
  .adm-tmdb-count strong { font-size: 24px; }
  .adm-tmdb-count span { font-size: 10px; letter-spacing: 0.06em; }
}

.adm-tmdb-log {
  display: flex; flex-direction: column; max-height: min(34dvh, 300px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-elev);
}
.adm-tmdb-log:empty { display: none; }
.adm-tmdb-res {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 8px 10px; border-top: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--st);
  animation: adm-tmdb-row 360ms var(--ease-out) both;
}
.adm-tmdb-res:first-child { border-top: 0; }
@keyframes adm-tmdb-row { from { opacity: 0; transform: translateY(-6px); background: var(--st-bg); } }
.adm-tmdb-res-imgs { display: flex; align-items: center; gap: 2px; color: var(--text-mute); }
.adm-tmdb-res-imgs .adm-tmdb-thumb { width: 28px; }
.adm-tmdb-thumb.is-old { filter: grayscale(0.85) brightness(0.6); }
.adm-tmdb-thumb.is-new { box-shadow: 0 0 0 1px var(--success), 0 0 12px -3px rgba(61, 220, 132, 0.7); }
.adm-tmdb-res-main { display: flex; flex-direction: column; min-width: 0; }
.adm-tmdb-res-main strong { font-size: 13px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-tmdb-res-main span {
  font-size: 11.5px; line-height: 1.35; color: var(--text-mute); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.adm-tmdb-st {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; flex-shrink: 0;
  border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 700; white-space: nowrap;
  color: var(--st); background: var(--st-bg);
}

.adm-tmdb-done { display: flex; align-items: center; gap: 14px; min-width: 0; }
.adm-tmdb-done-glow { position: absolute; left: 10%; right: 10%; top: -20px; height: 160px; border-radius: 50%; background: radial-gradient(closest-side, rgba(61, 220, 132, 0.35), transparent); opacity: 0.5; pointer-events: none; }
.adm-tmdb-run > :not(.adm-tmdb-done-glow) { position: relative; }
.adm-tmdb-done-ico { display: grid; place-items: center; flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%; }
.adm-tmdb-done-ico.is-ok { color: var(--success); background: rgba(61, 220, 132, 0.14); box-shadow: 0 0 0 6px rgba(61, 220, 132, 0.06), 0 0 32px -6px rgba(61, 220, 132, 0.6); }
.adm-tmdb-done-ico.is-warn { color: var(--warning); background: rgba(255, 176, 32, 0.14); box-shadow: 0 0 0 6px rgba(255, 176, 32, 0.06); }
.adm-tmdb-done-text { min-width: 0; }
.adm-tmdb-done-title { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1; letter-spacing: 0.04em; text-transform: uppercase; overflow-wrap: anywhere; }
.adm-tmdb-done-text p { margin-top: 6px; font-size: 13px; color: var(--text-dim); }

.adm-tmdb-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 520px) { .adm-tmdb-pairs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.adm-tmdb-pair { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(255, 255, 255, 0.025); }
.adm-tmdb-pair-imgs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 2px; color: var(--success); }
.adm-tmdb-pair-imgs .adm-tmdb-thumb { width: 100%; border-radius: 6px; }
.adm-tmdb-pair-title { font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.adm-tmdb-probs { border-radius: var(--radius-sm); border: 1px solid rgba(255, 176, 32, 0.3); background: rgba(255, 176, 32, 0.05); }
.adm-tmdb-probs summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; font-size: 13px; font-weight: 700; color: var(--warning); cursor: pointer; list-style: none; }
.adm-tmdb-probs summary::-webkit-details-marker { display: none; }
.adm-tmdb-probs-chev { margin-left: auto; transition: transform var(--t) var(--ease); }
.adm-tmdb-probs[open] .adm-tmdb-probs-chev { transform: rotate(180deg); }
.adm-tmdb-probs-help { padding: 0 12px 8px; font-size: 12px; color: var(--text-mute); }
.adm-tmdb-probs ul { display: flex; flex-direction: column; max-height: 240px; overflow-y: auto; padding: 0 6px 6px 12px; }
.adm-tmdb-probs li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 0; border-top: 1px solid var(--border); }
.adm-tmdb-probs li:first-child { border-top: 0; }
.adm-tmdb-probs li .adm-tmdb-st { height: 22px; font-size: 11px; }
.adm-tmdb-probs-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-tmdb-probs-main strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-tmdb-probs-main span { font-size: 11.5px; color: var(--text-mute); overflow-wrap: anywhere; }

/* ---------------- Page Importer : outils + affiches en double ---------------- */

.adm-tmdb-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; white-space: nowrap;
  color: var(--text-mute); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
}
.adm-tmdb-pill:empty { display: none; }
.adm-tmdb-pill.is-on { color: var(--success); background: rgba(61, 220, 132, 0.1); border-color: rgba(61, 220, 132, 0.3); }
.adm-tmdb-pill.is-off { color: var(--ember); background: var(--ember-soft); border-color: transparent; }
.adm-tmdb-dot { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.adm-tmdb-pill.is-on .adm-tmdb-dot, .adm-tmdb-dot.is-on { background: var(--success); box-shadow: 0 0 0 4px rgba(61, 220, 132, 0.15), 0 0 10px rgba(61, 220, 132, 0.6); }
.adm-tmdb-dot.is-off { background: var(--ember); box-shadow: 0 0 0 4px var(--ember-soft); }
.adm-tmdb-dot.is-unknown { background: var(--text-mute); }

.adm-tmdb-tools { display: flex; flex-direction: column; gap: 10px; }
.adm-tmdb-tools-intro { font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.adm-tmdb-tool {
  display: grid; grid-template-columns: 38px minmax(0, 1fr); grid-template-areas: "ico text" "ctl ctl";
  align-items: center; gap: 8px 14px; padding: 12px 14px;
  border-radius: var(--radius); border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02);
}
.adm-tmdb-tool > .adm-switch-ico { grid-area: ico; align-self: start; }
.adm-tmdb-tool.is-ok > .adm-switch-ico { color: var(--success); background: rgba(61, 220, 132, 0.1); }
.adm-tmdb-tool-text { grid-area: text; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.adm-tmdb-tool-text strong { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; }
.adm-tmdb-tool-text > span { font-size: 12px; line-height: 1.45; color: var(--text-mute); }
.adm-tmdb-tool-n {
  display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 8px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--warning); background: rgba(255, 176, 32, 0.13);
}
.adm-tmdb-tool-n.is-ok { color: var(--success); background: rgba(61, 220, 132, 0.12); }
.adm-tmdb-tool-ctl { grid-area: ctl; display: flex; }
.adm-tmdb-tool-ctl .btn { flex: 1 1 auto; }
.adm-tmdb-tool-btn:disabled { background: var(--surface-3); border-color: var(--border); color: var(--text-mute); box-shadow: none; opacity: 0.7; }
.adm-tmdb-tools-foot { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.45; color: var(--text-mute); }
.adm-tmdb-tools-foot > .icon { margin-top: 2px; }
@container admpage (min-width: 600px) {
  .adm-tmdb-tool { grid-template-columns: 38px minmax(0, 1fr) auto; grid-template-areas: "ico text ctl"; }
  .adm-tmdb-tool-ctl .btn { flex: 0 0 auto; min-width: 120px; }
}

.adm-tmdb-dups-zone { margin-bottom: 12px; }
.adm-tmdb-dups { border-radius: var(--radius); border: 1px solid rgba(255, 176, 32, 0.34); background: rgba(255, 176, 32, 0.06); }
.adm-tmdb-dups summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; cursor: pointer; list-style: none; color: var(--warning); }
.adm-tmdb-dups summary::-webkit-details-marker { display: none; }
.adm-tmdb-dups-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: var(--text); }
.adm-tmdb-dups-title small { display: block; font-size: 12px; font-weight: 600; color: var(--text-mute); }
.adm-tmdb-dups-chev { flex-shrink: 0; color: var(--text-mute); transition: transform var(--t) var(--ease); }
.adm-tmdb-dups[open] .adm-tmdb-dups-chev { transform: rotate(180deg); }
.adm-tmdb-dups-fix { display: flex; align-items: flex-start; gap: 8px; padding: 0 12px 10px; font-size: 12.5px; line-height: 1.45; color: var(--text-dim); }
.adm-tmdb-dups-fix > .icon { margin-top: 2px; color: var(--accent-hot); }
.adm-tmdb-dups-list { display: flex; flex-direction: column; max-height: 260px; overflow-y: auto; padding: 0 12px 10px; }
.adm-tmdb-dups-list li { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 0; border-top: 1px solid var(--border); }
.adm-tmdb-dups-list li:first-child { border-top: 0; }
.adm-tmdb-dups-main { min-width: 0; display: flex; flex-direction: column; }
.adm-tmdb-dups-main strong { font-size: 13px; }
.adm-tmdb-dups-main span {
  font-size: 12px; color: var(--text-mute); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.adm-tmdb-dups-more { font-size: 12px; color: var(--text-mute); }
.adm-i-thumb { position: relative; }
.adm-i-thumb.is-suspect { box-shadow: 0 0 0 1px var(--warning), var(--shadow-sm); }
.adm-i-dupbadge {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 0;
  font-size: 10px; font-weight: 800; line-height: 1.3; text-align: center; font-variant-numeric: tabular-nums;
  color: #1a0f00; background: var(--warning);
}
.adm-i-thumb.is-replaced { box-shadow: 0 0 0 1px var(--success), var(--shadow-sm); }
.adm-i-thumb.is-replaced img { filter: grayscale(0.9) brightness(0.55); }
.adm-i-thumb.is-replaced .adm-i-dupbadge,
.adm-i-thumb.is-tmdb .adm-i-dupbadge { color: #04150b; background: var(--success); }
.adm-i-thumb.is-tmdb { box-shadow: 0 0 0 1px var(--success), 0 0 10px -3px rgba(61, 220, 132, 0.6), var(--shadow-sm); }
.adm-i-notes .is-poster > .icon { color: var(--warning); }
.adm-i-notes .is-tmdb { color: var(--text); }
.adm-i-notes .is-tmdb > .icon { color: var(--success); }

/* ---------------- Formulaire : « Récupérer depuis TMDB » ---------------- */

.adm-tmdb-fetch { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.adm-tmdb-fetch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.adm-tmdb-fetch-btn { flex: 0 0 auto; border-color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.adm-tmdb-fetch-btn:not(:disabled) .icon { color: var(--accent-hot); filter: drop-shadow(0 0 6px var(--accent-glow)); }
.adm-tmdb-fetch-btn:disabled { opacity: 0.45; }
.adm-tmdb-fetch-hint { flex: 1 1 220px; min-width: 0; display: flex; align-items: flex-start; gap: 6px; line-height: 1.45; }
.adm-tmdb-fetch-hint > .icon { margin-top: 2px; }
.adm-tmdb-fetch-hint a { color: var(--accent-hot); font-weight: 700; }
.adm-tmdb-fetch-result:empty { display: none; }
.adm-tmdb-fetch-result .adm-inotice { margin: 0; }
.adm-tmdb-applied { border-color: rgba(61, 220, 132, 0.35); background: rgba(61, 220, 132, 0.07); }
.adm-inotice.adm-tmdb-applied > .icon { color: var(--success); }

.adm-tmdb-match {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px;
  border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: radial-gradient(90% 120% at 0% 0%, var(--accent-soft), transparent 70%), var(--bg-elev);
  box-shadow: 0 16px 40px -26px var(--accent-glow);
  animation: adm-in 320ms var(--ease-out) both;
}
.adm-tmdb-match-imgs { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; align-items: start; }
.adm-tmdb-match-fig { margin: 0; min-width: 0; }
.adm-tmdb-match-fig .adm-tmdb-thumb { width: 100%; border-radius: 8px; box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.adm-tmdb-match-fig.is-wide .adm-tmdb-thumb { aspect-ratio: 16 / 9; }
.adm-tmdb-match-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.adm-tmdb-match-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-hot); }
.adm-tmdb-match-kicker .adm-mono { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-mute); }
.adm-tmdb-match-title { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.adm-tmdb-match-title span { font-weight: 600; color: var(--text-dim); }
.adm-tmdb-match-orig { font-size: 12px; font-style: italic; color: var(--text-mute); overflow-wrap: anywhere; }
.adm-tmdb-match-syn { margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--text-dim); }
.adm-tmdb-match-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-tmdb-match-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-tmdb-match-actions .adm-tmdb-use { flex: 1 1 auto; }
@container admpage (min-width: 640px) {
  .adm-tmdb-match { grid-template-columns: 250px minmax(0, 1fr); grid-template-areas: "imgs info" "imgs pick" "imgs act"; align-items: start; column-gap: 16px; }
  .adm-tmdb-match-imgs { grid-area: imgs; grid-template-columns: 82px minmax(0, 1fr); }
  .adm-tmdb-match-info { grid-area: info; }
  .adm-tmdb-match-pick { grid-area: pick; }
  .adm-tmdb-match-actions { grid-area: act; }
  .adm-tmdb-match-actions .adm-tmdb-use { flex: 0 0 auto; }
}

/* ---------------- Paramètres : statut ---------------- */

.adm-tmdb-status { display: flex; flex-direction: column; gap: 14px; }
.adm-tmdb-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.adm-tmdb-line > strong { font-size: 15px; }
.adm-tmdb-line-sub { flex: 1 1 100%; order: 3; font-size: 12.5px; line-height: 1.45; color: var(--text-mute); }
.adm-tmdb-line > .btn { margin-left: auto; }
.adm-tmdb-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-tmdb-stat {
  display: inline-flex; align-items: baseline; gap: 5px; min-height: 30px; padding: 4px 10px;
  border-radius: var(--radius-pill); border: 1px solid var(--border); background: rgba(255, 255, 255, 0.03);
  font-size: 12px; color: var(--text-mute); white-space: nowrap;
}
.adm-tmdb-stat strong { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.adm-tmdb-stat.is-warn { border-color: rgba(255, 176, 32, 0.32); background: rgba(255, 176, 32, 0.07); }
.adm-tmdb-stat.is-warn strong { color: var(--warning); }
.adm-tmdb-status-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-tmdb-steps { display: flex; flex-direction: column; gap: 10px; }
.adm-tmdb-steps li { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.adm-tmdb-step-n {
  display: grid; place-items: center; flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  font-size: 12px; font-weight: 800; color: var(--accent-hot); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--border-strong);
}
.adm-tmdb-step-text { flex: 1; min-width: 0; padding-top: 3px; font-size: 13px; line-height: 1.55; color: var(--text-dim); overflow-wrap: anywhere; }
.adm-tmdb-step-text a { font-weight: 700; color: var(--accent-hot); }
.adm-tmdb-step-text a .icon { display: inline-block; margin-left: 2px; vertical-align: -1px; }
.adm-tmdb-status code, .adm-tmdb-cli code, .adm-tmdb-lock code {
  padding: 1px 6px; border-radius: 5px; font-family: var(--adm-mono); font-size: 12px; color: var(--text);
  background: rgba(255, 255, 255, 0.07); overflow-wrap: anywhere;
}
.adm-tmdb-keyname { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 6px 0; }
.adm-tmdb-keyname code { font-size: 13px; padding: 4px 8px; }
.adm-tmdb-copy { color: var(--text-dim); }
.adm-tmdb-cli { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--text-mute); }
.adm-tmdb-attrib { align-items: flex-start; line-height: 1.45; }
.adm-tmdb-attrib > .icon { margin-top: 1px; }

@media (pointer: coarse) {
  .adm-tmdb-lock-link { min-height: 44px; }
  .adm-tmdb-banner-x { width: 44px; min-width: 44px; height: 44px; }
}
