/* ==========================================================================
   e-Tibi Connect — Web responsive
   Système de design. Mobile-first, centré sur écran large.
   ========================================================================== */

:root {
  /* Marque ---------------------------------------------------------------- */
  --brand:        #15A8A8;   /* teal e-Tibi affiné */
  --brand-600:    #0E8E8E;
  --brand-700:    #0A6E6E;
  --brand-050:    #E6F6F6;
  --indigo:       #2563EB;   /* le bleu du dégradé d'entête */
  --gradient:     linear-gradient(135deg, #14A8A8 0%, #1488C8 52%, #2563EB 100%);
  --gradient-soft:linear-gradient(135deg, #19B3B3 0%, #2C7BD6 100%);

  /* Encre & surfaces ------------------------------------------------------ */
  --ink:          #0F1B2D;
  --ink-2:        #38465B;
  --muted:        #6B7A90;
  --faint:        #9AA7B8;
  --line:         #E7EDF1;
  --line-2:       #F0F4F7;
  --surface:      #FFFFFF;
  --bg:           #EEF3F6;
  --bg-2:         #F6F9FB;

  /* Accents sémantiques --------------------------------------------------- */
  --gold:         #F2A33C;   /* récompenses */
  --gold-050:     #FDF3E4;
  --green:        #18A862;
  --green-050:    #E6F6EE;
  --red:          #E5484D;
  --red-050:      #FCEBEC;
  --violet:       #7C5CFC;
  --violet-050:   #EFEBFF;

  /* Rayons & ombres ------------------------------------------------------- */
  --r-sm: 12px; --r: 16px; --r-lg: 22px; --r-xl: 28px; --r-pill: 999px;
  --sh-sm: 0 1px 2px rgba(15,27,45,.06), 0 1px 3px rgba(15,27,45,.04);
  --sh:    0 4px 16px rgba(15,27,45,.07), 0 1px 4px rgba(15,27,45,.04);
  --sh-lg: 0 18px 40px -12px rgba(16,57,90,.28);
  --sh-brand: 0 16px 34px -10px rgba(20,136,200,.5);

  /* Gabarit --------------------------------------------------------------- */
  --app-w: 460px;
  --pad: 18px;
  --nav-h: 66px;
  --top-h: 58px;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Plus Jakarta Sans', var(--font);
}

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overscroll-behavior-y: none;
}

/* Le « téléphone » : colonne centrée, fond clair sur desktop ---------------- */
.app {
  max-width: var(--app-w);
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}
@media (min-width: 540px) {
  body { background: #DCE6EC; padding: 22px 0; }
  .app {
    min-height: calc(100dvh - 44px);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 70px -24px rgba(13,42,66,.45);
    border: 1px solid rgba(255,255,255,.6);
  }
}

h1,h2,h3,h4 { font-family: var(--display); margin: 0; line-height: 1.2; letter-spacing: -.01em; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid rgba(37,99,235,.45); outline-offset: 2px; border-radius: 6px; }

/* ==========================================================================
   Barre supérieure
   ========================================================================== */
.topbar {
  height: var(--top-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 var(--pad);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar .tb-title { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.topbar .tb-sub { font-size: .72rem; color: var(--muted); margin-top: -2px; }
.topbar .spacer { flex: 1; }

.iconbtn {
  width: 40px; height: 40px; border-radius: var(--r-pill);
  display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--ink-2); position: relative; flex: none;
  transition: background .15s, transform .1s;
}
.iconbtn:active { transform: scale(.92); }
.iconbtn .dot {
  position: absolute; top: 7px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--surface);
}
.backbtn { background: var(--bg-2); }

/* Logo lockup -------------------------------------------------------------- */
.brand-lockup { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--gradient); color: #fff;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 1.15rem;
  box-shadow: var(--sh-brand);
}
.brand-name { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; font-size: 1.15rem; }
.brand-name b { color: var(--brand-600); }

/* ==========================================================================
   Zone défilante + bottom nav
   ========================================================================== */
.scroll {
  flex: 1;
  padding: var(--pad) var(--pad) calc(var(--nav-h) + 26px);
  overflow-y: auto;
}
.page-pad { padding-bottom: 26px; }

.bottomnav {
  position: sticky; bottom: 0; z-index: 30;
  height: var(--nav-h);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.navitem {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--faint); font-size: .68rem; font-weight: 600;
  position: relative; transition: color .15s;
}
.navitem svg { width: 23px; height: 23px; }
.navitem.active { color: var(--brand-600); }
.navitem.active::before {
  content: ''; position: absolute; top: 0; width: 26px; height: 3px;
  border-radius: 0 0 4px 4px; background: var(--brand);
}

/* ==========================================================================
   Carte d'identité (signature) — la carte de fidélité numérique
   ========================================================================== */
.idcard {
  background: var(--gradient);
  border-radius: var(--r-xl);
  padding: 20px;
  color: #fff;
  box-shadow: var(--sh-lg);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.idcard::before { /* halo lumineux */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 88% -10%, rgba(255,255,255,.35), transparent 55%),
    radial-gradient(90% 80% at -10% 110%, rgba(8,40,80,.4), transparent 60%);
}
.idcard::after { /* filigrane motif */
  content: ''; position: absolute; right: -40px; bottom: -50px; z-index: -1;
  width: 200px; height: 200px; border-radius: 50%;
  border: 30px solid rgba(255,255,255,.06);
}
.idcard .ic-top { display: flex; justify-content: space-between; align-items: flex-start; }
.idcard .ic-label { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; font-weight: 600; }
.idcard .ic-chip {
  width: 34px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, #FCE9B8, #E8B964);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
  position: relative;
}
.idcard .ic-chip::after {
  content: ''; position: absolute; inset: 6px 4px; border-radius: 3px;
  background-image: linear-gradient(90deg, rgba(0,0,0,.15) 1px, transparent 1px);
  background-size: 7px 100%;
}
.idcard .ic-balance { margin-top: 16px; display: flex; align-items: baseline; gap: 8px; }
.idcard .ic-points {
  font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1;
  letter-spacing: -.03em;
}
.idcard .ic-unit { font-size: .95rem; font-weight: 600; opacity: .85; }
.idcard .ic-fcfa {
  margin-top: 4px; font-size: .82rem; opacity: .85;
  display: inline-flex; align-items: center; gap: 6px;
}
.idcard .ic-fcfa .pelt {
  background: rgba(255,255,255,.18); border-radius: var(--r-pill);
  padding: 3px 10px; font-weight: 600;
}
.idcard .ic-foot {
  margin-top: 18px; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
}
.idcard .ic-holder .nm { font-family: var(--display); font-weight: 700; font-size: 1.02rem; }
.idcard .ic-holder .ph { font-size: .8rem; opacity: .82; font-variant-numeric: tabular-nums; margin-top: 2px; }
.idcard .ic-qr {
  background: #fff; border-radius: 14px; padding: 8px;
  width: 92px; height: 92px; flex: none;
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
  display: grid; place-items: center;
}
.idcard .ic-qr svg, .idcard .ic-qr canvas { width: 100%; height: 100%; }
.idcard .ic-qr.big { width: 220px; height: 220px; margin: 4px auto 0; }

.idcard .ic-actions { display: flex; gap: 10px; margin-top: 16px; }
.idcard .ic-actions .btn-glass {
  flex: 1; background: rgba(255,255,255,.16); color: #fff;
  border: 1px solid rgba(255,255,255,.22); border-radius: var(--r-pill);
  padding: 11px; font-weight: 600; font-size: .86rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: background .15s, transform .1s;
}
.idcard .ic-actions .btn-glass:active { transform: scale(.97); background: rgba(255,255,255,.26); }
.idcard .ic-actions .btn-glass svg { width: 17px; height: 17px; }

/* ==========================================================================
   Bandeau « Mon espace pro »
   ========================================================================== */
.pro-banner {
  display: flex; align-items: center; gap: 13px;
  background: linear-gradient(120deg, #0E3A55, #16567E);
  color: #fff; border-radius: var(--r-lg); padding: 14px 16px;
  margin-bottom: 16px; box-shadow: var(--sh);
}
.pro-banner .pb-ic {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: rgba(255,255,255,.14); display: grid; place-items: center;
}
.pro-banner .pb-ic svg { width: 22px; height: 22px; }
.pro-banner .pb-txt { flex: 1; }
.pro-banner .pb-txt .t { font-weight: 700; font-family: var(--display); display: flex; align-items: center; gap: 6px; }
.pro-banner .pb-txt .s { font-size: .76rem; opacity: .82; }
.pro-banner .chev { opacity: .8; }
.verif { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #2ED3A4; color: #06321f; }
.verif svg { width: 10px; height: 10px; }

/* ==========================================================================
   Grille de modules
   ========================================================================== */
.section-h { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 12px; }
.section-h h2 { font-size: 1rem; font-weight: 700; }
.section-h .link { color: var(--brand-600); font-size: .82rem; font-weight: 600; }
.section-h:first-child { margin-top: 6px; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px 14px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--sh-sm); transition: transform .12s, box-shadow .15s;
  position: relative; overflow: hidden;
}
.tile:active { transform: translateY(1px) scale(.99); }
.tile .t-ic {
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center;
}
.tile .t-ic svg { width: 24px; height: 24px; }
.tile .t-name { font-weight: 700; font-size: .92rem; font-family: var(--display); }
.tile .t-meta { font-size: .76rem; color: var(--muted); margin-top: -4px; }
.tile .t-badge {
  position: absolute; top: 12px; right: 12px;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill);
  background: var(--red); color: #fff; font-size: .7rem; font-weight: 700;
  display: grid; place-items: center;
}
/* couleurs d'icônes par module */
.ic-loyalty { background: var(--brand-050); color: var(--brand-700); }
.ic-presence { background: #E9F0FE; color: var(--indigo); }
.ic-cotis    { background: var(--violet-050); color: var(--violet); }
.ic-reward   { background: var(--gold-050); color: #C97E12; }
.ic-parr     { background: var(--green-050); color: var(--green); }
.ic-wallet   { background: var(--brand-050); color: var(--brand-700); }

/* ==========================================================================
   Cartes & listes génériques
   ========================================================================== */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}
.card.pad { padding: 16px; }
.card + .card { margin-top: 12px; }

.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px; border-bottom: 1px solid var(--line-2);
}
.row:last-child { border-bottom: none; }
.row .r-ic {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
}
.row .r-ic svg { width: 20px; height: 20px; }
.row .r-main { flex: 1; min-width: 0; }
.row .r-title { font-weight: 600; font-size: .92rem; }
.row .r-sub { font-size: .78rem; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .r-amt { font-family: var(--display); font-weight: 700; font-size: .96rem; font-variant-numeric: tabular-nums; text-align: right; flex: none; }
.r-amt.plus { color: var(--green); }
.r-amt.minus { color: var(--red); }
.r-amt.expire { color: var(--faint); }
.row .r-time { font-size: .72rem; color: var(--faint); margin-top: 2px; text-align: right; }
.row.tap { transition: background .12s; }
.row.tap:active { background: var(--bg-2); }
.chev-s { color: var(--faint); flex: none; }

/* Badges / pastilles ------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--r-pill);
  font-size: .72rem; font-weight: 600;
}
.badge.ok    { background: var(--green-050); color: #0B6E42; }
.badge.warn  { background: var(--gold-050); color: #9A5B00; }
.badge.late  { background: var(--red-050); color: #B11D22; }
.badge.muted { background: var(--bg); color: var(--muted); }
.badge.brand { background: var(--brand-050); color: var(--brand-700); }
.badge .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Barre de progression ----------------------------------------------------- */
.progress { height: 8px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--gradient-soft); transition: width .8s cubic-bezier(.2,.8,.2,1); }

/* Stat tuiles -------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 13px 10px; text-align: center; box-shadow: var(--sh-sm); }
.stat .v { font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.stat .k { font-size: .68rem; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .04em; }

/* Avatar ------------------------------------------------------------------- */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: #fff;
  background: var(--gradient);
}
.avatar.lg { width: 72px; height: 72px; font-size: 1.5rem; }

/* ==========================================================================
   Boutons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 15px 18px; border: none; border-radius: var(--r);
  font-weight: 700; font-size: .95rem; font-family: var(--display);
  transition: transform .1s, box-shadow .15s, opacity .15s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--sh-brand); }
.btn-ghost { background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.btn-soft { background: var(--brand-050); color: var(--brand-700); }
.btn-danger { background: var(--red-050); color: var(--red); }
.btn svg { width: 18px; height: 18px; }
.btn-sm { padding: 9px 14px; font-size: .82rem; border-radius: var(--r-pill); width: auto; }

/* ==========================================================================
   États vides
   ========================================================================== */
.empty {
  text-align: center; padding: 40px 24px; color: var(--muted);
}
.empty .em-ic {
  width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 16px;
  background: var(--bg); display: grid; place-items: center; color: var(--faint);
}
.empty .em-ic svg { width: 32px; height: 32px; }
.empty h3 { font-size: 1.02rem; color: var(--ink); margin-bottom: 6px; }
.empty p { font-size: .86rem; max-width: 26ch; margin: 0 auto; }
.empty .btn { margin-top: 18px; max-width: 220px; }

/* ==========================================================================
   AUTH — écrans de connexion
   ========================================================================== */
.auth {
  flex: 1; display: flex; flex-direction: column;
  padding: 30px var(--pad) calc(var(--pad) + env(safe-area-inset-bottom));
  min-height: 100dvh;
}
.auth-logo { text-align: center; margin: 14px 0 8px; }
.auth-logo .brand-mark { width: 56px; height: 56px; border-radius: 16px; font-size: 1.9rem; margin: 0 auto 12px; }
.auth-logo .brand-name { font-size: 1.7rem; }
.auth-logo .tag { font-size: .78rem; color: var(--muted); margin-top: 4px; letter-spacing: .02em; }

.auth-head { text-align: center; margin: 24px 0 22px; }
.auth-head h1 { font-size: 1.4rem; }
.auth-head p { color: var(--muted); font-size: .9rem; margin: 8px auto 0; max-width: 30ch; }

/* Champ téléphone ---------------------------------------------------------- */
.phone-field {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r-lg); padding: 4px 16px; height: 64px;
  box-shadow: var(--sh-sm); transition: border-color .15s, box-shadow .15s;
}
.phone-field.focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-050); }
.phone-field .cc { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.phone-field .cc .flag { font-size: 1.3rem; }
.phone-field .sep { width: 1px; height: 26px; background: var(--line); }
.phone-field .num {
  flex: 1; font-size: 1.35rem; font-weight: 600; letter-spacing: .06em;
  font-variant-numeric: tabular-nums; color: var(--ink); min-width: 0;
  font-family: var(--display);
}
.phone-field .num .ph-ph { color: var(--faint); }
.phone-field .caret { width: 2px; height: 26px; background: var(--brand); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Pavé OTP ----------------------------------------------------------------- */
.otp-boxes { display: flex; gap: 10px; justify-content: center; margin: 8px 0 6px; }
.otp-boxes .ob {
  flex: 1; max-width: 52px; height: 62px;
  border: 1.5px solid var(--line); border-radius: var(--r);
  background: var(--surface); display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 1.6rem; color: var(--ink);
  box-shadow: var(--sh-sm); transition: border-color .15s, box-shadow .15s, transform .1s;
}
.otp-boxes .ob.filled { border-color: var(--brand); }
.otp-boxes .ob.active { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-050); }
.otp-hidden { position: absolute; opacity: 0; pointer-events: none; }

.dev-code {
  margin: 14px auto 0; text-align: center; font-size: .82rem;
  background: var(--gold-050); color: #8A5400; border: 1px dashed #E2B873;
  border-radius: var(--r); padding: 10px 14px; max-width: 320px;
}
.dev-code b { font-family: var(--display); letter-spacing: .3em; font-size: 1.1rem; }

.resend { text-align: center; margin-top: 18px; font-size: .85rem; color: var(--muted); }
.resend b { color: var(--brand-600); }
.resend .link { color: var(--brand-600); font-weight: 600; }

/* Pavé PIN points ---------------------------------------------------------- */
.pin-dots { display: flex; gap: 16px; justify-content: center; margin: 10px 0 4px; }
.pin-dots .pd {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--line); transition: all .15s;
}
.pin-dots .pd.on { background: var(--brand); border-color: var(--brand); transform: scale(1.05); }
.pin-dots.err .pd { border-color: var(--red); animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-7px)} 40%,80%{transform:translateX(7px)} }

