/* ==========================================================================
   Kyrnet — feuille de style commune (site, espace client, administration)
   Thème « quantique » : fond #070A12, cartes #0B111C → #0E1626, bordures #18213A,
   accent bleu #1F6FE5 (texte blanc), bleu clair #6AB0FF, touches indigo #6E68FF et cyan #2EC5F0.
   Polices : Space Grotesk (titres, chiffres), Inter (texte), JetBrains Mono (libellés).
   Le site public ajoute site.css (accueil, configurateur, en-tête et pied de page).
   ========================================================================== */

:root {
  --bg: #070A12;
  --surface: #0B111C;
  --surface-2: #0E1626;
  --border: #18213A;
  --border-strong: #24304A;
  --text: #E9EDF3;
  --text-2: #B4BFCE;
  --muted: #9AA6B8;           /* texte secondaire (contraste ≥ 7:1 sur le fond) */
  --label: #7D8A9E;           /* libellés (≥ 4,9:1) */
  --accent: #1F6FE5;          /* boutons : texte blanc ≥ 4,7:1 */
  --accent-hover: #2A7BF0;
  --accent-text: #6AB0FF;     /* liens, petits libellés */
  --accent-soft: rgba(31, 111, 229, 0.14);
  --indigo: #6E68FF; --cyan: #2EC5F0; --violet-btn: #4B44D6;
  --ok: #3DDC97; --warn: #E3B341; --bad: #FF7B72; --info: #6AB0FF;
  --r: 12px; --r-lg: 20px; --r-xl: 28px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --sidebar-w: 256px;
  --header-h: 64px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--border-strong) var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
svg.i { width: 1.125em; height: 1.125em; flex: none; }
.i.inline, p svg.i, td svg.i, li svg.i, h3 svg.i, h4 svg.i, small svg.i, span.xsmall svg.i { display: inline-block; vertical-align: -0.2em; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 var(--s2); font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 var(--s2); }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s3) 0; }
code, .mono, pre { font-family: var(--mono); font-size: 0.875em; }
code { background: var(--surface-2); border: 1px solid var(--border); padding: 0 6px; border-radius: 6px; }
::selection { background: rgba(37, 99, 235, 0.45); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 4px; }

/* ---------- Utilitaires ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--s2); }
@media (min-width: 768px) { .container { padding: 0 var(--s3); } }
.narrow { max-width: 768px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.xsmall { font-size: 0.75rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; } .mt-sm { margin-top: 6px; }
.mt { margin-top: var(--s2); } .mt-lg { margin-top: var(--s4); } .mb { margin-bottom: var(--s2); } .mb-lg { margin-bottom: var(--s4); }
.flex { display: flex; gap: var(--s2); align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: var(--s2); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ph { color: var(--warn); font-style: normal; }
.skip-link { position: absolute; left: -9999px; top: var(--s1); z-index: 100; background: var(--accent); color: #fff; padding: var(--s1) var(--s2); border-radius: var(--r); }
.skip-link:focus { left: var(--s2); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); height: 40px; padding: 0 var(--s2); border-radius: var(--r);
  font: 600 0.9375rem/1 var(--font); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { background: color-mix(in srgb, var(--surface-2) 92%, var(--text)); border-color: color-mix(in srgb, var(--border-strong) 70%, var(--text)); color: var(--text); text-decoration: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-outline { background: transparent; }
.btn-danger { background: transparent; border-color: rgba(255, 123, 114, 0.45); color: var(--bad); }
.btn-danger:hover { background: rgba(255, 123, 114, 0.1); border-color: var(--bad); color: var(--bad); }
.btn-success { background: transparent; border-color: rgba(74, 194, 107, 0.45); color: var(--ok); }
.btn-success:hover { background: rgba(74, 194, 107, 0.1); color: var(--ok); }
.btn-sm { height: 32px; padding: 0 var(--s2); font-size: 0.875rem; }
.btn-lg { height: 48px; padding: 0 var(--s3); font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: 0.45; pointer-events: none; }
.btn-group { display: inline-flex; gap: var(--s1); flex-wrap: wrap; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); cursor: pointer; font: inherit; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 var(--s1); border-radius: var(--r); font-size: 0.75rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 32%, transparent); }
.badge-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 32%, transparent); }
.badge-bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 32%, transparent); }
.badge-info { color: var(--info); background: var(--accent-soft); border-color: rgba(122, 167, 255, 0.3); }
.badge-muted { color: var(--muted); background: transparent; border-color: var(--border); }
.pill, .tag { display: inline-flex; align-items: center; height: 24px; padding: 0 var(--s1); border-radius: var(--r); font-size: 0.75rem; font-weight: 600; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); }
.pill { color: var(--accent-text); border-color: rgba(122, 167, 255, 0.3); background: var(--accent-soft); }
.pulse::before { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-header h2, .card-header h3 { margin: 0; font-size: 1rem; }
.card-body { padding: var(--s3); }
.card-footer { padding: var(--s2) var(--s3); border-top: 1px solid var(--border); display: flex; gap: var(--s1); justify-content: flex-end; flex-wrap: wrap; }
.card.flush .card-body { padding: 0; }
.card-link { display: block; color: inherit; }
.card-link:hover { color: inherit; border-color: var(--border-strong); text-decoration: none; background: var(--surface-2); }
.card-danger { border-color: rgba(255, 123, 114, 0.35); }
@media (max-width: 640px) { .card-body { padding: var(--s2); } .card-header, .card-footer { padding: var(--s2); } }

.grid { display: grid; gap: var(--s3); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3, .grid-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-4 { grid-template-columns: minmax(0, 1fr); } .grid { gap: var(--s2); } }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: var(--s1); margin-bottom: var(--s2); }
.field label, .label { font-size: 0.875rem; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 0.8125rem; color: var(--muted); }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], input[type=url], input[type=datetime-local], select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); font: 400 0.9375rem/1.5 var(--font); }
textarea { height: auto; min-height: 128px; padding: var(--s1) 12px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23949eae' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent); }
@media (forced-colors: active) { input:focus, select:focus, textarea:focus { outline: 2px solid; } }
input::placeholder, textarea::placeholder { color: #6b7585; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 24px; }
.check { display: flex; gap: var(--s1); align-items: flex-start; font-size: 0.9375rem; color: var(--text-2); cursor: pointer; }
.check input { margin-top: 4px; flex: none; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s2); }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--s2); }
@media (max-width: 640px) { .form-row, .form-row-3 { grid-template-columns: minmax(0, 1fr); } }
.input-group { display: flex; }
.input-group input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.inline-form { display: inline; }
.search-bar { display: flex; gap: var(--s1); flex-wrap: wrap; align-items: center; }
.search-bar input:not([type=checkbox]):not([type=radio]), .search-bar select { width: auto; min-width: 176px; }
.search-bar input[type=search] { flex: 1; min-width: 200px; }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: var(--s1); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; flex-direction: column; gap: 0; padding: 12px var(--s2); border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--bg); cursor: pointer; height: 100%; }
.choice span strong { font-size: 0.9375rem; }
.choice span small { color: var(--muted); font-size: 0.8125rem; }
.choice input:checked + span { border-color: var(--accent-text); background: var(--accent-soft); }
.choice input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.choice .save { position: absolute; top: -8px; right: var(--s1); font-size: 0.6875rem; background: var(--accent); color: #fff; padding: 0 var(--s1); border-radius: var(--r); font-weight: 700; font-style: normal; line-height: 16px; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; padding: 12px var(--s2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px var(--s2); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.table .row-link { color: var(--text); font-weight: 600; }
.table .row-link:hover { color: var(--accent-text); }
.table td.actions { text-align: right; white-space: nowrap; }
.table-compact td, .table-compact th { padding: var(--s1) var(--s2); }
.kv { display: grid; grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); gap: var(--s1) var(--s3); font-size: 0.9375rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Messages ---------- */
.flashes { display: flex; flex-direction: column; gap: var(--s1); margin-bottom: var(--s3); }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px var(--s2); border-radius: var(--r); border: 1px solid; font-size: 0.9375rem; }
.alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.alert-success { background: rgba(74, 194, 107, 0.08); border-color: rgba(74, 194, 107, 0.35); color: #b6f0c4; }
.alert-error { background: rgba(255, 123, 114, 0.08); border-color: rgba(255, 123, 114, 0.4); color: #ffc7c2; }
.alert-info { background: var(--accent-soft); border-color: rgba(122, 167, 255, 0.35); color: #cddcff; }
.alert-warn { background: rgba(227, 179, 65, 0.08); border-color: rgba(227, 179, 65, 0.35); color: #f5dfa6; }
.alert ul { margin: var(--s1) 0 0; padding-left: var(--s3); }
.credentials { border: 1px solid rgba(122, 167, 255, 0.4); background: var(--surface); border-radius: var(--r); padding: var(--s2) var(--s3); }
.credentials h4 { margin: 0 0 var(--s1); display: flex; gap: var(--s1); align-items: center; }
.credentials .kv { font-family: var(--mono); font-size: 0.875rem; }
.secret { display: inline-flex; gap: var(--s1); align-items: center; background: var(--bg); padding: 0 0 0 12px; border-radius: var(--r); border: 1px solid var(--border-strong); min-height: 32px; }

/* ---------- En-tête public ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; gap: var(--s3); height: var(--header-h); position: relative; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; font-size: 1.125rem; letter-spacing: 0.04em; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand img { height: 26px; width: auto; }
.wordmark { display: inline-flex; flex: none; } .wordmark img { display: block; }
.wm-light, html[data-theme="light"] .wm-dark { display: none; } html[data-theme="light"] .wm-light { display: inline-flex; }
.nav-links { display: flex; gap: var(--s1); flex: 1; align-items: center; }
.nav-links a { color: var(--text-2); padding: var(--s1) 12px; border-radius: var(--r); font-size: 0.9375rem; font-weight: 500; white-space: nowrap; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent-text); border-radius: 0; }
.nav-actions { display: flex; gap: var(--s1); align-items: center; margin-left: auto; }
.lang-switch { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r); color: var(--text-2); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em; }
.lang-switch:hover { color: var(--text); border-color: #44505f; text-decoration: none; }
.cart-link { position: relative; display: inline-flex; padding: var(--s1); border-radius: var(--r); color: var(--text-2); }
.cart-link:hover { background: var(--surface-2); color: var(--text); }
.cart-link svg { width: 20px; height: 20px; }
.cart-count { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 0.6875rem; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); border-radius: var(--r); color: var(--text); width: 40px; height: 40px; place-items: center; cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; }
@media (max-width: 1080px) {
  .nav-toggle { display: grid; }
  .nav-links { position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: var(--s1) var(--s2) var(--s2); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px var(--s1); border-radius: 0; border-bottom: 1px solid var(--border); }
  .nav-links a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--accent-text); padding-left: var(--s2); }
}
@media (max-width: 420px) { .nav-actions .btn-sm svg { display: none; } }
.impersonation-bar { background: #6b4b00; color: #fff; font-size: 0.875rem; padding: var(--s1) 0; text-align: center; position: relative; z-index: 60; }
.impersonation-bar button { background: rgba(0, 0, 0, 0.25); color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: var(--r); padding: 0 var(--s1); margin-left: var(--s1); cursor: pointer; font: inherit; font-weight: 600; }
.crumbs-bar { border-bottom: 1px solid var(--border); }
.crumbs-bar ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s1); margin: 0; padding: var(--s1) 0; font-size: 0.8125rem; color: var(--muted); }
.crumbs-bar li + li::before { content: '/'; margin-right: var(--s1); color: var(--border-strong); }
.crumbs-bar a { color: var(--text-2); }
.flash-wrap { padding-top: var(--s2); }
.flash-wrap .flashes { margin-bottom: 0; }

/* ---------- Héros et sections ---------- */
.hero { padding: var(--s7) 0 var(--s6); border-bottom: 1px solid var(--border); }
.hero h1 { font-size: 2.5rem; line-height: 1.15; max-width: 720px; margin-bottom: var(--s3); }
.hero .lead { font-size: 1.125rem; color: var(--text-2); max-width: 640px; margin-bottom: var(--s4); }
.hero-cta { display: flex; gap: var(--s2); flex-wrap: wrap; }
.hero-facts { list-style: none; padding: 0; margin: var(--s5) 0 0; display: flex; gap: var(--s2) var(--s4); flex-wrap: wrap; color: var(--text-2); font-size: 0.9375rem; }
.hero-facts li { display: flex; gap: var(--s1); align-items: center; }
.hero-facts svg { color: var(--accent-text); width: 18px; height: 18px; }
@media (max-width: 640px) { .hero { padding: var(--s6) 0 var(--s5); } .hero h1 { font-size: 2rem; } .hero-facts { flex-direction: column; } }

.section { padding: var(--s6) 0; border-bottom: 1px solid var(--border); }
.section:last-of-type { border-bottom: 0; }
.section-alt { background: transparent; }
.section-head { max-width: 720px; margin: 0 0 var(--s4); }
.section-head.center { margin-left: auto; margin-right: auto; }
.section-head p { color: var(--text-2); margin: 0; }
.section-head h2 { margin-bottom: var(--s1); }
.kicker { display: block; color: var(--accent-text); font-weight: 600; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--s1); }
.page-hero { padding: var(--s6) 0 var(--s4); border-bottom: 1px solid var(--border); margin-bottom: var(--s5); }
.page-hero h1 { margin-bottom: var(--s1); }
.page-hero p { color: var(--text-2); max-width: 720px; margin: 0; font-size: 1.0625rem; }
.page-body { padding-bottom: var(--s6); }

.why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 1000px) { .why { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .why { grid-template-columns: minmax(0, 1fr); gap: var(--s3); } }
.why svg { width: 24px; height: 24px; color: var(--accent-text); margin-bottom: var(--s2); }
.why h3 { font-size: 1rem; margin-bottom: var(--s1); }
.why p { color: var(--text-2); font-size: 0.9375rem; margin: 0; }
.feature { padding: var(--s3); }
.feature .ico { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); margin-bottom: var(--s2); }
.feature .ico svg { width: 20px; height: 20px; }
.feature h3 { font-size: 1rem; }
.feature p { color: var(--text-2); font-size: 0.9375rem; margin: 0; }

/* ---------- Grille tarifaire (prix à l'unité) ---------- */
.price-table td { vertical-align: top; }
.price-table .gamme strong { display: block; }
.price-table .gamme small { color: var(--muted); font-size: 0.8125rem; }
.price-table .from { font-size: 1.125rem; font-weight: 700; white-space: nowrap; }
.price-table .units { font-size: 0.875rem; color: var(--text-2); white-space: nowrap; }
.price-table .units span { display: block; }
@media (max-width: 760px) {
  .rtable thead { display: none; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { border-bottom: 1px solid var(--border); padding: var(--s1) 0; }
  .rtable tr:last-child { border-bottom: 0; }
  .rtable td { border: 0; padding: var(--s1) var(--s2); display: flex; justify-content: space-between; gap: var(--s2); text-align: right; }
  .rtable td::before { content: attr(data-label); color: var(--muted); font-size: 0.8125rem; text-align: left; }
  .rtable td.gamme, .rtable td.actions { display: block; text-align: left; }
  .rtable td.gamme::before, .rtable td.actions::before { content: none; }
  .rtable td.actions .btn { width: 100%; }
}

/* Configurateur */
.cfg-row { padding: var(--s3) 0; border-bottom: 1px solid var(--border); }
.cfg-row:first-child { padding-top: 0; }
.cfg-row:last-child { border-bottom: 0; padding-bottom: 0; }
.cfg-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); margin-bottom: var(--s1); }
.cfg-head label { font-weight: 600; }
.cfg-head .unit { color: var(--muted); font-size: 0.8125rem; }
.cfg-ctl { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: var(--s2); align-items: center; }
.cfg-ctl input[type=number] { text-align: right; }
.cfg-scale { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); }
.cfg-fixed { color: var(--text-2); }
.price-big { font-size: 2rem; font-weight: 700; line-height: 1.2; }

