* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  font-family: system-ui, -apple-system, "Google Sans", sans-serif;
  background: #FAFAF7;
  color: #1B1B1B;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: #6E6E6E; }
.hint { color: #6E6E6E; font-size: 14px; }
.hint.error { color: #C62828; }

.screen {
  min-height: 100vh;
  padding: 40px 24px;
  max-width: 860px;
  margin: 0 auto;
}

/* === Login === */

#screen-login { display: flex; flex-direction: column; justify-content: center; align-items: center; }

.hero { text-align: center; max-width: 560px; }

.hero h1 {
  font-size: 56px;
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: 24px;
}
.hero h1 .accent { color: #2E7D32; }

.tagline {
  font-size: 20px;
  line-height: 1.55;
  color: #4A4A4A;
  margin-bottom: 24px;
}

.benefit {
  font-size: 17px;
  line-height: 1.6;
  color: #4A4A4A;
  background: #F4F8F4;
  border-left: 3px solid #2E7D32;
  padding: 16px 20px;
  border-radius: 10px;
  text-align: left;
  margin: 0 auto 28px;
  max-width: 520px;
}
.benefit strong { color: #1B1B1B; }

.price {
  font-size: 18px;
  color: #2E7D32;
  font-weight: 600;
  margin-bottom: 40px;
}

#google-signin { display: flex; justify-content: center; margin-bottom: 16px; }

/* === Dashboard === */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.topbar h2 {
  font-size: 36px;
  font-weight: 500;
  margin-bottom: 4px;
}

.parents-section { margin-bottom: 48px; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h3 { font-size: 20px; font-weight: 500; }

.parents-list { display: flex; flex-direction: column; gap: 12px; }

.parent-card {
  background: #fff;
  border: 1px solid #EAEAE4;
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.parent-card.revoked { opacity: 0.5; }

.parent-info { flex: 1; min-width: 200px; }
.parent-info .name { font-size: 18px; font-weight: 500; margin-bottom: 4px; }
.parent-info .url { font-size: 13px; color: #6E6E6E; word-break: break-all; }

.parent-actions { display: flex; gap: 8px; }

.footer { margin-top: 40px; text-align: center; }
.link {
  background: none;
  border: none;
  color: #6E6E6E;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
}

/* === Buttons === */

.btn-green-sm {
  background: #2E7D32;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-green-sm:hover { background: #256528; }
.btn-green-sm:disabled { background: #A0A0A0; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: #2E7D32;
  border: 1px solid #2E7D32;
  padding: 11px 18px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.btn-ghost:hover { background: #EAF5EB; }

.btn-grey {
  background: #E0E0E0;
  color: #1B1B1B;
  border: none;
  padding: 12px 20px;
  border-radius: 24px;
  font-size: 15px;
  cursor: pointer;
}

.btn-danger {
  background: transparent;
  color: #C62828;
  border: 1px solid #E6BCBC;
  padding: 9px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
}
.btn-danger:hover { background: #FBEAEA; }

.btn-copy {
  background: #F0F0EC;
  border: none;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 13px;
  cursor: pointer;
}
.btn-copy:hover { background: #E6E6E0; }
.btn-copy.copied { background: #C8E6C9; }

/* === Modals === */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.modal-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.modal-card.wide { max-width: 540px; }

.modal-card h3 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 12px;
}

.modal-card p { margin-bottom: 16px; color: #4A4A4A; }

.modal-card input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid #D0D0C8;
  border-radius: 12px;
  margin-bottom: 16px;
  font-family: inherit;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.cred-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #F7F7F2;
  border-radius: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.cred-label {
  font-size: 13px;
  color: #6E6E6E;
  min-width: 40px;
  font-weight: 500;
}
.cred-value {
  flex: 1;
  font-size: 14px;
  color: #1B1B1B;
  font-family: ui-monospace, monospace;
  word-break: break-all;
  min-width: 150px;
}
.cred-value.big { font-size: 28px; letter-spacing: 4px; font-weight: 600; }

.warn {
  background: #FFF4E0;
  color: #8B5A00;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  margin: 16px 0;
}

/* === Error screen === */

#screen-error { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 24px; }
#screen-error h1 { font-size: 48px; color: #C62828; }
#error-message { font-size: 20px; color: #4A4A4A; max-width: 500px; }

/* Activation : ce que l'enfant voit de l'usage de son parent (jamais le contenu). */
.parent-info .usage { font-size: 13px; color: #6E6E6E; margin-top: 6px; }
.parent-info .usage.none { color: #B26A00; }
.hint.trial { margin-top: 14px; color: #2E7D32; }

/* Guide d'installation : une check-list posée à côté du téléphone. */
.setup-access { border: 1px solid #EAEAE4; border-radius: 14px; padding: 20px 24px; margin: 24px 0 32px; background: #fff; }
.setup-cred { display: flex; gap: 16px; align-items: baseline; margin-bottom: 8px; }
.setup-cred .label { width: 72px; font-size: 13px; color: #6E6E6E; flex: none; }
.setup-cred .value { font-size: 16px; word-break: break-all; }
.setup-cred .value.pin { font-size: 14px; color: #6E6E6E; }
.setup-send { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.setup-send a { text-decoration: none; display: inline-block; }
.setup-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.setup-step { border-top: 1px solid #EAEAE4; padding: 20px 0; }
.setup-step:last-child { border-bottom: 1px solid #EAEAE4; }
.step-head { display: flex; align-items: center; gap: 12px; }
.step-mark { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #C8C8C0; flex: none; counter-increment: step; display: grid; place-items: center; font-size: 12px; color: #6E6E6E; }
.step-mark::before { content: counter(step); }
.setup-step.done .step-mark { background: #2E7D32; border-color: #2E7D32; color: #fff; }
.setup-step.done .step-mark::before { content: "✓"; }
.setup-step.blocked .step-mark { border-color: #C62828; color: #C62828; }
.setup-step.warn .step-mark { border-color: #B26A00; color: #B26A00; }
.step-title { font-size: 18px; font-weight: 500; }
.setup-step.done .step-title { color: #6E6E6E; }
.step-at { margin-left: auto; font-size: 13px; color: #6E6E6E; white-space: nowrap; }
.step-alert { margin: 12px 0 0 34px; padding: 12px 16px; border: 1px solid #C62828; border-radius: 8px; color: #7F1D1D; font-size: 15px; line-height: 1.5; }
.setup-step.warn .step-alert { border-color: #B26A00; color: #5C3A00; }
.step-say, .step-sees { margin: 12px 0 0 34px; font-size: 15px; line-height: 1.5; }
.step-say .label, .step-sees .label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: #6E6E6E; margin-bottom: 2px; }
.setup-step.done .step-say, .setup-step.done .step-sees { display: none; }
.setup-step button { margin: 12px 0 0 34px; }
@media (max-width: 480px) { .step-alert, .step-say, .step-sees, .setup-step button { margin-left: 0; } }

.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.header-actions a { text-decoration: none; display: inline-block; }
