/* SlicePilot : espace client et administration. Même palette que le site et le logiciel. */
:root {
  color-scheme: dark;
  --bg: #091016;
  --panel: #111b23;
  --panel-2: #0d171d;
  --line: #22323d;
  --text: #edf5f5;
  --muted: #94a8b0;
  --accent: #35e0ae;
  --accent-2: #60f1c6;
  --warn: #ffbd57;
  --danger: #ff6178;
  --blue: #46a8ff;
  --radius: 14px;
  --gutter: clamp(14px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, Arial, sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg) radial-gradient(circle at 50% -10%, #17303a 0, var(--bg) 52%) no-repeat;
}
a { color: var(--accent-2); }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
main { width: min(100% - 2 * var(--gutter), 1100px); margin: 0 auto; padding: 28px 0 64px; outline: none; }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: .875rem; }
.mono { font-family: Consolas, "Courier New", monospace; }
.hidden { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #06130f; padding: 8px 14px; border-radius: 8px; font-weight: 700; z-index: 30; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- En-tête ---------- */
.top { position: sticky; top: 0; z-index: 10; background: #0a1319e6; backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-in { width: min(100% - 2 * var(--gutter), 1100px); margin: 0 auto; min-height: 62px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 8px 0; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem; margin-right: auto; }
.brand svg { width: 34px; height: 34px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nav a, .nav button { color: var(--muted); text-decoration: none; font: inherit; font-weight: 600; font-size: .92rem; background: none; border: 0; padding: 7px 11px; border-radius: 9px; cursor: pointer; }
.nav a:hover, .nav button:hover { color: var(--text); background: #14242d; }
.nav a[aria-current="page"] { color: var(--accent-2); background: #12262a; }
.lang { border: 1px solid #2a3c45 !important; border-radius: 999px !important; }

/* ---------- Titres, cartes, formulaires ---------- */
h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin: 0 0 18px; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 0 0 12px; }
h3 { font-size: 1rem; margin: 0 0 8px; }
.card { border: 1px solid var(--line); background: linear-gradient(180deg, #111b23f2, #0d161df2); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.narrow { max-width: 460px; margin-inline: auto; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
form .field { margin-bottom: 14px; }
label { display: block; font-size: .8rem; font-weight: 700; color: #a8bac1; margin-bottom: 6px; letter-spacing: .02em; }
.check { display: flex; gap: 10px; align-items: center; font-size: .95rem; font-weight: 500; color: var(--text); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--text); background: #0c151b; border: 1px solid #2a3c45; border-radius: 10px; padding: 10px 12px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
input[readonly], textarea[readonly] { color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 800; font-size: .92rem; cursor: pointer; text-decoration: none; padding: 10px 16px; border-radius: 10px; border: 1px solid #2d414b; background: #14242d; color: #d8e6e8; }
.btn:hover { color: #fff; border-color: #3d5a66; }
.btn.primary { color: #06130f; border: 0; background: linear-gradient(135deg, var(--accent-2), #22c995); }
.btn.primary:hover { filter: brightness(1.06); color: #06130f; }
.btn.danger { color: #ffd0d6; border-color: #5a2a33; background: #2a1319; }
.btn.small { padding: 6px 11px; font-size: .82rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.msg { border-radius: 10px; padding: 11px 14px; margin-bottom: 16px; border: 1px solid; font-size: .95rem; }
.msg.ok { color: #c9fbe9; background: #10261f; border-color: #1f5a47; }
.msg.err { color: #ffd6db; background: #261217; border-color: #5a2a33; }
.msg.warn { color: #ffe7bd; background: #271f10; border-color: #5a4720; }
.msg a { color: inherit; font-weight: 700; }

.badge { display: inline-block; font-size: .75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.badge.active { color: #c9fbe9; background: #10261f; border-color: #1f5a47; }
.badge.suspended, .badge.not_started { color: #ffe7bd; background: #271f10; border-color: #5a4720; }
.badge.revoked, .badge.expired { color: #ffd6db; background: #261217; border-color: #5a2a33; }
.badge.plan { color: #cde6ff; background: #0f1d2c; border-color: #254a70; }

/* ---------- Licences (espace client) ---------- */
.key { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0 14px; }
.key code { font-family: Consolas, "Courier New", monospace; font-size: clamp(1.05rem, 3.4vw, 1.4rem); letter-spacing: .06em; padding: 10px 14px; background: #0c151b; border: 1px solid #2a3c45; border-radius: 10px; user-select: all; }
.machines { margin: 12px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.machines li { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 18px; }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .92rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover { background: #12202a; }
pre.mailbody { white-space: pre-wrap; word-break: break-word; background: #0c151b; border: 1px solid #2a3c45; border-radius: 10px; padding: 12px; font-size: .85rem; margin: 8px 0 0; }

/* ---------- Tableau de bord ---------- */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 18px; }
.tile { border: 1px solid var(--line); background: var(--panel-2); border-radius: var(--radius); padding: 16px; }
.tile b { display: block; font-size: 1.9rem; line-height: 1.1; color: var(--accent-2); }
.tile span { color: var(--muted); font-size: .85rem; }
.tile.alert b { color: var(--warn); }

.qr { display: block; background: #fff; padding: 8px; border-radius: 10px; margin: 12px 0; width: 236px; height: 236px; }
.codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 12px 0; font-family: Consolas, monospace; }
.codes span { background: #0c151b; border: 1px solid #2a3c45; border-radius: 8px; padding: 8px 10px; text-align: center; }

@media (max-width: 640px) { .brand { margin-right: 0; width: 100%; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

.grow { flex: 1; min-width: 200px; }

.foot { width: min(100% - 2 * var(--gutter), 1100px); margin: 0 auto; padding: 22px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
