/* CODA Fédérateur : styles des pages (carte, sites, recherche, administration). */
[hidden] { display: none !important; }

/* ---- Carte des sites ---- */
.fed { display: flex; flex-direction: column; gap: 14px; }
.fed-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.fed-bar h2 { margin: 0; font-family: "Rajdhani", "Segoe UI", sans-serif; font-size: 1.5rem; }
.fed-modes { display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px; flex-wrap: wrap; }
.fed-modes button { border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 0.92rem; padding: 7px 14px; border-radius: 7px; cursor: pointer; box-shadow: none; }
.fed-modes button[aria-selected="true"] { background: var(--brand); color: #fff; }
.fed-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fed-chips .label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-right: 4px; }
.fed-chip { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: 0.85rem; cursor: pointer; box-shadow: none; }
.fed-chip[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.fed-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.fed-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.fed-map { position: relative; overflow: hidden; }
.fed-map svg { display: block; width: 100%; height: auto; background: #f6f9fd; border-radius: 14px; }
.fed-map-title { position: absolute; left: 14px; top: 10px; font-family: "Rajdhani", "Segoe UI", sans-serif; font-size: 1.05rem; color: var(--muted); letter-spacing: 0.04em; }
.fed-legend { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 10px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 0.8rem; color: var(--muted); max-width: calc(100% - 24px); }
.fed-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.fed-side { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fed-side h3 { font-family: "Rajdhani", "Segoe UI", sans-serif; font-size: 1.4rem; margin: 0; line-height: 1.1; }
.fed-sub { color: var(--muted); font-size: 0.9rem; }
.fed-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fed-kpi { background: #f6f9fd; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.fed-kpi small { display: block; color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; }
.fed-kpi strong { font-family: Consolas, "JetBrains Mono", monospace; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.fed-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.82rem; padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.s-ok { color: var(--normal); } .s-degraded { color: var(--alert); } .s-alarm { color: var(--fault); } .s-offline { color: var(--offline); }
table.fed-cmp { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.fed-cmp th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.fed-cmp td { padding: 7px 4px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.fed-cmp tr[data-site] { cursor: pointer; }
table.fed-cmp tr[data-site]:hover td { background: #f6f9fd; }
.fed-barcell { display: flex; align-items: center; gap: 8px; }
.fed-track { flex: 1; height: 7px; background: #eef3fa; border-radius: 4px; overflow: hidden; min-width: 40px; }
.fed-fill { height: 100%; background: var(--brand); border-radius: 4px; }
.fed-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fed-note { font-size: 0.84rem; color: var(--muted); background: #f6f9fd; border: 1px dashed var(--line); border-radius: 8px; padding: 8px 10px; }
.fed-feed { display: flex; flex-direction: column; gap: 6px; max-height: 230px; overflow: auto; }
.fed-feed-item { display: grid; grid-template-columns: 64px 1fr; gap: 8px; font-size: 0.86rem; padding: 6px 8px; border-radius: 8px; background: #f6f9fd; border-left: 3px solid var(--line); }
.fed-feed-item time, .fed-wall-item time { font-family: Consolas, monospace; font-size: 0.78rem; color: var(--muted); }
.lv-ok { border-left-color: var(--normal) !important; } .lv-warn { border-left-color: var(--alert) !important; } .lv-alarm { border-left-color: var(--fault) !important; }
.fed-wall { padding: 14px 18px; }
.fed-wall-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fed-wall-head h3 { margin: 0; font-family: "Rajdhani", "Segoe UI", sans-serif; font-size: 1.2rem; }
.fed-live { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--normal); font-weight: 700; }
.fed-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--normal); display: inline-block; }
@media (prefers-reduced-motion: no-preference) { .fed-live i { animation: fedblink 1.6s infinite; } @keyframes fedblink { 50% { opacity: 0.25; } } svg circle.fed-ping { animation: fedping 1.2s ease-out forwards; } @keyframes fedping { from { r: 8; opacity: 0.8; } to { r: 26; opacity: 0; } } }
.fed-wall-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.fed-wall-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #f6f9fd; border-left: 4px solid var(--line); min-width: 0; }
.fed-wall-item .meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 0.78rem; }
.fed-wall-item span.msg { font-size: 0.86rem; overflow-wrap: anywhere; }
svg .fed-site { cursor: pointer; }
svg .fed-site:focus { outline: none; }
svg .fed-site:focus-visible circle.core { stroke: var(--brand); stroke-width: 3; }
svg text.fed-label { font: 600 11px "Segoe UI", sans-serif; fill: var(--ink); paint-order: stroke; stroke: #f6f9fd; stroke-width: 3px; }
svg text.fed-value { font: 500 10px Consolas, monospace; fill: var(--muted); paint-order: stroke; stroke: #f6f9fd; stroke-width: 3px; }
@media (max-width: 900px) { .fed-main { grid-template-columns: minmax(0, 1fr); } .fed-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  
/* ---- Sites rattachés ---- */
.fs-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; background: var(--panel); box-shadow: 0 2px 8px rgba(15,33,72,0.06); }
.fs-card h3 { font-family: "Rajdhani","Segoe UI",sans-serif; font-size: 1.15rem; margin: 0 0 6px; }
.fs-stack { display: flex; flex-direction: column; gap: 18px; }
.fs-badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; border: 1px solid currentColor; white-space: nowrap; }
.b-on { color: var(--normal); } .b-off { color: var(--offline); } .b-wait { color: var(--alert); } .b-dis { color: var(--fault); }
.fs-code { border: 2px solid var(--brand); background: var(--brand-soft); border-radius: 12px; padding: 14px 16px; }
.fs-code code { display: inline-block; font-size: 1.3rem; letter-spacing: 0.08em; padding: 6px 10px; background: #fff; border-radius: 8px; border: 1px solid var(--line); user-select: all; margin: 6px 0; }
.fs-code ol { margin: 8px 0 0; padding-left: 20px; line-height: 1.55; font-size: 0.9rem; }
.fs-code[hidden], #fs-form[hidden], .fs-licence[hidden] { display: none; }
.fs-licence { border-radius: 10px; padding: 10px 14px; font-size: 0.9rem; background: #f6f9fd; border: 1px solid var(--line); }
.fs-licence.bad { background: #fef2f2; border-color: #f5a5a5; color: #7a1515; }
td .hint { font-size: 0.8rem; }
.inline-hint { color: var(--muted); font-weight: 400; font-size: 0.8rem; }
.check-row { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.check-row input { width: auto; }
  
/* ---- Recherche ---- */
.fr-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; background: var(--panel); box-shadow: 0 2px 8px rgba(15,33,72,0.06); }
.fr-stack { display: flex; flex-direction: column; gap: 18px; }
.fr-plate { font-family: Consolas, "JetBrains Mono", monospace; font-size: 1.3rem !important; letter-spacing: 0.08em; text-transform: uppercase; }
.fr-sites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.fr-chip { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: 0.85rem; cursor: pointer; box-shadow: none; }
.fr-chip[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.fr-chip.off { opacity: 0.55; }
.fr-status { display: flex; flex-wrap: wrap; gap: 8px; }
.fr-st { font-size: 0.82rem; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); background: #f6f9fd; }
.fr-st.ok { border-color: var(--normal); } .fr-st.forbidden, .fr-st.unreachable { border-color: var(--fault); color: #7a1515; }
.fr-plate-cell { font-family: Consolas, monospace; font-weight: 700; letter-spacing: 0.05em; }
.fr-src { font-size: 0.74rem; color: var(--muted); text-transform: uppercase; }
.fr-legal { font-size: 0.82rem; color: var(--muted); }
  

/* ---- Administration (comptes, journal, licence, parametres) ---- */
.adm-card { border: 1px solid var(--line); border-radius: 14px; padding: 20px 24px; background: var(--panel); box-shadow: 0 2px 8px rgba(15,33,72,0.06); }
.adm-card h3 { font-family: "Rajdhani","Segoe UI",sans-serif; font-size: 1.15rem; margin: 0 0 6px; }
.adm-stack { display: flex; flex-direction: column; gap: 18px; }
.adm-badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; border: 1px solid currentColor; white-space: nowrap; }
.adm-badge.ok { color: var(--normal); } .adm-badge.warn { color: var(--alert); } .adm-badge.bad { color: var(--fault); } .adm-badge.off { color: var(--offline); }
.adm-scope { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.adm-scope label, .adm-inline { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.adm-scope input, .adm-inline input { width: auto; }
.adm-kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 0.92rem; }
.adm-kv dt { color: var(--muted); }
.adm-kv dd { margin: 0; overflow-wrap: anywhere; }
.mono { font-family: Consolas, "JetBrains Mono", monospace; }
td .hint { font-size: 0.8rem; }

/* ---- Confirmation par mot de passe ---- */
.fed-dialog { border: 1px solid #d9dcea; border-radius: 14px; padding: 24px; max-width: 420px; width: calc(100% - 32px); color: #1b2240; }
.fed-dialog::backdrop { background: rgba(15, 21, 48, 0.45); }
.fed-dialog-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.fed-dialog-form p { margin: 0; }

/* ---- Fédérateur 2.0 : memes composants que les modules 3.0 de la box ---- */
.x-layout { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 20px; align-items: start; }
.x-side { display: flex; flex-direction: column; gap: 16px; }
.x-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.x-card { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 2px 8px rgba(15,33,72,0.06); min-width: 0; }
.x-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.x-card > header h3 { margin: 0; font-family: "Rajdhani","Segoe UI",sans-serif; font-size: 1.15rem; }
.x-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.x-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.x-row > .grow { flex: 1; min-width: 160px; }
.x-list { display: flex; flex-direction: column; }
.x-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 18px; border-top: 1px solid var(--line); }
.x-item:first-child { border-top: 0; }
.x-item .grow { flex: 1; min-width: 0; }
.x-item strong { display: block; }
.x-item small, .x-muted { color: var(--muted); font-size: 0.84rem; }
.x-item p { margin: 4px 0 0; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.x-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.76rem; font-weight: 700; white-space: nowrap; border: 1px solid var(--line); background: #f4f6fa; color: var(--muted); }
.x-pill.bad { background: #fdecec; color: #8f1d1d; border-color: #f2b5b5; }
.x-pill.warn { background: #fff4e0; color: #7a4a00; border-color: #f2c46d; }
.x-pill.ok { background: #e9f8f0; color: #175c36; border-color: #8fd6ae; }
.x-pill.info { background: #eef4fd; color: #1e437d; border-color: #b7cdee; }
/* Lien presente comme un bouton secondaire (2.4.0 : « Ouvrir une demande » sur une alerte du parc). */
.x-link-button { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: 0.9rem; text-decoration: none; white-space: nowrap; }
.x-link-button:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.x-empty { padding: 18px; color: var(--muted); text-align: center; }
.x-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.x-kpi { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.x-kpi b { display: block; font-size: 1.6rem; font-family: "Rajdhani","Segoe UI",sans-serif; }
.x-kpi span { color: var(--muted); font-size: 0.84rem; }
.x-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.x-table th, .x-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.x-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.x-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.x-tabs button { box-shadow: none; }
.x-tabs button.active { background: var(--brand); color: #fff; }
.x-doc { background: #fff; color: #111; border: 1px solid var(--line); border-radius: 14px; padding: 28px 32px; line-height: 1.5; }
.x-doc h2 { margin: 0 0 4px; font-family: "Rajdhani","Segoe UI",sans-serif; }
.x-doc h3 { margin: 22px 0 8px; font-size: 1.05rem; border-bottom: 2px solid #1e437d; padding-bottom: 4px; }
.x-doc .x-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.x-doc .x-sign div { border: 1px solid #bbb; border-radius: 8px; min-height: 90px; padding: 8px 12px; font-size: 0.85rem; color: #555; }
[hidden] { display: none !important; }
@media (max-width: 1100px) { .x-layout { grid-template-columns: 1fr; } }
@media print {
  body.x-printing .shell > *:not(.x-print-target) { display: none !important; }
  body.x-printing .x-print-target { display: block !important; }
  body.x-printing .x-doc { border: 0; padding: 0; }
  body.x-printing .x-no-print { display: none !important; }
}

/* Mon compte : double authentification (2.3.0). */
.tfa-state { margin: 10px 0 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tfa-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; align-items: stretch; }
.tfa-steps[hidden], .tfa-manage[hidden], #tfa-start-row[hidden] { display: none; }
.tfa-steps[data-only-codes] .tfa-step:not(:last-child) { display: none; }
.tfa-step { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tfa-step-no { margin: 0; color: var(--brand); font-weight: 700; font-size: 0.85rem; }
.tfa-form { display: flex; flex-direction: column; gap: 10px; }
.tfa-form[hidden] { display: none; }
.tfa-qr { display: block; align-self: center; width: 210px; max-width: 100%; height: auto; image-rendering: pixelated; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.tfa-manual summary { cursor: pointer; color: var(--brand); min-height: 32px; }
.tfa-secret { display: inline-block; font-family: Consolas, monospace; font-size: 1.05rem; letter-spacing: 0.08em; padding: 6px 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; user-select: all; overflow-wrap: anywhere; }
.tfa-code-input { font-size: 1.4rem; font-weight: 700; letter-spacing: 0.3em; text-align: center; }
.tfa-codes { margin: 0; padding: 12px 14px; list-style: none; background: #f6f9fd; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; font-family: Consolas, monospace; font-size: 1rem; letter-spacing: 0.06em; }
.tfa-manage { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.tfa-confirm { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f6f9fd; }
.nav-user-badge.nav-user-link { text-decoration: none; cursor: pointer; }
.nav-user-badge.nav-user-link:hover, .nav-user-badge.nav-user-link.active { border-color: var(--brand); color: var(--brand); }

/* ---- 2.8.0 : trois fenetres (Vue d'ensemble, Site, Recherche) + roue « Réglages » ---- */
.nav-tabs { display: flex; gap: 4px; flex-wrap: wrap; background: #f4f7fb; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.nav-tabs .nav-tab { border: 0; border-radius: 999px; background: transparent; padding: 8px 16px; }
.nav-tabs .nav-tab.active { background: var(--brand); color: #fff; }
.nav-tabs .nav-tab:not(.active):hover { background: var(--brand-soft); color: var(--brand); }
.nav-settings .nav-group-menu { left: auto; right: 0; min-width: 290px; }
.nav-gear { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Niveaux : pastilles (lvb-*) et textes (lv-text-*), contrastes lisibles sur fond blanc. */
.lvb-bad { background: var(--fault) !important; } .lvb-warn { background: var(--alert) !important; } .lvb-off { background: var(--offline) !important; }
.lvb-ok { background: var(--normal) !important; } .lvb-none { background: #c3ccd9 !important; } .lvb-info { background: var(--brand) !important; }
.lv-text-bad { color: #9b1c1c; } .lv-text-warn { color: #8a4b00; } .lv-text-off { color: #4a5568; } .lv-text-ok { color: #0b6b43; } .lv-text-none { color: var(--muted); }
.ov-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; flex: none; vertical-align: baseline; }

.ov-main { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(380px, 1fr); gap: 16px; align-items: start; }
.ov-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ov-selected { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.ov-selected.on { border: 2px solid var(--brand); }
.ov-selected h3, .ov-sup h3, .st-card h3 { margin: 0; font-family: "Rajdhani", "Segoe UI", sans-serif; font-size: 1.35rem; line-height: 1.1; }
.ov-pick { margin: 0; color: var(--muted); }
.ov-sel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ov-sel-tools { display: flex; align-items: center; gap: 6px; }
.ov-badge { color: #fff; font-weight: 700; font-size: 0.8rem; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ov-badge.lvb-warn { color: #3d2400; } .ov-badge.lvb-none { color: var(--ink); }
.ov-close { min-width: 36px; min-height: 36px; padding: 0; font-size: 1.2rem; line-height: 1; }
.ov-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ov-kpis > div { background: #f6f9fd; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.ov-kpis small { display: block; color: var(--muted); font-size: 0.76rem; }
.ov-kpis strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.ov-actions, .st-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ov-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: 0.92rem; text-decoration: none; cursor: pointer; box-shadow: none; white-space: nowrap; }
.ov-actions .ov-btn { flex: 1 1 150px; }
.ov-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ov-btn:hover { border-color: var(--brand); color: var(--brand); }
.ov-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.ov-btn.dark { background: #0f2138; border-color: #0f2138; color: #fff; }
.ov-btn.primary:hover, .ov-btn.dark:hover { filter: brightness(1.12); color: #fff; }
.ov-btn.disabled, .ov-btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; }

.ov-sup { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.ov-sup-head, .st-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ov-counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ov-counter { text-align: left; border-radius: 10px; padding: 8px 10px; border: 1px solid; font: inherit; box-shadow: none; display: flex; flex-direction: column; min-width: 0; }
button.ov-counter { cursor: pointer; }
.ov-counter b { font-size: 1.35rem; font-family: "Rajdhani", "Segoe UI", sans-serif; line-height: 1.1; }
.ov-counter span { font-size: 0.78rem; }
.ov-counter.bad { background: #fdecec; border-color: #f3c2c2; color: #8f1d1d; }
.ov-counter.warn { background: #fff3e3; border-color: #f5d2a8; color: #7a4100; }
.ov-counter.off { background: #eef1f5; border-color: #d3d9e3; color: #3d4757; }
.ov-counter.ok { background: #e7f7ef; border-color: #bfe6d3; color: #0b5c3a; }
.ov-counter[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }
.ov-sub { margin: 4px 0 0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.ov-todo { border: 1px solid var(--line); border-radius: 12px; overflow: auto; max-height: 360px; }
.ov-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-top: 1px solid #eef2f8; }
.ov-item:first-child { border-top: 0; }
.ov-item .grow { flex: 1; min-width: 0; }
.ov-item time { font-size: 0.78rem; white-space: nowrap; }
.ov-text { font-size: 0.86rem; color: #33415a; overflow-wrap: anywhere; }
.ov-item-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ov-site-link { border: 0; background: transparent; padding: 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; box-shadow: none; text-align: left; }
.ov-site-link:hover { color: var(--brand); text-decoration: underline; }
.ov-mini { display: inline-flex; align-items: center; min-height: 34px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--brand); background: #fff; color: #0a4fa0;
  font: inherit; font-size: 0.82rem; font-weight: 700; text-decoration: none; cursor: pointer; box-shadow: none; white-space: nowrap; }
.ov-mini:hover { background: var(--brand-soft); }
.ov-mini.primary { background: #b42323; border-color: #b42323; color: #fff; }
.ov-mini.primary:hover { background: #961c1c; }
.ov-mini:disabled { opacity: 0.5; cursor: not-allowed; }
.ov-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.ov-table th { text-align: left; color: var(--muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.ov-table td { padding: 7px 4px; border-bottom: 1px solid #eef2f8; vertical-align: top; }
.ov-table td small { display: block; font-size: 0.76rem; }
.ov-table tr[data-site] { cursor: pointer; }
.ov-table tr[data-site]:hover td, .ov-table tr.selected td { background: #f2f7fe; }
@media (max-width: 1100px) { .ov-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .ov-counters, .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Fiche du site */
.st { display: flex; flex-direction: column; gap: 14px; }
.st-head { padding: 14px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.st-pick { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: var(--muted); font-weight: 700; }
.st-pick select { font-size: 1.1rem; font-weight: 700; color: var(--ink); min-width: 260px; }
.st-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 260px; }
.st-actions { margin-left: auto; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.st-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.st-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.st-live { background: #0d1626; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: #9fb0c8; }
.st-live img { width: 100%; height: 100%; object-fit: contain; }
.st-alarms { display: flex; flex-direction: column; gap: 8px; }
.st-alarm { border: 1px solid #f3c2c2; background: #fff7f7; border-left: 4px solid #d14b4b; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.st-alarm small { color: #4a2a2a; }
.st-alarm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.st-ack { background: #b42323; border-color: #b42323; color: #fff; }
.st-calm { margin: 0; color: #0b6b43; font-weight: 600; }
.st-cams { display: flex; flex-direction: column; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.st-cams button { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--line); background: transparent;
  padding: 9px 12px; box-shadow: none; border-radius: 0; color: var(--ink); font: inherit; cursor: pointer; min-height: 40px; }
.st-cams button:first-child { border-top: 0; }
.st-cams button.active, .st-cams button:hover { background: #f2f6fc; }
.st-net { display: flex; flex-direction: column; gap: 6px; }
.st-dev { display: flex; align-items: flex-start; gap: 4px; border: 1px solid #e6edf6; border-radius: 10px; padding: 9px 12px; }
.st-dev .ov-dot { margin-top: 5px; }
.st-dev .grow { flex: 1; min-width: 0; }
.st-dev strong { display: block; font-size: 0.92rem; }
.st-dev small { color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.st-dev-state { font-size: 0.84rem; margin-top: 2px; }
.st-more { font-weight: 700; font-size: 0.9rem; }
.st-more-btn { align-self: flex-start; background: transparent; border: 0; color: #0a5bb8; text-decoration: underline; padding: 6px 0; box-shadow: none; cursor: pointer; font: inherit; }
.st-rows { display: flex; flex-direction: column; }
.st-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid #eef2f8; }
.st-row:first-child { border-top: 0; }
.st-row .grow { flex: 1; min-width: 0; }
.st-row strong { display: block; font-size: 0.92rem; }
.st-row small { font-size: 0.84rem; overflow-wrap: anywhere; }
.st-row small:not([class*="lv-text"]) { color: #33415a; }
.st-row > :not(.grow) { flex: none; }
.st-note { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.st-note h4 { margin: 0 0 6px; font-size: 0.92rem; }
.st-note pre { margin: 0; white-space: pre-wrap; font-family: inherit; font-size: 0.9rem; line-height: 1.45; }

/* Prise en main a distance : choix de la machine */
.fed-dialog.rm-dialog { max-width: 680px; }
.rm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rm-list { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow: auto; }
.rm-machine { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.rm-who { flex: 1 1 200px; min-width: 0; }
.rm-who strong { display: block; }
.rm-who small { color: var(--muted); }
.rm-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* Recherche + plaques surveillees */
.rc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 18px; align-items: start; }
.rc-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rc-scroll { max-height: 340px; overflow: auto; }
.rc-sync summary { padding: 12px 18px; cursor: pointer; font-weight: 700; min-height: 24px; }
.sv-plate { font-family: Consolas, monospace; font-weight: 700; letter-spacing: 0.06em; background: #fff8d6; border: 2px solid #1b2240; border-radius: 6px; padding: 1px 8px; }
.sv-hit { border-left: 4px solid #d14b4b; }
@media (max-width: 1100px) { .rc-layout { grid-template-columns: minmax(0, 1fr); } }
.st-down { margin: 0; font-weight: 600; }
