/* NEXUS panel - feuille de style */
:root {
  --fond: #f5f5f7;
  --carte: #ffffff;
  --carte-2: #fafafc;
  --texte: #1d1d1f;
  --texte-2: #6e6e73;
  --texte-3: #8e8e93;
  --bordure: #e6e6ea;
  --bordure-forte: #d8d8de;
  --accent: #0071e3;
  --accent-doux: #eaf2fd;
  --vert: #128a45;
  --vert-doux: #e7f7ee;
  --orange: #b25e09;
  --orange-doux: #fdf1e3;
  --rouge: #c62828;
  --rouge-doux: #fdecec;
  --ombre: 0 1px 2px rgba(0, 0, 0, .04);
  --rayon: 16px;
  --rayon-petit: 10px;
  --sidebar: 248px;
}

html[data-theme="dark"] {
  --fond: #0b0b0d;
  --carte: #161618;
  --carte-2: #1c1c1f;
  --texte: #f5f5f7;
  --texte-2: #a1a1a8;
  --texte-3: #9a9aa2;
  --bordure: #2a2a2e;
  --bordure-forte: #3a3a40;
  --accent: #0a84ff;
  --accent-doux: #10243a;
  --vert: #35d07f;
  --vert-doux: #0f2a1d;
  --orange: #f0a04b;
  --orange-doux: #2a2114;
  --rouge: #ff6b6b;
  --rouge-doux: #2a1616;
  --ombre: 0 1px 2px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font: inherit; color: inherit; }

svg { display: block; }

/* ------------------------------- login ------------------------------- */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(0, 113, 227, .10), transparent 60%),
    radial-gradient(700px 400px at 110% 110%, rgba(0, 113, 227, .07), transparent 55%),
    var(--fond);
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 22px;
  padding: 34px 30px 30px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .06);
}

.login-logo {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: linear-gradient(135deg, #2d78ff, #0f4fbf);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(15, 79, 191, .25);
}

.login-card h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.2px; }
.login-card p.sub { color: var(--texte-2); margin: 0 0 24px; font-size: 13px; }

/* ------------------------------- layout ------------------------------- */

.app { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background: var(--carte);
  border-right: 1px solid var(--bordure);
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 10px 20px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2d78ff, #0f4fbf);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.brand-name { font-weight: 650; font-size: 15px; letter-spacing: -.2px; }
.brand-sub { font-size: 11px; color: var(--texte-3); margin-top: -2px; }

.nav { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--rayon-petit);
  color: var(--texte-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
}

.nav-item svg { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { background: var(--carte-2); color: var(--texte); text-decoration: none; }
.nav-item.active { background: var(--accent-doux); color: var(--accent); font-weight: 600; }
.nav-item.active svg { opacity: 1; }
.nav-item .count {
  margin-left: auto;
  font-size: 11px;
  background: var(--bordure);
  color: var(--texte-2);
  border-radius: 20px;
  padding: 1px 7px;
  font-weight: 600;
}

.nav-sep { height: 1px; background: var(--bordure); margin: 12px 10px; }
.nav-bottom { margin-top: auto; }

.main {
  margin-left: var(--sidebar);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--fond) 82%, transparent);
  backdrop-filter: blur(14px);
  z-index: 20;
  border-bottom: 1px solid transparent;
}

.topbar .pill {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--texte-2);
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: 100px;
  padding: 6px 12px;
  max-width: 52vw;
  overflow: hidden;
  white-space: nowrap;
}
.topbar .pill span { overflow: hidden; text-overflow: ellipsis; }
.topbar .pill b { color: var(--texte); font-weight: 600; }
.topbar .pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--vert); }
.topbar .pill .dot.off { background: var(--texte-3); }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 650;
}

.user-name { font-size: 13px; color: var(--texte-2); }

