/* =============================================================
   Mieux Apprendre — Feuille de style v7
   Thème : bleu marine #0a1f44 + or #f5a623 (maquette du site)
   ============================================================= */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #0a1f44;
  --mut: #5b6b8c;
  --line: #e3e8f2;
  --pri: #0a1f44;        /* bleu marine profond */
  --pri2: #16306b;       /* bleu marine clair */
  --gold: #f5a623;       /* or / ambre */
  --gold-d: #d98e06;
  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --warn: #d97706;
  --warn-bg: #fef3c7;
  --err: #dc2626;
  --err-bg: #fee2e2;
  --info-bg: #e6ecf9;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(10, 31, 68, .09);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html { background: var(--bg); }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--pri2); text-decoration: none; }
img { max-width: 100%; }

/* ── Barre supérieure ─────────────────────────────────────── */
.topbar {
  background: var(--pri);
  color: #fff;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; letter-spacing: .02em; }
.topbar .brand img { width: 36px; height: 36px; border-radius: 50%; background: #fff; object-fit: contain; }
.topbar .who { margin-left: auto; font-size: .88rem; opacity: .95; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar .badge-role { background: var(--gold); color: var(--pri); padding: 3px 12px; border-radius: 999px; font-size: .75rem; font-weight: 800; }

/* ── Conteneur ────────────────────────────────────────────── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 16px 60px; width: 100%; flex: 1; }
.wrap-narrow { max-width: 520px; margin: 0 auto; padding: 30px 16px 60px; width: 100%; flex: 1; }

/* ── Cartes ───────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 20px;
}
.card h2 { font-size: 1.08rem; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; color: var(--pri); }
.card h2 .fa, .card h2 .fas { color: var(--gold-d); }
.muted { color: var(--mut); font-size: .88rem; }

/* ── Grille de statistiques ───────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; text-align: center; box-shadow: var(--shadow);
}
.stat .num { font-size: 1.85rem; font-weight: 800; color: var(--pri); }
.stat .num.gold { color: var(--gold-d); }
.stat .lbl { font-size: .8rem; color: var(--mut); margin-top: 4px; }

/* ── Boutons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; border-radius: 10px; padding: 10px 18px;
  font-size: .92rem; font-weight: 700; cursor: pointer;
  background: var(--pri); color: #fff; transition: filter .15s, transform .1s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.97); }
.btn-gold { background: var(--gold); color: var(--pri); }
.btn-gold:hover { background: var(--gold-d); color: #fff; }
.btn-ghost { background: #fff; color: var(--pri); border: 1.5px solid var(--pri); }
.btn-ok { background: var(--ok); }
.btn-warn { background: var(--warn); }
.btn-err { background: var(--err); }
.btn-sm { padding: 6px 12px; font-size: .8rem; border-radius: 8px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Formulaires ──────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 5px; color: var(--pri); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: .95rem; font-family: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid rgba(245, 166, 35, .45); border-color: var(--gold);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── Tableaux ─────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.tbl th, table.tbl td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
table.tbl th { background: var(--info-bg); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--pri); }
table.tbl tr:hover td { background: #f7f9fd; }

/* ── Badges ───────────────────────────────────────────────── */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-info { background: var(--info-bg); color: var(--pri); }

/* ── Onglets (panels) ─────────────────────────────────────── */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs button {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  padding: 9px 16px; border-radius: 999px; font-size: .88rem; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.tabs button .fas { color: var(--gold-d); }
.tabs button.active { background: var(--pri); color: #fff; border-color: var(--pri); }
.tabs button.active .fas { color: var(--gold); }
.tabpane { display: none; }
.tabpane.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── QR ───────────────────────────────────────────────────── */
.qr-box {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 18px; background: #fff; border: 2px dashed var(--gold); border-radius: var(--radius);
}
.qr-box canvas, .qr-box img { border-radius: 8px; }
#qr-reader { width: 100%; max-width: 420px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; }
#qr-reader video { border-radius: var(--radius); }
.qr-wait {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 26px 18px; background: #f8fafc; border: 2px dashed var(--line);
  border-radius: var(--radius); text-align: center;
}
.qr-wait .fas { font-size: 2.4rem; color: var(--mut); }
.qr-wait strong { font-size: .98rem; }

/* ── Mini barres (statistiques) ───────────────────────────── */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding-top: 10px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bars .bar .col {
  width: 100%; max-width: 46px; border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--gold), var(--pri));
  min-height: 3px; transition: height .3s;
}
.bars .bar .cap { font-size: .68rem; color: var(--mut); text-align: center; white-space: nowrap; }
.bars .bar .val { font-size: .72rem; font-weight: 700; color: var(--pri); }

/* ── Toast ────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--pri); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: .9rem; opacity: 0; transition: all .3s; z-index: 999; max-width: 90vw; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-ok { background: var(--ok); }
.toast-err { background: var(--err); }
.toast-warn { background: var(--warn); }

/* ── Auth ─────────────────────────────────────────────────── */
.auth-card { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 30px; border: 1px solid var(--line); }
.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-logo img { width: 96px; height: 96px; border-radius: 50%; object-fit: contain; background: #fff; box-shadow: 0 0 0 3px var(--gold); }
.auth-logo h1 { font-size: 1.35rem; margin-top: 8px; color: var(--pri); }
.alert { padding: 12px 14px; border-radius: 10px; font-size: .88rem; margin-bottom: 14px; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-err { background: var(--err-bg); color: var(--err); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.center { text-align: center; }
.mt { margin-top: 14px; }
.hidden { display: none !important; }
body.auth-page .wrap-narrow { display: flex; align-items: center; }
body.auth-page .auth-card { width: 100%; }
.auth-card .btn-row { justify-content: center; }

/* ── En-tête de page (panels) ─────────────────────────────── */
.page-head { margin: 6px 0 22px; }
.page-head h1 { font-size: 1.5rem; display: flex; align-items: center; gap: 10px; color: var(--pri); }
.page-head h1 .fas { color: var(--gold-d); }
.page-head p { color: var(--mut); font-size: .9rem; margin-top: 4px; }

/* ── Numérotation des sections ────────────────────────────── */
.card h2 .step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--gold); color: var(--pri); font-size: .8rem; font-weight: 800;
}

/* ── Logo animé ───────────────────────────────────────────── */
@keyframes logoFloat {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  25%      { transform: translateY(-10px) rotate(6deg) scale(1.04); }
  50%      { transform: translateY(0) rotate(0deg) scale(1.02); }
  75%      { transform: translateY(-7px) rotate(-6deg) scale(1.04); }
}
@keyframes logoGlow {
  0%, 100% { box-shadow: 0 0 0 3px var(--gold), 0 0 22px rgba(245, 166, 35, .45); }
  50%      { box-shadow: 0 0 0 5px var(--gold), 0 0 44px rgba(245, 166, 35, .85); }
}
.logo-anim { animation: logoFloat 5s ease-in-out infinite, logoGlow 3.2s ease-in-out infinite; will-change: transform; }
@keyframes logoFloatSm {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
  25%      { transform: translateY(-3px) rotate(6deg) scale(1.06); }
  50%      { transform: translateY(0) rotate(0deg) scale(1.02); }
  75%      { transform: translateY(-2px) rotate(-6deg) scale(1.06); }
}
.topbar .brand img.logo-anim { animation: logoFloatSm 5s ease-in-out infinite, logoGlow 3.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .logo-anim { animation: none !important; } }

/* =============================================================
   PAGE D'ACCUEIL — reproduction de la maquette
   ============================================================= */

/* Barre d'info supérieure */
.site-topstrip {
  background: var(--pri);
  color: #fff; font-size: .8rem;
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 22px; flex-wrap: wrap; gap: 6px;
}
.site-topstrip a { color: #fff; opacity: .9; margin-left: 12px; }
.site-topstrip .loc i { color: var(--gold); margin-right: 6px; }

/* Navigation principale */
.site-nav {
  background: #fff; position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 26px;
  padding: 10px 26px; box-shadow: 0 2px 14px rgba(10, 31, 68, .08);
  flex-wrap: wrap;
}
.site-nav .brand { display: flex; align-items: center; gap: 10px; }
.site-nav .brand img { width: 52px; height: 52px; object-fit: contain; }
.site-nav .brand .b-name { font-weight: 900; color: var(--pri); font-size: 1.05rem; line-height: 1.1; letter-spacing: .02em; }
.site-nav .brand .b-tag { font-size: .62rem; color: var(--gold-d); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.site-nav .links { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.site-nav .links a { color: var(--pri); font-weight: 600; font-size: .9rem; }
.site-nav .links a:hover { color: var(--gold-d); }
.site-nav .links a.active { color: var(--gold-d); border-bottom: 2px solid var(--gold); padding-bottom: 2px; }

/* Section héro (maquette : texte à gauche, photo à droite) */
.hero-mock {
  max-width: 1180px; margin: 26px auto 0; padding: 0 16px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 34px; align-items: center;
}
@media (max-width: 860px) { .hero-mock { grid-template-columns: 1fr; } }
.hero-mock .hm-text h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 900; line-height: 1.12;
  color: var(--pri); text-transform: uppercase; letter-spacing: .01em;
}
.hero-mock .hm-text h1 .accent { color: var(--gold); }
.hero-mock .hm-text .sub { color: var(--mut); margin: 16px 0 22px; font-size: 1rem; max-width: 480px; }
.hero-mock .hm-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-mock .trust { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.hero-mock .trust .faces { display: flex; }
.hero-mock .trust .faces span {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; margin-left: -10px;
  background: var(--pri2); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800;
}
.hero-mock .trust .faces span:first-child { margin-left: 0; }
.hero-mock .trust .stars { color: var(--gold); font-size: .9rem; }
.hero-mock .trust .t-txt { font-size: .82rem; color: var(--mut); font-weight: 600; }
.hero-mock .hm-photo { position: relative; }
.hero-mock .hm-photo img {
  width: 100%; height: 430px; object-fit: cover; border-radius: 22px;
  box-shadow: 0 22px 48px rgba(10, 31, 68, .22);
}
.hero-mock .hm-badge {
  position: absolute; bottom: 18px; left: -14px; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow); padding: 12px 16px; display: flex; gap: 10px; align-items: center;
}
.hero-mock .hm-badge .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--info-bg); color: var(--pri); display: flex; align-items: center; justify-content: center; }
.hero-mock .hm-badge b { display: block; font-size: .86rem; color: var(--pri); }
.hero-mock .hm-badge span { font-size: .74rem; color: var(--mut); }

/* Bande d'atouts (icônes) */
.features-strip {
  max-width: 1180px; margin: 40px auto 0; padding: 0 16px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px;
}
.feat {
  display: flex; gap: 12px; align-items: flex-start; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.feat .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--info-bg); color: var(--pri); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.feat b { display: block; font-size: .92rem; color: var(--pri); margin-bottom: 3px; }
.feat span { font-size: .78rem; color: var(--mut); line-height: 1.35; }

/* Titre de section (style maquette) */
.sec-head { text-align: center; margin: 56px 0 30px; padding: 0 16px; }
.sec-head .kicker { color: var(--gold-d); font-weight: 800; font-size: .82rem; letter-spacing: .16em; text-transform: uppercase; }
.sec-head h2 { color: var(--pri); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; margin-top: 6px; }
.sec-head h2::after { content: ''; display: block; width: 54px; height: 3px; background: var(--gold); margin: 10px auto 0; border-radius: 2px; }

/* Grille des services */
.svc-grid { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.svc-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow); transition: transform .18s;
}
.svc-card:hover { transform: translateY(-4px); }
.svc-card img { width: 100%; height: 170px; object-fit: cover; }
.svc-card .svc-body { padding: 18px; position: relative; }
.svc-card .svc-ic {
  width: 46px; height: 46px; border-radius: 12px; background: var(--pri); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
  margin-top: -42px; margin-bottom: 12px; box-shadow: var(--shadow); border: 3px solid #fff; position: relative;
}
.svc-card h3 { font-size: 1rem; color: var(--pri); margin-bottom: 6px; }
.svc-card p { font-size: .84rem; color: var(--mut); margin-bottom: 12px; line-height: 1.45; }
.svc-card .more { font-size: .84rem; font-weight: 700; color: var(--pri); }
.svc-card .more i { color: var(--gold-d); margin-left: 4px; }

/* Bandeau de chiffres */
.stats-band { background: var(--pri); margin-top: 56px; padding: 40px 16px; }
.stats-band .sb-grid { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; text-align: center; }
.stats-band .sb-item .fas { color: var(--gold); font-size: 1.5rem; margin-bottom: 8px; }
.stats-band .sb-item .n { color: var(--gold); font-size: 1.9rem; font-weight: 900; }
.stats-band .sb-item .l { color: rgba(255,255,255,.85); font-size: .84rem; margin-top: 2px; }

/* Témoignages */
.testi-grid { max-width: 1180px; margin: 0 auto; padding: 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.testi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.testi .stars { color: var(--gold); margin-bottom: 10px; }
.testi p { font-size: .88rem; color: var(--ink); line-height: 1.55; margin-bottom: 14px; }
.testi .who { display: flex; align-items: center; gap: 10px; }
.testi .who .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--pri2); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; }
.testi .who b { display: block; font-size: .88rem; color: var(--pri); }
.testi .who span { font-size: .74rem; color: var(--mut); }

/* Blocs d'appel à l'action */
.cta-grid { max-width: 1180px; margin: 44px auto 0; padding: 0 16px; display: grid; gap: 16px; }
.cta-band {
  border-radius: 18px; padding: 24px 26px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.cta-band.dark { background: var(--pri); color: #fff; }
.cta-band.light { background: #fff; border: 1.5px solid var(--line); box-shadow: var(--shadow); }
.cta-band .ic { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--gold); flex-shrink: 0; }
.cta-band.light .ic { background: var(--info-bg); color: var(--gold-d); }
.cta-band h3 { font-size: 1.12rem; margin-bottom: 4px; }
.cta-band.light h3 { color: var(--pri); }
.cta-band p { font-size: .86rem; opacity: .85; }
.cta-band.light p { color: var(--mut); opacity: 1; }
.cta-band .btn { margin-left: auto; }

/* Pied de page */
.site-footer { background: #071433; color: rgba(255,255,255,.8); margin-top: 60px; }
.site-footer .f-grid { max-width: 1180px; margin: 0 auto; padding: 44px 16px 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px; }
.site-footer .f-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.site-footer .f-brand img { width: 46px; height: 46px; border-radius: 50%; background: #fff; object-fit: contain; }
.site-footer .f-brand b { color: #fff; font-size: 1rem; }
.site-footer p, .site-footer li { font-size: .84rem; line-height: 1.6; }
.site-footer h4 { color: var(--gold); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer ul { list-style: none; }
.site-footer ul a { color: rgba(255,255,255,.8); }
.site-footer ul a:hover { color: var(--gold); }
.site-footer .f-bottom { border-top: 1px solid rgba(255,255,255,.12); text-align: center; padding: 16px; font-size: .78rem; }

/* =============================================================
   Inscription élève en étapes (wizard)
   ============================================================= */
.wiz-steps { display: flex; gap: 8px; margin-bottom: 22px; }
.wiz-steps .ws { flex: 1; text-align: center; }
.wiz-steps .ws .dot {
  width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 6px;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .86rem;
  background: #eef1f8; color: var(--mut); border: 2px solid var(--line);
}
.wiz-steps .ws .ws-lbl { font-size: .7rem; color: var(--mut); font-weight: 600; }
.wiz-steps .ws.active .dot { background: var(--pri); color: #fff; border-color: var(--pri); }
.wiz-steps .ws.done .dot { background: var(--gold); color: var(--pri); border-color: var(--gold); }
.wiz-steps .ws.active .ws-lbl { color: var(--pri); }
.wiz-step { display: none; }
.wiz-step.active { display: block; animation: fadeIn .25s ease; }

/* ── Listes utilitaires ───────────────────────────────────── */
.doc-list { list-style: none; }
.doc-list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.doc-list li:last-child { border-bottom: none; }
.doc-list .fas { color: var(--gold-d); }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-note { text-align: center; padding: 18px; color: var(--mut); font-size: .9rem; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: .9rem; }
.kv dt { color: var(--mut); font-weight: 600; }
.kv dd { color: var(--ink); font-weight: 600; }

/* =============================================================
   RESPONSIVE MOBILE — aucun débordement sur téléphone
   ============================================================= */
html, body { overflow-x: hidden; }
.tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.tabs button { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 640px) {
  .wrap { padding: 16px 10px 44px; }
  .card { padding: 16px 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat .num { font-size: 1.4rem; }
  .page-head h1 { font-size: 1.18rem; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar .who { font-size: .78rem; gap: 8px; }
  .btn { padding: 10px 14px; font-size: .86rem; }
  .hero-mock { grid-template-columns: 1fr; gap: 20px; margin-top: 16px; }
  .hero-mock .hm-photo img { height: auto; max-height: 320px; }
  .hero-mock .hm-badge { left: 8px; bottom: 10px; padding: 8px 12px; }
  .hm-cta .btn { width: 100%; justify-content: center; }
  .site-nav { padding: 8px 12px; gap: 10px; }
  .site-nav .links { gap: 12px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .site-nav .links a { white-space: nowrap; font-size: .82rem; }
  .site-nav .links a.btn { width: auto; }
  .features-strip, .svc-grid, .testi-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 18px 16px; }
  .cta-band .btn { margin-left: 0; width: 100%; justify-content: center; }
  .bars { gap: 4px; }
  .bars .bar .cap { font-size: .58rem; }
  table.tbl { font-size: .8rem; }
  table.tbl th, table.tbl td { padding: 8px; white-space: nowrap; }
  .tbl-wrap { -webkit-overflow-scrolling: touch; }
  #qr-reader { max-width: 100%; }
  .qr-box canvas, .qr-box img { width: 160px !important; height: 160px !important; }
  .wiz-steps .ws .ws-lbl { font-size: .56rem; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .btn-row input { min-width: 0 !important; }
}