/* ---------- Divers publics ---------- */
.locations { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s2); }
.location { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); }
.location strong { display: block; }
.flag-ico { display: inline-block; width: 18px; height: 13px; border-radius: 2px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15); flex: none; }
.flag-code { width: auto; height: auto; padding: 0 4px; font-size: 0.6875rem; font-weight: 700; background: var(--surface-2); color: var(--text-2); }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s1); }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); }
.check-list li > svg { color: var(--accent-text); width: 18px; height: 18px; margin-top: 3px; }
.server-name { font-size: 1.125rem; margin: 0; }

.terminal { background: #07090d; border: 1px solid var(--border-strong); border-radius: var(--r); overflow: hidden; font-family: var(--mono); font-size: 0.8125rem; }
.terminal-bar { display: flex; gap: 6px; padding: var(--s1) 12px; background: var(--surface); border-bottom: 1px solid var(--border); align-items: center; }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.terminal-bar span { margin-left: var(--s1); color: var(--muted); font-size: 0.75rem; }
.terminal pre { margin: 0; padding: var(--s2); color: #c3ccd9; white-space: pre-wrap; line-height: 1.6; max-height: 344px; overflow: auto; }
.terminal .g { color: var(--ok); } .terminal .b { color: var(--accent-text); } .terminal .m { color: var(--muted); } .terminal .y { color: var(--warn); }

.faq { max-width: 800px; display: grid; gap: var(--s1); }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 0 var(--s3); }
.faq summary { cursor: pointer; padding: var(--s2) 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--s2); }
.faq summary::after { content: '+'; color: var(--accent-text); font-size: 1.25rem; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq summary::-webkit-details-marker { display: none; }
.faq details p { color: var(--text-2); padding-bottom: var(--s2); margin: 0; }
.faq-cat { font-size: 1.125rem; margin: var(--s5) 0 var(--s2); }
.faq-cat:first-child { margin-top: 0; }

.cta { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.cta h2 { margin: 0 0 var(--s1); font-size: 1.25rem; }
.cta p { margin: 0; color: var(--text-2); }

.toc { font-size: 0.875rem; }
.toc-title { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: var(--s1); }
.toc ul, .toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 1px solid var(--border); }
.toc li a { display: block; padding: 4px 0 4px 12px; color: var(--text-2); }
.toc li a:hover { color: var(--text); }
.toc li.lvl-3 a { padding-left: var(--s3); font-size: 0.8125rem; }
.with-toc { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: var(--s5); align-items: start; }
.with-toc.toc-right { grid-template-columns: minmax(0, 1fr) 224px; }
@media (max-width: 900px) { .with-toc, .with-toc.toc-right { grid-template-columns: minmax(0, 1fr); gap: var(--s3); } .with-toc .toc { position: static; } }

.prose { color: var(--text-2); font-size: 1rem; line-height: 1.7; }
.prose h2 { color: var(--text); font-size: 1.25rem; margin: var(--s5) 0 var(--s2); scroll-margin-top: 80px; }
.prose h3 { color: var(--text); font-size: 1.0625rem; margin: var(--s4) 0 var(--s1); scroll-margin-top: 80px; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: var(--s3); margin: 0 0 var(--s2); }
.prose li { margin-bottom: var(--s1); }
.prose strong { color: var(--text); }
.prose pre.code { background: #07090d; border: 1px solid var(--border); border-radius: var(--r); padding: var(--s2); overflow-x: auto; color: #d3dbe6; margin: 0 0 var(--s2); }
.prose pre.code code { background: none; border: 0; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 var(--s2); font-size: 0.9375rem; }
.prose th, .prose td { border-bottom: 1px solid var(--border); padding: var(--s1) 12px; text-align: left; }
.prose th { color: var(--text); }
.callout { border: 1px solid var(--border); border-left: 3px solid var(--accent-text); background: var(--surface); padding: 12px var(--s2); border-radius: var(--r); margin: 0 0 var(--s2); }
.legal h2 { font-size: 1.125rem; }

.guide-search { position: relative; max-width: 560px; }
.guide-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.guide-search input { padding-left: 40px; height: 48px; }
.guide-card h3 { font-size: 1rem; margin-bottom: var(--s1); }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--border); padding: var(--s5) 0 var(--s4); font-size: 0.9375rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: var(--s4); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s3); } .footer-brand { grid-column: 1 / -1; } }
.footer-grid h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: var(--s2); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s1); }
.footer-grid a { color: var(--text-2); }
.footer-grid a:hover { color: var(--text); }
.footer-brand p { color: var(--muted); max-width: 360px; font-size: 0.875rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid var(--border); font-size: 0.8125rem; color: var(--muted); }
.status-dot { display: inline-flex; align-items: center; gap: var(--s1); }
.status-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.status-dot.warn::before { background: var(--warn); }

/* ---------- Authentification ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: var(--s5) var(--s2); }
.auth-card { width: 100%; max-width: 448px; }
.auth-card.wide { max-width: 640px; }
.auth-card .card-body { padding: var(--s4); }
@media (max-width: 480px) { .auth-card .card-body { padding: var(--s3) var(--s2); } }
.auth-card h1 { font-size: 1.5rem; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: var(--s3); }
.auth-logo { display: block; width: 48px; margin: 0 auto var(--s2); }
.demo-hint { margin-top: var(--s2); font-size: 0.8125rem; color: var(--muted); text-align: center; border-top: 1px dashed var(--border); padding-top: var(--s2); }
.orb { display: none; }

.error-page { text-align: center; padding: var(--s7) var(--s2); }
.error-code { font-size: 4rem; font-weight: 700; line-height: 1; color: var(--accent-text); margin-bottom: var(--s2); }

/* ==========================================================================
   Application (espace client et administration)
   ========================================================================== */
.app { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 40; transition: transform 0.2s; }
.sidebar .brand { padding: 0 var(--s3); height: var(--header-h); font-size: 1rem; border-bottom: 1px solid var(--border); }
.sidebar .brand img { height: 24px; }
.side-nav { flex: 1; overflow-y: auto; padding: var(--s2) 12px; scrollbar-width: thin; }
.side-nav .group { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: var(--s2) 12px var(--s1); font-weight: 600; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: var(--s1) 12px; border-radius: var(--r); color: var(--text-2); font-size: 0.9375rem; font-weight: 500; margin-bottom: 2px; }
.side-nav a svg { width: 18px; height: 18px; flex: none; opacity: 0.8; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.side-nav a.active { background: var(--accent-soft); color: #fff; }
.side-nav a.active svg { opacity: 1; color: var(--accent-text); }
.side-nav .count { margin-left: auto; font-size: 0.6875rem; min-width: 20px; padding: 0 6px; border-radius: var(--r); background: var(--accent); color: #fff; text-align: center; font-weight: 700; line-height: 18px; }
.side-user { padding: var(--s2); border-top: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.avatar { width: 32px; height: 32px; border-radius: var(--r); background: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 0.8125rem; color: #fff; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.125rem; }
.side-user .who { flex: 1; min-width: 0; }
.side-user .who strong { display: block; font-size: 0.875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .who span { font-size: 0.75rem; color: var(--muted); }
.icon-btn { background: none; border: 1px solid transparent; color: var(--muted); width: 32px; height: 32px; border-radius: var(--r); cursor: pointer; display: inline-grid; place-items: center; padding: 0; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn svg { width: 16px; height: 16px; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--header-h); display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s4); background: var(--bg); border-bottom: 1px solid var(--border); }
.topbar .crumbs { font-size: 0.875rem; color: var(--muted); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumbs a { color: var(--muted); }
.topbar .crumbs b { color: var(--text); font-weight: 600; }
.topbar form.search { position: relative; }
.topbar form.search input { width: 256px; padding-left: 40px; height: 40px; }
.topbar form.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.content { padding: var(--s4); width: 100%; max-width: 1400px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s3); }
.page-head h1 { font-size: 1.5rem; margin: 0; }
.page-head p { margin: var(--s1) 0 0; color: var(--muted); }
.side-toggle { display: none !important; }
.backdrop { display: none; }
@media (max-width: 1240px) { .app .grid-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1000px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .side-toggle { display: inline-grid !important; }
  .backdrop.show { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 35; }
  .topbar form.search { display: none; }
  .content, .topbar { padding-left: var(--s2); padding-right: var(--s2); }
}

.stat { padding: var(--s3); }
.stat .label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; display: flex; align-items: center; gap: var(--s1); }
.stat .label svg { width: 16px; height: 16px; color: var(--accent-text); }
.stat .value { font-size: 1.75rem; font-weight: 700; margin-top: var(--s1); }
.stat .delta { font-size: 0.8125rem; color: var(--muted); }
.stat .delta.up { color: var(--ok); } .stat .delta.down { color: var(--bad); }

.meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.meter.warn > i { background: var(--warn); }
.meter.bad > i { background: var(--bad); }
.meter-row { display: grid; grid-template-columns: 1fr auto; gap: var(--s1) var(--s2); font-size: 0.875rem; margin-bottom: var(--s2); }
.meter-row .meter { grid-column: 1 / -1; }

.svc { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border-bottom: 1px solid var(--border); color: inherit; }
.svc:last-child { border-bottom: 0; }
.svc:hover { background: var(--surface-2); color: inherit; text-decoration: none; }
.svc-icon { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--accent-text); flex: none; }
.svc-icon svg { width: 20px; height: 20px; }
.svc .info { flex: 1; min-width: 0; }
.svc .info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc .info span { font-size: 0.8125rem; color: var(--muted); }
.svc .meta { text-align: right; font-size: 0.8125rem; color: var(--muted); }
@media (max-width: 640px) { .svc .meta { display: none; } .svc { padding: var(--s2); } }

.server-head { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; padding: var(--s3); }
.server-head .svc-icon { width: 48px; height: 48px; }
.server-head h1 { font-size: 1.375rem; margin: 0 0 var(--s1); word-break: break-all; }
.server-head .sub { display: flex; gap: var(--s2); flex-wrap: wrap; color: var(--muted); font-size: 0.875rem; align-items: center; }
.power-controls { display: flex; gap: var(--s1); flex-wrap: wrap; margin-left: auto; }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: var(--s3); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 12px var(--s2); color: var(--muted); font-weight: 500; font-size: 0.9375rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--accent-text); }

.chart { width: 100%; height: 176px; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .axis { stroke: var(--border); }
.chart text { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.chart-legend { display: flex; gap: var(--s2); font-size: 0.8125rem; color: var(--muted); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 4px var(--s1); font-size: 0.75rem; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; z-index: 5; }
.bars { display: flex; align-items: flex-end; gap: var(--s1); height: 200px; padding-top: var(--s1); }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--s1); height: 100%; justify-content: flex-end; }
.bars .bar i { width: 100%; max-width: 40px; border-radius: 4px 4px 0 0; background: var(--accent); min-height: 2px; position: relative; }
.bars .bar.current i { background: var(--accent-text); }
.bars .bar span { font-size: 0.75rem; color: var(--muted); }
.bars .bar i::after { content: attr(data-v); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); font-size: 0.6875rem; color: var(--text-2); white-space: nowrap; opacity: 0; }
.bars .bar:hover i::after { opacity: 1; }

