/* OneVPS -- espace client, revendeur et administration.

   Contenu clair, bande laterale rouge : le meme degrade que l'espace client
   OneHeberge (#a31621 vers #7a1018). Le rouge reste un accent : les boutons
   d'action principaux sont ardoise, sinon tout crie en meme temps.

   Theme unique et assume : pas de variante sombre. Le fond est peint
   explicitement partout.

   Polices systeme : aucune origine externe n'est autorisee par la politique de
   securite, et une police distante ajoute un aller-retour pour rien sur un
   panneau de gestion. */

:root {
  --bg:        #F4F2F3;
  --surface:   #FFFFFF;
  --surface-2: #F6F4F5;
  --surface-3: #EFECED;
  --line:      #E6E1E3;
  --line-2:    #D6CED1;

  --ink:    #18131A;
  --ink-2:  #554C52;
  --ink-3:  #877D82;

  --sidebar-from: #A31621;
  --sidebar-to:   #7A1018;
  --sidebar-ink:   rgba(255,255,255,.86);
  --sidebar-ink-2: rgba(255,255,255,.55);
  --sidebar-hover: rgba(255,255,255,.09);
  --sidebar-active: rgba(255,255,255,.16);
  --sidebar-line:  rgba(255,255,255,.13);

  --accent:       #C81E1E;
  --accent-solid: #DC2626;
  --accent-ink:   #FFFFFF;
  --accent-bg:    #FDEDED;

  /* Bouton principal : ardoise. */
  --primary:       #1E1A22;
  --primary-hover: #0F0C12;

  --ok:   #15703F;  --ok-bg:   #E5F4EB;  --ok-line:   #BFE3CD;
  --warn: #96550C;  --warn-bg: #FBF0DF;  --warn-line: #F0D3A6;
  --crit: #991B1B;  --crit-bg: #FCE7E7;  --crit-line: #F2C3C3;

  --r:   10px;
  --r-s: 7px;
  --shadow-1: 0 1px 2px rgba(24,19,26,.05);
  --shadow:   0 1px 2px rgba(24,19,26,.05), 0 4px 14px rgba(24,19,26,.06);
  --shadow-3: 0 12px 40px rgba(24,19,26,.22), 0 2px 6px rgba(24,19,26,.08);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "SF Mono", Menlo, Consolas, monospace;

  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-solid); outline-offset: 2px; border-radius: 3px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
kbd {
  font-family: var(--mono); font-size: 10.5px; padding: 1px 5px; border-radius: 4px;
  border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface);
  color: var(--ink-3); line-height: 1.4;
}
.ico { width: 17px; height: 17px; flex: none; }
[hidden] { display: none !important; }

/* ---------------- ossature ---------------- */

.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100%; }

