/* Accès famille — palette, typographies et verre repris de Jarvis Drive
   (jarvis/deploy/jarvis-drive/app/static/style.css, lignes 1-23). Pensé pour téléphone d'abord,
   texte de 18 px, gros boutons : lisible par des grands-parents. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/static/fonts/inter-latin.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url(/static/fonts/jetbrainsmono-latin.woff2) format("woff2"); }

:root {
  --bg: #0b0c0e;
  --glass-surface: rgba(22, 24, 29, 0.78);
  --glass-pill: rgba(255, 255, 255, 0.06);
  --glass-hover: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --text-primary: #f2f4f7;
  --text-secondary: #8c93a0;
  --text-muted: #565d6a;
  --accent: #ffffff;
  --violet: #5b4fe9;
  --bleu: #2b84ea;
  --rose: #df5b7e;
  --vert: #34d399;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background-color: var(--bg); color: var(--text-primary); font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased; font-size: 18px; line-height: 1.55; min-height: 100vh;
  overflow-x: hidden;
}
.mono { font-family: var(--font-mono); }
.bg-glow { position: fixed; width: 650px; height: 650px; border-radius: 50%; filter: blur(120px);
  opacity: 0.15; pointer-events: none; z-index: 0; }
.bg-glow-1 { top: -150px; left: 15%; background: radial-gradient(circle, #5b4fe9, #2b84ea); }
.bg-glow-2 { bottom: -180px; right: 20%; background: radial-gradient(circle, #df5b7e, #f1935c); }

.verre { background: var(--glass-surface); border: 1px solid var(--border); border-radius: 18px;
  backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%); }

/* ------------------------------------------------------------- mise en page */
.page { position: relative; z-index: 1; max-width: 560px; margin: 0 auto;
  padding: 20px 16px 36px; display: flex; flex-direction: column; gap: 16px; }
