/* GPU Control SOSOCED — thème « Night Ops ».
   Feuille unique, sans dépendance externe (CSP stricte : aucun style en ligne). */

:root {
  --bg-0: #060a12;
  --bg-1: #0a101c;
  --surface-solid: #131c2d;
  --surface-3: #1b263b;
  --line: rgba(148, 170, 210, .10);
  --line-2: rgba(148, 170, 210, .18);
  --line-3: rgba(148, 170, 210, .28);
  --text: #e9eef7;
  --text-2: #b8c3d6;
  --muted: #8291aa;
  --faint: #5d6b84;

  --accent: #2dd4bf;
  --accent-2: #22d3ee;
  --accent-ink: #032321;
  --accent-soft: rgba(45, 212, 191, .12);
  --accent-glow: rgba(34, 211, 238, .35);

  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .12);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, .12);
  --info: #7dd3fc;
  --sim: #f5b544;

  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 40px -22px rgba(0,0,0,.85), 0 2px 6px -2px rgba(0,0,0,.4);
  --shadow-lg: 0 30px 60px -30px rgba(0,0,0,.9);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --side-w: 264px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg-0); }
body {
  margin: 0; min-height: 100vh; color: var(--text); font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(1100px 520px at 72% -180px, rgba(34, 211, 238, .10), transparent 70%),
    radial-gradient(900px 600px at -10% 110%, rgba(45, 212, 191, .06), transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 60%);
  background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.015em; color: var(--text); }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: .95rem; font-weight: 600; }
p { margin: 0 0 .8em; }
code, .mono { font-family: var(--mono); font-size: .85em; }
code { color: var(--text-2); }
small, .muted { color: var(--muted); }
.faint { color: var(--faint); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 0; }
::selection { background: rgba(45, 212, 191, .3); }

/* -- ossature ------------------------------------------------------------------------ */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(90deg, rgba(9, 14, 24, .96) var(--side-w), transparent var(--side-w)); }
.content { min-width: 0; display: flex; flex-direction: column; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 22px 16px 18px;
  display: flex; flex-direction: column; gap: 22px;
  background: linear-gradient(180deg, rgba(13, 20, 34, .96), rgba(8, 12, 21, .96));
  border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark, .brand .brand-mark {
  width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, #2dd4bf 0%, #22d3ee 55%, #6366f1 130%);
  color: #04201d; font-weight: 800; font-size: 10.5px; letter-spacing: .03em;
  box-shadow: 0 8px 22px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35);
}
.brand b { display: block; font-size: 15px; letter-spacing: -.01em; }
.brand > span:not(.brand-mark) > span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 16px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); padding: 0 12px 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; font-size: 14px; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(148, 170, 210, .07); color: var(--text); }
.nav a.on {
  color: var(--text); background: linear-gradient(90deg, rgba(45, 212, 191, .16), rgba(45, 212, 191, .03));
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, .18);
}
.nav a.on::before {
  content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent); box-shadow: 0 0 12px var(--accent-glow);
}
.nav a.on svg { color: var(--accent); }
.nav svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.nav .count {
  margin-left: auto; min-width: 20px; text-align: center; background: var(--accent); color: var(--accent-ink);
  border-radius: 99px; font-size: 11px; font-weight: 800; padding: 0 6px; line-height: 19px;
  box-shadow: 0 0 12px var(--accent-glow);
}
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.mode-card {
  border-radius: 12px; padding: 11px 12px; font-size: 12.5px; line-height: 1.4;
  border: 1px solid rgba(245, 181, 68, .28); background: linear-gradient(135deg, rgba(245, 181, 68, .12), rgba(245, 181, 68, .03));
  color: #f7d79b;
}
.mode-card b { display: flex; align-items: center; gap: 7px; color: var(--sim); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 2px; }
.mode-card b i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.mode-card.real { border-color: rgba(248, 113, 113, .35); background: var(--bad-soft); color: #fecaca; }
.mode-card.real b { color: var(--bad); }
.profile {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px;
  background: rgba(148, 170, 210, .05); border: 1px solid var(--line);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(45, 212, 191, .3); text-transform: uppercase;
}
.profile .who { flex: 1; min-width: 0; font-size: 13px; line-height: 1.25; }
.profile .who b { display: block; overflow: hidden; text-overflow: ellipsis; }
.profile .who small { font-size: 11.5px; }
.icon-btn {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2);
  background: transparent; color: var(--muted); cursor: pointer; padding: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-3); }
