/* Lokaya · design system v2, aligné sur la maquette UX de référence (11 oct. 2026) */

:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --deep: #0A3D91;
  --primary: #2563EB;
  --primary-soft: #EAF1FF;
  --accent: #FBBF24;
  --accent-2: #F7B21C;
  --accent-ink: #1A1305;
  --hdr: linear-gradient(180deg, #0A3D91 0%, #0E47B4 62%, #134FCB 100%);
  --hdr-glow: radial-gradient(90% 80% at 50% -20%, rgba(96, 165, 250, 0.4), transparent 70%);
  --brand-text: #2563EB;

  --bg: #F3F6FB;
  --surface: #FFFFFF;
  --line: #E8EDF4;
  --line-2: #D5DDE8;
  --field: #CFD8E4;
  --text: #0F172A;
  --text-2: #56657B;
  --text-3: #8696AB;

  --ok: #15803D;
  --ok-bg: #DCFCE7;
  --info: #1D4ED8;
  --info-bg: #DBEAFE;
  --warn: #C2410C;
  --warn-bg: #FFEDD5;
  --bad: #B91C1C;
  --bad-bg: #FEE2E2;
  --mute: #475569;
  --mute-bg: #F1F5F9;
  --cream: #FFF8EB;
  --cream-line: #FBE3B8;
  --orange: #EA580C;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 26px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.07);
  --shadow-soft: 0 1px 2px rgba(15, 23, 42, 0.05), 0 4px 14px rgba(15, 23, 42, 0.05);
  --shadow-pop: 0 20px 60px rgba(15, 23, 42, 0.25);
  --ring: rgba(37, 99, 235, 0.22);
  --sb: env(safe-area-inset-top, 0px);
  --gutter: 16px;
  --tap: 54px;
}

