/* OWL Brain — surcouche de Tabler (vendor/tabler.min.css). */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url("/static/vendor/fonts/nunito-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url("/static/vendor/fonts/nunito-latin-ext.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --tblr-font-sans-serif: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tblr-body-font-size: 0.9375rem;
  --tblr-body-font-weight: 500;

  /* Statuts (fixes, toujours accompagnés d'une icône + d'un libellé) */
  --st-good: #0ca30c;
  --st-warning: #fab219;
  --st-serious: #ec835a;
  --st-critical: #d03b3b;
  --st-idle: #8a8f98;

  /* Série unique des mini-graphiques (bleu séquentiel) */
  --series-1: #2a78d6;
  --series-1-soft: rgba(42, 120, 214, 0.12);
  --meter-track: rgba(0, 0, 0, 0.07);
}
[data-bs-theme="dark"] {
  --series-1: #3987e5;
  --series-1-soft: rgba(57, 135, 229, 0.16);
  --meter-track: rgba(255, 255, 255, 0.09);
}

body {
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
}
.num, .stat-value, .kv dd, td.num { font-variant-numeric: tabular-nums; }
code, .font-monospace { font-size: 0.8125rem; }

/* ── Barre latérale ─────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 1.125rem; font-weight: 600; letter-spacing: 0.01em; }
.brand strong { font-weight: 800; }
.brand-lg { font-size: 1.5rem; color: var(--tblr-body-color); }
.navbar-vertical .nav-link { font-weight: 600; border-radius: 8px; margin: 1px 0.75rem; padding-inline: 0.75rem; }
.navbar-vertical .nav-item.active > .nav-link,
.navbar-vertical .nav-link:hover { background: rgba(255, 255, 255, 0.07); }
.navbar-vertical .nav-item.active > .nav-link { color: #fff; box-shadow: inset 3px 0 0 var(--tblr-primary); }
.nav-section { padding: 0.25rem 1.5rem; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.4); }
.nav-ext { width: 14px; height: 14px; opacity: 0.45; }
.sidebar-footer {
  margin-top: auto; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-user { display: flex; align-items: center; gap: 0.6rem; min-width: 0; flex: 1; }
.sidebar-email { font-size: 0.8125rem; color: rgba(255, 255, 255, 0.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-actions { display: flex; gap: 0.25rem; }
.sidebar-actions .btn { color: rgba(255, 255, 255, 0.7); }
@media (min-width: 992px) {
  #sidebar-menu { display: flex !important; flex-direction: column; min-height: calc(100vh - 4.5rem); }
}
[data-bs-theme="dark"] .theme-icon-dark, [data-bs-theme="light"] .theme-icon-light { display: none; }

/* ── Mise en page ───────────────────────────────────── */
.page-header { margin-bottom: 0.25rem; }
.page-pretitle { font-weight: 700; letter-spacing: 0.06em; }
.page-title { font-weight: 800; font-size: 1.5rem; }
.page-body { margin-top: 1.25rem; margin-bottom: 2rem; }
.container-fluid.page-pad { padding-inline: clamp(1rem, 2.5vw, 2.25rem); }
.card { border-radius: 12px; }
.card-title { font-weight: 800; }
.card-header { min-height: 3.25rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-good); display: inline-block; box-shadow: 0 0 0 0 rgba(12, 163, 12, 0.5); animation: pulse 2s infinite; }
.live-dot.stale { background: var(--st-warning); animation: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(12, 163, 12, 0); } 100% { box-shadow: 0 0 0 0 rgba(12, 163, 12, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ── Tuiles de stats ────────────────────────────────── */
.stat-card .card-body { padding: 1.1rem 1.25rem 0.9rem; }
.stat-head { display: flex; align-items: center; gap: 0.5rem; color: var(--tblr-secondary); font-weight: 700; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-head .icon { width: 18px; height: 18px; }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1.15; margin-top: 0.35rem; color: var(--tblr-body-color); }
.stat-value small { font-size: 1rem; font-weight: 700; color: var(--tblr-secondary); margin-left: 0.15rem; }
.stat-sub { color: var(--tblr-secondary); font-size: 0.875rem; }

/* Jauge : piste neutre, remplissage bleu ; statut seulement au-delà des seuils */
.meter { height: 6px; border-radius: 3px; background: var(--meter-track); overflow: hidden; margin: 0.6rem 0 0.25rem; }
.meter > span { display: block; height: 100%; border-radius: 3px; background: var(--series-1); transition: width 0.4s ease; }
.meter.is-warning > span { background: var(--st-warning); }
.meter.is-critical > span { background: var(--st-critical); }

/* Mini-graphique */
.spark { position: relative; height: 56px; margin: 0.5rem -0.25rem 0; }
.spark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.spark .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark .area { fill: var(--series-1-soft); stroke: none; }
.spark .cross { stroke: var(--tblr-border-color-translucent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.spark .dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--series-1); box-shadow: 0 0 0 2px var(--tblr-bg-surface); pointer-events: none; }
.spark .tip {
  position: absolute; top: -2.1rem; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  background: var(--tblr-bg-surface-dark, #1d273b); color: #fff; font-size: 0.75rem; font-weight: 700;
  padding: 0.2rem 0.5rem; border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.spark .empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.75rem; color: var(--tblr-secondary); }

/* ── Statuts ────────────────────────────────────────── */
.st { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; font-size: 0.8125rem; white-space: nowrap; }
.st .icon { width: 16px; height: 16px; stroke-width: 2.25; }
.st-good { color: var(--st-good); }
.st-warning { color: #b47800; }
.st-serious { color: #c45a2f; }
.st-critical { color: var(--st-critical); }
.st-idle { color: var(--st-idle); }
[data-bs-theme="dark"] .st-warning { color: var(--st-warning); }
[data-bs-theme="dark"] .st-serious { color: var(--st-serious); }
[data-bs-theme="dark"] .st-critical { color: #ee6b6b; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--st-idle); }
.status-dot.good { background: var(--st-good); }
.status-dot.warning { background: var(--st-warning); }
.status-dot.critical { background: var(--st-critical); }

.health-banner { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1.25rem; border-radius: 12px; border: 1px solid; }
.health-banner .icon { width: 26px; height: 26px; flex-shrink: 0; }
.health-banner.ok { border-color: rgba(12, 163, 12, 0.3); background: rgba(12, 163, 12, 0.07); }
.health-banner.bad { border-color: rgba(208, 59, 59, 0.35); background: rgba(208, 59, 59, 0.07); }
.health-banner .title { font-weight: 800; font-size: 1rem; }

/* ── Listes clé/valeur ──────────────────────────────── */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1rem; margin: 0; }
.kv dt { color: var(--tblr-secondary); font-weight: 600; }
.kv dd { margin: 0; text-align: right; font-weight: 700; overflow-wrap: anywhere; }

.list-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1.25rem; border-bottom: 1px solid var(--tblr-border-color); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .name { font-weight: 700; }
.list-row .meta { color: var(--tblr-secondary); font-size: 0.8125rem; }

/* ── Tableaux ───────────────────────────────────────── */
.table > :not(caption) > * > * { padding: 0.7rem 1rem; vertical-align: middle; }
.table thead th { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.05em; }
.table tbody tr.clickable { cursor: pointer; }
.group-row td { background: var(--tblr-bg-surface-secondary); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--tblr-secondary); padding-block: 0.4rem !important; }

/* ── Plan ───────────────────────────────────────────── */
.task { padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--tblr-border-color); }
.task:last-child { border-bottom: 0; }
.task-title { font-weight: 700; }
.task-desc { color: var(--tblr-secondary); margin-top: 0.2rem; }
.task details { margin-top: 0.4rem; }
.task summary { cursor: pointer; color: var(--tblr-primary); font-weight: 700; font-size: 0.8125rem; }
.tree-kv { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 0.3rem 1rem; margin: 0.5rem 0 0; font-size: 0.875rem; }
.tree-kv dt { color: var(--tblr-secondary); font-weight: 600; }
.tree-kv dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.tree-kv ul { margin: 0; padding-left: 1.1rem; }
.nav-tabs-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-tabs-scroll .nav-link { white-space: nowrap; font-weight: 700; }

/* ── Divers ─────────────────────────────────────────── */
.empty-state { padding: 2.5rem 1rem; text-align: center; color: var(--tblr-secondary); }
.skeleton { display: grid; place-items: center; min-height: 50vh; color: var(--tblr-secondary); }
textarea.font-monospace { min-height: 180px; }

@media (max-width: 575.98px) {
  .stat-value { font-size: 1.65rem; }
  .page-title { font-size: 1.3rem; }
  .list-row { padding-inline: 1rem; }
  .table > :not(caption) > * > * { padding: 0.6rem 0.75rem; }
}

/* ── Login ──────────────────────────────────────────── */
.login-body { min-height: 100vh; }