.icon-btn svg { width: 17px; height: 17px; }

/* bandeau de mode -------------------------------------------------------------------- */
.sim-banner {
  position: sticky; top: 0; z-index: 25; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 8px 16px; font-size: 12.5px; font-weight: 650; letter-spacing: .02em; text-align: center;
  color: #ffe2a8; background: linear-gradient(90deg, rgba(110, 66, 8, .95), rgba(140, 88, 14, .95), rgba(110, 66, 8, .95));
  border-bottom: 1px solid rgba(245, 181, 68, .45);
}
.sim-banner i { width: 8px; height: 8px; border-radius: 50%; background: var(--sim); box-shadow: 0 0 0 4px rgba(245, 181, 68, .25); flex: none; }
.sim-banner.real-banner { color: #fecaca; background: linear-gradient(90deg, rgba(90, 20, 20, .95), rgba(120, 28, 28, .95)); border-bottom-color: rgba(248, 113, 113, .45); }
.sim-banner.real-banner i { background: var(--bad); box-shadow: 0 0 0 4px rgba(248, 113, 113, .25); }

/* barre du haut ----------------------------------------------------------------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--line);
  background: rgba(8, 12, 21, .6);
}
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; min-width: 0; }
.crumbs b { color: var(--text); font-weight: 600; }
.crumbs svg { width: 14px; height: 14px; }
.tools { display: flex; align-items: center; gap: 10px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 650;
  border: 1px solid; white-space: nowrap;
}
.status-pill.ok { color: var(--ok); border-color: rgba(52, 211, 153, .3); background: var(--ok-soft); }
.status-pill.bad { color: var(--bad); border-color: rgba(248, 113, 113, .35); background: var(--bad-soft); }
.status-pill .dot { width: 7px; height: 7px; }
.mobile-only { display: none; }
.main { padding: 30px clamp(16px, 3vw, 40px) 64px; max-width: 1360px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 24px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }

.mode { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; border: 1px solid; }
.mode.sim { color: var(--sim); border-color: rgba(245, 181, 68, .4); background: rgba(245, 181, 68, .1); }
.mode.real { color: var(--bad); border-color: rgba(248, 113, 113, .4); background: var(--bad-soft); }
.mode i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* -- cartes --------------------------------------------------------------------------- */
.card {
  position: relative; min-width: 0; padding: 20px 22px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(25, 35, 55, .80), rgba(15, 22, 36, .80));
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }
.grid > .card + .card, .grid > .stack + .card, .grid > .card + .stack { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.h-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(45, 212, 191, .18); }
.h-icon svg { width: 16px; height: 16px; }
.grid { display: grid; gap: 18px; }
.grid.top { align-items: start; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.stack > * + * { margin-top: 18px; }
.mt { margin-top: 18px; }

/* KPI ------------------------------------------------------------------------------------ */
.kpi { display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.kpi .label { font-size: 11px; text-transform: uppercase; letter-spacing: .11em; color: var(--muted); font-weight: 700; }
.kpi .value { font-size: 2.1rem; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kpi .sub { font-size: 12.5px; color: var(--muted); }
.kpi-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(45, 212, 191, .2); }
.kpi-icon svg { width: 19px; height: 19px; }
.kpi-icon.warn { color: var(--warn); background: var(--warn-soft); border-color: rgba(251, 191, 36, .25); }
.kpi-icon.bad { color: var(--bad); background: var(--bad-soft); border-color: rgba(248, 113, 113, .3); }
.kpi-icon.neutral { color: var(--text-2); background: rgba(148, 170, 210, .08); border-color: var(--line-2); }
.kpi::after {
  content: ""; position: absolute; right: -50px; bottom: -70px; width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, .09), transparent 70%); pointer-events: none;
}
.meter { height: 6px; background: rgba(148, 170, 210, .1); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.meter > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; box-shadow: 0 0 10px var(--accent-glow); }
.meter.warn > span { background: var(--warn); box-shadow: none; }
.meter.bad > span { background: var(--bad); box-shadow: none; }
.w0{width:0}.w5{width:5%}.w10{width:10%}.w15{width:15%}.w20{width:20%}.w25{width:25%}.w30{width:30%}.w35{width:35%}
.w40{width:40%}.w45{width:45%}.w50{width:50%}.w55{width:55%}.w60{width:60%}.w65{width:65%}.w70{width:70%}
.w75{width:75%}.w80{width:80%}.w85{width:85%}.w90{width:90%}.w95{width:95%}.w100{width:100%}