.view {
  padding: 8px 28px 48px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.menu-btn { display: none; }

/* ------------------------------- titres ------------------------------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 6px 0 20px;
}

.page-head h1 { font-size: 27px; letter-spacing: -.6px; margin: 0; font-weight: 700; }
.page-head .sub { color: var(--texte-2); margin-top: 4px; font-size: 13px; }

.page-actions { display: flex; gap: 8px; align-items: center; }

/* ------------------------------- cartes ------------------------------- */

.cards-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.card {
  background: var(--carte);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
}

.stat { padding: 18px 20px 16px; }
.stat .label { font-size: 12px; color: var(--texte-2); font-weight: 500; }
.stat .value { font-size: 30px; font-weight: 700; letter-spacing: -.8px; margin-top: 6px; line-height: 1.1; }
.stat .foot { font-size: 12px; color: var(--texte-3); margin-top: 6px; display: flex; align-items: center; gap: 6px; }
.stat .foot .up { color: var(--vert); font-weight: 600; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}
.card-head h2 { font-size: 15px; margin: 0; font-weight: 650; letter-spacing: -.2px; display: flex; align-items: center; gap: 7px; }
.card-head h2 svg { width: 16px; height: 16px; flex: none; }
.card-head .link { font-size: 12.5px; }

.card-body { padding: 14px 20px 18px; }

.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; }

/* ------------------------------- boutons ------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 10px;
  border: 1px solid var(--bordure-forte);
  background: var(--carte);
  color: var(--texte);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { background: var(--carte-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }

.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); background: var(--accent); }

.btn.ghost { border-color: transparent; background: transparent; color: var(--texte-2); }
.btn.ghost:hover { background: var(--carte-2); color: var(--texte); }

.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.danger { color: var(--rouge); }
.btn.danger:hover { background: var(--rouge-doux); }
.btn:disabled { opacity: .5; cursor: default; }

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--texte-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.icon-btn:hover { background: var(--carte-2); color: var(--texte); }
.icon-btn svg { width: 16px; height: 16px; }

/* ------------------------------- formulaire ------------------------------- */

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--texte-3); margin-top: 5px; }

.input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--bordure-forte);
  background: var(--carte);
  outline: none;
  font-size: 13.5px;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

select.input { appearance: none; background-image: none; }

/* ------------------------------ campagne SMS ------------------------------ */

.area { resize: vertical; min-height: 64px; line-height: 1.5; font-family: inherit; }

.contact-pick {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--bordure);
  border-radius: 12px;
  padding: 4px;
  background: var(--carte);
}

.pick {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13px;
}
.pick:hover { background: var(--accent-doux); }
.pick input { width: 16px; height: 16px; accent-color: var(--accent); }
.pick span { display: flex; flex-direction: column; line-height: 1.25; }
.pick em { font-style: normal; color: var(--muted, #777); font-size: 12px; }

.bar {
  height: 8px;
  border-radius: 6px;
  background: var(--bordure);
  overflow: hidden;
}
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .3s; }

/* ------------------------------ pavé tactile ------------------------------ */

.pad-wrap {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pad {
  display: grid;
  grid-template-columns: repeat(3, 46px);
  grid-template-rows: repeat(3, 46px);
  gap: 4px;
  flex: none;
}

.pad-btn {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--bordure-forte);
  background: var(--carte);
  color: var(--texte, #222);
  font-size: 15px;
  cursor: pointer;
  transition: .12s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pad-btn:hover { background: var(--accent-doux); border-color: var(--accent); }
.pad-btn:active { transform: scale(.94); }

.pad-btn.up { grid-column: 2; grid-row: 1; }
.pad-btn.left { grid-column: 1; grid-row: 2; }
.pad-btn.mid { grid-column: 2; grid-row: 2; background: var(--accent); color: #fff; border-color: var(--accent); }
.pad-btn.right { grid-column: 3; grid-row: 2; }
.pad-btn.down { grid-column: 2; grid-row: 3; }

.pad-side { display: flex; flex-direction: column; gap: 8px; }

/* ------------------------------- tableaux ------------------------------- */

.table-wrap { overflow: auto; }

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--texte-2);
  padding: 8px 12px;
  border-bottom: 1px solid var(--bordure);
  white-space: nowrap;
}
.tbl td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bordure);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--carte-2); }
.tbl .two { line-height: 1.25; }
.tbl .two .small { color: var(--texte-3); font-size: 11.5px; }