/* Clavier numérique -------------------------------------------------------- */
.keypad {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-top: auto; padding-top: 22px; max-width: 360px;
  margin-left: auto; margin-right: auto; width: 100%;
}
.key {
  height: 62px; border: none; background: transparent;
  font-family: var(--display); font-size: 1.7rem; font-weight: 600; color: var(--ink);
  border-radius: var(--r); display: grid; place-items: center;
  transition: background .12s, transform .08s;
}
.key:active { background: var(--brand-050); transform: scale(.94); }
.key.fn { color: var(--muted); }
.key.fn svg { width: 26px; height: 26px; }
.key.empty { pointer-events: none; }

.field-msg { text-align: center; font-size: .83rem; margin-top: 14px; min-height: 20px; }
.field-msg.err { color: var(--red); }
.field-msg.ok { color: var(--green); }

/* Champ texte simple (nom) ------------------------------------------------- */
.text-field {
  width: 100%; height: 58px; padding: 0 18px;
  border: 1.5px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); font-size: 1.05rem; font-family: var(--font);
  color: var(--ink); box-shadow: var(--sh-sm);
}
.text-field:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-050); outline: none; }
.label { font-size: .8rem; font-weight: 600; color: var(--ink-2); margin: 0 2px 8px; display: block; }

/* Bandeau de réassurance --------------------------------------------------- */
.reassure { display: flex; align-items: center; gap: 8px; justify-content: center;
  color: var(--faint); font-size: .76rem; margin-top: 16px; }