.thread { display: flex; flex-direction: column; gap: var(--s2); }
.msg { display: flex; gap: var(--s2); }
.msg .bubble { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.msg .bubble-head { display: flex; justify-content: space-between; gap: var(--s1); flex-wrap: wrap; padding: var(--s1) var(--s2); border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.msg .bubble-body { padding: var(--s2); font-size: 0.9375rem; overflow-wrap: anywhere; }
.msg.staff .bubble { border-color: rgba(122, 167, 255, 0.35); }
.msg.staff .bubble-head { background: var(--accent-soft); }
.msg.internal .bubble { border-color: rgba(227, 179, 65, 0.4); border-style: dashed; }
.msg.internal .bubble-head { background: rgba(227, 179, 65, 0.08); }
.msg .avatar.staff { background: #1e3a8a; }
.msg.ai .bubble { border-color: rgba(var(--kn-a2-rgb, 139, 92, 246), 0.45); }
.msg.ai .bubble-head { background: linear-gradient(90deg, rgba(var(--kn-a2-rgb, 139, 92, 246), 0.16), transparent); }
.msg.ai .avatar { background: linear-gradient(135deg, var(--accent), rgb(var(--kn-a2-rgb, 139, 92, 246))); color: #fff; }
.msg.ai .avatar svg { width: 18px; height: 18px; }
/* Pièces jointes des tickets */
.attachments { display: flex; flex-wrap: wrap; gap: var(--s1); padding: 0 var(--s2) var(--s2); }
.attachment { display: inline-flex; align-items: center; gap: var(--s1); max-width: 280px; padding: 6px var(--s1); border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); color: var(--text-2); font-size: 0.8125rem; text-decoration: none; }
.attachment:hover { border-color: var(--accent); color: var(--text); }
.attachment img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; flex: none; background: var(--surface); }
.attachment svg { width: 20px; height: 20px; flex: none; }
.attachment-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Facture (toujours claire, imprimable) */
.invoice-doc { background: #fff; color: #111827; border-radius: var(--r); padding: var(--s5); }
.invoice-doc h1, .invoice-doc h2 { color: #0b1530; }
.invoice-doc .muted { color: #4b5563; }
.invoice-doc a { color: #1d4ed8; }
.invoice-doc table { width: 100%; border-collapse: collapse; margin: var(--s3) 0; font-size: 0.9375rem; }
.invoice-doc th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: #4b5563; border-bottom: 2px solid #e5e7eb; padding: var(--s1); }
.invoice-doc td { padding: 12px var(--s1); border-bottom: 1px solid #eef0f4; }
.invoice-doc .totals { margin-left: auto; width: 320px; max-width: 100%; }
.invoice-doc .totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.invoice-doc .totals .grand { border-top: 2px solid #111827; margin-top: var(--s1); padding-top: var(--s1); font-weight: 700; font-size: 1.125rem; }
.invoice-doc .stamp { display: inline-block; padding: 4px var(--s2); border: 2px solid; border-radius: var(--r); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.invoice-doc .stamp.paid { color: #15803d; } .invoice-doc .stamp.unpaid { color: #b91c1c; } .invoice-doc .stamp.cancelled, .invoice-doc .stamp.refunded { color: #4b5563; }
.invoice-doc .ph { color: #92400e; }
.invoice-head { display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s4); }
@media (max-width: 640px) { .invoice-doc { padding: var(--s3); } }

.pay-method { display: flex; gap: var(--s2); align-items: center; padding: var(--s2); border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--bg); }
.pay-method + .pay-method { margin-top: var(--s1); }
.pay-method .ico { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.pay-method .ico svg { width: 20px; height: 20px; }

.empty { text-align: center; padding: var(--s5) var(--s3); color: var(--muted); }
.empty > svg { width: 52px; height: 52px; padding: 13px; margin: 0 auto 14px; border-radius: 16px; color: var(--accent-text); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.empty.small > svg { width: 40px; height: 40px; padding: 10px; border-radius: 12px; }
.empty .btn svg, .empty .badge svg { width: 16px; height: 16px; margin: 0; color: inherit; }
.empty h3 { color: var(--text-2); }

.pagination { display: flex; gap: var(--s1); justify-content: center; padding: var(--s2); flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r); border: 1px solid var(--border); color: var(--text-2); font-size: 0.875rem; padding: 0 var(--s1); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

.summary-line { display: flex; justify-content: space-between; gap: var(--s2); padding: var(--s1) 0; font-size: 0.9375rem; color: var(--text-2); }
.summary-line.total { border-top: 1px solid var(--border); margin-top: var(--s1); padding-top: var(--s2); color: var(--text); font-weight: 700; font-size: 1.125rem; }
.sticky { position: sticky; top: calc(var(--header-h) + var(--s3)); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 var(--s2) var(--s3); font-size: 0.875rem; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-text); }
.timeline li::after { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline .when { color: var(--muted); font-size: 0.75rem; }

dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 0; max-width: 520px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0, 0, 0, 0.7); }

.status-banner { display: flex; align-items: center; gap: var(--s2); padding: var(--s3); border-radius: var(--r); border: 1px solid rgba(74, 194, 107, 0.4); background: var(--surface); }
.status-banner.warn { border-color: rgba(227, 179, 65, 0.45); }
.status-banner .big { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(74, 194, 107, 0.12); color: var(--ok); flex: none; }
.status-banner.warn .big { background: rgba(227, 179, 65, 0.12); color: var(--warn); }
.status-banner .big svg { width: 20px; height: 20px; }

/* SEO (admin) */
.serp { font-family: Arial, sans-serif; max-width: 600px; }
.serp .u { color: #bdc1c6; font-size: 0.8125rem; }
.serp .t { color: #8ab4f8; font-size: 1.125rem; line-height: 1.3; }
.serp .d { color: #bdc1c6; font-size: 0.875rem; }
.score { font-size: 2.5rem; font-weight: 700; }

/* Impression */
body.print { background: #fff; color: #111827; }
@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  .invoice-doc { padding: 0; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.h3 { font-size: 1.125rem; }
@media (max-width: 760px) {
  .rtable td .v { display: block; text-align: right; }
  .rtable td .v .units span { text-align: right; }
}

.demo-bar { background: #3d2f00; color: #ffe08a; text-align: center; font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.06em; padding: 4px var(--s2); }

form.inline { display: inline-block; margin: 0; }
/* Paiement par virement Interac (facture client) */
.interac-steps { list-style: none; margin: var(--s2) 0; padding: 0; display: grid; gap: 8px; counter-reset: st; }
.interac-steps li { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); counter-increment: st; }
.interac-steps li > span { font-size: .75rem; color: var(--muted); }
.interac-steps li > span::before { content: counter(st) ". "; color: var(--accent-text); font-weight: 600; }
.interac-steps strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .875rem; word-break: break-all; }
.pay-method.interac { border-bottom: 0; }
/* Couleur de la marque (Admin > Paramètres) : mêmes jetons pour l'espace client et l'administration */
html[data-brand="violet"] { --accent: #6E3FF3; --accent-hover: #7D52F5; --accent-text: #B69CFF; --accent-soft: rgba(110, 63, 243, 0.16); --info: #B69CFF; }
html[data-brand="rouge"] { --accent: #D62845; --accent-hover: #E03A56; --accent-text: #FF8FA3; --accent-soft: rgba(214, 40, 69, 0.16); --info: #FF8FA3; }
/* Marine (#003961) : très foncé, donc liseré clair sur les boutons et barres en ton plus clair pour rester visibles */
html[data-brand="marine"] { --accent: #003961; --accent-hover: #004A7C; --accent-text: #62B4EC; --accent-soft: rgba(11, 106, 174, 0.18); --info: #62B4EC; --kn-a2-rgb: 11, 106, 174; }
html[data-brand="marine"] .btn-primary { border-color: #2A7DB8; }
html[data-brand="marine"] :is(.meter > i, .bars .bar i) { background: #0B6AAE; }
/* Graphite : noirs et gris neutres (zinc), bordures discrètes, bleu électrique réservé aux actions */
html[data-brand="graphite"] {
  --bg: #080A0F; --surface: #0D1015; --surface-2: #12161F; --border: #1F2228; --border-strong: #2E3138;
  --text: #F8FAFC; --text-2: #D4D4D8; --muted: #A1A1AA; --label: #8B8B94;
  --accent: #2563EB; --accent-hover: #3B82F6; --accent-text: #60A5FA; --accent-soft: rgba(59, 130, 246, 0.14);
  --indigo: #6366F1; --cyan: #22D3EE; --violet-btn: #4F46E5; --ok: #34D399; --info: #60A5FA; --kn-a2-rgb: 59, 130, 246;
}
/* Pages d'accès à l'administration (connexion, A2F, codes de secours) */
.auth-page { min-height: 100vh; background: radial-gradient(1000px 520px at 50% -8%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%), var(--bg); }
.auth-page .auth-card { border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 40px 100px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.03); }
.auth-head { text-align: center; margin-bottom: var(--s3); }
.auth-badge { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: var(--s2); border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 40px -6px color-mix(in srgb, var(--accent) 65%, transparent); }
.auth-badge svg { width: 24px; height: 24px; }
.auth-head h1 { margin: 0 0 6px; font-size: 1.6rem; }
.auth-head .sub { margin: 0; }
.mfa-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.mfa-step-title { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.mfa-step-title b { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-size: .8rem; }
.mfa-steps .xsmall { margin: 6px 0 14px 36px; }
.mfa-qr { width: 216px; margin: 0 auto 14px; padding: 8px; border-radius: 16px; background: #fff; box-shadow: 0 24px 60px -24px color-mix(in srgb, var(--accent) 75%, transparent); }
.mfa-qr svg { display: block; width: 100%; height: auto; }
.mfa-manual { font-size: .875rem; }
.mfa-manual summary { cursor: pointer; list-style: none; text-align: center; color: var(--accent-text); }
.mfa-manual summary::-webkit-details-marker { display: none; }
.mfa-key { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0; padding: 10px 12px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--border); }
.mfa-key code { font-family: var(--mono); font-size: .85rem; letter-spacing: .08em; word-break: break-all; }
.otp-input { display: block; width: 100%; height: 64px; margin: 12px 0; padding-left: .5em; text-align: center; font-family: var(--mono); font-size: 1.9rem; letter-spacing: .5em; }
.otp-input::placeholder { color: #2E3A52; }
@media (hover: hover) and (pointer: fine) { .mfa-mobile-link { display: none; } }
/* Admin > SEO : liste « avant la mise en ligne » */
.launch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.launch-list li { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; }
.launch-list li > svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--warn); }
.launch-list li.done > svg { color: var(--ok); }
.launch-list li.done strong { color: var(--muted); font-weight: 500; }

/* Mes serveurs */
.status-dot.bad::before { background: var(--bad); box-shadow: 0 0 0 4px rgba(255, 123, 114, 0.18); }
.status-dot.off::before { background: var(--muted); }
.server-card { display: block; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.server-card:hover { border-color: var(--border-strong); transform: translateY(-1px); text-decoration: none; }
.server-card.alerting { border-color: rgba(255, 123, 114, 0.5); }
.server-card h2 { font-size: 1.0625rem; margin: 0; }
.server-facts { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); font-size: 0.8125rem; color: var(--muted); margin-top: var(--s2); }
.server-facts span { display: inline-flex; align-items: center; gap: 4px; }
.ip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.code-block { background: var(--bg, #0b0f17); border: 1px solid var(--border); border-radius: var(--r); padding: var(--s2); font-size: 0.8125rem; white-space: pre-wrap; word-break: break-all; margin: var(--s1) 0 var(--s2); }

/* ===== Mode clair (html[data-theme="light"]) : espace client, administration, pages de connexion ===== */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #F5F7FA; --surface: #FFFFFF; --surface-2: #F1F4F8; --border: #E2E6EC; --border-strong: #CBD2DC;
  --text: #0F172A; --text-2: #334155; --muted: #4B5563; --label: #64748B;
  --accent-text: #1D4ED8; --accent-soft: rgba(37, 99, 235, 0.10); --info: #1D4ED8;
  --ok: #047857; --warn: #B45309; --bad: #B91C1C; --cyan: #0E7490; --indigo: #4F46E5;
}
html[data-theme="light"][data-brand="violet"] { --accent-text: #6D28D9; --info: #6D28D9; --accent-soft: rgba(110, 63, 243, 0.10); }
html[data-theme="light"][data-brand="rouge"] { --accent-text: #B91C1C; --info: #B91C1C; --accent-soft: rgba(214, 40, 69, 0.08); }
html[data-theme="light"][data-brand="marine"] { --accent-text: #0B5A92; --info: #0B5A92; --accent-soft: rgba(11, 106, 174, 0.10); }
html[data-theme="light"] .lang-switch:hover { background: #EEF2F7; border-color: #B8C1CE; }
html[data-theme="light"] :is(input, textarea)::placeholder { color: #8A94A3; }
html[data-theme="light"] .otp-input::placeholder { color: #C3CAD5; }

html[data-theme="light"] .alert-info { color: #1E3A8A; }
html[data-theme="light"] .alert-warn { color: #7C2D12; background: rgba(217, 119, 6, 0.08); border-color: rgba(217, 119, 6, 0.4); }
html[data-theme="light"] .alert-error { color: #991B1B; }
html[data-theme="light"] .alert-success { color: #065F46; }
html[data-theme="light"] .side-nav a.active { color: var(--accent-text); }
html[data-theme="light"] :is(.serp .u, .serp .d) { color: #4D5156; }
html[data-theme="light"] .flag-ico { box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.15); }
html[data-theme="light"] :is(.card, .stat) { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
html[data-theme="light"] .msg .avatar.staff { background: #1D4ED8; }
/* La console et le code restent sombres, comme un vrai terminal */
html[data-theme="light"] .code-block { background: #0B1220; color: #E2E8F0; border-color: #0B1220; }
/* Bouton clair / sombre (barres du haut) */
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .ico-moon { display: none; }
html[data-theme="light"] .theme-toggle .ico-sun { display: none; }
html[data-theme="light"] .theme-toggle .ico-moon { display: inline; }

/* --- Dédiés reliés (Admin > Mes serveurs) -------------------------------------------------------- */
.wrap { flex-wrap: wrap; }
.inline { display: inline-block; }
.text-bad { color: var(--bad); }
.text-ok { color: var(--ok); } .text-warn { color: var(--warn); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--s2); }
.inst-card .card-body { display: flex; flex-direction: column; gap: 4px; height: 100%; }
.inst-card .card-body > button { align-self: flex-start; margin-top: auto; }
.inst-card.is-off { opacity: .72; }
.inst-head { display: flex; gap: 12px; align-items: center; }
.inst-head h3 { margin: 0; font-size: 1rem; }
.inst-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.inst-ico svg { width: 20px; height: 20px; }
.job-log { margin: 0; padding: 12px; min-height: 260px; max-height: 520px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: .8125rem; line-height: 1.5; }
.job-list { list-style: none; margin: 0; padding: 0; }
.job-list li a { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 10px var(--s2); border-top: 1px solid var(--border); color: var(--text); }
.job-list li a .xsmall { grid-column: 2; }
.job-list li a:hover { background: var(--surface-2); text-decoration: none; }
.job-list li.active a { background: var(--accent-soft); }
/* Console graphique (noVNC) */
.vnc { border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; background: #000; }
.vnc:fullscreen { display: flex; flex-direction: column; border-radius: 0; }
.vnc-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.vnc-status { font-size: .8125rem; color: var(--muted); }
.vnc-status.ok { color: var(--ok, #22c55e); }
.vnc-status.bad { color: var(--bad); }
.vnc-screen { height: min(70vh, 720px); }
.vnc:fullscreen .vnc-screen { flex: 1; height: auto; }

/* Page de statut publique (statut en direct) */
.st-banner { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; padding: var(--s3); border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); }
.st-orb { position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--ok); background: color-mix(in srgb, currentColor 14%, transparent); }
.st-orb svg { width: 22px; height: 22px; }
.st-banner > .grow { flex: 1 1 220px; }
.st-orb::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; animation: st-ping 2.6s ease-out infinite; }
@keyframes st-ping { 0% { transform: scale(0.85); opacity: 0.5; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes st-blink { 50% { opacity: 0.35; } }
.st-operational { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.st-degraded, .st-maintenance { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }
.st-degraded .st-orb, .st-maintenance .st-orb { color: var(--warn); }
.st-partial, .st-major { border-color: color-mix(in srgb, var(--bad) 55%, var(--border)); }
.st-partial .st-orb, .st-major .st-orb { color: var(--bad); }
.st-incident { border-left: 3px solid var(--warn); }
.st-incident.st-sev-major, .st-incident.st-sev-critical { border-left-color: var(--bad); }
.st-incident.st-sev-maintenance { border-left-color: var(--info); }
.st-row { padding-bottom: var(--s2); border-bottom: 1px solid var(--border); }
.st-row:last-child { padding-bottom: 0; border-bottom: 0; }
.st-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.st-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.st-ip { display: inline-flex; align-items: center; gap: 2px; font-size: 0.8125rem; color: var(--muted); padding: 1px 2px 1px 8px; border: 1px solid var(--border); border-radius: 999px; }
.st-ip .icon-btn { width: 26px; height: 26px; }
.st-now { display: flex; align-items: center; gap: 10px; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--label); }
.st-dot.st-up { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.st-dot.st-degraded { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 18%, transparent); }
.st-dot.st-down { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 20%, transparent); animation: st-blink 1.2s ease-in-out infinite; }
.st-pill { font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.st-pill.st-up { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.st-pill.st-degraded { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.st-pill.st-down { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.st-bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; height: 34px; margin-top: 12px; }
.st-bar { border-radius: 2px; background: var(--border-strong); transition: transform 0.15s ease, filter 0.15s ease; transform-origin: bottom; }
.st-bar:hover { transform: scaleY(1.15); filter: brightness(1.15); }
.st-l-ok { background: var(--ok); }
.st-l-good { background: color-mix(in srgb, var(--ok) 55%, var(--warn)); }
.st-l-warn { background: var(--warn); }
.st-l-bad { background: var(--bad); }
.st-l-none { background: var(--border-strong); opacity: 0.55; }
.st-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; }
@media (max-width: 640px) {
  .st-bars { gap: 1px; height: 28px; }
  .st-legend span:nth-child(2) { text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .st-orb::after, .st-dot.st-down { animation: none; } }
/* Formulaire de modification dépliable (Admin > Statut et incidents) */
.inline-edit { position: relative; }
.inline-edit > summary { list-style: none; cursor: pointer; }
.inline-edit > summary::-webkit-details-marker { display: none; }
.inline-edit[open] > form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); text-align: left; }

/* --- Serveurs physiques : ajout (test IPMI), cycle de vie, console SOL --------------------------------------------- */
.section-title { font-size: 1rem; margin: var(--s3) 0 var(--s2); color: var(--text-2); }
.stack-sm > * + * { margin-top: var(--s1); }
.test-result { border: 1px solid var(--border); border-radius: var(--r); padding: var(--s2); background: var(--surface-2); }
.test-line { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: var(--s2); padding: 6px 0; font-size: .875rem; align-items: start; }
.test-line strong { font-family: var(--mono); font-size: .78rem; color: var(--text-2); word-break: break-all; }
.test-line.ok [data-v] { color: var(--ok); }
.test-line.bad [data-v] { color: var(--bad); }
@media (max-width: 640px) { .test-line { grid-template-columns: 1fr; gap: 2px; } }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s1); }
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--r); padding: 12px; cursor: pointer; background: var(--surface-2); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card input { margin-top: 3px; }
.radio-card span { display: flex; flex-direction: column; gap: 2px; }
.lc-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; align-items: center; }
.lc-steps li { display: flex; align-items: center; gap: 6px; }
.lc-steps li + li::before { content: '→'; color: var(--label); }
.lc-steps li.next .badge { outline: 1px dashed var(--border-strong); }
.lc-steps li.current .badge { font-weight: 700; }
.sol-term { background: #0b0e14; border: 1px solid var(--border); border-radius: var(--r); padding: 8px; height: 440px; overflow: hidden; }
.sol-term .xterm { height: 100%; }
@media (max-width: 640px) { .sol-term { height: 340px; } }

/* --- Contrôle KYRNET (espace client) : panneau du client pour sa machine physique ----------------------------------- */
.ctl-hero { display: grid; grid-template-columns: auto auto 1fr; gap: var(--s3); align-items: center; padding: var(--s3); background:
  radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 55%), var(--surface); }
.ctl-brand { display: flex; gap: 12px; align-items: center; }
.ctl-brand img { background: #0b0e14; border-radius: 8px; padding: 3px; }
.ctl-kicker { font: 700 .72rem/1 var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 4px; }
.ctl-brand h1 { font-size: 1.35rem; }
.ctl-led-wrap { display: flex; gap: 12px; align-items: center; padding-left: var(--s3); border-left: 1px solid var(--border); }
.ctl-led { width: 18px; height: 18px; border-radius: 50%; background: var(--label); box-shadow: 0 0 0 4px rgba(125, 138, 158, .15); flex: none; }
.ctl-led.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(61, 220, 151, .18), 0 0 16px rgba(61, 220, 151, .55); }
.ctl-led.off { background: #5b6577; }
.ctl-led.unk { background: var(--warn); }
.ctl-power { font: 700 1.1rem/1.2 var(--font-display); }
.ctl-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px var(--s2); margin: 0; justify-self: stretch; }
.ctl-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--label); }
.ctl-facts dd { margin: 2px 0 0; font-size: .9rem; overflow-wrap: anywhere; }
@media (max-width: 900px) { .ctl-hero { grid-template-columns: 1fr; } .ctl-led-wrap { padding-left: 0; border-left: 0; } }
.ctl-power-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s1); }
.ctl-power-grid form { display: contents; }
.ctl-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: var(--r);
  background: var(--surface-2); color: var(--text); font: 600 .85rem/1.2 var(--font); cursor: pointer; text-align: center; }
.ctl-btn svg { width: 22px; height: 22px; }
.ctl-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.ctl-btn.go svg { color: var(--ok); }
.ctl-btn.danger svg { color: var(--bad); }
.ctl-btn.danger:hover:not(:disabled) { border-color: var(--bad); background: rgba(255, 123, 114, .08); }
.ctl-btn:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 640px) { .ctl-power-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ctl-sgroup + .ctl-sgroup { margin-top: var(--s2); }
.ctl-slabel { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--label); margin-bottom: 6px; }
.ctl-sensor { position: relative; display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; padding: 6px 0 9px; border-bottom: 1px solid var(--border); }
.ctl-sensor strong { font-family: var(--mono); font-weight: 600; white-space: nowrap; }
.ctl-sensor i { position: absolute; left: 0; bottom: 2px; height: 3px; width: var(--p); border-radius: 2px; background: linear-gradient(90deg, var(--ok), var(--warn)); opacity: .8; }
.ctl-sensor.warn strong { color: var(--warn); }
.ctl-sensor.crit strong { color: var(--bad); }
[hidden] { display: none !important; }
.test-line.info [data-v] { color: var(--muted); }
.dimm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .82rem; }
.dimm-list li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--border); padding-bottom: 4px; }
.mb-sm { margin-bottom: 6px; }

/* --- Tableau de bord d'un serveur ------------------------------------------------------------------------------------- */
.dash-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--s2); position: sticky; top: calc(var(--header-h) + 4px); z-index: 5; padding: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); }
.dash-nav a { font-size: .8rem; font-weight: 600; padding: 6px 10px; border-radius: 8px; color: var(--text-2); text-decoration: none; }
.dash-nav a:hover { background: var(--accent-soft); color: var(--text); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s1); }
.kpi { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--label); }
.kpi strong { font: 700 1.35rem/1.2 var(--font-display); }
.kpi strong.warn { color: var(--warn); }
.kpi strong.bad { color: var(--bad); }
.kpi small { font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.core-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(26px, 1fr)); gap: 6px; }
.core { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.core b { display: block; position: relative; width: 100%; height: 60px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.core b i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--ok); }
.core b i.warn { background: var(--warn); }
.core b i.bad { background: var(--bad); }
.core span { font: 500 .62rem/1 var(--mono); color: var(--label); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.input-sm { padding: 4px 8px; font-size: .8rem; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.section-title { scroll-margin-top: 150px; }
.input-sm { width: auto; max-width: 220px; }
/* Vos accès (VPS et dédiés) : commande prête à copier, domaine vérifié par le DNS */
.access-cmd { display: flex; align-items: center; gap: 6px; margin-bottom: var(--s2, 12px); }
.access-cmd pre { flex: 1; margin: 0; padding: 10px 12px; overflow-x: auto; white-space: pre; }
.access-cmd .icon-btn { margin-right: 6px; flex: none; }
.access-domain summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.access-domain .input-group input { font-family: var(--mono); font-size: .8125rem; }
#acces, #console, #reinstaller { scroll-margin-top: 90px; }
/* Pare-feu (XDP) : bascule ALLOW / DROP, formulaire d'ajout sur une ligne */
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; flex: none; }
.seg label { margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 7px 14px; font: 600 .78rem/1 var(--mono); letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
.seg label + label span { border-left: 1px solid var(--border-strong); }
.seg input:checked + .seg-allow { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.seg input:checked + .seg-drop { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); }
.seg input:focus-visible + span { outline: 2px solid var(--info); outline-offset: -2px; }
.fw-add { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fw-add select { width: auto; min-width: 120px; }
.fw-add input[name=port] { width: 100px; }
.fw-add input[name=source] { flex: 1; min-width: 170px; font-family: var(--mono); }
#pare-feu { scroll-margin-top: 90px; }

/* Service résilié : historique seulement (plus d’accès) */
.svc.svc-gone { opacity: .6; }
.svc.svc-gone:hover { opacity: .85; }
.table tr.row-gone td { opacity: .55; }

/* Fiche serveur : onglets techniques regroupés dans « Plus » */
.tabs:has(.tabs-more) { overflow: visible; flex-wrap: wrap; }
.tabs-more { position: relative; }
.tabs-more > summary { list-style: none; cursor: pointer; padding: 12px var(--s2); color: var(--muted); font-weight: 500; font-size: 0.9375rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs-more > summary::-webkit-details-marker { display: none; }
.tabs-more > summary::after { content: '▾'; margin-left: 6px; font-size: 0.75em; }
.tabs-more > summary:hover, .tabs-more[open] > summary { color: var(--text); }
.tabs-more > summary.active { color: var(--text); border-bottom-color: var(--accent-text); }
.tabs-more-list { position: absolute; right: 0; top: 100%; z-index: 30; min-width: 230px; display: grid; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }
.tabs-more-list a { border-bottom: 0; margin: 0; padding: 8px 10px; border-radius: 6px; }
.tabs-more-list a:hover, .tabs-more-list a.active { background: var(--surface-2); color: var(--text); }
/* Réinitialiser : deux choix dépliables */
.reset-opt > summary { cursor: pointer; list-style: none; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); }
.reset-opt > summary::-webkit-details-marker { display: none; }
.reset-opt[open] > summary { border-color: var(--accent-text); }

/* Haut de page commun des services (style Contrôle) : lien retour, actions rapides sous les caractéristiques */
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: var(--s1); }
.ctl-hero-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.ctl-hero-actions form { display: inline; }
.ctl-hero + .tabs { margin-top: 0; }

/* Installateur Kyrnet : catégories, recherche et cartes d'applications */
.app-picker { display: grid; gap: var(--s1); }
.app-picker-bar { display: flex; gap: var(--s1); align-items: center; }
.app-picker-bar input { flex: 1; }
.app-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.app-cats .chip { border: 1px solid var(--border); background: transparent; color: inherit; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .8rem; cursor: pointer; }
.app-cats .chip.active { border-color: var(--accent); background: var(--accent); color: #fff; }
.app-cats .chip.active .muted { color: rgba(255, 255, 255, .8); }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-height: 420px; overflow-y: auto; padding: 2px; }
.app-card { position: relative; display: grid; gap: 2px; padding: 10px 12px 10px 34px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--surface, transparent); }
.app-card input { position: absolute; left: 12px; top: 13px; margin: 0; }
.app-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.app-card.off { opacity: .45; cursor: not-allowed; }
.app-name { font-weight: 600; font-size: .9rem; }
.app-desc { font-size: .78rem; color: var(--muted, #8a94a6); }
.app-meta { font-size: .72rem; color: var(--label, #7d8a9e); }
/* Installation d'un système (Admin > serveur > Installation) : mêmes cartes que les applications */
.os-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.os-card { position: relative; display: grid; gap: 2px; padding: 10px 12px 10px 34px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--surface, transparent); }
.os-card input { position: absolute; left: 12px; top: 13px; margin: 0; }
.os-card:has(input:checked), .os-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.os-name { font-weight: 600; font-size: .9rem; }
.os-desc { font-size: .78rem; color: var(--muted, #8a94a6); }
.os-meta { font-size: .72rem; color: var(--label, #7d8a9e); }
.os-card.off { opacity: .5; cursor: not-allowed; }
.app-grid.app-grid-tall { max-height: 560px; }
.app-card.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.secret.secret-pre [data-pw-text] { white-space: pre-wrap; font-family: var(--mono, monospace); padding: 6px 0; }
[data-app-block].is-off .app-picker { opacity: .45; pointer-events: none; }
.app-note { color: var(--warn); }

/* Écran du serveur (KVM relayé par le panel) */
.kvm-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.kvm-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kvm-keys { width: auto; min-width: 0; padding: 4px 8px; font-size: .85rem; height: 32px; }
.kvm-screen { position: relative; background: #05070b; border: 1px solid var(--border); border-radius: var(--r); min-height: 380px; display: flex; align-items: flex-start; justify-content: center; overflow: auto; }
.kvm-screen canvas { display: block; outline: none; max-width: none; }
.kvm-screen canvas:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.kvm-screen:fullscreen { border: 0; border-radius: 0; align-items: center; }
.kvm-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #9aa4b2; font-size: .9rem; line-height: 1.5; }
.kvm-empty[hidden] { display: none; }
.kvm-type { display: grid; gap: 8px; margin-bottom: 10px; padding: 10px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2, transparent); }
.kvm-type textarea { font-family: var(--mono); font-size: .85rem; resize: vertical; }
@media (max-width: 640px) { .kvm-screen { min-height: 240px; } .kvm-tools .btn { padding-inline: 8px; } }
/* Santé : capteurs sur toute la largeur, en colonnes */
.ctl-sensors-wide { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s2); }
.ctl-sensors-wide .ctl-sgroup { margin: 0; }
.kvm-note[hidden] { display: none; }

/* Mise en service d'un nœud VPS (onglet Proxmox) : étapes numérotées, faite / à faire / en attente */
.setup-steps { list-style: none; margin: 0; padding: 0; }
.setup-steps > li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.setup-steps > li:first-child { border-top: 0; padding-top: 0; }
.setup-steps > li:last-child { padding-bottom: 0; }
.setup-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: .8rem; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.setup-steps > li.done .setup-num { color: var(--ok); border-color: rgba(74, 194, 107, 0.5); background: rgba(74, 194, 107, 0.1); }
.setup-steps > li.todo .setup-num { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.setup-steps > li.wait > div { opacity: .55; }
.setup-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
/* Catalogue d'ISO : cases à cocher par famille */
.iso-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; }
.iso-pick .check { margin: 0; }
.iso-pick .check.is-here { opacity: .6; }
/* Réseau des VM (onglet Proxmox) : seuls les champs du mode choisi s'affichent */
.vmnet .radio-cards { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.vmnet-opt { display: none; }
.vmnet:has(input[value="routed"]:checked) .vmnet-opt[data-mode~="routed"],
.vmnet:has(input[value="bridge"]:checked) .vmnet-opt[data-mode~="bridge"],
.vmnet:has(input[value="nat"]:checked) .vmnet-opt[data-mode~="nat"] { display: block; }
.radio-card.is-off { opacity: .55; cursor: not-allowed; }

/* Liste d’IP : passerelle modifiable */
.ip-gw summary { cursor: pointer; list-style: none; }
.ip-gw summary::-webkit-details-marker { display: none; }
.ip-gw summary .link { color: var(--accent-text); margin-left: 6px; font-family: var(--font, inherit); }
.ip-gw-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }

/* Admin > Moniteur : choix des interfaces du graphique de trafic */
.chip-checks { display: flex; flex-wrap: wrap; gap: var(--s1); }
.chip-check { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; font-size: .8rem; cursor: pointer; user-select: none; }
.chip-check input { margin: 0; }
.chip-check i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.chart.tall { height: 220px; }
/* Admin > Carte réseau : chemin du trafic, étape par étape */
.np-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s2); }
.np-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; border: 1px solid var(--warn); background: rgba(227, 179, 65, .15); vertical-align: -1px; }
.netpath { display: flex; flex-direction: column; }
.np-node { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); }
.np-node.filter { border-color: rgba(227, 179, 65, .45); box-shadow: inset 3px 0 0 var(--warn); }
.np-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--accent-text); }
.np-ico .i { width: 20px; height: 20px; }
.np-node.filter .np-ico { color: var(--warn); }
.np-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.np-num { font-size: .75rem; font-weight: 700; color: var(--warn); }
.np-what { margin-top: 2px; }
.np-out { display: none; }
.netpath.out .np-in { display: none; }
.netpath.out .np-out { display: inline; }
.np-val { text-align: right; white-space: nowrap; font-family: var(--mono); }
.np-link { position: relative; margin-left: 33px; padding: 8px 0 8px 22px; border-left: 2px solid var(--border-strong); min-height: 40px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.np-link::after { content: '▼'; position: absolute; left: -6px; bottom: -7px; font-size: 10px; line-height: 1; color: var(--accent-text); }
.netpath.out .np-link::after { content: '▲'; top: -7px; bottom: auto; }
.np-rate { font-family: var(--mono); }
.np-d, .np-u { opacity: .6; }
body:not(.np-dir-out) .np-d, body.np-dir-out .np-u { opacity: 1; font-weight: 600; color: var(--text); }
.np-list { list-style: none; margin: 6px 0 0; padding: 0; }
.np-list li { display: flex; justify-content: space-between; gap: var(--s1); padding: 8px 0; border-top: 1px solid var(--border); }
.np-filters { margin: 0 0 var(--s1); padding-left: 1.3em; }
.np-filters li + li { margin-top: 8px; }
.np-bar { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--surface-2); vertical-align: middle; overflow: hidden; }
.np-bar i { display: block; height: 100%; background: var(--accent); }
.netpath.compact .np-node { grid-template-columns: 32px minmax(0, 1fr); padding: 10px; }
.netpath.compact .np-ico { width: 32px; height: 32px; }
.netpath.compact .np-val { grid-column: 2; text-align: left; }
.netpath.compact .np-link { margin-left: 25px; }
@media (max-width: 560px) {
  .np-node { grid-template-columns: 32px minmax(0, 1fr); }
  .np-ico { width: 32px; height: 32px; }
  .np-val { grid-column: 2; text-align: left; white-space: normal; }
  .np-link { margin-left: 29px; }
  .np-list li { flex-direction: column; }
}
/* Admin > Moniteur : onglet Protection (bandeau d'attaque, périodes, chiffres, graphique dans le temps) */
.mon-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px var(--s2); border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); }
.mon-banner a { margin-left: auto; }
.mon-banner.bad { border-color: rgba(255, 123, 114, .45); background: rgba(255, 123, 114, .08); }
.mon-banner.bad .mon-dot { background: var(--bad); box-shadow: 0 0 0 4px rgba(255, 123, 114, .18); }
.mon-banner.ok .mon-dot { background: var(--ok); }
.mon-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--label); vertical-align: 1px; }
.mon-dot.on { background: var(--ok); }
.mon-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s2); }
.mon-bar-right { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) 12px; }
.mon-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; }
.mon-seg button { appearance: none; border: 0; background: transparent; color: var(--muted); font: 500 .8125rem/1 var(--font); padding: 8px 12px; cursor: pointer; }
.mon-seg button + button { border-left: 1px solid var(--border); }
.mon-seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.mon-seg button:focus-visible { outline: 2px solid var(--info); outline-offset: -2px; }
.mon-select { width: auto; min-width: 12em; height: 34px; padding: 0 10px; }
.mon-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.mon-stats > div { padding: 14px var(--s2); min-width: 0; }
.mon-stats > div + div { border-left: 1px solid var(--border); }
.mon-stats .label { font-size: .8125rem; color: var(--muted); }
.mon-stats .value { font: 600 1.375rem/1.3 var(--font-display); margin-top: 4px; overflow-wrap: anywhere; }
.chart.xtall { height: 300px; }
@media (max-width: 900px) { .mon-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mon-stats > div + div { border-left: 0; } .mon-stats > div { border-top: 1px solid var(--border); } .mon-stats > div:first-child { border-top: 0; } }
/* Admin > Carte réseau : chemin du trafic en une ligne (cases colorées par rôle, liens animés selon le débit, trafic jeté en rouge) */
.nm-card { padding: 12px; }
.nm-scroll { overflow-x: auto; }
svg.nm2 { width: 100%; min-width: 1040px; height: auto; display: block; }
svg.nm2.nm-grow { min-width: 0; max-width: 460px; margin: 0 auto; }
.nm2 .k-dc { --c: #7F77DD; } .nm2 .k-flt, .nm-sw.k-flt { --c: #E3B341; } .nm2 .k-rtr, .nm-sw.k-rtr { --c: #1D9E75; }
.nm2 .k-net { --c: #888780; } .nm2 .k-srv, .nm-sw.k-srv { --c: #5B8DEF; } .nm2 .k-drop, .nm-sw.k-drop { --c: #E24B4A; } .nm-sw.k-dc { --c: #7F77DD; }
.nm2 .b > rect { fill: color-mix(in srgb, var(--c) 20%, var(--surface)); stroke: color-mix(in srgb, var(--c) 75%, transparent); stroke-width: 1; transition: stroke-width .15s; }
.nm2 .b[data-node] { cursor: pointer; outline: none; }
.nm2 .b[data-node]:hover > rect, .nm2 .b:focus-visible > rect, .nm2 .b.sel > rect { stroke-width: 2.5; }
.nm2 .b.dim { opacity: .5; }
.nm2 .b.dash rect { stroke-dasharray: 5 4; fill: transparent; }
.nm2 .tt { fill: var(--text); font: 600 15px var(--font); }
.nm-grow .tt { font-size: 13px; }
.nm2 .ts { fill: var(--muted); font: 12.5px var(--font); }
.nm2 .tv { fill: var(--text-2); font: 12.5px var(--mono); }
.nm2 rect.num { fill: color-mix(in srgb, var(--c) 35%, var(--surface)); stroke: var(--c); }
.nm2 text.num { fill: var(--text); font: 600 11px var(--font); }
.nm2 .tl { fill: var(--muted); font: 12.5px var(--font); }
.nm2 .tr { fill: var(--text); font: 600 13px var(--mono); }
.nm2 .ln .base { fill: none; stroke: var(--border-strong); stroke-width: 2; }
.nm2 .ln .flow { fill: none; stroke: #4f8cff; stroke-width: 2; stroke-dasharray: 8 10; stroke-linecap: round; opacity: 0; transition: stroke-width .4s; }
.nm2 .ln.drop .base { stroke: color-mix(in srgb, #E24B4A 45%, transparent); stroke-dasharray: 4 5; }
.nm2 .ln.drop .flow { stroke: #E24B4A; }
.nm2 .ln.live .flow { opacity: 1; animation: nm-flow 1.2s linear infinite; }
.nm2 .ln.off .base { stroke-dasharray: 4 6; opacity: .5; }
svg.nm2.rev .ln.live:not(.drop) .flow { animation-direction: reverse; }
@keyframes nm-flow { to { stroke-dashoffset: -36; } }
@media (prefers-reduced-motion: reduce) { .nm2 .ln.live .flow { animation: none; stroke-dasharray: none; } }
.nm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.nm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.nm-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--c) 30%, transparent); border: 1px solid var(--c); }
.nm-line { display: inline-block; width: 22px; border-top: 3px solid #4f8cff; }
/* Pare-feu réseau : catalogue de filtres (admin), interrupteurs et lignes de protections (client), badge VIP */
.badge-vip { color: #f5c451; background: rgba(245, 196, 81, .12); border-color: rgba(245, 196, 81, .45); }
.fw-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s2); }
.fw-filter { padding: var(--s2); display: flex; flex-direction: column; }
.fw-filter.off { opacity: .6; }
.fw-filter-head { display: flex; justify-content: space-between; gap: var(--s1); align-items: flex-start; }
.fw-filter .small.muted { flex: 1; }
.fw-code { font: 12px/1.5 var(--mono); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin: 0 0 var(--s1); white-space: pre-wrap; max-height: 9em; overflow: auto; }
.fw-toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-toggle { appearance: none; border: 1px solid var(--border-strong); background: transparent; color: var(--muted); border-radius: 999px; padding: 4px 10px; font: 500 .78rem/1 var(--font); cursor: pointer; }
.chip-toggle.on { color: var(--text); border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.fw-rows { display: flex; flex-direction: column; }
.fw-row { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: 12px var(--s2); border-top: 1px solid var(--border); }
.fw-row:first-child { border-top: 0; }
.fw-switch { appearance: none; position: relative; width: 42px; height: 24px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); cursor: pointer; padding: 0; display: inline-block; flex: none; }
.fw-switch i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.fw-switch.on { background: color-mix(in srgb, var(--ok) 30%, var(--surface-2)); border-color: var(--ok); }
.fw-switch.on i { transform: translateX(18px); background: var(--ok); }
.fw-switch.locked { cursor: not-allowed; opacity: .55; }
.fw-switch:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }
.fw-check { margin-top: -6px; display: flex; flex-direction: column; gap: 3px; }
/* Carte réseau : case d'un serveur du datacenter (son filtre XDP, sa passerelle, ses VPS) */
.nm2 .hostbox rect { fill: color-mix(in srgb, #7F77DD 6%, transparent); stroke: color-mix(in srgb, #7F77DD 45%, transparent); stroke-dasharray: 6 5; }
.nm2 .hl { fill: var(--text); font: 600 13px var(--font); }
.nm2 .hs { fill: var(--muted); font: 12px var(--mono); }
.nm2 .hv { fill: var(--text-2); font: 12px var(--mono); }
.knc-live { filter: drop-shadow(0 0 4px currentColor); animation: knc-pulse 1.6s ease-in-out infinite; }
@keyframes knc-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .knc-live { animation: none; } }
.nm2 .vh { fill: var(--muted); font: 600 11px var(--font); letter-spacing: .02em; }
.nm2 .vm > rect { fill: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.nm2 .vm.team > rect { stroke-dasharray: 4 3; }
.nm2 .vt { fill: var(--text); font: 600 13px var(--font); }
.nm2 .vs { fill: var(--muted); font: 11px var(--font); }
.nm2 .tv.vr { font-size: 12px; }
/* Admin > Réseau : passerelles numérotées (une carte chacune) */
.gw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s2); }
.gw-card { border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; background: var(--surface-2); }
.gw-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s1); margin-bottom: 8px; }
.gw-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0; font-size: .85rem; }
.gw-facts dt { color: var(--muted); }
.gw-facts dd { margin: 0; overflow-wrap: anywhere; }
.gw-facts .tag { margin: 0 4px 4px 0; }

/* IP à grouper : pastilles à cocher */
.ip-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.ip-pick { position: relative; display: inline-flex; cursor: pointer; }
.ip-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ip-pick span { border: 1px solid var(--border-strong); border-radius: 999px; padding: 5px 11px; font-size: .8rem; color: var(--muted); }
.ip-pick input:checked + span { color: var(--text); border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.ip-pick input:focus-visible + span { outline: 2px solid var(--accent, var(--ok)); outline-offset: 2px; }
.gw-ips { border-top: 1px solid var(--border); padding-top: 14px; }
.gw-iplist { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); display: grid; gap: 4px; }
.gw-iplist-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .85rem; margin-bottom: 2px; }
.gw-ip { display: grid; grid-template-columns: max-content minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; font-size: .85rem; min-height: 30px; }
.gw-to { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gw-acts { display: inline-flex; align-items: center; gap: 4px; }
.gw-acts form { margin: 0; }
.gw-mv { display: inline-flex; gap: 4px; }
.gw-mv select { width: 104px; padding: 2px 6px; height: 28px; font-size: .78rem; }
.gw-add { margin-top: 10px; }
.gw-add .ip-picks { max-height: 150px; overflow: auto; padding: 2px; }
.gw-add > summary { list-style: none; display: inline-flex; cursor: pointer; }
.gw-add > summary::-webkit-details-marker { display: none; }
.gw-new { border-style: dashed; background: transparent; }
.gw-new details > summary { cursor: pointer; color: var(--muted); }
.gw-mode { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }

/* Pare-feu : ligne d'ajout, tableau de règles, protections */

/* Pare-feu : gestionnaire de règles (views/partials/fw-manage.ejs) */
.fwx-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s2); padding: 16px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.fwx-title h2 { margin: 0 0 4px; }
.fwx-ip { color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 7px; border-radius: 6px; }
.fwx-eng { font-weight: 600; } .fwx-eng-xdp { color: var(--ok); } .fwx-eng-proxmox { color: var(--info); } .fwx-eng-none { color: var(--warn); }
.fwx-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fwx-alert { margin: 12px 18px 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fwx-table th { font-size: .7rem; padding-top: 10px; padding-bottom: 10px; }
.fwx-table td { padding-top: 9px; padding-bottom: 9px; }
.fwx-table th, .fwx-table td { padding-left: 8px; padding-right: 8px; }
.fwx-table td:first-child, .fwx-table th:first-child { padding-left: 18px; } .fwx-table td:last-child, .fwx-table th:last-child { padding-right: 12px; }
.fwx-row:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.fwx-off td { opacity: .55; } .fwx-off td:last-child { opacity: 1; }
.fwx-err td { background: color-mix(in srgb, var(--bad) 6%, transparent); }
.fwx-name { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.fwx-name strong { font-size: .86rem; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.fwx-desc { max-width: 280px; margin-top: 2px; }
.fwx-chip { font: 600 .66rem/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 3px 6px; border-radius: 5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
.fwx-chip-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.fwx-chip-bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.fwx-chip-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.fwx-chip-lock { display: inline-flex; align-items: center; gap: 3px; color: #f5c451; border-color: rgba(245, 196, 81, .45); background: rgba(245, 196, 81, .1); }
.fwx-chip-lock svg { width: 10px; height: 10px; }
.fwx-okt { color: var(--ok); }
.fwx-pp { color: var(--muted); font-size: .72rem; margin-left: 1px; }
.fwx-chip-lock { padding: 3px 4px; }
.fwx-chip { font-size: .6rem; padding: 3px 5px; }
.fwx-open { color: var(--warn); background: transparent; border-color: color-mix(in srgb, var(--warn) 45%, transparent); border-style: dashed; }
.fwx-row-open td { background: color-mix(in srgb, var(--warn) 4%, transparent); }
.fwx-b.sug { color: var(--text); border-color: var(--accent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.fwx-f-lock { flex: 0 0 auto; }
.fwx-lockt { display: inline-flex; align-items: center; margin: 0; cursor: pointer; }
.fwx-lockt input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.fwx-lockt span { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); font: 700 .7rem/1 var(--mono); letter-spacing: .06em; white-space: nowrap; }
.fwx-lockt input:checked + span { color: #f5c451; border-color: rgba(245, 196, 81, .55); background: rgba(245, 196, 81, .1); }
.fwx-lockt input:focus-visible + span { outline: 2px solid var(--info); outline-offset: 2px; }
.fwx-lock { color: var(--muted); }
.fwx-proto { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; font: 600 .64rem/1 var(--mono); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.fwx-proto b { padding: 4px 6px; color: var(--accent-text); background: var(--accent-soft); font-weight: 700; border-right: 1px solid var(--border-strong); }
.fwx-proto span { padding: 4px 6px; color: var(--text-2); background: var(--surface-2); }
.fwx-act { display: inline-block; min-width: 48px; text-align: center; padding: 4px 8px; border-radius: 6px; font: 700 .7rem/1.2 var(--mono); letter-spacing: .06em; border: 1px solid transparent; }
.fwx-drop { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.fwx-allow { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.fwx-filter { color: var(--accent-text); background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.fwx-fdesc { margin-top: 3px; max-width: 260px; line-height: 1.35; }
.fwx-dropped { color: var(--bad); }
.fwx-explain { margin-top: 10px; color: var(--accent-text); }
.fwx-explain[hidden] { display: none; }
.fwx-rate { margin-left: 6px; color: var(--text-2); white-space: nowrap; }
.fwx-st { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; }
.fwx-st i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.fwx-st-ok { color: var(--ok); } .fwx-st-warn { color: var(--warn); } .fwx-st-bad { color: var(--bad); } .fwx-st-off { color: var(--muted); }
.fwx-errtxt { color: var(--bad); max-width: 220px; white-space: normal; }
.fwx-empty { text-align: center; color: var(--muted); padding: 28px !important; }
.fwx-acts { display: inline-flex; gap: 3px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.fwx-b { appearance: none; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); font: 600 .6rem/1 var(--mono); letter-spacing: .03em; text-transform: uppercase; cursor: pointer; list-style: none; white-space: nowrap; }
.fwx-b::-webkit-details-marker { display: none; }
.fwx-b:hover:not(:disabled) { color: var(--text); border-color: var(--muted); }
.fwx-b:disabled { cursor: default; }
.fwx-b svg { width: 14px; height: 14px; }
.fwx-b-allow.on, .fwx-b-allow:hover:not(:disabled) { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 12%, var(--surface-2)); }
.fwx-b-drop.on, .fwx-b-drop:hover:not(:disabled) { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: color-mix(in srgb, var(--bad) 12%, var(--surface-2)); }
.fwx-b-filter.on, .fwx-b-filter:hover:not(:disabled) { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }
.fwx-b-pow:hover:not(:disabled) { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.fwx-b-pow.off { color: var(--ok); }
.fwx-pad { padding: 12px 18px !important; }
.fwx-b-del:hover { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.fwx-b-ico { padding: 0 7px; }
.fwx-new { border-top: 1px solid var(--border); padding: 16px 18px 18px; background: color-mix(in srgb, var(--surface-2) 35%, transparent); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.fwx-new-head { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.fwx-new-grid { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.fwx-f { display: flex; flex-direction: column; gap: 5px; margin: 0; min-width: 0; }
.fwx-f > span { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.fwx-f-name { flex: 1 1 150px; } .fwx-f-proto { flex: 0 1 190px; } .fwx-f-act { flex: 0 0 110px; } .fwx-f-port { flex: 1 1 160px; } .fwx-f-src { flex: 1.2 1 190px; }
.fwx-f-go { flex: 0 0 auto; }
.fwx-f[hidden] { display: none; }
.fwx-pick { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; text-align: left; }
.fwx-pick b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fwx-pick svg { transform: rotate(90deg); color: var(--muted); flex: none; }
.fwx-pick:hover { border-color: var(--muted); }
/* Tiroir « Choisir un filtre » */
.fwd-back { position: fixed; inset: 0; background: rgba(4, 8, 16, .55); backdrop-filter: blur(2px); z-index: 900; }
.fwd { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); z-index: 901; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border-strong); box-shadow: -18px 0 40px rgba(0, 0, 0, .35); }
.fwd[hidden], .fwd-back[hidden] { display: none; }
body.fwd-open { overflow: hidden; }
.fwd-top { padding: 16px 16px 12px; border-bottom: 1px solid var(--border); }
.fwd-title { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); margin-bottom: 10px; }
.fwd-x { appearance: none; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; } .fwd-x:hover { color: var(--text); }
.fwd-search { width: 100%; }
.fwd-list { flex: 1; overflow-y: auto; padding: 12px 16px 24px; }
.fwd-sec { margin-bottom: 14px; }
.fwd-sec[hidden] { display: none; }
.fwd-sec h4 { margin: 0; padding: 8px 12px; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-bottom: 0; border-radius: 10px 10px 0 0; }
.fwd-box { border: 1px solid var(--border); border-radius: 0 0 10px 10px; overflow: hidden; }
.fwd-box form { margin: 0; } .fwd-box form[hidden], .fwd-item[hidden] { display: none; }
.fwd-item { appearance: none; display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 12px; border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: .86rem; text-align: left; cursor: pointer; text-decoration: none; }
.fwd-box > :first-child .fwd-item, .fwd-box > .fwd-item:first-child { border-top: 0; }
.fwd-item:hover, .fwd-item:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); outline: none; }
.fwd-item em { font-style: normal; color: var(--muted); font-size: .74rem; margin-left: 4px; }
.fwd-item small { font: 700 .62rem/1 var(--mono); letter-spacing: .07em; color: var(--muted); text-transform: uppercase; flex: none; }
.fwd-none { padding: 10px 2px; }
@media (max-width: 640px) { .fwx-f-name, .fwx-f-proto, .fwx-f-act, .fwx-f-port, .fwx-f-src, .fwx-f-go { flex: 1 1 100%; } .fwx-head { padding: 14px 16px; } .fwx-new { padding: 14px 16px; } }
/* Pare-feu : vues Pare-feu / Trafic, bridage, autopilote, onglet Trafic (views/partials/fw-traffic.ejs) */
.fwx-views { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.fwx-views a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: .86rem; text-decoration: none; }
.fwx-views a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.fwx-views a:hover { color: var(--text); }
.fwx-chip-auto { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.fwx-pop { position: relative; display: inline-block; vertical-align: middle; }
.fwx-pop > summary { list-style: none; cursor: pointer; }
.fwx-pop > summary::-webkit-details-marker { display: none; }
.fwx-pop-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: flex; gap: 6px; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); white-space: nowrap; }
.fwx-pop-l .fwx-pop-body { right: auto; left: 0; }
.fwx-pop-body input[name="mbps"] { width: 80px; }
.fwx-thr { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; padding: 3px 5px; border-radius: 6px; border: 1px dashed var(--border-strong); color: var(--muted); font: 600 .66rem/1 var(--mono); }
.fwx-thr:hover, .fwx-thr.on { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); border-style: solid; }
.fwx-thr svg { width: 12px; height: 12px; }
.fwt-auto { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.fwt-auto-l { font-weight: 600; font-size: .86rem; display: inline-flex; align-items: center; gap: 5px; }
.fwt-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.fwt-tiles > div { padding: 14px 18px; border-right: 1px solid var(--border); }
.fwt-tiles > div:last-child { border-right: 0; }
.fwt-l { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 4px; }
.fwt-v { font: 600 1.3rem/1.2 var(--font-display); }
.fwt-v small { font-size: .75rem; color: var(--muted); }
.fwt-bad { color: var(--bad); }
.fwt-chart { padding: 12px 18px 14px; }
.fwt-chart svg { width: 100%; height: 150px; display: block; }
.fwt-chart path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.fwt-in { stroke: var(--accent); } .fwt-out { stroke: var(--ok); } .fwt-drop { stroke: var(--bad); stroke-dasharray: 4 3; }
.fwt-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; color: var(--text-2); }
.fwt-k { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-left: 8px; }
.fwt-k-in { background: var(--accent); } .fwt-k-out { background: var(--ok); } .fwt-k-drop { background: var(--bad); }
.fwt-bar { height: 6px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin: 5px 0 3px; }
.fwt-bar i { display: block; height: 100%; background: color-mix(in srgb, var(--bad) 75%, transparent); border-radius: 4px; }
.fwt-events { display: flex; flex-direction: column; }
.fwt-ev { padding: 10px 18px; border-top: 1px solid var(--border); border-left: 3px solid var(--border-strong); }
.fwt-ev:first-child { border-top: 0; }
.fwt-ev-filter { border-left-color: var(--accent); } .fwt-ev-throttle { border-left-color: var(--warn); } .fwt-ev-ban { border-left-color: var(--bad); } .fwt-ev-guard { border-left-color: var(--ok); }
@media (max-width: 760px) { .fwt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fwt-tiles > div:nth-child(2) { border-right: 0; } }
/* Onglet Autopilote (views/partials/fw-autopilot.ejs) */
.fwa-h { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.fwa-guess { color: var(--accent-text); }
.fwa-cat { display: grid; grid-template-columns: 90px 1fr; gap: 10px; align-items: start; padding: 6px 0; border-top: 1px solid var(--border); }
.fwa-cat:first-of-type { border-top: 0; }
.fwa-cl { font-size: .8rem; font-weight: 600; color: var(--text-2); padding-top: 6px; }
.fwa-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fwa-chip { margin: 0; cursor: pointer; }
.fwa-chip input { position: absolute; opacity: 0; pointer-events: none; }
.fwa-chip span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); font-size: .8rem; color: var(--text-2); }
.fwa-chip em { font-style: normal; font-size: .68rem; color: var(--muted); }
.fwa-chip input:checked + span { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }
.fwa-chip input:focus-visible + span { outline: 2px solid var(--info); outline-offset: 2px; }
.fwa-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fwa-mode { margin: 0; cursor: pointer; }
.fwa-mode input { position: absolute; opacity: 0; pointer-events: none; }
.fwa-mode span { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); }
.fwa-mode small { font-size: .74rem; color: var(--muted); line-height: 1.35; }
.fwa-mode input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.fwa-mode-hard input:checked + span { border-color: var(--warn); box-shadow: 0 0 0 1px var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.fwa-mode-extreme input:checked + span { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.fwa-mode input:focus-visible + span { outline: 2px solid var(--info); outline-offset: 2px; }
.fwa-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.fwa-tiles > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); } .fwa-tiles > div:nth-child(2n) { border-right: 0; }
.fwa-tiles > div { padding: 12px 16px; border-right: 1px solid var(--border); }
.fwa-tiles > div:last-child { border-right: 0; }
@media (max-width: 760px) { .fwa-modes, .fwa-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fwa-cat { grid-template-columns: 1fr; } }
.fwm-grid { gap: 0; } .fwm-grid > div { min-width: 0; } .fwm-grid > div + div { border-left: 1px solid var(--border); }
.fwm-h { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 16px 6px; }
@media (max-width: 900px) { .fwm-grid > div + div { border-left: 0; border-top: 1px solid var(--border); } }

/* --- Carte réseau (HUD) : bandeau de mesures, carte dessinée par /js/carte.js, détails ------------------------------------- */
.nmh { --hud: #4f8cff; margin-bottom: 16px; }
.nmh-stats { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: 12px 12px 0 0; background: linear-gradient(180deg, color-mix(in srgb, var(--hud) 8%, var(--surface)), var(--surface)); }
.nmh-stats > div { padding: 10px 14px; border-right: 1px solid var(--border); min-width: 0; position: relative; }
.nmh-stats > div:last-child { border-right: 0; }
.nmh-stats > div::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: color-mix(in srgb, var(--hud) 55%, transparent); border-radius: 2px; }
.nmh-stats > div.bad::before { background: #E24B4A; }
.nmh-stats span { display: block; font: 700 10px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.nmh-stats b { display: block; font: 600 15px var(--mono); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.nmh-stats .bad b { color: #ff8a8a; }
.nmh-stats b.ok { color: #4ade80; }
.nmh-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 12px; border: 1px solid var(--border); border-top: 0; background: var(--surface); }
.nmh-canvas { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 12px 12px; overflow: hidden; background: radial-gradient(ellipse 60% 70% at 25% 30%, color-mix(in srgb, var(--hud) 10%, transparent), transparent 70%), radial-gradient(ellipse 40% 60% at 85% 40%, color-mix(in srgb, #1D9E75 7%, transparent), transparent 70%), var(--bg, #0b0d12); }
.nmh-scroll { overflow-x: auto; }
.nmh-scroll .empty { padding: 48px; text-align: center; }
svg.nmh-svg { min-width: 0 !important; }
@media (max-width: 1100px) { .nmh-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } .nmh-stats > div:nth-child(4n) { border-right: 0; } .nmh-stats > div:nth-child(-n+4) { border-bottom: 1px solid var(--border); } }
@media (max-width: 560px) { .nmh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .nmh-stats > div:nth-child(2n) { border-right: 0; } .nmh-stats > div:nth-child(-n+6) { border-bottom: 1px solid var(--border); } }
svg.nmh-svg { display: block; width: 100%; min-width: 1120px; height: auto; }
.nmh-svg .dot { fill: color-mix(in srgb, var(--hud) 26%, transparent); }
.nmh-svg .sweep { animation: nmh-sweep 10s linear infinite; pointer-events: none; }
@keyframes nmh-sweep { from { transform: translateX(0); } to { transform: translateX(1660px); } }
/* Cadres : un par serveur réel */
.nmh-svg .fr { --c: var(--hud); }
.nmh-svg .fr.k-rtr { --c: #1D9E75; }
.nmh-svg .frb { fill: color-mix(in srgb, var(--c) 4%, transparent); stroke: color-mix(in srgb, var(--c) 28%, transparent); }
.nmh-svg .brk { fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: square; opacity: .9; }
.nmh-svg .frt { fill: var(--text); font: 700 12.5px var(--font); letter-spacing: .12em; }
.nmh-svg .frs { fill: var(--muted); font: 12px var(--mono); }
.nmh-svg .frv { fill: var(--text-2); font: 11.5px var(--mono); }
.nmh-svg .frl { stroke: color-mix(in srgb, var(--c) 20%, transparent); }
.nmh-svg .cap { fill: color-mix(in srgb, var(--c) 75%, var(--muted)); font: 700 9.5px var(--font); letter-spacing: .16em; }
.nmh-svg .tl { fill: color-mix(in srgb, #7F77DD 80%, var(--text)); font: 700 10px var(--font); letter-spacing: .12em; }
.nmh-svg .tr { fill: var(--text); font: 600 12.5px var(--mono); }
/* Cases */
.nmh-svg .nd { --c: #888780; cursor: pointer; outline: none; transition: opacity .2s; }
.nmh-svg .k-flt { --c: #E3B341; } .nmh-svg .k-dc { --c: #7F77DD; } .nmh-svg .k-rtr { --c: #1D9E75; } .nmh-svg .k-srv { --c: #5B8DEF; } .nmh-svg .k-drop { --c: #E24B4A; } .nmh-svg .k-net { --c: #38bdf8; } .nmh-svg .k-sw { --c: #9a9a95; }
.nmh-svg .nd > rect.bx { fill: color-mix(in srgb, var(--c) 13%, var(--surface)); stroke: color-mix(in srgb, var(--c) 50%, transparent); stroke-width: 1; transition: stroke-width .15s, filter .2s; }
.nmh-svg .nd .brk { stroke-width: 1.6; }
.nmh-svg .nd:hover > rect.bx, .nmh-svg .nd:focus-visible > rect.bx, .nmh-svg .nd.sel > rect.bx { stroke-width: 2; filter: drop-shadow(0 0 7px color-mix(in srgb, var(--c) 65%, transparent)); }
.nmh-svg .nd .ic { fill: none; stroke: var(--c); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.nmh-svg .t1 { fill: var(--text); font: 700 13.5px var(--font); }
.nmh-svg .t2 { fill: var(--muted); font: 11.5px var(--font); }
.nmh-svg .tv { fill: var(--text); font: 600 12.5px var(--mono); }
.nmh-svg .td { fill: #ff8a8a; font: 11px var(--mono); }
.nmh-svg .t3 { fill: color-mix(in srgb, var(--muted) 85%, transparent); font: 10.5px var(--mono); }
.nmh-svg .tag rect { fill: color-mix(in srgb, var(--c) 32%, var(--surface)); stroke: var(--c); }
.nmh-svg .tag text { fill: var(--text); font: 700 9px var(--font); letter-spacing: .1em; }
.nmh-svg .nd.dim { opacity: .5; }
.nmh-svg .nd.dash > rect.bx { stroke-dasharray: 5 4; fill: transparent; }
.nmh-svg .nd.vm.team > rect.bx { fill: color-mix(in srgb, var(--c) 8%, var(--surface)); }
.nmh-svg .pt > rect.bx { fill: color-mix(in srgb, var(--c) 8%, var(--surface)); stroke: color-mix(in srgb, var(--c) 38%, transparent); }
.nmh-svg .pt .ic { transform-box: fill-box; }
.nmh-svg .pn { fill: var(--text); font: 600 11px var(--mono); }
.nmh-svg .pa { fill: var(--muted); font: 10.5px var(--font); }
.nmh-svg .pv { fill: var(--text-2); font: 11px var(--mono); }
/* Internet */
.nmh-svg .inet .core { fill: color-mix(in srgb, var(--c) 12%, var(--surface)); stroke: color-mix(in srgb, var(--c) 60%, transparent); }
.nmh-svg .inet .mer { fill: none; stroke: color-mix(in srgb, var(--c) 30%, transparent); }
.nmh-svg .inet .ring { fill: none; stroke: color-mix(in srgb, var(--c) 55%, transparent); stroke-width: 1.4; }
.nmh-svg .spin { transform-box: fill-box; transform-origin: center; animation: nmh-spin 28s linear infinite; }
.nmh-svg .spin.rev { animation-direction: reverse; animation-duration: 44s; }
@keyframes nmh-spin { to { transform: rotate(360deg); } }
/* Jauge du filtre : part du trafic jetée */
.nmh-svg .gb { fill: none; stroke: color-mix(in srgb, var(--c) 22%, transparent); stroke-width: 4; }
.nmh-svg .ga { fill: none; stroke: #E24B4A; stroke-width: 4; stroke-linecap: round; transition: stroke-dasharray .6s; }
.nmh-svg .gt { fill: var(--text-2); font: 600 9.5px var(--mono); }
/* Liens : particules qui avancent, plus épaisses et plus rapides avec le débit */
.nmh-svg .ln .base { fill: none; stroke: color-mix(in srgb, var(--hud) 24%, var(--border-strong)); stroke-width: 1.5; transition: stroke .2s, opacity .2s; }
.nmh-svg .ln .flow { fill: none; stroke: #6ea2ff; stroke-width: 2.4; stroke-dasharray: 1 13; stroke-linecap: round; opacity: 0; }
.nmh-svg .ln.live .flow { opacity: 1; animation: nmh-flow 1.2s linear infinite; filter: drop-shadow(0 0 3px #4f8cff); }
.nmh-svg .ln.live .base { stroke: color-mix(in srgb, #4f8cff 45%, transparent); }
.nmh-svg .ln.tun .base { stroke-dasharray: 7 4; stroke: color-mix(in srgb, #7F77DD 55%, transparent); }
.nmh-svg .ln.tun .flow { stroke: #b3a9ff; }
.nmh-svg .ln.tun.live .flow { filter: drop-shadow(0 0 3px #7F77DD); }
.nmh-svg .ln.drop .base { stroke: color-mix(in srgb, #E24B4A 45%, transparent); stroke-dasharray: 3 4; }
.nmh-svg .ln.drop .flow { stroke: #ff6b6b; }
.nmh-svg .ln.drop.live .flow { filter: drop-shadow(0 0 3px #E24B4A); }
.nmh-svg .ln.off .base { stroke-dasharray: 3 6; opacity: .45; }
@keyframes nmh-flow { to { stroke-dashoffset: -28; } }
svg.nmh-svg.rev .ln.live:not(.drop) .flow { animation-direction: reverse; }
/* Survol : tout le chemin d'une case ressort, le reste s'efface */
.nmh-svg.focus .ln:not(.hl), .nmh-svg.focus .nd:not(.hl), .nmh-svg.focus .evs:not(.hl) { opacity: .22; }
.nmh-svg.focus .ln.hl .base { stroke: color-mix(in srgb, #4f8cff 70%, transparent); stroke-width: 2.2; }
@media (prefers-reduced-motion: reduce) { .nmh-svg .spin, .nmh-svg .sweep { animation: none; } .nmh-svg .ln.live .flow { animation: none; stroke-dasharray: none; } }
.nmh-detail .card-header { gap: 10px; }
.nmh-find { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 260px; max-width: 420px; padding: 0 12px; height: 34px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.nmh-find input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; outline: none; padding: 0; height: auto; box-shadow: none; }
.nmh-find:focus-within { border-color: color-mix(in srgb, var(--hud) 60%, transparent); }
.nmh-svg .nd.found > rect.bx { stroke: #E3B341; stroke-width: 2; filter: drop-shadow(0 0 8px color-mix(in srgb, #E3B341 55%, transparent)); }
.nmh-svg .nd.more > rect.bx { fill: transparent; stroke-dasharray: 4 4; }
.nmh-kv { display: grid; grid-template-columns: max-content 1fr; gap: 5px 16px; margin-bottom: 12px; }
.nmh-kv:empty { display: none; }
.nmh-kv .mono { font-size: 12.5px; overflow-wrap: anywhere; }

/* --- Carte réseau (HUD, 2) : nom sur le bord, jauge de capacité, port filtré, actions de l'autopilote, détail sur la carte --- */
.nmh-canvas { position: relative; }
.nmh-stage { position: relative; min-width: 1120px; }
.nmh-stage .empty { padding: 48px; text-align: center; }
.nmh-svg .pill rect { fill: color-mix(in srgb, var(--c) 26%, var(--surface)); stroke: var(--c); }
.nmh-svg .pill text { fill: var(--text); font: 700 9.5px var(--font); letter-spacing: .1em; }
.nmh-svg .pill .ic { stroke-width: 1.8; }
.nmh-svg .tb { fill: var(--text); font: 700 13.5px var(--mono); }
.nmh-svg .tok { fill: color-mix(in srgb, #4ade80 75%, var(--muted)); font: 11px var(--font); }
.nmh-svg .t2.td, .nmh-svg text.td { fill: #ff8a8a; font: 600 11px var(--font); }
.nmh-svg .ga.mid { stroke: #E3B341; }
.nmh-svg .ga.hi { stroke: #E24B4A; }
.nmh-svg .ga { stroke: #4f8cff; }
/* Port filtré : la puce passe au rouge et dit ce qui est filtré */
.nmh-svg .pt.atk > rect.bx { fill: color-mix(in srgb, #E24B4A 16%, var(--surface)); stroke: #E24B4A; animation: nmh-atk 1.6s ease-in-out infinite; }
.nmh-svg .pt.atk { animation: nmh-pop .45s cubic-bezier(.2, 1.4, .4, 1) backwards; transform-box: fill-box; transform-origin: left center; }
.nmh-svg .px { fill: #ff9a9a; font: 600 10.5px var(--font); }
.nmh-svg .px.r { font: 600 10.5px var(--mono); }
.nmh-svg .evs rect { fill: color-mix(in srgb, #a78bfa 18%, var(--surface)); stroke: color-mix(in srgb, #a78bfa 65%, transparent); }
.nmh-svg .evs.k-ban rect, .nmh-svg .evs.k-guard rect { fill: color-mix(in srgb, #E24B4A 14%, var(--surface)); stroke: color-mix(in srgb, #E24B4A 60%, transparent); }
.nmh-svg .evs { animation: nmh-open .6s cubic-bezier(.2, 1.2, .4, 1) backwards; transform-box: fill-box; transform-origin: top center; }
@keyframes nmh-open { from { opacity: 0; transform: scaleY(.1) translateY(-8px); } to { opacity: 1; transform: none; } }
.nmh-svg .evt { fill: #ddd6fe; font: 700 10.5px var(--font); }
.nmh-svg .evd { fill: var(--muted); font: 10px var(--font); }
.nmh-svg .nd.atk:not(.pt) > rect.bx { stroke: color-mix(in srgb, #E24B4A 70%, transparent); }
.nmh-svg .ln.atk .flow { stroke: #ff6b6b; }
.nmh-svg .ln.atk.live .flow { filter: drop-shadow(0 0 3px #E24B4A); }
@keyframes nmh-atk { 50% { filter: drop-shadow(0 0 6px color-mix(in srgb, #E24B4A 70%, transparent)); } }
@keyframes nmh-pop { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
/* Case où l'autopilote vient d'agir : halo violet */
.nmh-svg .nd.ai > rect.bx { stroke: #a78bfa; stroke-width: 2; animation: nmh-ai 2s ease-in-out infinite; }
@keyframes nmh-ai { 50% { filter: drop-shadow(0 0 8px color-mix(in srgb, #a78bfa 75%, transparent)); } }
.nm-sw.k-ai { --c: #a78bfa; }
/* Actions de l'autopilote, posées sur la carte */
.nmh-ov { position: absolute; inset: 0; pointer-events: none; }
.nmh-ev { position: absolute; transform: translate(-100%, -100%); pointer-events: auto; font-size: 12px; }
.nmh-ev-dot { position: absolute; right: -9px; bottom: -9px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #a78bfa; background: color-mix(in srgb, #a78bfa 30%, var(--surface)); color: #fff; font-size: 11px; line-height: 18px; padding: 0; cursor: pointer; box-shadow: 0 0 10px color-mix(in srgb, #a78bfa 60%, transparent); }
.nmh-ev-dot i { position: absolute; top: -7px; right: -7px; min-width: 14px; height: 14px; border-radius: 7px; background: #a78bfa; color: #111; font: 700 9px/14px var(--font); font-style: normal; padding: 0 3px; }
.nmh-ev-c { display: none; width: 250px; margin: 0 6px 6px 0; padding: 9px 11px; border-radius: 10px; border: 1px solid color-mix(in srgb, #a78bfa 60%, transparent); background: color-mix(in srgb, #a78bfa 12%, var(--surface)); box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 14px color-mix(in srgb, #a78bfa 30%, transparent); }
.nmh-ev.pop .nmh-ev-c, .nmh-ev.open .nmh-ev-c { display: block; }
.nmh-ev.pop .nmh-ev-c { animation: nmh-drop .5s cubic-bezier(.2, 1.3, .4, 1) both; transform-origin: bottom right; }
@keyframes nmh-drop { from { opacity: 0; transform: translateY(-10px) scale(.8); } to { opacity: 1; transform: none; } }
.nmh-ev-h { display: flex; justify-content: space-between; gap: 8px; font: 700 9.5px var(--font); letter-spacing: .08em; color: #c4b5fd; margin-bottom: 3px; }
.nmh-ev-h time { font-weight: 500; letter-spacing: 0; color: var(--muted); }
.nmh-ev-c b { display: block; color: var(--text); font-size: 12.5px; line-height: 1.3; }
.nmh-ev-c small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.nmh-ev-c small.more { color: #c4b5fd; }
.nmh-ev.k-ban .nmh-ev-c, .nmh-ev.k-guard .nmh-ev-c { border-color: color-mix(in srgb, #E24B4A 60%, transparent); }
/* Détail : panneau sur la carte */
.nmh-pop { position: absolute; top: 12px; right: 12px; width: min(340px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; z-index: 3; padding: 14px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--hud) 45%, var(--border)); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); animation: nmh-drop .25s ease-out both; }
.nmh-pop[hidden] { display: none; }
.nmh-pop-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.nmh-pop-h h3 { margin: 2px 0 0; font-size: 15px; }
.nmh-pop-k { font: 700 9.5px var(--font); letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, var(--hud) 80%, var(--text)); }
.nmh-x { border: 0; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; }
.nmh-x:hover { color: var(--text); }
.nmh-pop .nmh-kv { font-size: 12.5px; }
.nmh-pop-ev:empty { display: none; }
.nmh-pop-ev { margin-top: 10px; display: grid; gap: 6px; }
.nmh-ev-row { padding: 7px 9px; border-radius: 8px; border-left: 3px solid #a78bfa; background: color-mix(in srgb, #a78bfa 9%, transparent); font-size: 12px; }
.nmh-ev-row span { display: block; font: 700 9.5px var(--font); letter-spacing: .08em; color: #c4b5fd; text-transform: uppercase; }
.nmh-ev-row b { display: block; }
.nmh-ev-row small { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .nmh-svg .pt.atk, .nmh-svg .pt.atk > rect.bx, .nmh-svg .nd.ai > rect.bx, .nmh-ev.pop .nmh-ev-c, .nmh-pop { animation: none; } }

/* --- Pare-feu (équipe) : ports d'un filtre, débloquables un par un pour un service ------------------------------------------ */
.fwx-sub td { padding: 0 14px 14px !important; border-top: 0 !important; }
.fwx-more summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 6px 10px; border-radius: 8px; border: 1px dashed var(--border); }
.fwx-more summary::-webkit-details-marker { display: none; }
.fwx-more[open] summary { color: var(--text); border-style: solid; }
.fwx-ports { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 12px 0 10px; }
.fwx-port { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; }
.fwx-port .mono { font-weight: 600; min-width: 0; flex: 1 1 auto; white-space: nowrap; }
.fwx-port-st { font-size: 12px; color: var(--muted); }
.fwx-port.open { border-color: color-mix(in srgb, var(--ok, #22c55e) 45%, var(--border)); }
.fwx-port.open .fwx-port-st { color: var(--ok, #22c55e); font-weight: 600; }

/* ===== Finitions (revue complète) ===== */
:root { --r-card: 16px; --card-fx: inset 0 1px 0 rgba(255,255,255,.04); --glow: color-mix(in srgb, var(--accent) 14%, transparent); }
html[data-theme="light"] { --card-fx: 0 1px 2px rgba(15,23,42,.05), 0 10px 28px -20px rgba(15,23,42,.18); --glow: color-mix(in srgb, var(--accent) 8%, transparent); }

/* --- Boutons : transitions, appui, relief du bouton principal --- */
.btn { transition: background-color .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease, transform .06s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 8px 20px -12px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 12px 26px -12px color-mix(in srgb, var(--accent) 95%, transparent); }
html[data-theme="light"] .btn-primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(15,23,42,.12), 0 8px 18px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-success { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.btn-success:hover { background: color-mix(in srgb, var(--ok) 10%, transparent); }
.icon-btn { transition: color .12s ease, background-color .12s ease; }

/* --- Filtres de liste (.segmented n'avait aucun style : des liens bruts collés) --- */
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; max-width: 100%; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.segmented a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 9px; color: var(--muted); font: 500 .875rem/1 var(--font); white-space: nowrap; text-decoration: none; transition: color .12s ease, background-color .12s ease; }
.segmented a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.segmented a.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); font-weight: 600; }
html[data-theme="light"] .segmented { background: var(--surface-2); }
html[data-theme="light"] .segmented a:hover { background: rgba(15,23,42,.04); }
html[data-theme="light"] .segmented a.active { background: #fff; color: var(--accent-text); box-shadow: 0 1px 2px rgba(15,23,42,.08), inset 0 0 0 1px var(--border); }
@media (max-width: 640px) { .segmented { display: flex; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } }
.search-bar .check { align-items: center; white-space: nowrap; }
.search-bar .check input { margin-top: 0; }

/* --- Identité dans l'application : cartes, libellés JetBrains Mono, chiffres Space Grotesk, barre du haut en verre --- */
.app .card { border-radius: var(--r-card); box-shadow: var(--card-fx); }
html[data-theme="light"] .app :is(.card, .stat) { box-shadow: var(--card-fx); }
.app .card > .table-wrap:last-child { border-radius: 0 0 calc(var(--r-card) - 1px) calc(var(--r-card) - 1px); }
.app .card-link { transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.app a.card-link:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); transform: translateY(-1px); }
.app .content:not([data-view="admin/moniteur"], [data-view="admin/carte"]) :is(.stat .label, .ctl-facts dt, .ctl-slabel) { font-family: var(--mono); font-weight: 500; font-size: .6875rem; letter-spacing: .1em; }
.app .side-nav .group { font-family: var(--mono); font-weight: 500; letter-spacing: .1em; }
.app .content:not([data-view="admin/moniteur"], [data-view="admin/carte"]) :is(.stat .value, .price-big, .summary-line.total) { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.app .main { background: radial-gradient(1000px 360px at 80% -140px, var(--glow), transparent 70%) no-repeat; }
.topbar { background: color-mix(in srgb, var(--bg) 80%, transparent); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .topbar { background: var(--bg); } }
@media (min-width: 1700px) { .content { max-width: 1600px; } }

/* --- Menu : repère actif lumineux --- */
.side-nav a { position: relative; transition: background-color .12s ease, color .12s ease; }
.side-nav a.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-text); box-shadow: 0 0 12px var(--accent); }
html[data-theme="light"] .side-nav a.active::before { box-shadow: none; background: var(--accent); }
.side-nav .count { font-family: var(--mono); font-weight: 500; }

/* --- Barre du haut : fil d'Ariane lisible, y compris sur téléphone (il se réduisait à « Esp… ») --- */
.topbar .crumb-sep { margin: 0 8px; color: var(--border-strong); }
@media (max-width: 640px) { .topbar { gap: 6px; } .topbar .crumbs:has(b) :is(.crumb-root, .crumb-sep) { display: none; } .topbar .btn span { display: none; } .topbar .btn { padding: 0 10px; } }

/* --- Tableaux --- */
.table th.right { text-align: right; } .table th.center { text-align: center; }
.app .table td { font-variant-numeric: tabular-nums; }
.app :is(.row-link, strong, b).mono, .app :is(strong, b) .mono { font-weight: 500; }
.card > .pagination { border-top: 1px solid var(--border); }
.pagination a:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
/* Téléphone : colonnes secondaires masquées (la première colonne mène au détail complet) */
@media (max-width: 640px) {
  .xs-hide-2 tr > :nth-child(2), .xs-hide-3 tr > :nth-child(3), .xs-hide-4 tr > :nth-child(4), .xs-hide-5 tr > :nth-child(5), .xs-hide-6 tr > :nth-child(6), .xs-hide-7 tr > :nth-child(7) { display: none; }
  .svc .info strong { white-space: normal; overflow-wrap: anywhere; }
}

/* --- Cartes de chiffres : deux par rangée sur téléphone ; la couleur signale seulement un problème --- */
.stat .value.bad { color: var(--bad); } .stat .value.warn { color: var(--warn); } .stat .value.ok { color: var(--ok); }
@media (max-width: 640px) {
  .grid:has(> .stat) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid:has(> .stat) > .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stat { padding: 14px; } .stat .value { font-size: 1.375rem; } .stat .delta { font-size: .75rem; }
}

/* --- Formulaires --- */
input, select, textarea { transition: border-color .12s ease, box-shadow .12s ease; }
html[data-theme="light"] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea) { background-color: #fff; box-shadow: inset 0 1px 2px rgba(15,23,42,.04); }
html[data-theme="light"] :is(input, select, textarea):focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
:is(input, select, textarea):disabled { opacity: .6; cursor: not-allowed; }
input[type=file] { font: 400 .875rem/1.4 var(--font); color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { height: 36px; margin-right: 12px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: 600 .875rem/1 var(--font); cursor: pointer; transition: border-color .12s ease; }
input[type=file]::file-selector-button:hover { border-color: var(--accent); }

/* --- Onglets --- */
.tabs a, .tabs-more > summary { border-radius: 8px 8px 0 0; transition: color .12s ease, background-color .12s ease; }
.tabs a:hover, .tabs-more > summary:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.tabs a.active svg { color: var(--accent-text); }

/* --- Confirmation aux couleurs du panel (remplace la boîte grise du navigateur) --- */
dialog.confirm { max-width: 440px; border-radius: 16px; box-shadow: 0 40px 100px -30px rgba(0,0,0,.8); }
dialog.confirm form { padding: var(--s3); }
.confirm-msg { margin: 0 0 var(--s3); font-size: 1rem; line-height: 1.5; color: var(--text); }
.confirm-actions { display: flex; justify-content: flex-end; gap: var(--s1); }
dialog.confirm::backdrop { background: rgba(4,8,16,.6); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
html[data-theme="light"] dialog.confirm { box-shadow: 0 30px 80px -30px rgba(15,23,42,.35); }
html[data-theme="light"] dialog.confirm::backdrop { background: rgba(15,23,42,.35); }

/* --- Retour visuel du bouton copier, messages cliquables, graphiques --- */
[data-copy] { position: relative; }
[data-copy].copied { color: var(--ok); }
[data-copy].copied::after { content: attr(title); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 3px 8px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: 500 .75rem/1.3 var(--font); white-space: nowrap; pointer-events: none; z-index: 5; }
a.alert { text-decoration: none; transition: border-color .12s ease, transform .12s ease; }
a.alert:hover { text-decoration: none; border-color: currentColor; transform: translateY(-1px); }
line.cursor { stroke: var(--border-strong); }

/* --- Admin › Mes serveurs : cartes resserrées --- */
.server-card .server-facts { margin-top: 0; }