.mono { font-family: "SF Mono", ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; }

/* ------------------------------- pastilles ------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 100px;
  padding: 3px 9px;
  background: var(--carte-2);
  color: var(--texte-2);
  border: 1px solid var(--bordure);
  white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { color: var(--vert); background: var(--vert-doux); border-color: transparent; }
.badge.orange { color: var(--orange); background: var(--orange-doux); border-color: transparent; }
.badge.red { color: var(--rouge); background: var(--rouge-doux); border-color: transparent; }
.badge.blue { color: var(--accent); background: var(--accent-doux); border-color: transparent; }
.badge.clic { cursor: pointer; border-style: dashed; }
.badge.clic:hover { border-color: var(--accent); color: var(--accent); }

/* ------------------------------- appareils ------------------------------- */

.dev-cell { display: flex; align-items: center; gap: 11px; }
.dev-ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--carte-2);
  border: 1px solid var(--bordure);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--texte-2);
  flex: none;
}
.dev-ic svg { width: 17px; height: 17px; }

.batt { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.batt .bar { width: 34px; height: 6px; border-radius: 4px; background: var(--bordure); overflow: hidden; }
.batt .bar i { display: block; height: 100%; border-radius: 4px; background: var(--vert); }
.batt .bar i.low { background: var(--rouge); }
.batt .bar i.mid { background: var(--orange); }

.empty {
  padding: 38px 20px;
  text-align: center;
  color: var(--texte-2);
}
.empty .big { font-size: 15px; font-weight: 600; color: var(--texte); margin-bottom: 5px; }
.empty svg { width: 34px; height: 34px; margin: 0 auto 12px; color: var(--texte-3); }

.skeleton {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bordure) 25%, var(--carte-2) 37%, var(--bordure) 63%);
  background-size: 400% 100%;
  animation: sk 1.4s ease infinite;
  margin: 8px 0;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ------------------------------- fiche appareil ------------------------------- */