.reassure svg { width: 14px; height: 14px; }

/* Toast -------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--r-pill);
  font-size: .86rem; font-weight: 600; box-shadow: var(--sh-lg); z-index: 90;
  opacity: 0; transition: opacity .25s, transform .25s; max-width: 90%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Modale QR plein écran ----------------------------------------------------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(10,24,40,.55); z-index: 80;
  display: none; align-items: flex-end; justify-content: center; backdrop-filter: blur(2px);
}
.sheet-backdrop.show { display: flex; }
.sheet {
  width: 100%; max-width: var(--app-w); background: var(--surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 10px 22px calc(26px + env(safe-area-inset-bottom));
  box-shadow: var(--sh-lg); animation: sheetup .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes sheetup { from { transform: translateY(100%); } }
.sheet .grab { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 16px; }
.sheet h3 { text-align: center; font-size: 1.1rem; }
.sheet .sub { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.qr-stage {
  margin: 20px auto; width: 240px; height: 240px; padding: 14px;
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh);
  border: 1px solid var(--line); display: grid; place-items: center;
}
.qr-stage svg, .qr-stage canvas { width: 100%; height: 100%; }

/* Animations d'entrée ------------------------------------------------------ */
.rise { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
.rise-1 { animation-delay: .04s; } .rise-2 { animation-delay: .1s; }
.rise-3 { animation-delay: .16s; } .rise-4 { animation-delay: .22s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== Spinner global (boutons) ===== */
.spin{width:16px;height:16px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;display:inline-block;animation:sp .6s linear infinite;vertical-align:-3px}
@keyframes sp{to{transform:rotate(360deg)}}
select.text-field{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7A90' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center;padding-right:44px}

/* ===== Espace pro ===== */
.pro-hero{position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(135deg,#0E3A55,#16567E);color:#fff;border-radius:var(--r-xl);padding:20px;box-shadow:var(--sh-lg)}
.pro-hero::before{content:'';position:absolute;inset:0;z-index:-1;background:radial-gradient(120% 90% at 88% -10%,rgba(255,255,255,.18),transparent 55%),radial-gradient(90% 80% at -10% 120%,rgba(0,0,0,.25),transparent 60%)}
.pro-hero::after{content:'';position:absolute;right:-40px;bottom:-50px;z-index:-1;width:190px;height:190px;border-radius:50%;border:28px solid rgba(255,255,255,.05)}
.pro-hero .lbl{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;opacity:.78;font-weight:600}
.pro-hero .biz{font-family:var(--display);font-weight:800;font-size:1.4rem;margin-top:4px;letter-spacing:-.02em;line-height:1.1}
.pro-hero .meta{font-size:.82rem;opacity:.85;margin-top:3px}
.hero-edit{flex:none;width:40px;height:40px;border-radius:var(--r-pill);display:grid;place-items:center;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.22);color:#fff;transition:background .15s,transform .1s}
.hero-edit:active{transform:scale(.92);background:rgba(255,255,255,.28)}
.hero-edit svg{width:18px;height:18px}
.pro-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}
.pro-act{display:flex;flex-direction:column;gap:9px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.22);border-radius:var(--r);padding:15px;color:#fff;font-weight:700;font-size:.92rem;font-family:var(--display);box-shadow:inset 0 1px 0 rgba(255,255,255,.12);transition:transform .1s,background .15s}
.pro-act svg{width:24px;height:24px}
.pro-act:active{transform:scale(.98);background:rgba(255,255,255,.2)}
.bignum{font-family:var(--display);font-weight:800;font-size:2rem;line-height:1;letter-spacing:-.02em}

/* Bouton flottant de scan (client) */
.fab-scan{position:fixed;right:calc(50% - var(--app-w)/2 + 18px);bottom:calc(var(--nav-h) + 18px);z-index:40;
  width:58px;height:58px;border-radius:50%;background:var(--gradient);color:#fff;border:none;
  display:grid;place-items:center;box-shadow:var(--sh-brand)}
.fab-scan svg{width:26px;height:26px}
@media (max-width:540px){.fab-scan{right:18px}}
.iconbtn.big{width:46px;height:46px;font-size:1.4rem;font-weight:700}

/* ===== Logo (image) ===== */
.brand-logo{height:34px;width:auto;display:block}
.auth-logo-img{width:210px;max-width:72%;height:auto;margin:0 auto 8px;display:block}

/* ===== Inscription : photo + cases ===== */
.avatar-pick{display:flex;align-items:center;gap:14px;margin:10px 0 4px}
.avatar-drop{width:72px;height:72px;border-radius:50%;flex:none;border:2px dashed var(--line);background:var(--bg-2);display:grid;place-items:center;color:var(--faint);overflow:hidden;position:relative;cursor:pointer;transition:border-color .15s}
.avatar-drop:active{border-color:var(--brand)}
.avatar-drop img{width:100%;height:100%;object-fit:cover}
.avatar-drop svg{width:30px;height:30px}
.check-row{display:flex;align-items:flex-start;gap:11px;margin:18px 2px 8px;cursor:pointer}
.check-row input{position:absolute;opacity:0;width:0;height:0}
.check-box{flex:none;width:24px;height:24px;border-radius:7px;border:2px solid var(--line);display:grid;place-items:center;color:#fff;transition:all .15s;margin-top:1px}
.check-box svg{width:15px;height:15px;opacity:0;transition:opacity .12s}
.check-row input:checked + .check-box{background:var(--brand);border-color:var(--brand)}
.check-row input:checked + .check-box svg{opacity:1}
.check-row input:focus-visible + .check-box{box-shadow:0 0 0 4px var(--brand-050)}
.check-text{font-size:.86rem;color:var(--ink-2);line-height:1.45}

/* Case CGU : zones cliquables */
.check-box{cursor:pointer;-webkit-tap-highlight-color:transparent}
#termsLabel{cursor:pointer}
.btn:disabled,.btn[disabled]{opacity:.5;filter:saturate(.7);cursor:not-allowed}
