/* BRM Remote — page de compte. S'appuie sur les variables de brm-remote.css. */

[hidden] { display: none !important; }

.account { max-width: 460px; margin: 28px auto 0; }
.account h2 { margin: 0 0 10px; font-size: 1.25rem; }
.account h3 { margin: 22px 0 8px; font-size: 1rem; }
.lead { margin: 0 0 16px; color: var(--muted); font-size: .95rem; }
.center { text-align: center; margin: 14px 0 0; }

.tabs {
  display: flex; gap: 6px; padding: 5px; margin-bottom: 22px;
  background: var(--bg); border-radius: 14px;
}
.tabs button {
  flex: 1; min-height: 44px; padding: 8px 6px; white-space: nowrap;
  font: 600 .9rem/1 var(--font); color: var(--muted);
  background: transparent; border: 0; border-radius: 10px; cursor: pointer;
}
.tabs button[aria-selected="true"] {
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 4px rgba(20, 40, 70, .18);
}

.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 6px; font-weight: 500; font-size: .9rem; }
.field input {
  width: 100%; padding: 13px 14px;
  font: 500 1rem var(--font); color: var(--text);
  background: var(--bg); border: 2px solid var(--border); border-radius: 12px;
}
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(56, 132, 222, .25); }
.hint-text { margin: 6px 0 0; color: var(--muted); font-size: .82rem; }

.check { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 4px; font-size: .88rem; color: var(--muted); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); }
.check.consent { margin-top: 12px; }

.link-btn {
  padding: 8px 4px; font: 500 .9rem var(--font); color: var(--link);
  background: none; border: 0; text-decoration: underline; cursor: pointer;
}

.alert {
  max-width: 460px; margin: 22px auto 0; padding: 13px 16px;
  font-size: .92rem; background: var(--surface);
  border: 1.5px solid var(--border); border-left-width: 5px; border-radius: 12px;
}
.alert.ok { border-left-color: var(--ok); }
.alert.error { border-left-color: var(--danger); }
.alert.info { border-left-color: var(--accent); }

.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); }
.btn.danger:hover { background: rgba(211, 58, 58, .08); }
.btn.danger:disabled, .btn.ghost:disabled { opacity: .55; cursor: default; }

.devices { list-style: none; margin: 0 0 18px; padding: 0; }
.devices li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.devices li:last-child { border-bottom: 0; }
.devices .dev-name { font-weight: 600; }
.devices .dev-meta { display: block; color: var(--muted); font-size: .8rem; }
.devices .badge {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; color: #fff; background: var(--ok); vertical-align: middle;
}
.devices .btn { min-height: 38px; padding: 6px 12px; font-size: .82rem; flex: none; }

.danger-zone { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border); }
.danger-zone summary { cursor: pointer; font-weight: 600; color: var(--danger); }
.danger-zone .lead { margin-top: 12px; }

.diag { list-style: none; margin: 0 0 8px; padding: 0; }
.diag li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.diag li:last-child { border-bottom: 0; }
.diag .mark { flex: none; width: 1.4em; font-weight: 700; }
.diag .good .mark { color: var(--ok); }
.diag .bad .mark { color: var(--danger); }
.diag .warn .mark { color: var(--warn); }
.diag small { display: block; color: var(--muted); }
code { font-size: .85em; }

/* ---- Page smartphone : liste des tablettes, ancien mode ------------------ */
a.btn, a.btn:hover { text-decoration: none; }
.connect .devices { text-align: left; margin-bottom: 8px; }
.devices .badge.off { background: var(--muted); }
.devices .dev-name { display: block; }
.links-row { margin: 10px 0 0 !important; color: var(--muted); font-size: .9rem; }
.links-row .link-btn { font-size: .9rem; }
.legacy details { text-align: left; }
.legacy summary { cursor: pointer; color: var(--muted); font-size: .9rem; text-align: center; }
.legacy details[open] summary { margin-bottom: 14px; }
.legacy p { text-align: center; }
.btn.link-like { margin-top: 12px; }

/* ---- Tablette arrêtée ou injoignable : image grisée, voyant orange -------- */
body.lost #screenImg { opacity: .3; pointer-events: none; }
body.lost .status { color: var(--warn); font-weight: 600; }
body.lost .status::before { background: var(--warn); animation: pulse 1.2s ease-in-out infinite; }
body.lost .hint { display: none; }

/* ---- Plein écran : toute la zone (image + avertissement) ------------------ */
#screenWrap:fullscreen, #screenWrap:-webkit-full-screen {
  display: flex; align-items: center; justify-content: center;
  width: 100vw; height: 100vh; background: #000; border: 0; border-radius: 0;
}
#screenWrap:fullscreen #screenImg, #screenWrap:-webkit-full-screen #screenImg {
  width: 100vw; height: 100vh; max-height: none; object-fit: contain; background: #000;
}
.fs-alert { display: none; }
#screenWrap:fullscreen .fs-alert:not([hidden]), #screenWrap:-webkit-full-screen .fs-alert:not([hidden]) {
  display: block; position: absolute; z-index: 5;
  top: 12px; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 12px;
  padding: 14px 16px; border-radius: 14px; text-align: center;
  font: 600 1rem/1.35 var(--font); color: #fff; background: rgba(176, 94, 0, .96);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.fs-alert button {
  display: block; margin: 10px auto 0; padding: 9px 16px; min-height: 40px;
  font: 600 .9rem var(--font); color: #fff; background: transparent;
  border: 1.5px solid rgba(255, 255, 255, .85); border-radius: 10px; cursor: pointer;
}

/* ---- Sécurité du compte ---------------------------------------------------- */
.settings { margin: 22px 0 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.settings summary { cursor: pointer; font-weight: 600; }
.settings form { margin: 16px 0; }
.settings > .btn { margin-top: 6px; }

/* ---- Champ piège anti-robots (invisible pour les humains) ----------------- */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---- État de l'envoi d'emails (administrateur) ---------------------------- */
.mail-status { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; font-size: .88rem; word-break: break-word; background: var(--bg); border: 1px solid var(--border); }
.mail-status.good { border-color: var(--ok); }
.mail-status.bad { border-color: var(--danger); color: var(--danger); }

/* ---- Forfait et statistiques --------------------------------------------- */
.plan-line { margin: -6px 0 16px; padding: 9px 12px; border-radius: 10px; font-size: .88rem; background: var(--bg); border: 1px solid var(--border); }
.mail-status { white-space: pre-line; }

.plan-line { white-space: pre-line; }