.side {
  background: linear-gradient(180deg, var(--sidebar-from) 0%, var(--sidebar-to) 100%);
  color: var(--sidebar-ink);
  padding: 16px 10px 12px; display: flex; flex-direction: column; gap: 1px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side .mark { display: flex; align-items: center; gap: 10px; padding: 2px 10px 16px; text-decoration: none; }
.side .glyph {
  width: 32px; height: 32px; border-radius: 9px; background: #fff;
  display: grid; place-items: center; font-weight: 750; font-size: 13px;
  color: var(--sidebar-from); flex: none; letter-spacing: -.03em;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.side .glyph-logo { object-fit: contain; padding: 3px; }
.side .nm { font-weight: 650; font-size: 15.5px; color: #fff; line-height: 1.15; letter-spacing: -.01em; }
.side .nm small {
  display: block; font-weight: 500; font-size: 10px; margin-top: 2px;
  letter-spacing: .09em; color: var(--sidebar-ink-2); text-transform: uppercase;
}
.side .grp {
  font-size: 10px; font-weight: 600; letter-spacing: .11em;
  text-transform: uppercase; color: var(--sidebar-ink-2); padding: 16px 12px 6px;
}
.side a.nav {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 8px 12px; border-radius: 8px; position: relative;
  color: var(--sidebar-ink); text-decoration: none; font-size: 13.5px;
  transition: background-color .12s ease, color .12s ease;
}
.side a.nav .ico { opacity: .8; }
.side a.nav:hover { background: var(--sidebar-hover); color: #fff; }
.side a.nav[aria-current="page"] { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.side a.nav[aria-current="page"] .ico { opacity: 1; }
.side a.nav[aria-current="page"]::before {
  content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: #fff;
}
.side .foot {
  margin-top: auto; padding: 12px 6px 0; border-top: 1px solid var(--sidebar-line);
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.side .avatar {
  width: 32px; height: 32px; border-radius: 99px; flex: none; display: grid; place-items: center;
  background: rgba(255,255,255,.16); color: #fff; font-weight: 650; font-size: 13px;
  border: 1px solid rgba(255,255,255,.22);
}
.side .qui { min-width: 0; flex: 1; line-height: 1.3; }
.side .qui strong, .side .qui small {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side .qui strong { font-size: 12.5px; color: #fff; font-weight: 600; }
.side .qui small { font-size: 11px; color: var(--sidebar-ink-2); }
.side .foot form { margin: 0; }
.side .foot button {
  background: transparent; border: 1px solid var(--sidebar-line); color: var(--sidebar-ink);
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: grid; place-items: center;
}
.side .foot button:hover { background: var(--sidebar-hover); color: #fff; }

.main { min-width: 0; background: var(--bg); display: flex; flex-direction: column; }

/* Barre du haut : recherche globale (Ctrl K) et raccourci de creation. */
.barre {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 10px 28px; background: rgba(244,242,243,.88);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.barre .recherche {
  display: flex; align-items: center; gap: 9px; flex: 0 1 440px; min-width: 0;
  padding: 7px 10px 7px 12px; border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--surface); color: var(--ink-3); cursor: text; text-align: left; font-size: 13px;
  box-shadow: var(--shadow-1); transition: border-color .12s ease;
}
.barre .recherche:hover { border-color: #bdb2b6; }
.barre .recherche span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre-espace { flex: 1; }
.menu-btn {
  display: none; border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px;
  width: 36px; height: 36px; place-items: center; cursor: pointer; color: var(--ink-2); flex: none;
}

.topbar {
  padding: 22px 28px 4px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
}
.topbar h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.02em; line-height: 1.25; }
.topbar .sub { color: var(--ink-3); font-size: 13px; margin: 3px 0 0; }
.topbar .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.wrap { padding: 18px 28px 48px; display: grid; gap: 18px; align-content: start; }

.voile { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: 264px; height: auto;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  body.menu-ouvert .side { transform: none; box-shadow: var(--shadow-3); }
  body.menu-ouvert .voile { display: block !important; position: fixed; inset: 0; z-index: 40; background: rgba(24,19,26,.38); }
  .menu-btn { display: grid; }
  .barre .recherche kbd { display: none; }
}
@media (max-width: 560px) {
  .barre, .topbar, .wrap { padding-inline: 16px; }
  .barre .barre-cta { display: none; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat .v { font-size: 23px; }
  .stat .d { display: none; }
}

/* ---------------- briques ---------------- */

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-1); min-width: 0;
}
.card > header {
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.card > header h2 { font-size: 14.5px; font-weight: 650; margin: 0; letter-spacing: -.005em; }
.card > header .hint { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.card .body { padding: 18px; }
/* Le tableau colle aux coins arrondis de sa carte. */
.card > .scroller:first-child { border-radius: var(--r) var(--r) 0 0; }
.card > .scroller:last-child { border-radius: 0 0 var(--r) var(--r); }
.card > .scroller:only-child { border-radius: var(--r); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }

.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 18px 14px; box-shadow: var(--shadow-1); position: relative; overflow: hidden;
}
.stat .k {
  font-size: 11px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--ink-3);
}
.stat .v {
  font-size: 28px; font-weight: 700; line-height: 1.15; margin-top: 4px;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.stat .v small { font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.stat .d { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
/* Fine barre de couleur en bas de carte : la teinte dit l'etat sans tout peindre. */
.stat[data-teinte]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--t);
}
.stat[data-teinte="ok"]   { --t: var(--ok); }
.stat[data-teinte="warn"] { --t: var(--warn); }
.stat[data-teinte="crit"] { --t: var(--crit); }
.stat[data-teinte="run"]  { --t: var(--accent-solid); }
.stat[data-teinte="idle"] { --t: var(--line-2); }

.gauge { display: grid; gap: 5px; }
.gauge .row { display: flex; justify-content: space-between; font-size: 12.5px; gap: 10px; }
.gauge .lbl { color: var(--ink-2); }
.gauge .val { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.track { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 99px; background: var(--accent-solid); transition: width .4s ease; }
.track i.ok { background: var(--ok); } .track i.warn { background: var(--warn); } .track i.crit { background: var(--crit); }

/* Mini-jauge de tableau : un chiffre et une barre de 46 px. */
.mini { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 12px;
        font-variant-numeric: tabular-nums; color: var(--ink-2); }
.mini .track { width: 46px; height: 5px; }
.mini b { font-weight: 500; min-width: 3.4em; text-align: right; }

.btn {
  border: 1px solid var(--line-2); background: var(--surface); padding: 6px 13px;
  border-radius: var(--r-s); cursor: pointer; font-size: 13px; font-weight: 500; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink);
  box-shadow: var(--shadow-1); line-height: 1.45; white-space: nowrap;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { background: var(--surface-2); border-color: #bdb2b6; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn-danger { color: var(--crit); }
.btn-danger:hover { background: var(--crit-bg); border-color: var(--crit); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--surface); border-color: var(--line-2); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; padding: 2px 9px 2px 8px; border-radius: 99px;
  border: 1px solid transparent; white-space: nowrap; line-height: 1.5;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.chip.ok   { background: var(--ok-bg);   color: var(--ok);   border-color: var(--ok-line); }
.chip.run  { background: var(--accent-bg); color: var(--accent); border-color: #F5C9C9; }
.chip.run::before { animation: pulse 1.4s ease-in-out infinite; }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.chip.crit { background: var(--crit-bg); color: var(--crit); border-color: var(--crit-line); }
.chip.idle { background: var(--surface-2); color: var(--ink-3); border-color: var(--line); }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .chip.run::before { animation: none; } }

.scroller { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
thead th {
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3); background: var(--surface-2);
  padding-top: 9px; padding-bottom: 9px;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color .1s ease; }
tbody tr:hover { background: #FAF8F9; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.right { text-align: right; }
td .name { font-weight: 600; }
a.name { color: var(--ink); text-decoration: none; }
a.name:hover { color: var(--accent); text-decoration: underline; }
td .sub, .sub { color: var(--ink-3); font-size: 11.5px; }

.flash {
  border-radius: var(--r); padding: 11px 14px; font-size: 13px; border: 1px solid transparent;
  box-shadow: var(--shadow-1); transition: opacity .3s ease, transform .3s ease;
}
.flash.info  { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.flash.error { background: var(--crit-bg); color: var(--crit); border-color: var(--crit-line); }
.flash.sort { opacity: 0; transform: translateY(-4px); }

.empty { padding: 44px 16px; text-align: center; color: var(--ink-3); }
.empty strong { color: var(--ink-2); }
.empty p { margin: 6px 0 0; font-size: 13px; }

/* Bouton de copie accole a une valeur. */
.copie {
  border: 0; background: transparent; padding: 3px; margin-left: 4px; border-radius: 5px; cursor: pointer;
  color: var(--ink-3); display: inline-grid; place-items: center; vertical-align: -3px;
}
.copie:hover { color: var(--ink); background: var(--surface-3); }
.copie .ico { width: 14px; height: 14px; }
.copie.fait { color: var(--ok); }

/* Menu d'actions (« ⋯ ») : un <details>, donc sans script. */
.menu-act { position: relative; display: inline-block; }
.menu-act > summary { list-style: none; cursor: pointer; }
.menu-act > summary::-webkit-details-marker { display: none; }
.menu-act > .menu-liste {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 15; min-width: 230px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-3); padding: 5px; text-align: left; white-space: normal;
}
.menu-liste form { margin: 0; }
.menu-liste .item {
  display: flex; width: 100%; align-items: center; gap: 8px; padding: 7px 10px; border: 0;
  background: transparent; border-radius: 6px; font-size: 13px; color: var(--ink); cursor: pointer;
  text-decoration: none; text-align: left; box-shadow: none;
}
.menu-liste .item:hover { background: var(--surface-2); }
.menu-liste .item.danger { color: var(--crit); }
.menu-liste .item.danger:hover { background: var(--crit-bg); }
.menu-liste hr { margin: 4px 2px; }
.menu-liste .zone { padding: 8px 10px 10px; }
.menu-liste .zone p { margin: 0 0 8px; font-size: 12px; color: var(--ink-3); }
.menu-liste .zone input { margin-bottom: 8px; }

/* ---------------- palette de recherche (Ctrl K) ---------------- */

.palette { position: fixed; inset: 0; z-index: 100; background: rgba(24,19,26,.32); display: flex;
           justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette-boite { width: 100%; max-width: 620px; background: var(--surface); border-radius: 14px;
                 box-shadow: var(--shadow-3); overflow: hidden; border: 1px solid var(--line); }
.palette-saisie { display: flex; align-items: center; gap: 10px; padding: 12px 16px;
                  border-bottom: 1px solid var(--line); color: var(--ink-3); }
.palette-saisie input { border: 0 !important; box-shadow: none !important; padding: 4px 0 !important;
                        font-size: 15px !important; background: transparent !important; }
.palette-liste { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.palette-liste .titre { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
                        color: var(--ink-3); padding: 8px 10px 4px; }
.palette-liste a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px;
                   color: var(--ink); text-decoration: none; font-size: 13.5px; }
.palette-liste a .sub { margin-left: auto; font-family: var(--mono); }
.palette-liste a[aria-selected="true"] { background: var(--surface-3); }
.palette-liste .vide { padding: 18px 10px; text-align: center; color: var(--ink-3); font-size: 13px; }
.palette-pied { border-top: 1px solid var(--line); padding: 8px 14px; font-size: 11.5px; color: var(--ink-3);
                display: flex; gap: 4px; align-items: center; background: var(--surface-2); }

.field { display: grid; gap: 5px; margin-bottom: 14px; }
.field > label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field .note { font-size: 11.5px; color: var(--ink-3); }
/* Un seul jeu de regles pour tous les champs : la liste precedente ne visait
   que text, email et password, si bien que les champs `number` et `search` —
   l'essentiel des formulaires d'administration — gardaient le rendu brut du
   navigateur, avec une hauteur differente de leurs voisins. */
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], input[type=tel], input[type=url], input[type=date],
input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.4;
  transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
  -webkit-appearance: none;
  appearance: none;
}

/* La fleche du menu deroulant est dessinee ici : celle du systeme est d'une
   taille et d'une couleur differentes selon la plateforme, a cote d'un champ
   texte ca se voit. */
select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%238B8184' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

input::placeholder, textarea::placeholder { color: #a79da0; }

input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) {
  border-color: #bdb4b6;
}

/* Halo plutot qu'un simple changement de bordure : sur un formulaire dense,
   une bordure rouge de un pixel ne dit pas assez ou se trouve le curseur. */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-solid);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

input:disabled, select:disabled, textarea:disabled {
  background: var(--surface-2);
  color: var(--ink-3);
  cursor: not-allowed;
}

input[type=search] { -webkit-appearance: none; }
input[type=search]::-webkit-search-cancel-button { cursor: pointer; }

/* Les fleches d'un champ numerique n'apparaissent qu'au survol : affichees en
   permanence, elles rognent la valeur et alourdissent une grille de six
   champs cote a cote. */
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { opacity: 0; transition: opacity .12s ease; }
input[type=number]:hover::-webkit-inner-spin-button,
input[type=number]:focus::-webkit-inner-spin-button { opacity: 1; }

textarea { min-height: 88px; resize: vertical; }

.secret {
  background: #1A1416; color: #F2EDEE; border-radius: 6px; padding: 14px 16px;
  font-family: var(--mono); font-size: 13px; word-break: break-all;
  border-left: 3px solid var(--accent-solid);
}
.secret .lbl {
  display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: #A99FA1; margin-bottom: 6px;
}

/* ---------------- choix du systeme, par famille ---------------- */

.os-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 10px; margin-bottom: 4px;
}
.os-grid.is-missing .os-card { border-color: var(--crit); }

.os-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 6px; padding: 11px 12px 12px;
  display: flex; flex-direction: column; gap: 9px;
  transition: border-color .12s, box-shadow .12s;
}
.os-card.is-chosen {
  border-color: var(--accent-solid);
  box-shadow: 0 0 0 1px var(--accent-solid) inset;
}
.os-head { display: flex; align-items: center; gap: 9px; }
.os-logo { width: 22px; height: 22px; flex: none; }
/* Les logos sont des SVG monochromes : on les teinte a la couleur de la
   distribution avec un masque, plutot que de retoucher leur code source. */
.os-logo i {
  display: block; width: 22px; height: 22px; background: var(--os);
  -webkit-mask: var(--src) center / contain no-repeat;
          mask: var(--src) center / contain no-repeat;
}
.os-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.os-card select { font-size: 12.5px; padding: 6px 9px; }

/* ---------------- page de connexion ---------------- */

.bare { min-height: 100%; display: grid; place-items: center; padding: 24px 16px; background: var(--bg); }
.login { width: 100%; max-width: 384px; }
.login .brand { display: flex; align-items: center; gap: 11px; justify-content: center; margin-bottom: 22px; }
.login .brand .glyph {
  width: 36px; height: 36px; border-radius: 8px; background: var(--accent-solid);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
}
.login .brand .nm { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.login .box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 24px; box-shadow: var(--shadow);
  border-top: 3px solid var(--accent-solid);
}
.login h1 { font-size: 17px; margin: 0 0 4px; font-weight: 600; }
.login .lede { margin: 0 0 20px; color: var(--ink-3); font-size: 13px; }
.login button { width: 100%; justify-content: center; margin-top: 4px; }
.login .foot { text-align: center; margin-top: 18px; font-size: 11.5px; color: var(--ink-3); font-family: var(--mono); }

/* ---------------- onglets d'un serveur ---------------- */

/* Onglets cote serveur : ce sont de vrais liens, l'URL reste partageable et la
   page fonctionne sans script. */
.tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.tabs a {
  padding: 9px 15px; font-size: 13.5px; text-decoration: none;
  color: var(--ink-2); border-bottom: 2px solid transparent;
  margin-bottom: -1px; border-radius: 5px 5px 0 0;
}
.tabs a:hover { background: var(--surface); color: var(--ink); }
.tabs a[aria-current="page"] {
  color: var(--accent); border-bottom-color: var(--accent-solid);
  font-weight: 600; background: var(--surface);
}

/* ---------------- graphiques ---------------- */

.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.chart { min-width: 0; }
.chart-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 6px; font-size: 12.5px; color: var(--ink-2);
}
.chart-head b {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 12.5px; color: var(--ink); font-weight: 500; white-space: nowrap;
}
.chart-box { width: 100%; }

/* Legende : une pastille de la couleur de la courbe, pour lire un graphe a
   deux series sans deviner. */
.lg {
  font-style: normal; font-size: 11px; color: var(--ink-3);
  margin-left: 8px; display: inline-flex; align-items: center; gap: 4px;
}
.lg::before { content: ""; width: 7px; height: 2px; border-radius: 2px; background: currentColor; }
.lg-in  { color: #15703F; }
.lg-out { color: #96550C; }
.lg-rd  { color: #5B3FA8; }
.lg-wr  { color: #B03A6E; }

.range-pick { display: inline-flex; gap: 4px; }
.range-pick button[aria-pressed="true"] {
  background: var(--accent-bg); border-color: var(--accent-solid); color: var(--accent);
  font-weight: 500;
}


/* ------------- libelles des formulaires d'administration -------------
   Chaque page redefinissait les memes regles dans un <style> local. Elles
   vivent ici : un reglage, toutes les pages. */
.rv-champ > label, .nv-champ > label, .cl-champ > label,
.pf-champ > label, .res-champ > label {
  display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px;
}
.rv-champ > .note, .nv-champ > .note, .cl-champ > .note,
.pf-champ > .note, .res-champ > .note {
  font-size: 11.5px; color: var(--ink-3); margin: 6px 0 0;
}


/* ---------------- jauges reglables (composition d'offre) ----------------
   Le curseur porte la valeur, sa butee porte l'enveloppe. La piste se
   remplit a gauche du curseur : on voit ce qu'on prend et ce qu'on laisse
   sans lire un seul chiffre. */
.jr-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px 28px; }
.jr-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.jr-tete .k {
  font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3);
}
.jr-tete .v { display: inline-flex; align-items: baseline; gap: 4px; }
/* La valeur est un vrai champ, mais sans l'allure d'une case : la bordure
   n'apparait qu'au moment ou on la modifie. */
.jr-tete .v input {
  width: 4.2em; padding: 1px 4px; text-align: right; border: 1px solid transparent;
  border-radius: 6px; background: transparent; font-family: var(--mono);
  font-size: 15px; font-weight: 600; color: var(--ink); box-shadow: none;
}
.jr-tete .v input:hover { border-color: var(--line); }
.jr-tete .v input:focus { border-color: var(--accent-solid); box-shadow: 0 0 0 3px var(--accent-bg); }
.jr-tete .v .u { font-size: 12px; color: var(--ink-3); font-family: var(--mono); }
.jr-tete .v .max { font-size: 12px; color: var(--ink-3); }

.jr input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px;
  margin: 4px 0 0; padding: 0; background: transparent; border: 0; box-shadow: none;
  cursor: pointer;
}
.jr input[type=range]:focus { outline: none; box-shadow: none; }
/* La piste est peinte en deux temps par un degre calcule en JavaScript
   (--p) : un pseudo-element ne peut pas suivre la poignee. */
.jr input[type=range]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 99px;
  background: linear-gradient(to right,
    var(--accent-solid) 0 calc(var(--p, 0) * 1%),
    var(--surface-2) calc(var(--p, 0) * 1%) 100%);
}
.jr input[type=range]::-moz-range-track {
  height: 6px; border-radius: 99px; background: var(--surface-2);
}
.jr input[type=range]::-moz-range-progress {
  height: 6px; border-radius: 99px; background: var(--accent-solid);
}
.jr input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; margin-top: -5px; border-radius: 99px;
  background: var(--surface); border: 2px solid var(--accent-solid);
  box-shadow: 0 1px 3px rgba(26,20,22,.22);
  transition: transform .1s ease, box-shadow .1s ease;
}
.jr input[type=range]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 99px; border: 2px solid var(--accent-solid);
  background: var(--surface); box-shadow: 0 1px 3px rgba(26,20,22,.22);
}
.jr input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.12); }
.jr input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent-bg); }
.jr input[type=range]:hover::-moz-range-thumb { transform: scale(1.12); }

.jr .pied { display: flex; justify-content: space-between; font-size: 11px;
            color: var(--ink-3); margin-top: 2px; font-family: var(--mono); }


/* ---------------- choix du mode de creation ----------------
   Chaque choix est un <label> : cliquer la carte entiere coche le bouton,
   sans un octet de JavaScript. */
.nv-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.nv-champ label.nv-mode {
  display: flex; align-items: center; gap: 11px; cursor: pointer;
  padding: 13px 15px; border: 1px solid var(--line-2); border-radius: 10px;
  background: var(--surface); margin: 0;
  /* On annule ici ce que l'intitule de champ impose : une carte n'est pas
     une etiquette. */
  font-size: inherit; font-weight: 400; letter-spacing: normal;
  text-transform: none; color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.nv-champ label.nv-mode:hover { border-color: #bdb4b6; background: var(--surface-2); }
.nv-champ label.nv-mode:has(input:checked) {
  border-color: var(--accent-solid); background: var(--accent-bg);
  box-shadow: inset 0 0 0 1px var(--accent-solid);
}
.nv-champ label.nv-mode:has(input:disabled) { opacity: .5; cursor: not-allowed; background: var(--surface); }
.nv-mode input[type=radio] {
  width: 17px; height: 17px; flex: none; margin: 0; padding: 0;
  accent-color: var(--accent-solid); cursor: inherit;
}
.nv-mode > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nv-mode strong {
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  letter-spacing: normal; text-transform: none;
}
.nv-mode small {
  font-size: 11.5px; color: var(--ink-3);
  letter-spacing: normal; text-transform: none;
}

/* Les jauges forment un ensemble a part : un filet les separe des champs
   qui les precedent, sinon tout se lit comme une seule grille. */
[data-bloc="mesure"] { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; }
[data-bloc="mesure"][hidden] { display: none; }

.rv-cta { border-color: var(--accent-solid); }
.rv-cta h2 { color: var(--ink); }
