/* Polices hébergées ici (licence OFL) : aucun appel à Google. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600 700; font-display: swap; src: url(/static/fonts/bricolage-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600 700; font-display: swap; src: url(/static/fonts/bricolage-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/static/fonts/figtree-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/static/fonts/figtree-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }

/* Valeurs des maquettes validées. */
:root {
  --ground: #F3F7F9; --surface: #FFFFFF; --ink: #0F2233; --muted: #4A5D6E;
  --line: #EDF2F6; --edge: #D5DEE6; --input: #7C8C9A;
  --danger: #B42318; --danger-wash: #FEF3F2; --danger-edge: #F1B5AE;
  --ok: #1B6B3A; --ok-wash: #E7F5EC;
  --hydrup: #1E6FD9; --hydrup-wash: #E8F1FC;
  --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); }
body { font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
p { margin: 0; }
svg { flex-shrink: 0; }

.page { max-width: 480px; min-height: 100dvh; margin: 0 auto; padding: max(env(safe-area-inset-top), 12px) 20px max(env(safe-area-inset-bottom), 24px); display: flex; flex-direction: column; gap: 20px; }
main { flex: 1; display: flex; flex-direction: column; gap: 18px; }

/* En-tête : logo + langues (ou action) */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { height: 22px; width: auto; display: block; }
.langs { display: flex; align-items: center; gap: 2px; color: var(--muted); }
.langs a { min-width: 44px; min-height: 44px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.langs a[aria-current] { background: var(--surface); color: var(--ink); }

/* « Continuer vers Hydrup » */
.app-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: 16px; }
.app-card small { display: block; font-size: 13px; color: var(--muted); }
.app-card strong { display: block; font-size: 17px; font-weight: 600; }
.tile { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--surface); color: var(--ink); }
.tile-lg { width: 56px; height: 56px; border-radius: 16px; }
.tile-xl { width: 72px; height: 72px; border-radius: 22px; }
.tile-danger { background: var(--danger-wash); color: var(--danger); }
.tile-ink { background: var(--ink); color: #fff; }

/* Titres */
.intro { display: flex; flex-direction: column; gap: 8px; }
.intro-icon { gap: 14px; padding-top: 4px; }
h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 27px; line-height: 1.15; letter-spacing: -0.02em; }
h2 { margin: 0; font-size: 16px; font-weight: 600; }
h3 { margin: 0; font-size: 16px; font-weight: 600; }
.label { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.lead { font-size: 15px; line-height: 1.5; color: var(--muted); }
.lead strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.45; }
.center { text-align: center; }

/* Cartes et sections */
.card { background: var(--surface); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card-outline { border: 1.5px solid var(--edge); }
.card-danger { border: 1.5px solid var(--danger-edge); }
.card-danger h2 { color: var(--danger); }
.section { display: flex; flex-direction: column; gap: 10px; }
.section > h2 { padding: 0 4px; }

/* Formulaires */
form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 15px; font-weight: 600; }
.field input, .field select { width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--input); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
.field input:disabled { background: var(--ground); border-color: var(--edge); color: var(--muted); }
.field .hint { font-size: 14px; font-weight: 400; color: var(--muted); }
.code-input { letter-spacing: 8px; font-variant-numeric: tabular-nums; text-align: center; font-size: 22px !important; font-weight: 600; }
.checks { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; font-size: 15px; line-height: 1.45; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--ink); cursor: pointer; }
.check a { font-weight: 600; }

/* Boutons */
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; padding: 13px 18px; border: 0; border-radius: 14px; font: inherit; font-size: 16px; font-weight: 600; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { color: #fff; background: #1D3448; }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1.5px solid var(--edge); }
.btn-ghost { background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; background: #912018; }
.btn-danger-outline { background: var(--surface); color: var(--danger); border: 1.5px solid var(--danger-edge); }
.btn-danger-outline:hover { color: var(--danger); }
.btn-small { width: auto; min-height: 44px; padding: 8px 14px; font-size: 15px; border-radius: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions > * { flex: 1 1 140px; display: flex; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.push { margin-top: auto; }
.back { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 44px; padding-right: 8px; font-size: 15px; font-weight: 600; text-decoration: none; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Messages */
.alert { margin: 0; background: var(--danger-wash); color: var(--danger); border-radius: 14px; padding: 12px 14px; font-weight: 500; font-size: 15px; }
.notice { margin: 0; background: var(--ok-wash); color: var(--ok); border-radius: 14px; padding: 12px 14px; font-weight: 500; font-size: 15px; display: flex; gap: 8px; align-items: center; }

/* Listes à icône */
.icon-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.icon-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.icon-list li > svg { color: var(--muted); margin-top: 1px; }
.icon-list.danger li > svg { color: var(--danger); }
.kv { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.kv li { display: flex; gap: 12px; align-items: center; min-height: 40px; font-size: 15px; }
.kv li > span:first-of-type { flex: 1; min-width: 0; }
.kv li > span:last-child { font-size: 14px; color: var(--muted); text-align: right; overflow-wrap: anywhere; }

/* Attente du clic sur le lien */
.waiting { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 15px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); animation: pulse 1.4s ease-in-out infinite; flex-shrink: 0; }
@keyframes pulse { 50% { opacity: 0.25; } }

/* Autorisation : app ··· FirUP */
.pair { display: flex; align-items: center; gap: 10px; }
.pair-dots { display: flex; gap: 4px; color: var(--muted); }
.pair-dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Mon compte */
.who { display: flex; align-items: center; gap: 14px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 24px; flex-shrink: 0; }
.who h1 { font-size: 26px; }
.who span { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.app-head { display: flex; align-items: center; gap: 12px; }
.app-head > div { flex: 1; min-width: 0; }
.app-head small { display: block; font-size: 14px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--ok-wash); color: var(--ok); font-size: 13px; font-weight: 600; white-space: nowrap; }
.setting { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.setting p { font-size: 14px; color: var(--muted); }
.row-btn { display: flex; gap: 12px; align-items: flex-start; width: 100%; min-height: 52px; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.row-btn strong { display: block; font-size: 15px; font-weight: 600; }
.row-btn small { display: block; font-size: 14px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.row-btn.danger, .row-btn.danger strong { color: var(--danger); }

/* Pied de page */
.foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: 6px; font-size: 13px; color: var(--muted); }
.foot a { color: var(--muted); display: inline-flex; align-items: center; min-height: 32px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--hydrup); outline-offset: 2px; }
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--hydrup); outline-offset: 1px; border-color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