.dev-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  flex-wrap: wrap;
}
.dev-head .big-ic {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent-doux);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dev-head .big-ic svg { width: 26px; height: 26px; }
.dev-head h1 { font-size: 21px; margin: 0; letter-spacing: -.4px; }
.dev-head .meta { color: var(--texte-2); font-size: 12.5px; margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dev-head .spacer { flex: 1; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.tabs {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--bordure);
  overflow-x: auto;
}
.tab {
  border: none;
  background: transparent;
  color: var(--texte-2);
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover { background: var(--carte-2); color: var(--texte); }
.tab.active { background: var(--accent-doux); color: var(--accent); }

.tab-body { padding: 16px 20px 20px; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px 22px;
}
.info-item .k { font-size: 11.5px; color: var(--texte-3); }
.info-item .v { font-size: 13.5px; font-weight: 550; margin-top: 1px; word-break: break-word; }

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.action-tile {
  border: 1px solid var(--bordure);
  background: var(--carte);
  border-radius: 12px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 550;
  text-align: left;
}
.action-tile:hover { background: var(--carte-2); border-color: var(--bordure-forte); }
.action-tile svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

.chat-list { display: flex; flex-direction: column; }
.chat {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bordure);
}
.chat:last-child { border-bottom: none; }
.chat .who { min-width: 120px; font-weight: 600; font-size: 12.5px; }
.chat .txt { flex: 1; font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.chat .when { font-size: 11px; color: var(--texte-3); white-space: nowrap; }
.chat.out { background: color-mix(in srgb, var(--accent-doux) 40%, transparent); border-radius: 8px; padding-left: 8px; padding-right: 8px; }

.file-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
}
.file-row:hover { background: var(--carte-2); }
.file-row .fic { width: 17px; height: 17px; color: var(--texte-3); flex: none; }
.file-row .fic.dir { color: var(--accent); }
.file-row .fname { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .fmeta { font-size: 11.5px; color: var(--texte-3); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gal-item {
  border: 1px solid var(--bordure);
  border-radius: 12px;
  overflow: hidden;
  background: var(--carte-2);
  display: flex;
  flex-direction: column;
}
.gal-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.gal-item .gal-empty { height: 120px; display: flex; align-items: center; justify-content: center; color: var(--texte-3); }
.gal-name { padding: 7px 9px 0; font-size: 11.5px; color: var(--texte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-foot { display: flex; justify-content: space-between; align-items: center; padding: 2px 9px 8px; font-size: 11.5px; }
.gal-audio { width: calc(100% - 18px); margin: 0 9px 8px; height: 30px; }

/* ------------------------------- creation apk ------------------------------- */

.build-layout { display: grid; grid-template-columns: 1.25fr .9fr; gap: 14px; align-items: start; }

.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }

.model-card {
  border: 1.5px solid var(--bordure);
  border-radius: 13px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  background: var(--carte);
  transition: border-color .12s, background .12s;
}
.model-card:hover { border-color: var(--bordure-forte); background: var(--carte-2); }
.model-card.on { border-color: var(--accent); background: var(--accent-doux); }
.model-card img { width: 42px; height: 42px; border-radius: 11px; margin: 0 auto 7px; display: block; object-fit: cover; }
.model-card .mn { font-size: 11.5px; font-weight: 600; line-height: 1.2; }

.apk-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--carte-2);
  border: 1px solid var(--bordure);
  margin-bottom: 16px;
}
.apk-preview img { width: 56px; height: 56px; border-radius: 14px; }
.apk-preview .t { font-weight: 650; font-size: 15px; }
.apk-preview .s { font-size: 12px; color: var(--texte-2); }

.progress-track { height: 8px; background: var(--bordure); border-radius: 6px; overflow: hidden; }
.progress-track i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s ease; }

.build-steps { margin: 14px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.build-step { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--texte-2); }
.build-step .b { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--bordure-forte); flex: none; display: flex; align-items: center; justify-content: center; }
.build-step .b svg { width: 10px; height: 10px; }
.build-step.done { color: var(--texte); }
.build-step.done .b { border-color: var(--vert); background: var(--vert); color: #fff; }
.build-step.now { color: var(--accent); font-weight: 600; }
.build-step.now .b { border-color: var(--accent); }

.log-box {
  margin-top: 12px;
  background: var(--carte-2);
  border: 1px solid var(--bordure);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: "SF Mono", ui-monospace, Consolas, monospace;
  font-size: 11px;
  color: var(--texte-2);
  max-height: 130px;
  overflow: auto;
  white-space: pre-wrap;
}

/* ------------------------------- divers ------------------------------- */

.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; }
.muted { color: var(--texte-2); }
.small { font-size: 12px; }
.mt8 { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; }
.mb16 { margin-bottom: 16px; }
.hide { display: none !important; }
.sep { height: 1px; background: var(--bordure); margin: 16px 0; }

.toast-wrap { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast {
  background: #1d1d1f;
  color: #fff;
  padding: 10px 14px;
  border-radius: 11px;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  animation: tin .18s ease;
}
html[data-theme="dark"] .toast { background: #2f2f34; }
@keyframes tin { from { opacity: 0; transform: translateY(6px); } }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--bordure);
  background: var(--carte);
  border-radius: 10px;
  padding: 7px 11px;
  min-width: 220px;
}
.search svg { width: 15px; height: 15px; color: var(--texte-3); }
.search input { border: none; outline: none; background: transparent; width: 100%; font-size: 13px; }

.theme-row { display: flex; gap: 8px; }
.theme-opt {
  flex: 1;
  border: 1.5px solid var(--bordure);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 550;
  background: var(--carte);
}
.theme-opt.on { border-color: var(--accent); color: var(--accent); background: var(--accent-doux); }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }

/* ------------------------------- depot apk ------------------------------- */