/* protections --------------------------------------------------------------------------- */
.health { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.health li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 2px 12px;
  padding: 10px 12px; border-radius: 10px; background: rgba(148, 170, 210, .04); border: 1px solid var(--line); font-size: 13.5px;
}
.health li > .dot { margin-top: 6px; }
.health .h-label { font-weight: 600; color: var(--text); }
.health .d { grid-column: 2; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.health li.is-bad { border-color: rgba(248, 113, 113, .3); background: var(--bad-soft); }
.health li.is-info { border-style: dashed; background: transparent; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--faint); display: inline-block; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .15), 0 0 10px rgba(52, 211, 153, .5); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 4px rgba(248, 113, 113, .16); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 4px rgba(251, 191, 36, .14); }
.shield { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 13px; border: 1px solid; margin-bottom: 14px; }
.shield.ok { border-color: rgba(52, 211, 153, .3); background: linear-gradient(135deg, rgba(52, 211, 153, .15), rgba(52, 211, 153, .03)); }
.shield.bad { border-color: rgba(248, 113, 113, .35); background: linear-gradient(135deg, rgba(248, 113, 113, .16), rgba(248, 113, 113, .03)); }
.shield b { display: block; font-size: 15px; }
.shield small { display: block; }
.shield svg { width: 30px; height: 30px; flex: none; }
.shield.ok svg { color: var(--ok); filter: drop-shadow(0 0 8px rgba(52, 211, 153, .45)); }
.shield.bad svg { color: var(--bad); }
.shield .score { margin-left: auto; font-size: 1.45rem; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shield .score small { display: inline; font-size: .8rem; color: var(--muted); font-weight: 600; }
.subhead { font-size: 10.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--faint); margin: 16px 2px 8px; }