.marque { display: flex; align-items: center; gap: 12px; padding: 2px 4px 4px; }
.marque img { width: 40px; height: 40px; flex-shrink: 0; }
.marque-nom { font-weight: 600; font-size: 19px; letter-spacing: -0.02em; line-height: 1.2; }
.marque-nom .fin { color: var(--text-secondary); font-weight: 500; }
.marque-sous { font-size: 14px; color: var(--text-secondary); line-height: 1.3; }
.carte { padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.centre { text-align: center; align-items: center; }
h1 { font-size: 28px; line-height: 1.2; letter-spacing: -0.03em; font-weight: 600; }
h2 { font-size: 21px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 600; }
p { color: #d7dbe2; }
p strong { color: #fff; }
.grand { font-size: 19px; }
.aide { color: var(--text-secondary); font-size: 16px; }
.etiquette { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-secondary); }
.pied { margin-top: 8px; font-size: 13px; color: var(--text-muted); text-align: center; }

/* ------------------------------------------------------------- boutons */
.btn { font: 500 16px var(--font-ui); color: var(--text-primary); border: 1px solid var(--border);
  background: var(--glass-pill); border-radius: 999px; padding: 10px 16px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s, border-color .2s, transform .2s cubic-bezier(.16,1,.3,1); }
.btn:hover { background: var(--glass-hover); }
.btn:active { transform: scale(.98); }
.btn-grand { width: 100%; min-height: 58px; justify-content: center; text-align: center;
  font-size: 18px; padding: 14px 22px; white-space: normal; line-height: 1.25; }
.btn-plein { background: var(--accent); color: #0b0c0e; border-color: transparent; font-weight: 600; }
.btn-plein:hover { background: #dfe3ea; }
.btn-fantome { background: transparent; color: var(--text-secondary); }
.btn.copie { background: var(--vert); color: #0b0c0e; }
.btn:focus-visible, input:focus-visible, .choix a:focus-visible, .ligne-appareil:focus-visible {
  outline: 3px solid rgba(91, 79, 233, .8); outline-offset: 2px; }

/* ------------------------------------------------------------- adresse, code, menus */
.adresse { font-size: 17px; line-height: 1.4; color: #fff; background: rgba(0, 0, 0, .32);
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
  overflow-wrap: anywhere; word-break: break-all; -webkit-user-select: all; user-select: all; }
/* L'adresse passe à la ligne entière ; coupée seulement si elle est plus large que l'écran. */
.adresse-inline { font-family: var(--font-mono); font-size: 16px; color: #fff; display: inline-block;
  max-width: 100%; overflow-wrap: anywhere; }
.code { font-size: 30px; font-weight: 600; letter-spacing: .08em; color: #fff; }
.exemple { color: #fff; white-space: nowrap; }
.bloc-code { border-color: rgba(91, 79, 233, .45);
  background: linear-gradient(135deg, rgba(91,79,233,.18), rgba(43,132,234,.10)), var(--glass-surface); }
/* Libellé exact d'un menu de l'appli Tailscale (en anglais) : pastille violette. */
.menu { font-weight: 600; color: #fff; background: rgba(91, 79, 233, .28);
  border: 1px solid rgba(91, 79, 233, .55); border-radius: 8px; padding: 1px 7px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ------------------------------------------------------------- étapes */
.etapes { list-style: none; counter-reset: etape; display: flex; flex-direction: column; gap: 12px; }
.etapes li { counter-increment: etape; display: grid; grid-template-columns: 38px 1fr; gap: 14px;
  align-items: start; padding: 16px 16px 16px 14px; }
.etapes li::before { content: counter(etape); width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 18px; color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--bleu)); }
.etapes li > div { padding-top: 5px; color: #e4e7ec; }
.etapes.compactes li { padding: 4px 0; }

/* ------------------------------------------------------------- choix d'appareil */
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix a { font-size: 15px; color: var(--text-secondary); text-decoration: none; border-radius: 999px;
  border: 1px solid var(--border); background: var(--glass-pill); padding: 8px 13px; line-height: 1.2; }
.choix a.actif { color: #0b0c0e; background: #fff; border-color: #fff; font-weight: 600; }
.liste-appareils { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ligne-appareil { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; text-decoration: none;
  color: var(--text-primary); }
.ligne-appareil:hover { background: rgba(32, 35, 42, .85); }
.nom-appareil { font-weight: 600; font-size: 19px; }
.nom-appareil::after { content: " →"; color: var(--text-secondary); }
.ou { font-size: 15px; color: var(--text-secondary); }
.impossibles { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.impossibles li { color: #d7dbe2; font-size: 16px; padding-left: 22px; position: relative; }
.impossibles li::before { content: "✕"; position: absolute; left: 0; color: var(--rose); font-weight: 700; }
.recopie { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.recopie li { color: #d7dbe2; font-size: 16px; line-height: 1.5; padding-left: 22px; position: relative; }
.recopie li::before { content: "→"; position: absolute; left: 0; color: var(--text-secondary); }

/* ------------------------------------------------------------- formulaires */
.formulaire { display: flex; flex-direction: column; gap: 12px; width: 100%; }
input { font: 400 18px var(--font-ui); color: var(--text-primary); background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 14px 16px; width: 100%;
  min-height: 58px; }
input::placeholder { color: var(--text-muted); }
.saisie-code { font-family: var(--font-mono); font-size: 26px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; text-align: center; }
.message-erreur { color: #f38ba8; font-weight: 600; font-size: 17px; }

/* ------------------------------------------------------------- états */
.rond-ok { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  font-size: 40px; font-weight: 700; color: var(--vert); background: rgba(52, 211, 153, .14);
  border: 2px solid var(--vert); box-shadow: 0 0 40px rgba(52, 211, 153, .25); }
.rond-attente { width: 64px; height: 64px; border-radius: 50%; border: 4px solid rgba(255,255,255,.1);
  border-top-color: var(--violet); border-right-color: var(--bleu); animation: tourne 1.2s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }

@media (min-width: 640px) {
  .page { padding-top: 48px; }
  h1 { font-size: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