.drop {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1.5px dashed var(--bordure-forte);
  border-radius: 13px;
  cursor: pointer;
  background: var(--carte-2);
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-doux); }
.drop-ic { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex: none; }
.drop-ic-ph {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--carte);
  border: 1px solid var(--bordure);
  color: var(--texte-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.drop-ic-ph svg { width: 20px; height: 20px; }

/* ------------------------------- ecran direct ------------------------------- */

.live-wrap { display: flex; flex-direction: column; align-items: center; }
.live-frame {
  position: relative;
  width: 100%;
  max-width: 400px;
  min-height: 380px;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  cursor: crosshair;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  touch-action: none;
}
.live-frame img { width: 100%; min-height: 380px; display: block; object-fit: contain; }
.live-nodes { position: absolute; inset: 0; pointer-events: none; }
.live-nodes .nd {
  position: absolute;
  border: 1px solid rgba(10, 132, 255, .8);
  background: rgba(10, 132, 255, .16);
  border-radius: 3px;
  overflow: hidden;
}
.live-nodes .nd span {
  display: block;
  font-size: 9px;
  line-height: 1.15;
  color: #fff;
  padding: 1px 2px;
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-wait {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  font-size: 13px;
}
.live-wait.ko {
  padding: 26px;
  text-align: center;
  line-height: 1.55;
  background: #14171c;
  font-size: 13.5px;
}
.live-curtain {
  position: absolute;
  inset: 0;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.live-spin {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: #fff;
  animation: lspin .8s linear infinite;
}
@keyframes lspin { to { transform: rotate(360deg); } }
.warn {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  background: var(--orange-doux);
  color: var(--orange);
  font-size: 13px;
}
.lock-card {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: var(--carte-2);
  border: 1px solid var(--bordure);
}
.lock-card .lock-txt { flex: 1; min-width: 150px; }
.mic-box { max-width: 520px; }
.mic-buttons { display: flex; gap: 10px; margin-bottom: 14px; }
.mic-level {
  height: 14px;
  border-radius: 100px;
  background: var(--carte-2);
  border: 1px solid var(--bordure);
  overflow: hidden;
  margin-bottom: 10px;
}
.mic-level > div {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #19a35a, #f0a500);
  transition: width .12s linear;
}

/* reconstruction d'ecran */
.live-frame.recon { background: #f3f5f9; }
.live-nodes .nd2 {
  position: absolute;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: 4px;
  line-height: 1.15;
}
.live-nodes .nd2 span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1px 2px;
}
.live-nodes .nd2.tx {
  color: #21252b;
  background: transparent;
}
.live-nodes .nd2.btn {
  background: #fff;
  border: 1px solid #d3d9e3;
  color: #14508f;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.live-nodes .nd2.fld {
  background: #fff;
  border: 1px solid #b9c3d2;
  color: #21252b;
  display: flex;
  align-items: center;
}
.live-nodes .nd2.chk {
  background: #fff;
  border: 1px solid #d3d9e3;
  color: #21252b;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 3px;
}
.live-nodes .nd2.chk.on { border-color: #19a35a; }
.live-nodes .nd2.chk i {
  font-style: normal;
  color: #19a35a;
  font-weight: 700;
}
.live-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, .68);
  color: #fff;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
}
.live-tools { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

/* ------------------------------- telephone ------------------------------- */

@media (max-width: 1000px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .build-layout, .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-102%);
    transition: transform .22s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, .18);
  }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid var(--bordure);
    background: var(--carte);
    cursor: pointer;
  }
  .view { padding: 4px 16px 40px; }
  .topbar { padding: 0 16px; }
  .cards-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 23px; }
  .tbl th:nth-child(4), .tbl td:nth-child(4) { display: none; }
  .tbl th:nth-child(2), .tbl td:nth-child(2) { display: none; }
  .chart-lbl { display: none; }
  .live-frame { max-width: 100%; }
  .topbar .pill { max-width: calc(100vw - 190px); }
  .chat { flex-wrap: wrap; }
  .chat .who { min-width: 0; }
  .chat .txt { flex-basis: 100%; }
}
