:root {
  color-scheme: dark;
  --bg: #0b1726;
  --panel: #14263a;
  --blue: #2388e8;
  --text: #f2f6fb;
  --muted: #a9bacb;
  --border: #2b4056;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 25px 16px;
  padding-bottom: max(25px, env(safe-area-inset-bottom));
  background: radial-gradient(circle at top, #193550, var(--bg) 55%);
  color: var(--text);
  font-family: Arial, sans-serif;
}

.brand {
  text-align: center;
  margin: 12px auto 30px;
}

.logo {
  width: 54px;
  height: 54px;
  margin: auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--blue);
  font-size: 32px;
  font-weight: 900;
}

.brand h1 {
  margin: 9px 0 2px;
  letter-spacing: 3px;
}

.brand p, .switch, footer {
  color: var(--muted);
  font-size: 13px;
}

.container {
  width: 100%;
  max-width: 460px;
  margin: auto;
  padding: 25px 21px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 15px 45px #0005;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

h2 {
  font-size: 21px;
  text-align: center;
  margin: 5px 0 26px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  font-size: 13px;
  font-weight: bold;
  line-height: 1.5;
}

input {
  width: 100%;
  min-height: 49px;
  padding: 13px;
  color: white;
  background: #0b1929;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 14px;
  outline: none;
}

input:focus {
  border-color: var(--blue);
}

button {
  min-height: 49px;
  padding: 12px;
  border: 0;
  border-radius: 9px;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

form button {
  margin-top: 12px;
}

button:active {
  transform: scale(.99);
}

.switch {
  text-align: center;
  margin-top: 23px;
}

.textButton {
  display: block;
  width: 100%;
  min-height: 35px;
  margin-top: 8px;
  padding: 5px;
  background: transparent;
  color: #67b2ff;
}

.recoveryButton {
  width: 100%;
  background: transparent;
  border: 1px solid var(--blue);
  color: #75baff;
}

.backButton {
  margin-top: 15px;
}

.notice {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 20px 0;
}

.dashboardPlaceholder {
  margin-top: 25px;
  padding: 22px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.cameraIcon {
  font-size: 45px;
  color: #58aaff;
}

.dashboardPlaceholder p {
  color: var(--muted);
  font-size: 13px;
}

#message {
  margin-top: 18px;
  text-align: center;
  color: #ffc56a;
  font-size: 13px;
  line-height: 1.5;
}

footer {
  text-align: center;
  margin: 30px auto 10px;
}

@media (max-width: 360px) {
  .container {
    padding: 19px 15px;
  }
  h2 {
    font-size: 19px;
  }
}

/* Champs de code secret et commandes */
.secret-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.secret-row input {
  flex: 1;
  min-width: 0;
}

.secret-row .iconButton {
  flex: 0 0 52px;
  width: 52px;
  min-height: 49px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--border);
  background: #1b3854;
  font-size: 20px;
}

.secret-row .iconButton:disabled {
  opacity: .5;
  cursor: not-allowed;
}
