/* Charte du site afomedia.com (tailwind.config.ts, globals.css) : bleu #1176BC, fonds #F4F4F4 / #121212,
   cartes blanches / #1E1E1E, police Gilroy, couleurs unies uniquement. */
@font-face { font-family: Gilroy; src: url(/fonts/Gilroy-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Gilroy; src: url(/fonts/Gilroy-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Gilroy; src: url(/fonts/Gilroy-SemiBold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Gilroy; src: url(/fonts/Gilroy-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f4f4f4; --panel: #ffffff; --panel2: #f8f8f9; --line: #dcdcde; --text: #0e192b; --muted: #787e88; --head: #a3a2a6;
  --primary: #1176bc; --primary-btn: #0c5ba1; --primary-soft: rgba(17, 118, 188, .1);
  --ok: #1a7726; --ok-soft: #edfce5; --warn: #a76d00; --warn-soft: #fefae0; --bad: #db0000; --bad-soft: #fdf0e3;
  --none: #4f4d55; --none-soft: #ececed; --info: #1176bc; --info-soft: rgba(17, 118, 188, .12);
  --chart: #1176bc; --chart2: #a8762a; --bar-ok: #47ad4b; --bar-warn: #e8a600; --bar-bad: #db0000; --bar-none: #e6e6e6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --panel: #1e1e1e; --panel2: #171717; --line: #2d2b32; --text: #e0e0e0; --muted: #a3a2a6; --head: #8c8c8c;
    --primary: #44a3d6; --primary-btn: #0c5ba1; --primary-soft: rgba(17, 118, 188, .18);
    --ok: #77d671; --ok-soft: rgba(26, 119, 38, .25); --warn: #f8d663; --warn-soft: rgba(232, 166, 0, .18); --bad: #f47b61; --bad-soft: rgba(219, 0, 0, .18);
    --none: #c9c9cc; --none-soft: rgba(60, 60, 67, .6); --info: #44a3d6; --info-soft: rgba(17, 118, 188, .2);
    --chart: #44a3d6; --chart2: #c4913a; --bar-none: #2d2b32;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --panel: #1e1e1e; --panel2: #171717; --line: #2d2b32; --text: #e0e0e0; --muted: #a3a2a6; --head: #8c8c8c;
  --primary: #44a3d6; --primary-btn: #0c5ba1; --primary-soft: rgba(17, 118, 188, .18);
  --ok: #77d671; --ok-soft: rgba(26, 119, 38, .25); --warn: #f8d663; --warn-soft: rgba(232, 166, 0, .18); --bad: #f47b61; --bad-soft: rgba(219, 0, 0, .18);
  --none: #c9c9cc; --none-soft: rgba(60, 60, 67, .6); --info: #44a3d6; --info-soft: rgba(17, 118, 188, .2);
  --chart: #44a3d6; --chart2: #c4913a; --bar-none: #2d2b32;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 500 14px/1.5 Gilroy, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
.boot { padding: 40px; color: var(--muted); }

/* Mise en page : barre latérale comme le site (carte blanche arrondie, logo, liens à pastille bleue) */
.shell { display: grid; grid-template-columns: 264px 1fr; gap: 16px; min-height: 100vh; padding: 16px; }
.side { background: var(--panel); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 16px; height: calc(100vh - 32px); overflow-y: auto; }
.brand { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; }
.brand img { height: 43px; width: auto; }
.brand b { display: block; font-size: 15px; font-weight: 700; }
.brand small { color: var(--muted); font-size: 12px; }
.side h6 { margin: 16px 10px 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.side a { color: var(--text); padding: 8px 10px; border-radius: 8px; display: block; font-size: 16px; font-weight: 500; }
.side a:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.side a.on { background: var(--primary-soft); color: var(--primary); }
.side .foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.side .foot b { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.side .foot .row { gap: 6px; }
.side .foot button, .side .foot a { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 12px; padding: 6px 12px; cursor: pointer; font-size: 13px; font-weight: 600; display: inline-block; }
.side .foot a:hover { text-decoration: none; background: var(--panel); color: var(--text); border-color: var(--muted); }
.main { padding: 8px 8px 40px; min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.top h1 { font-size: 26px; line-height: 1.25; margin: 0; font-weight: 700; }
.top .sub { color: var(--muted); font-size: 14px; }
.top .grow { flex: 1; }
.menu-btn { display: none; }

/* Blocs */
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--panel); border-radius: 16px; padding: 20px; min-width: 0; }
.card h3 { margin: 0 0 14px; font-size: 18px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.card h3 .grow { flex: 1; }
.kpi .v { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .l { color: var(--text); font-size: 14px; font-weight: 600; margin-top: 4px; }
.kpi .s { color: var(--muted); font-size: 13px; margin-top: 4px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Pastilles (BaseBadge du site) */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; line-height: 18px; font-weight: 600; white-space: nowrap; }
.b-ok { color: var(--ok); background: var(--ok-soft); }
.b-warn { color: var(--warn); background: var(--warn-soft); }
.b-bad { color: var(--bad); background: var(--bad-soft); }
.b-none { color: var(--none); background: var(--none-soft); }
.b-info, .b-acc { color: var(--info); background: var(--info-soft); }
.banner { border-radius: 16px; padding: 16px 20px; margin-bottom: 16px; display: flex; gap: 12px; align-items: center; background: var(--panel); border-left: 4px solid var(--ok); flex-wrap: wrap; }
.banner.warn { border-left-color: var(--bar-warn); }
.banner.bad { border-left-color: var(--bar-bad); }
.nc { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; color: var(--muted); background: var(--panel2); font-size: 14px; }
.nc b { color: var(--text); }

/* Tableaux (BaseTable du site) */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; color: var(--head); font-size: 13px; padding: 8px 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--primary-soft); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.scroll { overflow-x: auto; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 400; }
.ellipsis { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Formulaires et boutons (BaseButton du site) */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=search], select { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; height: 40px; padding: 0 12px; min-width: 0; font-weight: 500; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.btn { background: var(--primary-btn); color: #fff; border: 1px solid var(--primary-btn); border-radius: 12px; height: 40px; padding: 0 14px; cursor: pointer; font-weight: 600; font-size: 14px; }
.btn:hover { background: #084487; border-color: #084487; }
.btn.light { background: var(--panel); color: var(--text); border-color: var(--line); }
.btn.light:hover { border-color: var(--muted); }
.btn.danger { background: #db0000; border-color: #db0000; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.error { color: var(--bad); font-size: 14px; min-height: 20px; }
.login { max-width: 420px; margin: 10vh auto; padding: 0 16px; }
.login .card { padding: 28px; }
.login .brand { justify-content: center; padding-bottom: 20px; }
.sign { color: var(--muted); font-size: 13px; text-align: center; margin-top: 16px; }

/* Graphiques : couleurs unies, pas de remplissage */
svg.chart { width: 100%; height: auto; display: block; }
svg.chart text { fill: var(--muted); font-size: 10px; font-family: Gilroy, sans-serif; }
svg.chart .grid-l { stroke: var(--line); stroke-width: 1; }
svg.chart .ln { fill: none; stroke: var(--chart); stroke-width: 2; }
svg.chart .ln2 { fill: none; stroke: var(--chart2); stroke-width: 2; }
svg.chart .bar { fill: var(--chart); }
svg.chart .bar-g.on .bar { fill: var(--primary-btn); }
svg.chart .xhair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
svg.chart .hit, svg.chart .hitbar { cursor: crosshair; }
.chart-wrap { position: relative; touch-action: pan-y; }
.k1 { background: var(--chart); }
.k2 { background: var(--chart2); }
.tip { position: fixed; z-index: 60; display: none; pointer-events: none; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; box-shadow: 0 8px 24px -6px rgba(14, 25, 43, .28); min-width: 120px; }
.tip-t { color: var(--muted); margin-bottom: 4px; }
.tip-r { display: flex; align-items: center; gap: 8px; }
.tip-r i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.tip-r b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tip-r span { color: var(--muted); }
.dtable { margin-top: 8px; }
.dtable .tbl { font-size: 12px; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.uptime { display: flex; gap: 2px; height: 30px; align-items: stretch; }
.uptime span { flex: 1; border-radius: 2px; background: var(--bar-none); }
.uptime span.ok { background: var(--bar-ok); }
.uptime span.warn { background: var(--bar-warn); }
.uptime span.bad { background: var(--bar-bad); }
.meter { height: 8px; background: var(--bar-none); border-radius: 5px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--chart); }
.stack { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--bar-none); }
.stack i { display: block; height: 100%; }

/* Cycle de vie */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding-bottom: 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: var(--panel); display: grid; place-items: center; font-size: 11px; font-weight: 700; z-index: 1; }
.timeline .done .dot { border-color: var(--bar-ok); background: var(--bar-ok); color: #fff; }
.timeline .cur .dot { border-color: var(--primary); color: var(--primary); }
.timeline .err .dot { border-color: var(--bar-bad); background: var(--bar-bad); color: #fff; }
.timeline .t { font-weight: 600; }
.timeline .d { color: var(--muted); font-size: 13px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pipeline { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.pipeline a { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--panel); color: var(--text); }
.pipeline a:hover { text-decoration: none; border-color: var(--primary); }
.pipeline .n { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pipeline .l { font-size: 13px; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { background: none; border: none; padding: 10px 12px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 600; }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--panel2); padding: 10px; border-radius: 8px; font-size: 12px; margin: 6px 0 0; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pipeline { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .side { position: fixed; inset: 0 25% 0 0; z-index: 10; border-radius: 0 20px 20px 0; height: 100vh; top: 0; transform: translateX(-105%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 8px 24px -6px rgba(14, 25, 43, .28); }
  .menu-btn { display: inline-block; }
  .main { padding: 16px; }
  .g4, .g3, .g2 { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv { grid-template-columns: 1fr; }
  .kv dt { margin-top: 6px; }
}

/* Fenêtre de confirmation (gabarit du site : en-tête, boutons outline / primary) */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border-radius: 16px; width: min(480px, 100%); padding: 22px; }
.modal h3 { margin: 0 0 10px; font-size: 18px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.modal input { width: 100%; }
.actions-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.player video { width: 100%; max-height: 420px; background: #000; border-radius: 12px; display: block; }
textarea { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; color: inherit; width: 100%; min-height: 80px; resize: vertical; }
.checks label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--line); }
.checks label:last-child { border-bottom: none; }
.checks input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--primary-btn); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field input[type=datetime-local] { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; height: 40px; padding: 0 12px; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }
.meter i.m-warn { background: var(--bar-warn); }
.meter i.m-bad { background: var(--bar-bad); }

/* Lecteur : même apparence que celui du site (AfoHlsPlayer) — fond noir, barre noire unie, bleu de la charte */
.pl { position: relative; background: #000; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; max-height: 70vh; width: 100%; outline: none; color: #fff; user-select: none; }
.pl video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.pl button { background: none; border: 0; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; padding: 0; }
.pl button:hover { background: rgba(255, 255, 255, .15); }
.pl button:focus-visible { outline: 2px solid #fff; }
.pl-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.pl .pl-big { pointer-events: auto; width: 72px; height: 72px; border-radius: 50%; background: #1176bc; }
.pl .pl-big:hover { background: #0c5ba1; }
.pl .pl-big svg { width: 32px; height: 32px; margin-left: 4px; }
.pl-wait { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.pl-spin { animation: pl-rot 1s linear infinite; }
@keyframes pl-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pl-spin { animation: none; } }
.pl-bar { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .65); padding: 6px 12px 8px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.pl.pl-show .pl-bar { opacity: 1; pointer-events: auto; }
.pl-track { position: relative; height: 16px; cursor: pointer; touch-action: none; }
.pl-rail { position: absolute; left: 0; right: 0; top: 50%; height: 4px; transform: translateY(-50%); border-radius: 999px; background: rgba(255, 255, 255, .25); }
.pl-track:hover .pl-rail { height: 6px; }
.pl-rail i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; }
.pl-buf { background: rgba(255, 255, 255, .4); }
.pl-done { background: #1176bc; }
.pl-knob { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); }
.pl-hover { position: absolute; bottom: 20px; transform: translateX(-50%); background: rgba(0, 0, 0, .8); border-radius: 4px; padding: 2px 6px; font-size: 12px; white-space: nowrap; }
.pl-row { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.pl-grow { flex: 1; }
.pl-time { margin-left: 6px; font-variant-numeric: tabular-nums; }
.pl-vol { display: inline-flex; align-items: center; }
.pl-vol input { width: 0; opacity: 0; transition: width .2s, opacity .2s, margin .2s; accent-color: #fff; }
.pl-vol:hover input, .pl-vol input:focus { width: 80px; opacity: 1; margin-left: 4px; }
.pl button.on { box-shadow: inset 0 -2px 0 #1176bc; }
.pl-menu-box { position: relative; }
.pl-menu { position: absolute; right: 0; bottom: 44px; width: 220px; max-height: 280px; overflow-y: auto; background: rgba(0, 0, 0, .9); border-radius: 8px; padding: 8px; z-index: 5; font-size: 13px; }
.pl-menu p { margin: 4px 0; color: rgba(255, 255, 255, .6); }
.pl-menu button { display: block; width: 100%; height: auto; text-align: left; padding: 5px 8px; border-radius: 4px; }
.pl-menu button.on { font-weight: 700; box-shadow: none; color: #44a3d6; }
.pl-speeds { display: flex; flex-wrap: wrap; gap: 4px; }
.pl-speeds button { width: auto; display: inline-block; }
@media (max-width: 600px) { .pl .pl-wide, .pl-vol input { display: none; } }
.pv-stats { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 10px; }
.pv-stats b { color: var(--text); font-weight: 600; }
.actions-bar { margin-bottom: 16px; }
.pv { margin-bottom: 16px; }
.pv:empty { display: none; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.filters { margin-bottom: 16px; }
/* L'attribut hidden doit toujours gagner (sinon le chargement et le bouton central restent affichés en lecture) */
[hidden] { display: none !important; }
.pv-stats > span { white-space: nowrap; }

/* Barre latérale fine et réductible ; un trait léger entre chaque onglet */
.shell { grid-template-columns: 228px 1fr; transition: grid-template-columns .2s; }
.shell.small { grid-template-columns: 68px 1fr; }
.side { padding: 16px 12px; scrollbar-width: thin; overflow-x: hidden; }
.brand { padding: 0 4px 12px; gap: 10px; }
.brand img { height: 34px; flex: none; }
.brand b { font-size: 14px; }
.brand small { font-size: 11px; }
.side h6 { margin: 14px 8px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.nav-group { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.side .nav-group a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: 14px; border-radius: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.side .nav-group a:last-child { border-bottom: 0; }
.side .nav-group a svg { flex: none; opacity: .85; }
.side .nav-group a.on { box-shadow: inset 3px 0 0 var(--primary); }
.side .foot { gap: 10px; }
.foot-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.side .foot button.nav-toggle { display: flex; align-items: center; gap: 8px; justify-content: flex-start; width: 100%; }
.shell.small .brand-t, .shell.small .side h6, .shell.small .nav-group a span, .shell.small .foot-t, .shell.small .nav-toggle span { display: none; }
.shell.small .side { padding: 16px 10px; }
.shell.small .brand { justify-content: center; padding-bottom: 14px; }
.shell.small .brand img { height: 22px; }
.shell.small .side .nav-group { margin-top: 10px; }
.shell.small .side .nav-group a { justify-content: center; padding: 10px 0; }
.shell.small .nav-toggle { justify-content: center; }
.shell.small .nav-toggle svg { transform: rotate(180deg); }
@media (max-width: 760px) { .shell, .shell.small { grid-template-columns: 1fr; } .nav-toggle { display: none !important; } .shell.small .brand-t, .shell.small .side h6, .shell.small .nav-group a span, .shell.small .foot-t { display: revert; } .shell.small .nav-group a span { display: inline; } }
.side > * { flex-shrink: 0; }
.side .foot { margin-top: auto; padding-top: 12px; }
.side .foot .row { gap: 6px; }
.side .foot .row a, .side .foot .row button { font-size: 12px; padding: 4px 8px; border-radius: 8px; }
.side .foot button.nav-toggle { padding: 6px 8px; font-size: 13px; }
/* Pagination */
.pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pager .btn { height: 34px; padding: 0 12px; font-size: 13px; }
.pager select { height: 32px; padding: 0 8px; margin-left: 6px; }
.section-t { font-size: 16px; font-weight: 700; margin: 0 0 10px; }
.flow-step .v { font-size: 22px; }
.flow-step .l { margin-top: 2px; }
.flow { position: relative; }

/* ---------- Chargement centré (évoque la lecture vidéo) */
.boot { min-height: 100vh; display: grid; place-items: center; padding: 0; }
.loader { display: grid; justify-items: center; gap: 14px; color: var(--primary); }
.loader-ring { width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: ld-rot .9s linear infinite; grid-area: 1 / 1; }
.loader-play { grid-area: 1 / 1; align-self: center; justify-self: center; margin-left: 3px; }
.loader-t { color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
@keyframes ld-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loader-ring { animation: none; border-top-color: var(--primary); } }
.main { position: relative; }
.loader-veil { position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg); opacity: .92; z-index: 20; border-radius: 16px; }

/* ---------- Barre latérale : bouton de réduction en haut */
.brand { position: relative; }
.brand .nav-toggle { margin-left: auto; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; padding: 0; }
.brand .nav-toggle:hover { color: var(--text); border-color: var(--muted); }
.shell.small .brand { flex-direction: column; gap: 10px; }
.shell.small .brand .nav-toggle { margin: 0; }
.shell.small .brand .nav-toggle svg { transform: rotate(180deg); }
.side .foot .row { flex-wrap: wrap; }

/* ---------- Légère amélioration générale */
.card { border: 1px solid var(--line); }
.top h1 { font-size: 24px; }
.card h3 { font-size: 16px; }
.tbl td { vertical-align: middle; }
.tbl tr.click:hover td { background: var(--primary-soft); }
.chip { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); }
.chip-cf { color: var(--chart); border-color: color-mix(in srgb, var(--chart) 40%, transparent); }
.chip-aws { color: var(--chart2); border-color: color-mix(in srgb, var(--chart2) 40%, transparent); }
.dot-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.dot-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--none); }
.dot-ok { color: var(--ok); } .dot-ok::before { background: var(--bar-ok); }
.dot-info { color: var(--info); } .dot-info::before { background: var(--primary); }
.dot-warn { color: var(--warn); } .dot-warn::before { background: var(--bar-warn); }
.dot-bad { color: var(--bad); } .dot-bad::before { background: var(--bar-bad); }
.dot-none { color: var(--muted); }

/* ---------- Bibliothèque (façon médiathèque JW) */
.lib-filters { display: grid; gap: 12px; }
.lib-filters input[type=search] { width: 100%; height: 44px; font-size: 15px; }
.lib-card { padding: 8px 16px 16px; }
.tbl.lib th { padding-top: 14px; }
.tbl.lib td { padding-top: 12px; padding-bottom: 12px; }
.lib-th-img { width: 108px; }
.lib-img img, .lib-noimg { display: block; width: 96px; height: 54px; border-radius: 6px; object-fit: cover; background: var(--panel2); border: 1px solid var(--line); }
.lib-img img.vert { object-fit: contain; background: #000; }
.lib-title { max-width: 360px; }
.lib-title a { display: block; color: var(--primary); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.id-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px 4px 10px; background: var(--panel); }
.id-chip .mono { font-size: 13px; color: var(--ok); }
.id-copy { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; display: grid; place-items: center; border-radius: 4px; }
.id-copy:hover { color: var(--text); background: var(--panel2); }
.id-copy.done { color: var(--ok); }

/* ---------- Relais */
.relay-tbl td { padding-top: 12px; padding-bottom: 12px; }
.relay-name { font-size: 14px; }
.share { display: flex; align-items: center; gap: 8px; }
.share .meter { flex: 1; min-width: 60px; }
.share span { font-size: 12px; color: var(--muted); min-width: 44px; text-align: right; }
.brand img { height: 28px; }
.brand-t { min-width: 0; }
.brand-t b, .brand-t small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tbl.lib td:nth-child(5), .tbl.lib td:nth-child(9) { white-space: nowrap; }
.reach { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.reach .meter { margin-bottom: 6px; }
@media (max-width: 760px) { .reach { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* En-tête de la barre : logo + bouton sur une ligne, titre complet dessous */
.shell:not(.small) .brand { flex-wrap: wrap; align-items: center; row-gap: 8px; }
.shell:not(.small) .brand .nav-toggle { order: 2; }
.shell:not(.small) .brand-t { order: 3; flex-basis: 100%; }
.brand-t b, .brand-t small { white-space: normal; overflow: visible; text-overflow: clip; }