/* badges --------------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 3px 10px;
  border-radius: 99px; background: rgba(148, 170, 210, .08); color: var(--text-2); border: 1px solid var(--line-2); white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.s-PROVISIONING, .badge.s-CONFIGURING, .badge.s-PENDING_CREATE { color: var(--info); border-color: rgba(125, 211, 252, .3); background: rgba(125, 211, 252, .08); }
.badge.s-RUNNING, .badge.s-READY { color: var(--ok); border-color: rgba(52, 211, 153, .3); background: var(--ok-soft); }
.badge.s-COLLECTING, .badge.s-CREATE_UNCERTAIN { color: var(--warn); border-color: rgba(251, 191, 36, .3); background: var(--warn-soft); }
.badge.s-DESTROYING, .badge.s-VERIFYING { color: var(--bad); border-color: rgba(248, 113, 113, .3); background: var(--bad-soft); }
.badge.s-DESTROYED, .badge.s-SIM_CLOSED { color: var(--muted); }
.badge.s-CREATE_FAILED { color: var(--faint); text-decoration: line-through; }
.badge.l-info { color: var(--info); }
.badge.l-warn { color: var(--warn); border-color: rgba(251, 191, 36, .3); }
.badge.l-critical { color: var(--bad); border-color: rgba(248, 113, 113, .35); background: var(--bad-soft); }
.badge.plain::before { display: none; }
.pulse::before { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.price-tag { font-size: 10.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; border: 1px solid; white-space: nowrap; }
.price-tag.sim { color: var(--sim); border-color: rgba(245, 181, 68, .4); background: rgba(245, 181, 68, .08); }
.price-tag.api { color: var(--ok); border-color: rgba(52, 211, 153, .35); background: var(--ok-soft); }
.price-tag.bad { color: var(--bad); border-color: rgba(248, 113, 113, .4); background: var(--bad-soft); }

/* tableaux ----------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .11em; color: var(--muted);
  font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-2); }
td a { color: var(--text); font-weight: 600; }
td a:hover { color: var(--accent); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(148, 170, 210, .045); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.gpu-name { font-weight: 700; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { font-size: 11px; font-family: var(--mono); padding: 2px 7px; border-radius: 6px; background: rgba(148, 170, 210, .07); border: 1px solid var(--line-2); color: var(--muted); }
.chip.ok { color: var(--ok); border-color: rgba(52, 211, 153, .35); background: var(--ok-soft); }
.chip.no { color: var(--faint); text-decoration: line-through; }

/* formulaires --------------------------------------------------------------------------- */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text-2); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; font-weight: 400; }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: rgba(6, 10, 18, .65); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 11px 13px; min-height: 46px; transition: border-color .15s, box-shadow .15s, background .15s;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
select option { background: var(--surface-solid); color: var(--text); }
textarea { font-family: var(--mono); font-size: 13px; min-height: 130px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background-color: rgba(6, 10, 18, .85); box-shadow: 0 0 0 4px rgba(45, 212, 191, .15); }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); flex: none; margin: 2px 0 0; }
.field { margin-bottom: 18px; }
.fields { display: grid; gap: 0 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; color: var(--text); padding: 14px; border-radius: 12px; background: rgba(148, 170, 210, .05); border: 1px solid var(--line-2); }
.code-input { font-family: var(--mono); font-size: 1.4rem; letter-spacing: .4em; text-align: center; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.grow { flex: 1 1 280px; min-width: 0; }
form.card.actions { align-items: flex-end; }
form.card.actions .field { margin-bottom: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 650; font-size: 14px;
  padding: 10px 17px; min-height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: rgba(148, 170, 210, .07); color: var(--text); cursor: pointer; white-space: nowrap;
  transition: transform .06s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { color: var(--text); border-color: var(--line-3); background: rgba(148, 170, 210, .12); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn.primary {
  color: var(--accent-ink); border-color: transparent;
  background: linear-gradient(135deg, #2dd4bf, #22d3ee);
  box-shadow: 0 10px 24px -10px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn.primary:hover { color: var(--accent-ink); background: linear-gradient(135deg, #5eead4, #67e8f9); }
.btn.danger { color: #fecaca; border-color: rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .12); }
.btn.danger:hover { background: rgba(248, 113, 113, .2); color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 12px; min-height: 34px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
form.inline { display: inline; }

/* messages ------------------------------------------------------------------------------ */
.msg { padding: 13px 16px; border-radius: 12px; border: 1px solid; margin-bottom: 18px; font-size: 14px; color: var(--text-2); }
.msg b { color: var(--text); }
.msg.ok { border-color: rgba(52, 211, 153, .3); background: var(--ok-soft); }
.msg.error { border-color: rgba(248, 113, 113, .35); background: var(--bad-soft); }
.msg.warn { border-color: rgba(251, 191, 36, .3); background: var(--warn-soft); }
.msg.info { border-color: var(--line-2); background: rgba(148, 170, 210, .05); }
.banner-real { border-color: rgba(125, 211, 252, .3); background: rgba(125, 211, 252, .07); }
.bad-text { color: var(--bad) !important; font-weight: 650; }
.note { margin-top: 22px; font-size: 12.5px; color: var(--faint); }

/* locations ----------------------------------------------------------------------------- */
.rental-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 22px; align-items: center;
  padding: 16px; border-radius: 13px; background: rgba(148, 170, 210, .045); border: 1px solid var(--line);
}
.rental-card + .rental-card { margin-top: 12px; }
section.card.rental-card { padding: 20px 22px; background: linear-gradient(180deg, rgba(25, 35, 55, .80), rgba(15, 22, 36, .80)); }
.rental-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rental-title a { color: var(--text); font-weight: 700; }
.rental-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.countdown { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; color: var(--text); }
.countdown small { display: block; font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.countdown.urgent, [data-deadline].urgent { color: var(--warn); }
dl.specs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 20px; margin: 0; font-size: 14px; }
dl.specs dt { color: var(--muted); }
dl.specs dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--text-2); }

/* chronologie --------------------------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 26px; font-size: 13.5px; color: var(--text-2); }
.timeline li::before {
  content: ""; position: absolute; left: 3px; top: 5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface-3); border: 2px solid var(--line-3);
}
.timeline li::after { content: ""; position: absolute; left: 8px; top: 19px; bottom: 1px; width: 1px; background: var(--line-2); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li.info::before { border-color: rgba(45, 212, 191, .7); }
.timeline li.warn::before { border-color: var(--warn); background: rgba(251, 191, 36, .25); }
.timeline li.critical::before { border-color: var(--bad); background: rgba(248, 113, 113, .3); box-shadow: 0 0 8px rgba(248, 113, 113, .5); }
.timeline time { display: block; font-size: 11.5px; color: var(--faint); font-family: var(--mono); margin-bottom: 1px; }
.timeline .tl-mode { font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sim); margin-left: 6px; }
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.steps span { font-size: 12px; padding: 4px 10px; border-radius: 7px; background: rgba(148, 170, 210, .05); color: var(--faint); border: 1px solid var(--line); }
.steps span.done { color: var(--ok); border-color: rgba(52, 211, 153, .25); background: rgba(52, 211, 153, .06); }
.steps span.cur { color: var(--accent-ink); background: linear-gradient(135deg, #2dd4bf, #22d3ee); border-color: transparent; font-weight: 700; box-shadow: 0 0 14px var(--accent-glow); }

.quote { display: grid; gap: 9px; font-size: 14px; }
.quote .row { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); }
.quote .row b { color: var(--text); }
.quote .total { border-top: 1px solid var(--line-2); padding-top: 12px; font-size: 1.1rem; font-weight: 700; color: var(--text); }
.big-total { font-size: 2.3rem; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text); }
ul.plain { margin: 0; padding-left: 1.1em; font-size: 14px; color: var(--text-2); }
ul.plain li { margin: 5px 0; }

/* état vide ---------------------------------------------------------------------------- */
.empty { text-align: center; padding: 34px 16px 30px; color: var(--muted); }
.empty-art {
  width: 74px; height: 74px; margin: 0 auto 16px; border-radius: 20px; display: grid; place-items: center; color: var(--accent);
  background: radial-gradient(circle at 30% 20%, rgba(45, 212, 191, .25), rgba(45, 212, 191, .04) 70%);
  border: 1px solid rgba(45, 212, 191, .25); box-shadow: 0 0 40px -10px var(--accent-glow);
}
.empty-art svg { width: 34px; height: 34px; }
.empty > svg { width: 34px; height: 34px; color: var(--faint); margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.empty p { max-width: 400px; margin: 0 auto 18px; }

/* suivi des opérations ----------------------------------------------------------------- */
.monitors { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 16px; }
.monitor {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; font-size: 13px;
  background: rgba(148, 170, 210, .05); border: 1px solid var(--line); color: var(--text);
}
.monitor small { margin-left: auto; font-size: 11.5px; white-space: nowrap; }
.op { border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; background: rgba(148, 170, 210, .04); }
.op + .op { margin-top: 12px; }
.op-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.op-head a { color: var(--text); }
.op-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; margin: 14px 0 4px; font-size: 13.5px; }
.op-facts dt { color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.op-facts dd { margin: 3px 0 0; font-variant-numeric: tabular-nums; color: var(--text); }
.op-log summary { cursor: pointer; color: var(--muted); font-size: 13px; margin: 8px 0; }
.op-log[open] summary { margin-bottom: 12px; }

/* -- connexion ------------------------------------------------------------------------ */
.auth {
  min-height: 100vh; display: grid; place-items: center; padding: 28px 16px;
  background:
    radial-gradient(700px 420px at 50% -10%, rgba(34, 211, 238, .16), transparent 70%),
    radial-gradient(600px 400px at 100% 100%, rgba(99, 102, 241, .10), transparent 70%);
}
.auth-card { width: 100%; max-width: 420px; }
.auth-card.wide { max-width: 500px; }
.auth-card .card { padding: 32px 30px; box-shadow: var(--shadow-lg); }
.auth-card .brand { justify-content: center; margin-bottom: 24px; }
.auth-card h1 { font-size: 1.35rem; text-align: center; }
.auth-card .lead { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.auth .sim-banner { position: static; border-radius: 12px; border: 1px solid rgba(245, 181, 68, .45); margin-bottom: 16px; }
.qr { background: #fff; border-radius: 14px; padding: 10px; width: 200px; height: 200px; margin: 0 auto 14px; display: block; }
.secret { font-family: var(--mono); font-size: 12.5px; word-break: break-all; text-align: center; padding: 9px; background: rgba(6, 10, 18, .6); border-radius: 9px; border: 1px dashed var(--line-3); color: var(--text-2); }
.auth-foot { text-align: center; font-size: 12px; color: var(--faint); margin-top: 18px; }
ol.codes { columns: 2; column-gap: 18px; padding-left: 1.6em; margin: 0 0 16px; font-size: 1.05rem; color: var(--text); }
ol.codes li { padding: 4px 0; break-inside: avoid; }
ol.codes code { font-size: 1rem; letter-spacing: .04em; color: var(--text); }
details.recovery { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
details.recovery summary { cursor: pointer; color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }

/* -- menu et onglets mobiles ------------------------------------------------------------ */
.mnav summary { list-style: none; cursor: pointer; }
.mnav summary::-webkit-details-marker { display: none; }
.tabbar { display: none; }

@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 > .span2 { grid-column: span 2; }
}
@media (max-width: 900px) {
  .shell { display: block; background: none; }
  .side { display: none; }
  .mobile-only { display: flex; }
  .desktop-only { display: none !important; }
  .sim-banner { font-size: 11.5px; padding: 7px 12px; line-height: 1.35; }
  .topbar { padding: 10px 16px; background: rgba(8, 12, 21, .95); }
  .topbar .brand > span:not(.brand-mark) > span { display: none; }
  .mnav summary { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(148, 170, 210, .06); color: var(--text); }
  .mnav summary svg { width: 20px; height: 20px; }
  .mnav[open] .mnav-panel {
    position: fixed; inset: 0; z-index: 40; overflow-y: auto;
    padding: 18px 18px 110px; background: rgba(6, 10, 18, .985);
  }
  .mnav-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
  .mnav-head .icon-btn { width: 42px; height: 42px; border-radius: 11px; }
  .mnav .nav a { padding: 13px 12px; font-size: 16px; }
  .mnav .nav a.on::before { left: -6px; }
  .mnav .side-foot { margin-top: 22px; }
  .main { padding: 20px 16px 110px; }
  .page-head { margin-bottom: 18px; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .g4.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .g4.kpis .card { padding: 14px; }
  .g4.kpis .kpi .value { font-size: 1.6rem; }
  .g4.kpis .kpi-icon { width: 32px; height: 32px; border-radius: 9px; }
  .g4.kpis .kpi-icon svg { width: 16px; height: 16px; }
  .g4.kpis .kpi .label { font-size: 9.5px; letter-spacing: .09em; }
  .g4.kpis .meter { display: none; }
  .span2, .g3 > .span2 { grid-column: auto; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 1.45rem; }
  .card { padding: 17px 16px; }
  .rental-card { grid-template-columns: minmax(0, 1fr); }
  .countdown { text-align: left; }
  .shield .score { font-size: 1.2rem; }
  .table-wrap { margin: 0; padding: 0; overflow: visible; }
  table.cards thead { display: none; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr { border: 1px solid var(--line); border-radius: 13px; padding: 10px 14px; margin-bottom: 10px; background: rgba(148, 170, 210, .04); }
  table.cards td { border: 0; padding: 5px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.cards td::before { content: attr(data-label); color: var(--muted); font-size: 12.5px; text-align: left; flex: none; }
  table.cards td.main-cell { display: block; text-align: left; font-size: 15px; padding-bottom: 8px; }
  table.cards td.main-cell::before { display: none; }
  tbody tr:hover td { background: transparent; }
  .btn { min-height: 46px; }
  .btn.sm { min-height: 38px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 6px 6px max(8px, env(safe-area-inset-bottom)); background: rgba(8, 12, 21, .96);
    border-top: 1px solid var(--line-2);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 2px; border-radius: 10px; color: var(--muted); font-size: 10.5px; font-weight: 600; }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a.on { color: var(--accent); }
  .tabbar .cta-dot { width: 44px; height: 32px; border-radius: 11px; display: grid; place-items: center; color: var(--accent-ink); background: linear-gradient(135deg, #2dd4bf, #22d3ee); box-shadow: 0 6px 18px -6px var(--accent-glow); }
  .tabbar .cta-dot svg { width: 19px; height: 19px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
