:root {
  --brand: #6C4CE0;
  --brand-dark: #4A2FB8;
  --brand-soft: #EFEBFF;
  --accent: #00C2A8;
  --accent-soft: #E2FBF6;
  --ink: #1E1B2E;
  --ink-2: #4B4761;
  --muted: #8A87A0;
  --line: #E7E5F2;
  --bg: #F5F4FB;
  --card: #FFFFFF;
  --ok: #16A34A;
  --ok-soft: #E7F8EE;
  --warn: #D97706;
  --warn-soft: #FEF3E2;
  --danger: #DC2626;
  --danger-soft: #FDECEC;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 4px 16px rgba(30, 27, 46, .06);
  --shadow-lg: 0 14px 34px rgba(30, 27, 46, .12);
  --nav-h: 68px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.has-bottom-nav { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 16px); }

a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 8px; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 750; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 12px; }
small { color: var(--muted); }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 620px; }
.page { padding: 18px 0 24px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-12 { margin-bottom: 12px; }
.hide { display: none !important; }

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.app-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 8px 16px;
  max-width: 980px;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px; letter-spacing: -.5px;
}
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -.02em; white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: -3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 14px; padding: 12px 18px;
  font-size: 15px; font-weight: 650; font-family: inherit; cursor: pointer;
  background: var(--brand); color: #fff;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  text-align: center; line-height: 1.2;
}
.btn:active { transform: scale(.97); }
.btn-block { width: 100%; }
.btn-ghost { background: var(--brand-soft); color: var(--brand-dark); }
.btn-ghost:active { background: #E3DDFF; }
.btn-line { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-accent { background: var(--accent); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 8px 13px; font-size: 13.5px; border-radius: 11px; }
.btn-lg { padding: 15px 22px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-2); transition: transform .12s ease;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card + .card { margin-top: 14px; }
.card-list > * + * { margin-top: 12px; }
.card-tight { padding: 14px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px;
}
.stat .val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.stat .lbl { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.stat.brand { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); }
.stat.brand .val, .stat.brand .lbl { color: #fff; }
.stat.brand .lbl { opacity: .85; }

.item {
  display: flex; align-items: center; gap: 13px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; transition: transform .12s ease;
}
.item:active { transform: scale(.985); }
.item-ico {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  background: var(--brand-soft); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
}
.item-ico svg { width: 21px; height: 21px; }
.item-body { min-width: 0; flex: 1; }
.item-title { font-weight: 680; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-sub { font-size: 12.5px; color: var(--muted); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); white-space: nowrap;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-mute { background: #F0EFF6; color: var(--ink-2); }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 6px; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 13px;
  padding: 12px 14px; font-size: 15px; font-family: inherit; color: var(--ink);
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(108, 76, 224, .13);
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A87A0' stroke-width='2.4' stroke-linecap='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 12px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

.searchbar { position: relative; }
.searchbar input { padding-left: 42px; }
.searchbar svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav .inner {
  display: flex; align-items: stretch; justify-content: space-around;
  max-width: 980px; margin: 0 auto; height: var(--nav-h);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 650;
  transition: transform .12s ease, color .15s ease;
}
.bottom-nav a:active { transform: scale(.94); }
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a .pill {
  display: flex; align-items: center; justify-content: center;
  padding: 5px 14px; border-radius: 999px; transition: background .18s ease, color .18s ease;
}
.bottom-nav a.active { color: var(--brand-dark); }
.bottom-nav a.active .pill { background: var(--brand-soft); }
/* Administration : 7 onglets — on resserre pour que tout reste lisible sur mobile */
.bottom-nav.admin-nav a { font-size: 9.5px; gap: 2px; }
.bottom-nav.admin-nav a .pill { padding: 4px 9px; }
.bottom-nav.admin-nav a svg { width: 20px; height: 20px; }
.bottom-nav.admin-nav a.active { color: #4A2FB8; }
.bottom-nav.admin-nav a.active .pill { background: #EFEBFF; }

/* ---------- Hero / public ---------- */
.hero {
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 55%, #2E1A80 100%);
  color: #fff; padding: 44px 0 52px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,194,168,.45), transparent 70%);
  top: -120px; right: -110px;
}
.hero h1 { font-size: 30px; color: #fff; max-width: 15ch; }
.hero p { color: rgba(255,255,255,.88); font-size: 16px; max-width: 46ch; }
.hero .wrap { position: relative; z-index: 2; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,.16); padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.hero-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.hero-actions .btn-line { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.34); }

.section { padding: 30px 0; }
.section-head { margin-bottom: 16px; }
.section-head h2 { margin-bottom: 4px; }

.feature-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.feature {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
}
.feature .ficon {
  width: 44px; height: 44px; border-radius: 13px; background: var(--brand-soft); color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.feature .ficon svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 5px; }
.feature p { color: var(--ink-2); font-size: 14px; margin: 0; }

.steps { counter-reset: s; display: grid; grid-template-columns: 1fr; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.step .num {
  counter-increment: s; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.step .num::before { content: counter(s); }

.pricing { display: grid; grid-template-columns: 1fr; gap: 12px; }
.plan { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; border: 2px solid transparent; }
.plan.featured { border-color: var(--brand); }
.plan .price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.plan .price span { font-size: 14px; font-weight: 600; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 14px 0 0; }
.plan li { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; padding: 5px 0; color: var(--ink-2); }
.plan li svg { width: 17px; height: 17px; color: var(--accent); flex: none; margin-top: 3px; }

.footer {
  background: #fff; border-top: 1px solid var(--line); padding: 28px 0 34px; margin-top: 8px;
}
.footer .cols { display: grid; grid-template-columns: 1fr; gap: 20px; }
.footer a { color: var(--ink-2); font-size: 14px; display: block; padding: 3px 0; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.footer-bottom { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* ---------- Auth ---------- */
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; }
.auth-top {
  background: linear-gradient(150deg, var(--brand), var(--brand-dark)); color: #fff;
  padding: calc(34px + env(safe-area-inset-top, 0px)) 0 30px;
}
.auth-body { flex: 1; padding: 22px 0 40px; }
.auth-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 22px; margin-top: -26px; }

/* ---------- Microphone ---------- */
.mic-zone { text-align: center; padding: 8px 0 4px; }
.mic-btn {
  width: 104px; height: 104px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(145deg, var(--brand), var(--brand-dark)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px rgba(108,76,224,.35); position: relative;
  transition: transform .14s ease;
}
.mic-btn:active { transform: scale(.95); }
.mic-btn svg { width: 42px; height: 42px; }
.mic-btn.listening { background: linear-gradient(145deg, #FF5A6E, #D6142E); box-shadow: 0 12px 30px rgba(214,20,46,.35); }
.mic-btn.listening::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
  border: 3px solid rgba(214,20,46,.4); animation: pulse 1.6s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.92); opacity: .9; } 100% { transform: scale(1.22); opacity: 0; } }
.mic-wrap { display: inline-block; position: relative; }
.mic-label { margin-top: 14px; font-size: 14px; color: var(--ink-2); font-weight: 600; min-height: 21px; }

.transcript {
  background: var(--brand-soft); border-radius: var(--radius-sm); padding: 13px 15px;
  font-size: 13.5px; color: var(--ink-2); min-height: 46px; line-height: 1.5;
}
.transcript.empty { color: var(--muted); font-style: italic; }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-size: 12.5px; font-weight: 650; padding: 7px 12px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); border: 0; cursor: pointer;
  font-family: inherit; transition: transform .12s ease;
}
.chip:active { transform: scale(.95); }
.chip.on { background: var(--brand); color: #fff; }
.chip.accent { background: var(--accent-soft); color: #0B7A6B; }

/* ---------- Signature ---------- */
.sign-pad-wrap {
  border: 2px dashed var(--line); border-radius: var(--radius); background: #fff;
  padding: 6px; position: relative;
}
.sign-pad-wrap.ready { border-style: solid; border-color: var(--brand); }
canvas.sign-pad { width: 100%; height: 220px; display: block; border-radius: 12px; touch-action: none; }
.sign-line { position: absolute; left: 26px; right: 26px; bottom: 44px; border-bottom: 1px solid var(--line); pointer-events: none; }

/* ---------- Contract sheet ---------- */
.sheet {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 20px; font-size: 13.5px; line-height: 1.65; color: var(--ink);
}
.sheet h2 { font-size: 17px; text-align: center; margin-bottom: 4px; }
.sheet .sheet-head { display: flex; justify-content: center; margin-bottom: 14px; }
.sheet .sheet-logo { max-height: 62px; max-width: 210px; width: auto; object-fit: contain; }
.logo-preview {
  width: 96px; height: 96px; flex: none; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 6px;
}
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bandeau-verif {
  background: var(--warn-soft); border: 1px solid #F6DFBB;
  font-size: 13.5px; color: #8A5300;
}
.bandeau-verif button { color: var(--warn); background: rgba(255,255,255,.7); }
.sheet .sheet-sub { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.sheet .sheet-sec { margin-bottom: 16px; }
.sheet .sheet-sec h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-dark); margin-bottom: 7px; }
.sheet .kv { display: grid; grid-template-columns: 1fr; gap: 2px 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sheet .kv .k { color: var(--muted); font-size: 12px; }
.sheet .kv .v { font-weight: 620; }
.sheet .sign-box {
  margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 96px;
  display: flex; align-items: center; justify-content: center;
}
.sheet .sign-box img { max-height: 120px; }
.sheet .sign-typed { font-family: "Segoe Script", "Brush Script MT", cursive; font-size: 26px; color: var(--brand-dark); }

/* ---------- Table ---------- */
.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 11px 14px; background: #FBFAFF; color: var(--muted);
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; font-weight: 700;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .strong { font-weight: 650; }

/* ---------- Empty / toast / modal ---------- */
.empty { text-align: center; padding: 34px 20px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; margin-bottom: 10px; opacity: .5; }

.toast-host {
  position: fixed; left: 50%; transform: translateX(-50%); top: calc(14px + env(safe-area-inset-top, 0px));
  z-index: 200; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 32px); max-width: 420px;
  pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff; border-radius: 13px; padding: 12px 15px;
  font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-lg);
  animation: toastIn .22s ease; display: flex; align-items: center; gap: 9px;
}
.toast.ok { background: #0E9F6E; }
.toast.err { background: #D6314A; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

.sheet-modal {
  position: fixed; inset: 0; z-index: 150; background: rgba(22,18,44,.5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
}
.sheet-modal .panel {
  background: #fff; border-radius: 22px 22px 0 0; width: 100%; max-width: 560px;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px)); max-height: 90vh; overflow-y: auto;
  animation: sheetUp .24s ease;
}
@keyframes sheetUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-handle { width: 42px; height: 4px; border-radius: 99px; background: var(--line); margin: 0 auto 16px; }

/* ---------- Splash ---------- */
#app-splash {
  display: none; position: fixed; inset: 0; z-index: 99999; pointer-events: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
#app-splash.show { display: flex; animation: splashOut .4s ease 1.2s forwards; }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }
#app-splash .sp-name { color: #fff; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }

.install-zone { display: flex; flex-direction: column; gap: 10px; }
.install-note { font-size: 12.5px; color: var(--muted); }
.store-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff;
  border-radius: 12px; padding: 9px 14px; font-size: 12.5px; font-weight: 650;
}
.store-badge svg { width: 18px; height: 18px; }

/* ---------- Admin ---------- */
.admin-tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand-dark); background: var(--brand-soft); padding: 4px 9px; border-radius: 7px;
}
.gate {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 18px calc(24px + env(safe-area-inset-bottom, 0px));
}
/* ---------- Graphiques ---------- */
.chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 62px 1fr 34px; align-items: center; gap: 10px; }
.bar-lbl { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.bar-track {
  display: block; height: 10px; border-radius: 99px;
  background: var(--brand-soft); overflow: hidden;
}
.bar-fill {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  transition: width .5s ease;
}
.bar-fill.ok { background: linear-gradient(90deg, #22C55E, var(--ok)); }
.bar-val { font-size: 13px; font-weight: 700; text-align: right; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.temp-pass {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 24px; font-weight: 800; letter-spacing: .14em; text-align: center;
  background: var(--brand-soft); color: var(--brand-dark);
  border-radius: var(--radius-sm); padding: 16px 12px; margin: 4px 0 12px;
  word-break: break-all; user-select: all;
}

/* ---------- Signature publique (QR code self-service) ---------- */
.public-sign { background: var(--bg); }
.sign-shell { min-height: 100vh; display: flex; flex-direction: column; }
.sign-top {
  background: linear-gradient(150deg, var(--brand), var(--brand-dark)); color: #fff;
  padding: calc(28px + env(safe-area-inset-top, 0px)) 0 30px;
}
.sign-top h1 { color: #fff; font-size: 25px; }
.sign-top p { color: rgba(255,255,255,.86); font-size: 14.5px; }
.sign-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.sign-brand .brand-logo { background: rgba(255,255,255,.2); }
.sign-body { flex: 1; padding: 22px 0 40px; }
.sign-body .card:first-child { margin-top: -26px; }

.sign-steps { display: grid; grid-template-columns: 1fr; gap: 8px; }
.sign-step { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.sign-step .n {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}

.consent-box {
  background: #FBFAFF; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 15px; font-size: 13px; line-height: 1.6; color: var(--ink-2); max-height: 280px; overflow-y: auto;
}
.consent-box p { margin: 0 0 9px; }
.consent-box p:last-child { margin-bottom: 0; }

.check-line {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--accent-soft); border-radius: var(--radius-sm);
  padding: 13px 14px; font-size: 14px; font-weight: 600; color: #0B7A6B; cursor: pointer;
}
.check-line input { width: 21px; height: 21px; flex: none; accent-color: var(--accent); margin: 0; }

.sign-ok { color: var(--ok); display: flex; justify-content: center; margin-bottom: 6px; }
.recap { text-align: left; }
.kv-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.kv-row:last-child { border-bottom: 0; }
.kv-row span { color: var(--muted); font-size: 13px; }

/* ---------- QR code affiché au professionnel ---------- */
.qr-card { text-align: center; }
.qr-frame {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: inline-block; max-width: 100%;
}
.qr-frame img { width: 100%; max-width: 260px; height: auto; margin: 0 auto; }
.qr-link {
  display: block; background: #FBFAFF; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 13px; font-size: 12px; color: var(--ink-2); word-break: break-all; text-align: left;
}

/* ---------- Site vitrine ---------- */
.vnav {
  position: sticky; top: 0; z-index: 80;
  background: rgba(255, 255, 255, .95);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.vnav-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; padding-top: 10px; padding-bottom: 10px;
}
.vnav-links { display: flex; flex-wrap: wrap; gap: 4px; order: 3; width: 100%; }
.vnav-links a {
  font-size: 13.5px; font-weight: 650; color: var(--ink-2);
  padding: 7px 11px; border-radius: 10px; white-space: nowrap;
}
.vnav-links a.active { background: var(--brand-soft); color: var(--brand-dark); }
.vnav-actions { display: flex; gap: 8px; }

.page-hero {
  background: linear-gradient(150deg, var(--brand) 0%, var(--brand-dark) 60%, #2E1A80 100%);
  color: #fff; padding: 34px 0 38px;
}
.page-hero h1 { color: #fff; font-size: 27px; max-width: 24ch; }
.page-hero p { color: rgba(255,255,255,.88); font-size: 15.5px; max-width: 54ch; margin-bottom: 0; }
.breadcrumb { font-size: 12.5px; color: rgba(255,255,255,.78); margin-bottom: 10px; }
.breadcrumb a { color: rgba(255,255,255,.9); }

.media-block { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: center; }
.media-block img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: auto; }
.media-block h2 { margin-bottom: 6px; }
.media-block p { color: var(--ink-2); font-size: 14.5px; }

.gallery { display: grid; grid-template-columns: 1fr; gap: 12px; }
.gallery figure { margin: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.gallery img { width: 100%; height: 190px; object-fit: cover; display: block; }
.gallery figcaption { padding: 11px 14px; font-size: 13px; color: var(--ink-2); }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 14.5px; color: var(--ink-2); }
.check-list li svg { width: 19px; height: 19px; color: var(--accent); flex: none; margin-top: 2px; }
.cross-list li svg { color: var(--danger); }

.faq { display: grid; grid-template-columns: 1fr; gap: 10px; }
.faq details {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px;
}
.faq summary { font-weight: 680; font-size: 14.5px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: inline-block; width: 18px; color: var(--brand); font-weight: 800; }
.faq details[open] summary::before { content: "−"; }
.faq p { margin: 9px 0 0; font-size: 14px; color: var(--ink-2); }

.cta-band { text-align: center; padding: 28px 20px; }
.cta-band h2 { margin-bottom: 6px; }

.use-cases { display: grid; grid-template-columns: 1fr; gap: 12px; }
.use-case { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 17px; }
.use-case .tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-dark); }
.use-case h3 { margin: 5px 0 5px; font-size: 15.5px; }
.use-case p { margin: 0; font-size: 14px; color: var(--ink-2); }

.form-row-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.contact-line { display: flex; gap: 11px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.contact-line:last-child { border-bottom: 0; }
.contact-line svg { width: 19px; height: 19px; color: var(--brand); flex: none; margin-top: 2px; }
.contact-line .k { font-size: 12.5px; color: var(--muted); }
.contact-line .v { font-weight: 640; font-size: 14.5px; word-break: break-word; }

.notice {
  background: var(--brand-soft); border-radius: var(--radius-sm);
  padding: 13px 15px; font-size: 13.5px; color: var(--brand-dark);
}
/* Champ anti-robots : invisible pour les humains, rempli seulement par les robots */
.honeypot {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0; pointer-events: none;
}
.notice-ok { background: var(--ok-soft); color: #0B6B37; }
.notice-err { background: var(--danger-soft); color: #A81C1C; }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .pricing { grid-template-columns: repeat(3, 1fr); }
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .hero-actions .btn { flex: 0 0 auto; }
  .header-actions { display: flex; gap: 8px; }
  .card-list.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-list.two > * + * { margin-top: 0; }
}
@media (min-width: 860px) {
  h1 { font-size: 28px; }
  .hero h1 { font-size: 40px; }
  .wrap { padding: 0 24px; }
  .sheet .kv { grid-template-columns: 190px 1fr; padding: 7px 0; align-items: baseline; }
  .footer .cols { grid-template-columns: 1.4fr 1fr 1fr; }
  .form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
}
@media (max-width: 380px) {
  .mic-btn { width: 90px; height: 90px; }
  .brand-name { font-size: 15px; }
}
.mobile-only { display: initial; }
@media (min-width: 860px) { .mobile-only { display: none !important; } }

/* Vitrine : passage en colonnes sur ordinateur, jamais sur mobile */
@media (min-width: 768px) {
  .vnav-links { order: 0; width: auto; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .use-cases { grid-template-columns: repeat(3, 1fr); }
  .faq { grid-template-columns: 1fr 1fr; }
  .media-block { grid-template-columns: 1.1fr 1fr; gap: 26px; }
  .media-block.inverse > :first-child { order: 2; }
  .contact-grid { grid-template-columns: 1.2fr 1fr; gap: 22px; }
  .form-row-2 { grid-template-columns: 1fr 1fr; }
  .page-hero { padding: 46px 0 50px; }
  .page-hero h1 { font-size: 34px; }
}
@media (min-width: 1024px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .media-block { grid-template-columns: 1.15fr 1fr; gap: 34px; }
}