[data-app="agence"] {
  --deep: #0F2D6B;
  --primary: #1E40AF;
  --primary-soft: #E3EBFF;
  --accent: #FDBA74;
  --accent-2: #F97316;
  --accent-ink: #2A1100;
  --hdr: linear-gradient(180deg, #0F2D6B 0%, #15398A 70%, #1E40AF 100%);
  --bg: #EFF4FD;
  --ring: rgba(30, 64, 175, 0.24);
  --brand-text: #C2410C;
}

[data-app="proprietaire"] {
  --deep: #08306B;
  --primary: #08306B;
  --primary-soft: #FEF6D8;
  --accent: #FCD34D;
  --accent-2: #EAB308;
  --accent-ink: #08306B;
  --hdr: linear-gradient(180deg, #F5C542 0%, #EAB308 100%);
  --ring: rgba(234, 179, 8, 0.32);
  --brand-text: #A16207;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  font-feature-settings: "cv11", "ss01";
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
fieldset { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.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;
}
.ic { width: 22px; height: 22px; flex: none; }
.flag { width: 24px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12); }

/* Coque : plein écran sur téléphone, cadre de téléphone sur ordinateur */
body.app-body { height: 100%; overflow: hidden; }
.stage { height: 100vh; height: 100dvh; display: flex; justify-content: center; }
.side { display: none; }
.device {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}
.statusbar { display: none; }
.offline-banner {
  position: absolute; left: 12px; right: 12px; bottom: 84px; z-index: 40;
  display: none; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; border-radius: 12px; background: #0F172A; color: #fff; font-size: 14px; font-weight: 600;
}
.offline-banner .ic { width: 18px; height: 18px; }
.device.is-offline .offline-banner { display: flex; }
.screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.screen:focus { outline: none; }
.device[data-chrome="none"] .tabbar { display: none; }

@media (min-width: 960px) and (min-height: 700px) {
  body.app-body {
    background:
      radial-gradient(1100px 620px at 6% 0%, #DCE7FB, transparent 62%),
      radial-gradient(900px 520px at 100% 100%, rgba(251, 191, 36, 0.18), transparent 60%),
      #F3F6FB;
  }
  .stage { align-items: center; gap: clamp(40px, 6vw, 110px); padding: 24px; }
  .side { display: block; width: 390px; }
  .device {
    --sb: 46px;
    width: 410px;
    max-width: none;
    height: min(880px, calc(100dvh - 48px));
    border: 11px solid #0B1220;
    border-radius: 60px;
    box-shadow: 0 0 0 2px #1F2937, 0 40px 90px rgba(15, 23, 42, 0.3);
  }
  .device::after {
    content: ""; position: absolute; left: 50%; bottom: 8px; z-index: 50;
    width: 128px; height: 5px; border-radius: 3px; background: #0F172A; opacity: 0.75;
    transform: translateX(-50%); pointer-events: none;
  }
  .statusbar {
    position: absolute; top: 0; left: 0; right: 0; z-index: 45;
    display: flex; align-items: center; justify-content: space-between;
    height: 46px; padding: 0 28px; color: #fff; font-size: 15px; font-weight: 600; pointer-events: none;
  }
  .statusbar .island { width: 108px; height: 31px; border-radius: 20px; background: #0B1220; }
  .statusbar .sb-icons { display: flex; align-items: center; gap: 6px; }
  .statusbar .sb-icons svg { width: auto; height: 12px; }
  .tabbar { padding-bottom: 22px; }
}

/* Panneau d'explication (ordinateur) */
.side-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 34px; color: var(--text-2); font-weight: 600; text-decoration: none; }
.side-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.side-brand img { width: 60px; height: 60px; border-radius: 16px; box-shadow: var(--shadow-soft); }
.side-brand strong { display: block; color: var(--deep); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.side-brand span { display: block; margin-top: 4px; color: var(--primary); font-size: 16px; font-weight: 600; }
.side h1 { margin-bottom: 16px; color: var(--deep); font-size: 42px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.side > p { color: var(--text-2); font-size: 18px; }
.side-points { display: grid; gap: 12px; margin: 26px 0; padding: 0; list-style: none; }
.side-points li { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.side-points .ic { color: var(--ok); }
.side-demo { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-soft); color: var(--text-2); font-size: 14px; }
.side-demo .ic { color: var(--primary); }

/* En-têtes bleus */
.hdr {
  position: relative;
  flex: none;
  padding: calc(var(--sb) + 8px) var(--gutter) 34px;
  color: #fff;
  background: var(--hdr-glow), var(--hdr);
}
.hdr-home { padding-bottom: 104px; }
.hdr-row { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 52px; }
.hdr-title { font-size: 18px; font-weight: 600; text-align: center; letter-spacing: -0.01em; }
.hdr-btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: #fff; text-decoration: none;
}
.hdr-btn .ic { width: 24px; height: 24px; }
.hdr-btn:active { background: rgba(255, 255, 255, 0.12); }
.hdr-btn .dot { position: absolute; top: 8px; right: 7px; width: 10px; height: 10px; border: 2px solid #0E47B4; border-radius: 50%; background: #F97316; }
.brand { display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; text-decoration: none; }
.brand-name { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.brand-app { display: block; margin-top: 2px; font-size: 12px; font-weight: 500; opacity: 0.9; }
.avatar-btn {
  display: grid; place-items: center; justify-self: end; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: #fff; color: var(--deep); font-size: 14px; font-weight: 700; text-decoration: none;
}
.hello { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.hello-photo { flex: none; width: 52px; height: 52px; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.9); border-radius: 50%; background: #fff; }
.hello-photo img { width: 100%; height: 100%; object-fit: cover; }
.hello-initials { display: grid; place-items: center; height: 100%; color: var(--deep); font-weight: 700; }
.hello h1 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.hello p { margin-top: 2px; font-size: 14px; opacity: 0.88; }

/* Contenus */
.home-wrap { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; margin-top: -88px; padding: 0 var(--gutter) 24px; }
.page {
  position: relative; z-index: 1; flex: 1 0 auto; margin-top: -20px;
  padding: 22px var(--gutter) 28px; border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--surface);
}
.page-title { margin-bottom: 16px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.page-lead { margin: -8px 0 18px; color: var(--text-2); font-size: 15px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.section { margin-top: 24px; }
.section-title { margin-bottom: 12px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Cartes */
.card { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.page .card { box-shadow: var(--shadow-soft); }
.card-flat { box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.card-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.link { padding: 6px 0; border: 0; background: none; color: var(--primary); font-size: 15px; font-weight: 600; text-decoration: none; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.caption { font-size: 13px; color: var(--text-2); }
.t-display { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.t-amount { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }

/* Carte du logement (accueil) */
.hcard { overflow: hidden; padding: 0; }
.hcard-photo { position: relative; height: 150px; background: #DCE7F7; }
.hcard-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-more {
  position: absolute; top: 10px; left: 10px; display: grid; place-items: center; width: 40px; height: 30px; padding: 0;
  border: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.85); color: #0F172A;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.photo-more .ic { width: 20px; height: 20px; }
.photo-empty { display: grid; place-items: center; height: 100%; color: var(--primary); background: linear-gradient(135deg, #EAF1FF, #DCE7F7); }
.photo-empty .ic { width: 42px; height: 42px; opacity: 0.7; }
.hcard-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px; color: inherit; text-decoration: none; }
.hcard-head > div { flex: 1; min-width: 0; }
.hcard-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; }
.hcard-head .chev { color: var(--text); }
.addr { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: var(--text-2); font-size: 15px; }
.addr .ic { width: 18px; height: 18px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.fact { padding: 12px 16px 14px; }
.fact + .fact { border-left: 1px solid var(--line); }
.fact span { display: block; color: var(--text-2); font-size: 13.5px; }
.fact strong { display: block; margin-top: 3px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }

/* Statut du loyer */
.status-top { display: flex; align-items: flex-start; gap: 12px; }
.status-text { flex: 1; min-width: 0; }
.status-title { font-size: 15px; font-weight: 600; }
.status-amount { margin-top: 14px; font-size: 16px; color: var(--text-2); }
.status-amount b { color: var(--text); font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.status-text .caption { margin-top: 2px; }
.progress-row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.progress { flex: 1; height: 10px; overflow: hidden; border-radius: 999px; background: #E6ECF4; }
.progress > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563EB, #3B82F6); transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.progress-pct { flex: none; min-width: 42px; font-size: 16px; font-weight: 700; text-align: right; }
.status-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); color: var(--ok); font-size: 14px; font-weight: 600; }
.status-note .ic { width: 18px; height: 18px; }
.status-note.is-info { color: var(--text-2); }

/* Pastilles */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 0; border-radius: 999px;
  font-size: 13px; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.pill .ic { width: 15px; height: 15px; stroke-width: 2.6; }
button.pill { cursor: pointer; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }
.pill-mute { background: var(--mute-bg); color: var(--mute); }
.pill-glass { background: rgba(255, 255, 255, 0.92); color: var(--text); box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14); }
.pill-dark { background: rgba(15, 23, 42, 0.72); color: #fff; }
.pill-lg { padding: 7px 14px; font-size: 14px; }

/* Pastilles d'icône */
.bubble { display: grid; flex: none; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--primary-soft); color: var(--primary); }
.bubble .ic { width: 23px; height: 23px; }
.bubble-orange { background: #FFEDD5; color: var(--orange); }
.bubble-ok { background: var(--ok-bg); color: #16A34A; }
.bubble-bad { background: var(--bad-bg); color: var(--bad); }
.bubble-mute { background: var(--mute-bg); color: var(--mute); }
.bubble-sm { width: 38px; height: 38px; border-radius: 11px; }
.bubble-sm .ic { width: 20px; height: 20px; }
.bubble-lg { width: 64px; height: 64px; border-radius: 18px; }
.bubble-lg .ic { width: 32px; height: 32px; }
.bubble-round { border-radius: 50%; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: var(--tap);
  padding: 0 20px; border: 0; border-radius: var(--r-md); font-size: 16.5px; font-weight: 700; letter-spacing: -0.005em;
  line-height: 1.2; text-align: center; text-decoration: none; user-select: none; -webkit-user-select: none;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background-color 0.2s ease, opacity 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn .ic { width: 21px; height: 21px; }
.btn-cta { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px rgba(247, 178, 28, 0.32); }
.btn-cta:active { background: var(--accent-2); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px var(--ring); }
.btn-ghost { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-light { background: rgba(255, 255, 255, 0.08); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7); }
.btn-danger { background: var(--bad-bg); color: var(--bad); }
.btn-sm { width: auto; min-height: 42px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn.is-loading { opacity: 0.92; pointer-events: none; }
.btn + .btn { margin-top: 10px; }
.spinner { width: 20px; height: 20px; flex: none; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: lk-spin 0.7s linear infinite; }
.link-btn {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; width: 100%; min-height: 48px; margin-top: 4px;
  border: 0; background: none; color: var(--text-2); font-size: 15px; font-weight: 500; text-align: center; text-decoration: none;
}
.link-btn u { color: var(--primary); font-weight: 600; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* Raccourcis */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 84px; padding: 10px 4px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-soft);
  color: var(--text); font-size: 13px; font-weight: 600; text-align: center; text-decoration: none; transition: transform 0.12s;
}
.tile:active { transform: scale(0.96); }
.tile .ic { width: 25px; height: 25px; color: var(--primary); }
.tiles-2 { grid-template-columns: 1fr 1fr; }
.tiles-2 .tile { align-items: flex-start; min-height: 96px; padding: 14px; text-align: left; }
.tiles-2 .tile span { color: var(--text-2); font-size: 13px; font-weight: 500; }

/* Graphique en barres */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 132px; margin-top: 16px; padding: 0 2px; }
.bar-col { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 8px; height: 100%; }
.bar-track { display: flex; flex: 1; align-items: flex-end; width: 100%; max-width: 34px; }
.bar {
  width: 100%; min-height: 4px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #A5C4FF, #8DB3FB);
  transform: scaleY(0); transform-origin: bottom; transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bar.is-now { background: linear-gradient(180deg, #3B82F6, #2563EB); }
.chart.is-in .bar { transform: scaleY(1); }
.bar-label { color: var(--text-2); font-size: 12px; font-weight: 500; }
.total-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }

/* Listes */
.list { padding: 0 16px; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 70px; padding: 12px 0;
  border: 0; border-bottom: 1px solid var(--line); background: none; color: inherit; text-align: left; text-decoration: none;
}
.row:last-child { border-bottom: 0; }
a.row, button.row { cursor: pointer; }
a.row:active, button.row:active { opacity: 0.65; }
.row-main { flex: 1; min-width: 0; }
.row-title { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.row-sub { display: block; margin-top: 2px; color: var(--text-2); font-size: 13.5px; }
.row-end { display: flex; flex: none; align-items: center; gap: 10px; }
.row-amount { font-size: 15px; font-weight: 600; white-space: nowrap; }
.row[aria-current="true"] .row-title { color: var(--primary); }
.chev { width: 20px; height: 20px; color: var(--text-3); }
.thumb { flex: none; width: 58px; height: 58px; overflow: hidden; border-radius: 12px; background: var(--primary-soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .photo-empty .ic { width: 26px; height: 26px; }
.kv-list { padding: 0 16px; }
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv dt { flex: none; max-width: 48%; color: var(--text-2); font-size: 14.5px; }
.kv dd { font-size: 15px; font-weight: 600; text-align: right; }
.kv dd small { display: block; color: var(--text-2); font-size: 13px; font-weight: 500; }
.info-list .info { padding: 13px 0; border-bottom: 1px solid var(--line); }
.info-list .info:last-child { border-bottom: 0; }
.info span { display: block; color: var(--text-2); font-size: 14px; }
.info strong { display: block; margin-top: 3px; font-size: 16.5px; font-weight: 600; }
.info p { margin-top: 3px; font-size: 16px; }

/* Messages */
.notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: var(--r-md); font-size: 14.5px; line-height: 1.45; }
.notice .ic { width: 22px; height: 22px; margin-top: 1px; }
.notice strong { display: block; font-weight: 700; }
.notice-info { background: var(--info-bg); color: #1E3A8A; }
.notice-warn { background: var(--cream); color: #7C2D12; border: 1px solid var(--cream-line); }
.notice-warn .ic { color: var(--orange); }
.notice-ok { background: var(--ok-bg); color: #14532D; }
.notice a, .notice .link { color: var(--primary); font-weight: 600; }
.demo-hint { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 11px 13px; border-radius: 12px; background: var(--cream); border: 1px solid var(--cream-line); color: #7C2D12; font-size: 14px; font-weight: 500; }
.demo-hint .ic { width: 20px; height: 20px; color: var(--orange); }
.preview-badge { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 6px 11px; border-radius: 999px; background: #FEF3C7; color: #92400E; font-size: 13px; font-weight: 600; }
.preview-badge .ic { width: 16px; height: 16px; }

/* Formulaires */
.field { display: block; margin-bottom: 18px; }
.label { display: block; margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.label small { color: var(--text-3); font-size: 13px; font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 54px; padding: 0 16px; border: 1.5px solid var(--field); border-radius: var(--r-md);
  background: var(--surface); font-size: 17px; font-weight: 500; -webkit-appearance: none; appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-lg { font-size: 22px; font-weight: 700; }
.textarea { min-height: 110px; padding: 13px 16px; font-size: 16px; line-height: 1.45; resize: vertical; }
.select {
  padding-right: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356657B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 14px center; background-repeat: no-repeat; background-size: 20px;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); font-weight: 400; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.input-wrap { display: flex; align-items: stretch; overflow: hidden; border: 1.5px solid var(--field); border-radius: var(--r-md); background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s; }
.input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.input-wrap .input { min-width: 0; border: 0; border-radius: 0; box-shadow: none; }
.affix { display: flex; flex: none; align-items: center; gap: 8px; padding: 0 16px; background: #F6F8FB; color: var(--text-2); font-size: 16px; font-weight: 600; }
.affix-end { border-left: 1.5px solid var(--line); min-width: 84px; justify-content: center; }
.affix-start { border-right: 1.5px solid var(--line); }
.hint { margin-top: 7px; color: var(--text-2); font-size: 13.5px; }
.err { display: none; margin-top: 7px; color: var(--bad); font-size: 14px; font-weight: 600; }
.field.has-error .err { display: block; }
.field.has-error .input, .field.has-error .input-wrap, .field.has-error .choice-body, .field.has-error .otp input, .field.has-error .check { border-color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.field .chips { margin-bottom: 10px; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gutter) * -1) 14px; padding: 2px var(--gutter) 4px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--surface);
  font-size: 15px; font-weight: 600; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.amount-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.amount-chip {
  min-height: 50px; padding: 0 4px; border: 0; border-radius: 12px; background: #F1F4F9; color: var(--text);
  font-size: 14.5px; font-weight: 600; transition: background 0.15s, color 0.15s, transform 0.12s;
}
.amount-chip:active { transform: scale(0.95); }
.amount-chip[aria-pressed="true"] { background: var(--primary); color: #fff; box-shadow: 0 6px 14px var(--ring); }
.amount-chip small { display: block; font-size: 11.5px; font-weight: 500; opacity: 0.8; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; }
.day {
  min-height: 42px; padding: 0; border: 1.5px solid var(--line-2); border-radius: 11px; background: var(--surface);
  font-size: 15px; font-weight: 600; transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s;
}
.day:active { transform: scale(0.92); }
.day[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: #fff; }
.choices { display: grid; gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice-body {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border: 1.5px solid var(--line-2);
  border-radius: var(--r-md); background: var(--surface); transition: border-color 0.15s, background 0.15s;
}
.choice-dot { display: grid; flex: none; place-items: center; width: 24px; height: 24px; border: 2px solid var(--field); border-radius: 50%; transition: all 0.15s; }
.choice-title { display: block; font-size: 15.5px; font-weight: 600; }
.choice-sub { display: block; color: var(--text-2); font-size: 13.5px; }
.choice-logo { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: #fff; font-size: 13px; font-weight: 800; }
.choice input:checked + .choice-body { border-color: var(--primary); background: #F5F8FF; }
.choice input:checked + .choice-body .choice-dot { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 5px #fff; }
.choice input:focus-visible + .choice-body { outline: 3px solid var(--primary); outline-offset: 2px; }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border: 1.5px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); font-size: 14.5px; line-height: 1.4; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--primary); }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp input {
  width: 100%; height: 60px; padding: 0; border: 1.5px solid var(--field); border-radius: var(--r-md); background: var(--surface);
  caret-color: var(--primary); font-size: 26px; font-weight: 700; text-align: center; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.otp input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--ring); }
.otp input.filled { border-color: var(--primary); background: #F5F8FF; }
.otp input[type="password"] { font-size: 34px; letter-spacing: 0; }
.pin-toggle { width: auto; min-height: 44px; margin: 8px auto 0; gap: 6px; color: var(--primary); font-weight: 600; }
.pin-toggle .ic { width: 18px; height: 18px; }
.photo-pick { position: relative; display: block; cursor: pointer; }
.photo-preview {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 104px; border: 1.5px dashed var(--field);
  border-radius: var(--r-md); background: #FAFBFD center / cover no-repeat; color: var(--text-2); font-size: 15px; font-weight: 600;
}
.photo-preview .ic { width: 26px; height: 26px; }
.photo-preview.has-photo { min-height: 170px; border: 0; color: transparent; }
.photo-preview.has-photo .ic { display: none; }
.photo-pick input:focus-visible + .photo-preview { outline: 3px solid var(--primary); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch-row:last-child { border-bottom: 0; }
.switch { position: relative; flex: none; width: 52px; height: 32px; }
.switch input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #CBD5E1; transition: background 0.2s; }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22); transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.select-btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 50px; margin-bottom: 14px; padding: 0 14px 0 16px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: #F6F8FB; font-size: 15.5px; font-weight: 500;
}
.select-btn .ic { width: 20px; height: 20px; color: var(--text-2); }

/* Photos : carrousel et visionneuse */
.carousel-wrap { position: relative; margin-bottom: 14px; overflow: hidden; border-radius: var(--r-lg); background: #DCE7F7; }
.carousel { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel img { flex: none; width: 100%; height: 220px; object-fit: cover; scroll-snap-align: center; }
.carousel-count { position: absolute; right: 10px; bottom: 10px; }
.carousel-wrap .photo-empty { height: 200px; }
.viewer { position: absolute; inset: 0; z-index: 80; display: flex; flex-direction: column; background: #05080F; color: #fff; animation: lk-fade 0.25s ease both; }
.viewer-top { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--sb) + 8px) 12px 8px 18px; font-weight: 600; }
.viewer .carousel { flex: 1; align-items: center; }
.viewer .carousel img { height: auto; max-height: 100%; object-fit: contain; }

/* Menu déroulant (hamburger) */
.dropdown-backdrop { position: absolute; inset: 0; z-index: 60; background: rgba(8, 18, 40, 0.35); opacity: 0; transition: opacity 0.2s; }
.dropdown-backdrop.open { opacity: 1; }
.dropdown {
  position: absolute; top: calc(var(--sb) + 132px); left: var(--gutter); right: var(--gutter); z-index: 61; max-height: 70%;
  overflow-y: auto; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(-10px) scale(0.98); transform-origin: top center; transition: opacity 0.2s, transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.dropdown.open { opacity: 1; transform: none; }
.dropdown .row { padding: 12px 16px; min-height: 64px; }
.dropdown .bubble { background: transparent; color: var(--primary); width: 34px; }
.dropdown-close { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; border: 0; border-top: 1px solid var(--line); background: none; font-size: 15px; font-weight: 600; }
.count-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #F97316; color: #fff; font-size: 12px; font-weight: 700; }

/* Fenêtre du bas (sheet) */
.sheet-backdrop { position: absolute; inset: 0; z-index: 60; background: rgba(8, 18, 40, 0.45); opacity: 0; transition: opacity 0.25s; }
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 90%; overflow-y: auto;
  padding: 8px var(--gutter) calc(20px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--surface);
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.2); transform: translateY(105%); transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.sheet.open { transform: none; }
.sheet-handle { width: 40px; height: 5px; margin: 0 auto 10px; border-radius: 9px; background: var(--line-2); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-bottom: 8px; }
.sheet-head h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.sheet-x { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--text); }
.sheet-x .ic { width: 22px; height: 22px; }
.sheet-text { margin: 0 0 16px; color: var(--text-2); font-size: 15px; }
.sheet .list { padding: 0; margin-bottom: 14px; }
.sheet .btn { margin-top: 12px; }
.legend-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; }
.legend-row + .legend-row { margin-top: 4px; }
.legend-row:nth-child(odd) { background: #F8FAFC; }
.legend-row strong { display: block; font-size: 15px; font-weight: 600; }
.legend-row span { display: block; color: var(--text-2); font-size: 13.5px; }
.radio-list .choice-body { min-height: 52px; border: 0; border-radius: 12px; background: transparent; }
.radio-list .choice input:checked + .choice-body { background: #F5F8FF; }

/* Toast */
.toast-wrap { position: absolute; left: 14px; right: 14px; bottom: 92px; z-index: 70; display: grid; gap: 8px; pointer-events: none; }
.device[data-chrome="none"] .toast-wrap { bottom: 28px; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 16px; background: #0F172A; color: #fff;
  font-size: 15px; font-weight: 600; line-height: 1.35; box-shadow: var(--shadow-pop); animation: lk-toast-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.toast .ic { width: 22px; height: 22px; color: #4ADE80; }
.toast-bad .ic { color: #FCA5A5; }
.toast-info .ic { color: #93C5FD; }
.toast.out { animation: lk-toast-out 0.3s ease forwards; }

/* Chargement, succès, frise */
.skel { border-radius: 12px; background: linear-gradient(90deg, #E5EBF3 0%, #F3F6FA 45%, #E5EBF3 90%); background-size: 300% 100%; animation: lk-shimmer 1.2s ease-in-out infinite; }
.skel-light { background: linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.32) 45%, rgba(255, 255, 255, 0.18) 90%); background-size: 300% 100%; }
.success { display: flex; flex-direction: column; align-items: center; padding: 28px 4px 18px; text-align: center; }
.success-badge {
  position: relative; display: grid; place-items: center; width: 112px; height: 112px; margin-bottom: 22px;
  border-radius: 50%; background: var(--ok-bg); color: var(--ok); animation: lk-pop 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.35) both;
}
.success-badge > .ic { width: 58px; height: 58px; stroke-width: 2.6; }
.success-badge > .ic path { stroke-dasharray: 26; stroke-dashoffset: 26; animation: lk-draw 0.45s 0.3s ease-out forwards; }
.success h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.success .lead { max-width: 330px; margin-top: 8px; color: var(--text-2); font-size: 15.5px; }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: 50%; left: 50%; width: 9px; height: 9px; border-radius: 2px; background: var(--c); opacity: 0; transform: translate(-50%, -50%); animation: lk-burst 1s 0.25s cubic-bezier(0.15, 0.8, 0.3, 1) forwards; }
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; top: 30px; bottom: 0; left: 13px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.tl-dot { display: grid; flex: none; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--line); color: #fff; }
.tl-dot .ic { width: 16px; height: 16px; stroke-width: 3; }
.tl-dot.done { background: var(--ok); }
.tl-dot.now { background: var(--primary); box-shadow: 0 0 0 5px var(--ring); }
.steps { display: grid; gap: 10px; margin: 0 0 14px; padding-left: 22px; font-size: 15.5px; }
.steps .ic { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; }
.pulse { animation: lk-pulse 1.6s ease-in-out infinite; }

/* États vides */
.empty { padding: 26px 18px; text-align: center; }
.empty .bubble { margin: 0 auto 16px; }
.empty h2 { margin-bottom: 6px; font-size: 19px; font-weight: 700; }
.empty p { margin-bottom: 18px; color: var(--text-2); font-size: 15px; }

/* Accueil : écran de bienvenue */
.splash { position: relative; display: flex; flex: 1 0 auto; flex-direction: column; min-height: 100%; overflow: hidden; color: #fff; background: #0A2E70; }
.splash { background: var(--hdr-glow), var(--hdr); }
.splash-photo {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 40%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 40%);
}
.splash-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 35%; }
.splash-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 31, 82, 0) 38%, rgba(7, 31, 82, 0.82) 78%, #071F52 100%); }
.splash-top { position: relative; z-index: 1; padding: calc(var(--sb) + 56px) 24px 0; text-align: center; }
.splash-logo { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 22px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3); }
.splash-title { font-size: 40px; font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.splash-title span { display: block; margin-top: 6px; color: #FCD34D; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.splash-sub { max-width: 280px; margin: 14px auto 0; font-size: 17px; opacity: 0.92; }
.splash-actions { position: relative; z-index: 1; display: grid; gap: 12px; margin-top: auto; padding: 0 24px calc(28px + env(safe-area-inset-bottom)); }
.splash-actions .btn + .btn { margin-top: 0; }
.splash-foot { margin-top: 4px; font-size: 14px; text-align: center; opacity: 0.8; }

/* Connexion */
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 4px; text-align: center; }
.auth-brand img { width: 60px; height: 60px; border-radius: 16px; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25); }
.auth-brand p { font-size: 15px; opacity: 0.9; }
.auth-form { display: flex; flex: 1; flex-direction: column; }
.auth-foot { margin-top: auto; padding-top: 18px; }

/* Reçu */
.receipt { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-card); }
.receipt-head { padding: 20px; text-align: center; color: #fff; background: var(--hdr-glow), var(--hdr); }
.receipt-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.receipt-no { margin: 6px 0 12px; font-size: 14px; opacity: 0.88; }
.receipt-main { padding: 20px 20px 18px; text-align: center; }
.receipt-main .t-display { margin: 6px 0; font-size: 32px; }
.receipt-sep { position: relative; margin: 0 20px; border-top: 2px dashed var(--line-2); }
.receipt-sep::before, .receipt-sep::after { content: ""; position: absolute; top: -14px; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.page .receipt-sep::before, .page .receipt-sep::after { background: var(--surface); }
.receipt-sep::before { left: -34px; }
.receipt-sep::after { right: -34px; }
.receipt .kv-list { padding: 4px 20px 6px; }
.verify { display: flex; align-items: center; gap: 12px; margin: 4px 20px 20px; padding: 14px; border-radius: var(--r-md); background: #F6F8FB; }
.verify code { display: block; color: var(--deep); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 19px; font-weight: 700; letter-spacing: 0.08em; }
.fineprint { margin: 14px 2px; color: var(--text-2); font-size: 13.5px; line-height: 1.45; }

/* Divers */
.install-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.install-top img { width: 48px; height: 48px; flex: none; border-radius: 13px; }
.install-text { flex: 1; min-width: 0; }
.install-text strong { display: block; font-size: 16px; font-weight: 700; }
.install-text span { display: block; color: var(--text-2); font-size: 13.5px; }
.icon-x { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 12px; background: none; color: var(--text-3); }
.icon-x .ic { width: 20px; height: 20px; }
.edit-btn { display: grid; flex: none; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.edit-btn .ic { width: 20px; height: 20px; }
.profile-card { display: flex; align-items: center; gap: 14px; }
.avatar { display: grid; flex: none; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--deep)); color: #fff; font-size: 22px; font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.home-tile { display: flex; gap: 12px; padding: 12px; color: inherit; text-decoration: none; }
.home-tile .thumb { width: 92px; height: 92px; border-radius: 14px; }
.home-tile-body { display: flex; flex: 1; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.home-tile-body h3 { font-size: 17px; font-weight: 700; }
.home-tile-body .row-between { margin-top: 4px; }
.cream-card { border-color: var(--cream-line); background: var(--cream); box-shadow: none; }
.recap .kv-list { padding: 0; }
.op-wave { background: #1DA1F2; }
.op-orange { background: #F97316; }
.op-mtn { background: #EAB308; color: #111827 !important; }
.op-moov { background: #2563EB; }
.phone-wait { display: grid; place-items: center; width: 112px; height: 112px; margin: 0 auto 22px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.phone-wait .ic { width: 52px; height: 52px; }

/* Installer l'app */
.install-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.install-hero img { width: 84px; height: 84px; margin-bottom: 8px; border-radius: 22px; box-shadow: 0 14px 30px rgba(10, 61, 145, 0.28); }
.install-hero .page-title { margin: 0; }
.isteps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: istep; }
.istep { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); counter-increment: istep; }
.istep strong { display: block; font-size: 15.5px; font-weight: 700; }
.istep strong::before { content: counter(istep) ". "; color: var(--primary); }
.istep div span { display: block; margin-top: 2px; color: var(--text-2); font-size: 14px; }
.istep-icon { flex: none; }
.istep-glyph { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--primary-soft); color: var(--primary); }
.istep-glyph .ic { width: 24px; height: 24px; }
.istep-text { width: auto; min-width: 46px; padding: 0 10px; font-size: 14px; font-weight: 700; }

/* Aperçu dans la page d'accueil du site (?apercu) */
.apercu .device { --sb: 30px; }
.apercu .statusbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 45; display: flex; align-items: center; justify-content: space-between;
  height: 30px; padding: 0 22px; color: #fff; font-size: 13px; font-weight: 600; pointer-events: none;
}
.apercu .statusbar .island { width: 86px; height: 24px; border-radius: 16px; background: #0B1220; }
.apercu .statusbar .sb-icons { display: flex; align-items: center; gap: 5px; }
.apercu .statusbar .sb-icons svg { width: auto; height: 10px; }
.apercu .tabbar { padding-bottom: 14px; }

.page-flex { display: flex; flex-direction: column; }
.page-solo { margin-top: 0; padding-top: calc(var(--sb) + 26px); border-radius: 0; }
.row-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.chart-dense { gap: 5px; }
.card.row { border: 1px solid var(--line); background: var(--surface); }
button.home-tile { width: 100%; text-align: left; cursor: pointer; }
button.tile { cursor: pointer; }
.tile[disabled] { opacity: 0.5; pointer-events: none; }
.device[data-tone="light"] .statusbar { color: #0F172A; }
.viewer .sheet-x { color: #fff; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }

/* Animations */
.anim-enter :is(.home-wrap, .page) > * { animation: lk-rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.anim-enter :is(.home-wrap, .page) > *:nth-child(2) { animation-delay: 0.04s; }
.anim-enter :is(.home-wrap, .page) > *:nth-child(3) { animation-delay: 0.08s; }
.anim-enter :is(.home-wrap, .page) > *:nth-child(4) { animation-delay: 0.12s; }
.anim-enter :is(.home-wrap, .page) > *:nth-child(5) { animation-delay: 0.16s; }
.anim-enter :is(.home-wrap, .page) > *:nth-child(n + 6) { animation-delay: 0.2s; }
.anim-push .page, .anim-push .home-wrap { animation: lk-push 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.anim-fade { animation: lk-fade 0.3s ease both; }
.shake { animation: lk-shake 0.4s; }
@keyframes lk-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes lk-push { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes lk-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lk-spin { to { transform: rotate(360deg); } }
@keyframes lk-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes lk-draw { to { stroke-dashoffset: 0; } }
@keyframes lk-burst {
  0% { opacity: 1; transform: translate(-50%, -50%) rotate(0) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) rotate(240deg) scale(0.6); }
}
@keyframes lk-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes lk-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes lk-toast-in { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes lk-toast-out { to { opacity: 0; transform: translateY(10px); } }
@keyframes lk-pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.25); } 50% { transform: scale(1.04); box-shadow: 0 0 0 16px rgba(37, 99, 235, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Barre de navigation du bas */
.tabbar {
  position: relative; z-index: 10; flex: none; display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.04);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 56px;
  color: #7A8AA0; font-size: 12.5px; font-weight: 500; text-decoration: none; transition: color 0.2s, transform 0.12s;
}
.tab .ic { width: 25px; height: 25px; }
.tab:active { transform: scale(0.94); }
.tab[aria-current="page"] { color: var(--primary); font-weight: 700; }

@media (max-width: 360px) {
  :root { --gutter: 14px; }
  .tiles { gap: 8px; }
  .tile { font-size: 12px; }
  .amount-chip { font-size: 13px; }
}

/* Page « Quel est votre profil ? » et pages en attente */
body.landing { min-height: 100vh; min-height: 100dvh; background: var(--bg); }
.landing-hero { position: relative; padding: 56px 20px 120px; color: #fff; text-align: center; background: var(--hdr-glow), var(--hdr); }
[data-app="agence"] .landing-sub { color: #FDBA74; }
[data-app="proprietaire"] .landing-hero { color: #08306B; }
.landing-icon { width: 92px; height: 92px; margin: 0 auto 16px; border-radius: 26px; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28); }
.landing-title { font-size: 46px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.landing-sub { margin-top: 6px; color: #FCD34D; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
[data-app="proprietaire"] .landing-sub { color: #08306B; }
.landing-tag { max-width: 340px; margin: 12px auto 0; font-size: 17px; opacity: 0.92; }
.landing-body { position: relative; max-width: 560px; margin: -88px auto 0; padding: 0 16px 28px; }
.landing-card { padding: 20px 16px 18px; border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow-card); }
.landing-q { margin: 0 4px 12px; font-size: 21px; font-weight: 700; letter-spacing: -0.02em; text-align: center; }
.profiles { display: grid; gap: 10px; }
.profile {
  display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 14px; border: 1px solid var(--line); border-radius: 18px;
  background: #fff; color: var(--text); text-decoration: none; transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}
.profile:hover { border-color: #BFD3FB; box-shadow: var(--shadow-soft); }
.profile:active { transform: scale(0.98); }
.profile-icon { display: grid; flex: none; place-items: center; width: 52px; height: 52px; border-radius: 15px; color: #fff; }
.profile-icon .ic { width: 27px; height: 27px; }
.profile-text { flex: 1; min-width: 0; }
.profile-text strong { display: block; font-size: 17px; font-weight: 700; }
.profile-text span { display: block; margin-top: 2px; color: var(--text-2); font-size: 14px; }
.profile-go { color: var(--text-3); }
.profile-locataire .profile-icon { background: linear-gradient(135deg, #3B82F6, #1D4ED8); }
.profile-agence .profile-icon { background: linear-gradient(135deg, #FB923C, #EA580C); }
.profile-proprietaire .profile-icon { background: linear-gradient(135deg, #FCD34D, #EAB308); color: #08306B; }
.landing-points { display: grid; gap: 10px; margin: 18px 4px 0; padding: 0; list-style: none; }
.landing-points li { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 15px; font-weight: 500; }
.landing-points .ic { color: var(--ok); }
.landing-foot { padding: 6px 16px 28px; color: var(--text-3); font-size: 13px; text-align: center; }
.landing-back { position: absolute; top: 14px; left: 12px; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 8px; color: inherit; font-weight: 600; text-decoration: none; }
.soon { padding: 22px 18px; text-align: center; }
.soon h2 { margin: 12px 0 6px; font-size: 20px; font-weight: 700; }
.soon p { margin-bottom: 18px; color: var(--text-2); font-size: 15px; }

/* Impression du reçu (« Télécharger le PDF ») */
@media print {
  @page { margin: 14mm; }
  body.app-body { height: auto; overflow: visible; background: #fff; }
  .side, .tabbar, .statusbar, .hdr, .offline-banner, .toast-wrap, .no-print, .fineprint { display: none !important; }
  .stage, .device, .screen, .page {
    display: block !important; width: auto !important; max-width: none !important; height: auto !important; margin: 0 !important;
    padding: 0 !important; overflow: visible !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; animation: none !important;
  }
  .device::after { display: none !important; }
  .receipt { max-width: 520px; margin: 0 auto; box-shadow: none; }
  .receipt-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
