/* =============================================================================
   massify-ui.css — Couche design « méthode Massify Locations »
   Appliquée aux 3 apps Immobilière (admin / agence / client).
   Contenu : thème sombre premium, cartes, boutons 3D, tags, formulaires, tables,
   navigation (topbar, drawer, bottom-nav), messagerie, module paiement manuel,
   masquage des numéros, toasts, animations (reveal, compteurs, ripple, splash).
   Aucune modification du logo ni des informations de marque.
   ============================================================================= */

/* ---------- 1. Jetons de couleur (palette Locations) ---------- */
html[data-app] {
  --mz-bg: #070b16;
  --mz-bg2: #0d1428;
  --mz-card: #111a33;
  --mz-card2: #0a1230;
  --mz-line: #1f2b4d;
  --mz-txt: #eef2ff;
  --mz-mut: #8ea0c8;
  --mz-acc: #f59e0b;
  --mz-acc2: #fbbf24;
  --mz-vio: #7b2ff7;
  --mz-ok: #22c55e;
  --mz-bad: #ef4444;
  --mz-blue: #3b82f6;
  --mz-deep: 0 20px 48px rgba(0, 0, 0, .52);
  --mz-soft: 0 8px 24px rgba(0, 0, 0, .35);
  --mz-r: 16px;
}

/* --- Admin (app claire -> thème Locations sombre) --- */
html[data-app="admin"] {
  --navy: #0b1224; --navy2: #132e57; --navy3: #1b3a6b;
  --gold: #f59e0b; --gold2: #fbbf24; --gold-soft: #2a2410;
  --bg: #070b16; --card: #111a33; --ink: #eef2ff; --muted: #8ea0c8;
  --ok: #22c55e; --warn: #f59e0b; --danger: #ef4444; --info: #3b82f6;
  --input-bg: #0c1428; --input-border: #22315e;
  --item-bg: #0c1428; --item-border: #1f2b4d;
  --shadow: 0 20px 48px rgba(0, 0, 0, .52);
  --radius: 16px;
}
/* --- Agence (déjà sombre : alignement sur la palette exacte) --- */
html[data-app="agence"] {
  --bg: #060b18; --bg2: #0c1430; --card: #101b3d; --card2: #16213a;
  --gold: #f59e0b; --gold2: #fbbf24; --gold-dim: #8a6a1a; --vio: #7b2ff7;
  --text: #eef2ff; --muted: #93a3cf; --line: rgba(245, 158, 11, .22);
  --ok: #22c55e; --warn: #f59e0b; --err: #ef4444; --info: #38bdf8;
  --radius: 16px; --shadow: 0 20px 48px rgba(0, 0, 0, .52);
}
/* --- Client / site public (clair -> thème Locations sombre) --- */
html[data-app="client"] {
  --navy: #0b1224; --navy2: #16263f;
  --gold: #f59e0b; --gold2: #fbbf24;
  --bg: #070b16; --card: #111a33; --muted: #8ea0c8; --line: #1f2b4d;
  --ink: #eef2ff; --ok: #22c55e; --danger: #ef4444;
  --shadow: 0 20px 48px rgba(0, 0, 0, .52); --radius: 16px;
}

/* ---------- 2. Base ---------- */
html[data-app] body {
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(123, 47, 247, .16), transparent 60%),
    radial-gradient(900px 460px at 6% 4%, rgba(245, 158, 11, .10), transparent 62%),
    var(--mz-bg) !important;
  color: var(--mz-txt) !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html[data-app] ::selection { background: rgba(245, 158, 11, .35); color: #fff; }
html[data-app] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-app] ::-webkit-scrollbar-thumb { background: #22315e; border-radius: 8px; }
html[data-app] ::-webkit-scrollbar-track { background: transparent; }
html[data-app] a { color: var(--mz-acc2); text-decoration: none; }
html[data-app] h1, html[data-app] h2, html[data-app] h3 { color: var(--mz-txt); letter-spacing: -.2px; }
html[data-app] .small, html[data-app] .muted, html[data-app] .meta { color: var(--mz-mut) !important; }

/* ---------- 3. Surfaces : cartes, sections, entêtes ---------- */
html[data-app] .card,
html[data-app] .property-card,
html[data-app] .agency-card,
html[data-app] .account-card,
html[data-app] .conv-item,
html[data-app] .stat,
html[data-app] .choice,
html[data-app] .panel,
html[data-app] .sheet {
  background: linear-gradient(180deg, var(--mz-card), var(--mz-card2)) !important;
  border: 1px solid var(--mz-line) !important;
  border-radius: var(--mz-r) !important;
  box-shadow: var(--mz-soft) !important;
  color: var(--mz-txt) !important;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s, border-color .35s;
}
html[data-app] .card:hover,
html[data-app] .property-card:hover,
html[data-app] .agency-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, .45) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(245, 158, 11, .18) inset !important;
}
html[data-app] header,
html[data-app] .topbar,
html[data-app] .appbar,
html[data-app] .brand-bar {
  background: linear-gradient(180deg, #0b1224, #0a1020) !important;
  border-bottom: 1px solid var(--mz-line) !important;
  color: var(--mz-txt) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
html[data-app] .hero,
html[data-app] .entry-hero {
  background:
    radial-gradient(700px 320px at 85% -20%, rgba(245, 158, 11, .22), transparent 60%),
    linear-gradient(180deg, #101b3d, #0a1230) !important;
  border: 1px solid var(--mz-line) !important;
  border-radius: var(--mz-r) !important;
  color: var(--mz-txt) !important;
}

/* ---------- 4. Boutons (méthode Locations : 3D + press) ---------- */
html[data-app] .btn,
html[data-app] button.btn,
html[data-app] .btn-gold,
html[data-app] .btn-navy,
html[data-app] .btn-dark,
html[data-app] .btn-ghost,
html[data-app] .btn-ok,
html[data-app] .btn-danger,
html[data-app] .btn-line,
html[data-app] .chip,
html[data-app] .chip-btn,
html[data-app] .mz-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.22, 1, .36, 1), box-shadow .22s, filter .22s, background .22s;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
html[data-app] .btn:active,
html[data-app] .btn-gold:active,
html[data-app] .btn-navy:active,
html[data-app] .btn-dark:active,
html[data-app] .btn-ghost:active,
html[data-app] .btn-ok:active,
html[data-app] .btn-danger:active,
html[data-app] .chip:active { transform: translateY(2px) scale(.985); }

/* primaire (or) */
html[data-app] .btn-gold,
html[data-app] .mz-btn-primary,
html[data-app] .btn.btn-primary {
  background: linear-gradient(180deg, var(--mz-acc2), var(--mz-acc)) !important;
  color: #1a1300 !important;
  border-color: rgba(255, 255, 255, .18) !important;
  box-shadow: 0 8px 22px rgba(245, 158, 11, .30), 0 1px 0 rgba(255, 255, 255, .35) inset !important;
}
html[data-app] .btn-gold:hover,
html[data-app] .mz-btn-primary:hover { filter: brightness(1.06); box-shadow: 0 12px 28px rgba(245, 158, 11, .42) !important; }
/* secondaire (navy) */
html[data-app] .btn-navy,
html[data-app] .btn-dark,
html[data-app] .mz-btn-dark {
  background: linear-gradient(180deg, #1b3a6b, #132e57) !important;
  color: #eef2ff !important;
  border-color: rgba(255, 255, 255, .10) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .4) !important;
}
/* fantôme */
html[data-app] .btn-ghost,
html[data-app] .mz-btn-ghost {
  background: rgba(255, 255, 255, .04) !important;
  color: var(--mz-txt) !important;
  border: 1px solid var(--mz-line) !important;
}
html[data-app] .btn-ghost:hover { background: rgba(245, 158, 11, .12) !important; border-color: rgba(245, 158, 11, .45) !important; }
/* états */
html[data-app] .btn-ok { background: linear-gradient(180deg, #34d399, #22c55e) !important; color: #05230f !important; }
html[data-app] .btn-danger, html[data-app] .btn-logout { background: linear-gradient(180deg, #f87171, #ef4444) !important; color: #2a0505 !important; }
html[data-app] .btn-line { background: transparent !important; border: 1px solid var(--mz-line) !important; color: var(--mz-txt) !important; }
html[data-app] .btn[disabled], html[data-app] button[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; }
html[data-app] .btn-sm { padding: 7px 11px; font-size: 12.5px; border-radius: 10px; }
/* ripple */
html[data-app] .mz-ripple {
  position: absolute; border-radius: 50%; transform: scale(0); opacity: .55;
  background: rgba(255, 255, 255, .55); pointer-events: none;
  animation: mz-ripple .6s ease-out forwards;
}
@keyframes mz-ripple { to { transform: scale(2.6); opacity: 0; } }

/* ---------- 5. Formulaires ---------- */
html[data-app] input:not([type="checkbox"]):not([type="radio"]),
html[data-app] select,
html[data-app] textarea {
  background: #0c1428 !important;
  border: 1px solid var(--mz-line) !important;
  color: var(--mz-txt) !important;
  border-radius: 12px !important;
  padding: 11px 13px !important;
  font-size: 14px !important;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  max-width: 100%;
}
html[data-app] input:focus, html[data-app] select:focus, html[data-app] textarea:focus {
  border-color: var(--mz-acc) !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .18) !important;
  background: #0e1830 !important;
}
html[data-app] input::placeholder, html[data-app] textarea::placeholder { color: #6b7fa8 !important; }
html[data-app] label, html[data-app] .field label { color: var(--mz-mut) !important; font-weight: 600; }
html[data-app] option { background: #0c1428; color: var(--mz-txt); }

/* ---------- 6. Tags / badges de statut ---------- */
html[data-app] .badge,
html[data-app] .tag,
html[data-app] .b-pending, html[data-app] .b-published, html[data-app] .b-approved,
html[data-app] .b-rejected, html[data-app] .b-suspended, html[data-app] .b-draft,
html[data-app] .b-active, html[data-app] .b-expired, html[data-app] .b-archived,
html[data-app] .b-accepted, html[data-app] .b-cancelled, html[data-app] .b-sold,
html[data-app] .b-rented, html[data-app] .mz-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .2px;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  background: rgba(255, 255, 255, .06) !important; color: var(--mz-txt) !important;
}
html[data-app] .b-published, html[data-app] .b-approved, html[data-app] .b-active,
html[data-app] .b-accepted, html[data-app] .mz-tag-ok {
  background: rgba(34, 197, 94, .16) !important; color: #86efac !important; border-color: rgba(34, 197, 94, .35) !important;
}
html[data-app] .b-pending, html[data-app] .b-draft, html[data-app] .mz-tag-warn {
  background: rgba(245, 158, 11, .16) !important; color: #fcd34d !important; border-color: rgba(245, 158, 11, .35) !important;
}
html[data-app] .b-rejected, html[data-app] .b-suspended, html[data-app] .b-expired,
html[data-app] .b-cancelled, html[data-app] .mz-tag-bad {
  background: rgba(239, 68, 68, .16) !important; color: #fca5a5 !important; border-color: rgba(239, 68, 68, .35) !important;
}

/* ---------- 7. Tables ---------- */
html[data-app] table { width: 100%; border-collapse: collapse; }
html[data-app] th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--mz-mut) !important; padding: 10px 12px; border-bottom: 1px solid var(--mz-line) !important;
  background: rgba(255, 255, 255, .02) !important;
}
html[data-app] td { padding: 11px 12px; border-bottom: 1px solid rgba(31, 43, 77, .7) !important; color: var(--mz-txt) !important; font-size: 13.5px; }
html[data-app] tr:hover td { background: rgba(245, 158, 11, .05) !important; }
html[data-app] .tablewrap, html[data-app] .table-responsive { overflow-x: auto; border-radius: 12px; border: 1px solid var(--mz-line); }

/* ---------- 8. Navigation : dessus, tiroir, bas ---------- */
html[data-app] .hamburger, html[data-app] #btnBurger {
  background: rgba(255, 255, 255, .06) !important; color: var(--mz-txt) !important;
  border: 1px solid var(--mz-line) !important; border-radius: 12px !important;
  width: 42px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: transform .2s, background .2s;
}
html[data-app] .hamburger:hover, html[data-app] #btnBurger:hover { background: rgba(245, 158, 11, .15) !important; }
html[data-app] .hamburger:active, html[data-app] #btnBurger:active { transform: scale(.94); }

html[data-app] .drawer, html[data-app] aside.drawer, html[data-app] #drawer, html[data-app] .drawer-nav, html[data-app] .mz-drawer {
  background: linear-gradient(180deg, #0c1430, #070b16) !important;
  border-right: 1px solid var(--mz-line) !important;
  box-shadow: 24px 0 60px rgba(0, 0, 0, .55) !important;
  color: var(--mz-txt) !important;
  transition: transform .38s cubic-bezier(.22, 1, .36, 1), opacity .3s;
}
html[data-app] .drawer .dlink, html[data-app] .drawer-nav a, html[data-app] .drawer-row, html[data-app] .mz-drawer a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px; color: var(--mz-txt) !important;
  font-weight: 600; transition: background .2s, transform .2s, color .2s;
}
html[data-app] .drawer .dlink:hover, html[data-app] .drawer-nav a:hover, html[data-app] .mz-drawer a:hover {
  background: rgba(245, 158, 11, .14); transform: translateX(3px); color: #fff !important;
}
html[data-app] .mz-overlay {
  position: fixed; inset: 0; z-index: 9998; background: rgba(3, 6, 14, .62);
  backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .3s;
}
html[data-app] .mz-overlay.show { opacity: 1; pointer-events: auto; }

html[data-app] .bottomnav, html[data-app] .bottomnav-inner, html[data-app] .nav-bas {
  background: linear-gradient(180deg, rgba(12, 20, 48, .96), rgba(7, 11, 22, .98)) !important;
  border-top: 1px solid var(--mz-line) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, .45);
}
html[data-app] .bottomnav a, html[data-app] .bottomnav button, html[data-app] .nav-bas a {
  color: var(--mz-mut) !important; transition: color .2s, transform .2s;
}
html[data-app] .bottomnav a.active, html[data-app] .bottomnav button.active, html[data-app] .nav-bas a.active {
  color: var(--mz-acc2) !important; transform: translateY(-2px);
}

/* ---------- 9. Messagerie (bulles façon Locations) ---------- */
html[data-app] .bubble, html[data-app] .bub, html[data-app] .msg-bubble, html[data-app] .message {
  border-radius: 16px 16px 16px 6px !important;
  padding: 10px 13px !important;
  background: #16213a !important;
  border: 1px solid var(--mz-line) !important;
  color: var(--mz-txt) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  animation: mz-pop .28s cubic-bezier(.22, 1, .36, 1) both;
  max-width: 84%;
  word-break: break-word;
}
html[data-app] .bubble.me, html[data-app] .bub.me, html[data-app] .bubble.mine,
html[data-app] .msg-bubble.me, html[data-app] .message.me {
  border-radius: 16px 16px 6px 16px !important;
  background: linear-gradient(180deg, rgba(245, 158, 11, .22), rgba(245, 158, 11, .12)) !important;
  border-color: rgba(245, 158, 11, .4) !important;
  margin-left: auto;
}
@keyframes mz-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
html[data-app] .conv-unread, html[data-app] .nbadge {
  background: var(--mz-bad) !important; color: #fff !important;
  border-radius: 999px; font-size: 11px; font-weight: 800; padding: 1px 7px;
  animation: mz-pulse 1.8s ease-in-out infinite;
}
@keyframes mz-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); } 50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); } }

/* ---------- 10. Masquage des numéros ---------- */
html[data-app] .mz-phone {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(245, 158, 11, .12); border: 1px dashed rgba(245, 158, 11, .45);
  font-variant-numeric: tabular-nums; font-weight: 700; color: #fcd34d;
}
html[data-app] .mz-phone button {
  border: 0; background: transparent; color: var(--mz-acc2);
  font-size: 12px; font-weight: 800; cursor: pointer; padding: 0 2px;
}
html[data-app] .mz-phone.revealed { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .45); color: #86efac; }

/* ---------- 11. Toasts / alertes ---------- */
html[data-app] .toast, html[data-app] #toast, html[data-app] .mz-toast {
  border-radius: 14px !important;
  font-weight: 700;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55) !important;
  animation: mz-slide .32s cubic-bezier(.22, 1, .36, 1) both;
  z-index: 2147483000;
}
@keyframes mz-slide { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
html[data-app] .alert, html[data-app] .errbox, html[data-app] .err {
  border-radius: 14px !important; border: 1px solid rgba(239, 68, 68, .4) !important;
  background: rgba(239, 68, 68, .12) !important; color: #fecaca !important; padding: 12px 14px;
}

/* ---------- 12. Module paiement manuel (méthode Locations) ---------- */
.mz-sheet-wrap {
  position: fixed; inset: 0; z-index: 2147483200; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(3, 6, 14, .66); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .28s;
}
.mz-sheet-wrap.show { opacity: 1; pointer-events: auto; }
.mz-sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  background: linear-gradient(180deg, #101b3d, #0a1230);
  border: 1px solid var(--mz-line, #1f2b4d); border-bottom: 0;
  border-radius: 22px 22px 0 0; color: var(--mz-txt, #eef2ff);
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateY(22px); transition: transform .34s cubic-bezier(.22, 1, .36, 1);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.mz-sheet-wrap.show .mz-sheet { transform: none; }
.mz-sheet h3 { margin: 0 0 4px; font-size: 18px; color: #eef2ff; }
.mz-sheet .mz-sub { color: #8ea0c8; font-size: 12.5px; margin-bottom: 12px; }
.mz-sheet .mz-grab { width: 44px; height: 4px; border-radius: 4px; background: #24345c; margin: 0 auto 12px; }
.mz-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.mz-grid .full { grid-column: 1 / -1; }
.mz-lab { font-size: 12px; font-weight: 700; color: #8ea0c8; margin-bottom: 4px; display: block; }
.mz-sheet input, .mz-sheet select, .mz-sheet textarea {
  width: 100%; background: #0c1428; border: 1px solid #1f2b4d; color: #eef2ff;
  border-radius: 12px; padding: 11px 12px; font-size: 14px; outline: none;
}
.mz-sheet input:focus, .mz-sheet select:focus, .mz-sheet textarea:focus {
  border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .18);
}
.mz-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 12px; }
.mz-method {
  border: 1px solid #1f2b4d; background: rgba(255, 255, 255, .03); color: #eef2ff;
  border-radius: 12px; padding: 10px 6px; font-size: 12px; font-weight: 800; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px; transition: all .2s;
}
.mz-method span { font-size: 18px; }
.mz-method.active { border-color: #f59e0b; background: rgba(245, 158, 11, .16); color: #fcd34d; transform: translateY(-2px); }
.mz-actions { display: flex; gap: 8px; margin-top: 14px; }
.mz-actions button { flex: 1; border: 0; border-radius: 12px; padding: 12px; font-weight: 800; font-size: 14px; cursor: pointer; }
.mz-actions .mz-cancel { background: rgba(255, 255, 255, .06); color: #cbd5e1; }
.mz-actions .mz-save { background: linear-gradient(180deg, #fbbf24, #f59e0b); color: #1a1300; box-shadow: 0 8px 22px rgba(245, 158, 11, .3); }
.mz-actions .mz-save:active { transform: translateY(2px) scale(.99); }
.mz-pay-list { margin-top: 12px; display: grid; gap: 8px; }
.mz-pay-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: rgba(255, 255, 255, .035); border: 1px solid #1f2b4d; border-radius: 12px;
  font-size: 13px;
}
.mz-pay-row b { color: #fbbf24; }
.mz-pay-ico { font-size: 18px; }
.mz-pay-meta { flex: 1; min-width: 0; }
.mz-pay-meta small { display: block; color: #8ea0c8; font-size: 11.5px; }
.mz-empty { color: #8ea0c8; font-size: 13px; padding: 10px 0; }
.mz-fab {
  position: fixed; right: 14px; bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  z-index: 2147482000; width: 54px; height: 54px; border-radius: 50%; border: 0;
  background: linear-gradient(180deg, #fbbf24, #f59e0b); color: #1a1300;
  font-size: 22px; font-weight: 800; cursor: pointer;
  box-shadow: 0 14px 34px rgba(245, 158, 11, .42);
  transition: transform .2s, box-shadow .2s;
}
.mz-fab:active { transform: scale(.94); }

/* ---------- 13. Animations : reveal, compteurs, splash ---------- */
html[data-app] .rv { opacity: 0; transform: translateY(18px); }
html[data-app] .rv-in { opacity: 1; transform: none; transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform .7s cubic-bezier(.22, 1, .36, 1); }
html[data-app] .mz-count { font-variant-numeric: tabular-nums; }
.mz-splash {
  position: fixed; inset: 0; z-index: 2147483400; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(600px 400px at 50% 30%, #132e57, #070b16 70%);
  color: #eef2ff; transition: opacity .5s ease, visibility .5s;
}
.mz-splash.hide { opacity: 0; visibility: hidden; }
.mz-splash img { width: 84px; height: 84px; border-radius: 22px; object-fit: contain; box-shadow: 0 18px 40px rgba(0, 0, 0, .55); animation: mz-logo .9s cubic-bezier(.22, 1, .36, 1) both; }
.mz-splash b { font-size: 17px; letter-spacing: .3px; }
.mz-splash small { color: #93a3cf; font-size: 12.5px; }
.mz-splash .mz-bar { width: 120px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.mz-splash .mz-bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: linear-gradient(90deg, #f59e0b, #7b2ff7); animation: mz-load 1.1s ease-in-out infinite; }
@keyframes mz-logo { from { opacity: 0; transform: scale(.86) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes mz-load { 0% { transform: translateX(-60px); } 100% { transform: translateX(160px); } }
@keyframes mz-fade-in { from { opacity: 0; } to { opacity: 1; } }
html[data-app] .page:not(.hidden), html[data-app] .view:not(.hidden) { animation: mz-fade-in .3s ease both; }

/* ---------- 14. Impression & accessibilité ---------- */
@media print {
  html[data-app] body { background: #fff !important; color: #000 !important; }
  .mz-fab, .mz-splash, .mz-sheet-wrap, .drawer, .bottomnav, .hamburger { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-app] *, .mz-sheet, .mz-splash { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html[data-app] .rv { opacity: 1 !important; transform: none !important; }
}

/* ============================================================================
   15. Neutralisation des surfaces claires (apps Admin & Client passées en dark)
   Corrige les règles codées en dur (#fff) qui resteraient claires sous un texte clair.
   ============================================================================ */
/* jetons dark imposés quel que soit le thème choisi par l'utilisateur */
html[data-app="admin"][data-theme],
html[data-app="admin"][data-theme="light"],
html[data-app="admin"][data-theme="dark"] {
  --navy: #0b1224; --navy2: #132e57; --navy3: #1b3a6b;
  --gold: #f59e0b; --gold2: #fbbf24; --gold-soft: #2a2410;
  --bg: #070b16; --card: #111a33; --ink: #eef2ff; --muted: #8ea0c8;
  --line: #1f2b4d; --input-bg: #0c1428; --input-border: #22315e;
  --item-bg: #0c1428; --item-border: #1f2b4d;
  --shadow: 0 20px 48px rgba(0, 0, 0, .52); --radius: 16px;
}
html[data-app="client"][data-theme],
html[data-app="client"][data-theme="light"],
html[data-app="client"][data-theme="dark"] {
  --bg: #070b16; --bg2: #0d1428; --card: #111a33; --card2: #0a1230;
  --line: #1f2b4d; --navy: #eef2ff; --gold: #f59e0b; --gold2: #fbbf24;
  --muted: #8ea0c8; --txt: #eef2ff;
}
/* surfaces jadis blanches */
html[data-app] .login-card,
html[data-app] .item,
html[data-app] .state,
html[data-app] .tab,
html[data-app] .preset,
html[data-app] .actions .btn,
html[data-app] .btn-line,
html[data-app] .panel,
html[data-app] .empty,
html[data-app] .kv div,
html[data-app] .modal,
html[data-app] .specs span,
html[data-app] .selrow select,
html[data-app] .selrow input,
html[data-app] .toolbar input,
html[data-app] .form input,
html[data-app] .form select,
html[data-app] .form textarea {
  background: linear-gradient(180deg, var(--mz-card), var(--mz-card2)) !important;
  color: var(--mz-txt) !important;
  border: 1px solid var(--mz-line) !important;
  border-radius: 14px !important;
}
html[data-app] .login-card {
  border-top: 6px solid var(--mz-acc) !important;
  box-shadow: var(--mz-deep) !important;
  padding: 18px !important;
}
html[data-app] .login-card h2, html[data-app] .login-card h1 { color: var(--mz-txt) !important; }
html[data-app] .state.err, html[data-app] .errbox {
  background: rgba(239, 68, 68, .12) !important; color: #fecaca !important;
  border-color: rgba(239, 68, 68, .4) !important;
}
html[data-app] .actions .btn-ok, html[data-app] .btn-ok {
  background: linear-gradient(180deg, #34d399, #22c55e) !important; color: #05230f !important;
}
html[data-app] .actions .btn-danger, html[data-app] .btn-reject, html[data-app] .btn-logout {
  background: linear-gradient(180deg, #f87171, #ef4444) !important; color: #fff !important;
}
html[data-app] .theme-btn, html[data-app] .langsel, html[data-app] .hamb-btn, html[data-app] .hamburger {
  background: rgba(255, 255, 255, .06) !important; color: var(--mz-txt) !important;
  border: 1px solid var(--mz-line) !important;
}
html[data-app] #drawer, html[data-app] .drawer-nav, html[data-app] .drawer-head {
  background: linear-gradient(180deg, #0c1430, #070b16) !important;
  border-right: 1px solid var(--mz-line) !important;
  border-color: var(--mz-line) !important;
  color: var(--mz-txt) !important;
}
html[data-app] .drawer-nav a, html[data-app] .drawer a, html[data-app] #drawer a { color: var(--mz-txt) !important; }
html[data-app] .bottomnav, html[data-app] .bottomnav-inner, html[data-app] .navbtn {
  color: var(--mz-mut) !important;
}
html[data-app] .bottomnav .navbtn[aria-current="page"], html[data-app] .navbtn.active {
  color: #fbbf24 !important; background: rgba(245, 158, 11, .14) !important; border-radius: 10px;
}
/* messagerie : couvre aussi .bub / .msg / .msg.me */
html[data-app] .bub, html[data-app] .msg, html[data-app] .msg.them {
  background: #16213a !important; border: 1px solid var(--mz-line) !important;
  color: var(--mz-txt) !important; border-radius: 16px 16px 16px 6px !important;
}
html[data-app] .bub.mine, html[data-app] .msg.me {
  background: linear-gradient(180deg, rgba(245, 158, 11, .24), rgba(245, 158, 11, .12)) !important;
  border: 1px solid rgba(245, 158, 11, .4) !important; color: #fff !important;
  border-radius: 16px 16px 6px 16px !important; margin-left: auto;
}
/* catégories / chips clairs du site client */
html[data-app] .cat, html[data-app] .chip-btn, html[data-app] .toggle button {
  background: rgba(255, 255, 255, .05) !important; color: var(--mz-txt) !important;
  border: 1px solid var(--mz-line) !important; border-radius: 12px !important;
}
html[data-app] .chip-btn[aria-pressed="true"], html[data-app] .toggle button.active {
  background: rgba(245, 158, 11, .18) !important; color: #fcd34d !important;
  border-color: rgba(245, 158, 11, .5) !important;
}
/* titres / textes hérités en navy sur fond sombre */
html[data-app] h1, html[data-app] h2, html[data-app] h3, html[data-app] h4,
html[data-app] .title, html[data-app] .section-head a, html[data-app] b, html[data-app] strong { color: var(--mz-txt); }

/* ============================================================================
   16. Textes héritant de var(--navy) (devenu sombre) -> forçage clair, sauf sur fond or
   ============================================================================ */
html[data-app] .kpi,
html[data-app] .card h3,
html[data-app] .card h2,
html[data-app] .card h4,
html[data-app] .form label,
html[data-app] .login-card h2,
html[data-app] .toolbar label,
html[data-app] .list h4,
html[data-app] .item b,
html[data-app] .item h4,
html[data-app] td b,
html[data-app] .state,
html[data-app] .tab,
html[data-app] .preset { color: var(--mz-txt) !important; }

/* éléments posés sur un fond or : texte sombre */
html[data-app] .btn-gold,
html[data-app] .brand-badge,
html[data-app] .tab.active,
html[data-app] .chip-btn[aria-pressed="true"],
html[data-app] .toggle button.active { color: #14100a !important; }

/* onglets / pilules */
html[data-app] .tab {
  background: rgba(255, 255, 255, .04) !important;
  border: 1px solid var(--mz-line) !important;
}
html[data-app] .tab.active {
  background: linear-gradient(180deg, var(--mz-acc2), var(--mz-acc)) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 20px rgba(245, 158, 11, .28) !important;
}
html[data-app] .kpi-sub { color: var(--mz-mut) !important; }

/* icônes SVG inline (remplacent les emoji dans les composants ajoutés) */
html[data-app] .mz-fab svg { stroke: #1a1300; }
html[data-app] .mz-method svg { stroke: currentColor; }
html[data-app] .mz-pay-ico svg { stroke: var(--mz-acc2); }
html[data-app] .mz-phone button svg { vertical-align: -2px; stroke: currentColor; }
html[data-app] .mz-toast svg { vertical-align: -2px; stroke: currentColor; }
html[data-app] .mz-method { display: flex; align-items: center; justify-content: center; gap: 5px; flex-direction: column; }

/* ============================================================================
   17. Conteneurs restés clairs (barres d'onglets, blocs de résultat, boutons lien)
   ============================================================================ */
html[data-app] nav.tabs,
html[data-app] #topTabs,
html[data-app] .tabs,
html[data-app] .toolbar,
html[data-app] .kpis,
html[data-app] .filters,
html[data-app] .cats,
html[data-app] .selrow,
html[data-app] .list,
html[data-app] .item-head,
html[data-app] .result-box,
html[data-app] .sheet-head,
html[data-app] .modal-head {
  background: transparent !important;
  border-color: var(--mz-line) !important;
  color: var(--mz-txt) !important;
}
html[data-app] nav.tabs {
  background: linear-gradient(180deg, #0c1430, #0a1020) !important;
  border-bottom: 1px solid var(--mz-line) !important;
  padding: 6px !important;
  gap: 6px;
}
html[data-app] .result-box {
  background: rgba(34, 197, 94, .12) !important;
  border: 1px solid rgba(34, 197, 94, .35) !important;
  color: #bbf7d0 !important;
  border-radius: 12px !important;
  padding: 10px 12px;
}
html[data-app] a.btn {
  background: linear-gradient(180deg, var(--mz-card), var(--mz-card2)) !important;
  color: var(--mz-txt) !important;
  border: 1px solid var(--mz-line) !important;
}
html[data-app] a.btn.btn-gold,
html[data-app] a.btn-primary {
  background: linear-gradient(180deg, var(--mz-acc2), var(--mz-acc)) !important;
  color: #14100a !important;
  border-color: transparent !important;
}
html[data-app] .whatsapp, html[data-app] .btn-wa, html[data-app] .btn-ig {
  color: #fff !important;
}

/* ============================================================================
   18. FIDÉLITÉ EXACTE — règles copiées à l'identique du dépôt Locations
   (agence-app/web — mêmes valeurs, mêmes ombres, mêmes keyframes).
   ============================================================================ */
@keyframes cardIn { from { opacity: 0; transform: translateY(8px) } }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px) } }
@keyframes modalIn { from { opacity: 0; transform: scale(.9) translateY(16px) } }
@keyframes drawerSlideIn { from { opacity: 0; transform: translateX(-100%) } }
@keyframes riseIn { from { opacity: 0; transform: translateY(26px) } }
@keyframes toastPop { 0% { opacity: 0; transform: translateX(-50%) translateY(84px) scale(.88) } 100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1) } }
@keyframes rip { from { transform: scale(0); opacity: .65 } to { transform: scale(2.4); opacity: 0 } }
@keyframes pulseB { 0%, 100% { box-shadow: 0 0 0 rgba(245, 158, 11, 0) } 50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, .18) } }
@keyframes kenburns { from { transform: scale(1) } to { transform: scale(1.08) } }

/* --- carte (identique) --- */
html[data-app] .card,
html[data-app] .property-card,
html[data-app] .agency-card,
html[data-app] .account-card,
html[data-app] .conv-item,
html[data-app] .stat,
html[data-app] .choice {
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .012)), var(--mz-card) !important;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  border-top-color: rgba(255, 255, 255, .2) !important;
  border-radius: 18px !important;
  padding: 15px !important;
  margin: 11px 0 !important;
  box-shadow: var(--mz-deep) !important;
  transition: border-color .28s, box-shadow .28s, transform .28s;
  animation: cardIn .3s ease;
}
html[data-app] .card:hover,
html[data-app] .property-card:hover,
html[data-app] .agency-card:hover {
  border-color: rgba(245, 158, 11, .4) !important;
  box-shadow: 0 24px 58px rgba(0, 0, 0, .55) !important;
}

/* --- boutons (or 3D exact : ombre dure + reflet + press) --- */
html[data-app] .btn,
html[data-app] .btn-gold,
html[data-app] button.btn,
html[data-app] .mz-btn-primary,
html[data-app] .mz-save,
html[data-app] a.btn.btn-gold {
  position: relative;
  padding: 11px 15px !important;
  border-radius: 12px !important;
  border: none !important;
  background: linear-gradient(180deg, #fbbf24, #f59e0b) !important;
  color: #1a1005 !important;
  font-weight: 800 !important;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 14px 30px -8px rgba(245, 158, 11, .8) !important;
  transition: transform .08s, box-shadow .18s, filter .18s;
  overflow: hidden;
}
html[data-app] .btn:hover,
html[data-app] .btn-gold:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 14px 30px -8px rgba(245, 158, 11, .8) !important;
}
html[data-app] .btn:active,
html[data-app] .btn-gold:active {
  transform: translateY(0) scale(.985);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .3), 0 5px 14px -8px rgba(245, 158, 11, .6) !important;
}
html[data-app] .btn[disabled], html[data-app] button[disabled] {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15) !important;
  transform: none !important;
  filter: grayscale(.8) brightness(.7);
}
/* ghost exact */
html[data-app] .btn-ghost,
html[data-app] .btn-line,
html[data-app] .btn-navy,
html[data-app] .btn-dark,
html[data-app] .mz-btn-ghost,
html[data-app] .mz-cancel {
  background: linear-gradient(180deg, #151f46, #0b1229) !important;
  color: var(--mz-txt) !important;
  border: 1px solid rgba(255, 255, 255, .16) !important;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .95) !important;
}
html[data-app] .btn-ghost:hover,
html[data-app] .btn-line:hover,
html[data-app] .btn-navy:hover {
  border-color: rgba(245, 158, 11, .7) !important;
  box-shadow: 0 12px 26px -10px rgba(245, 158, 11, .5) !important;
  filter: none;
}
/* rouge / vert / bleu exacts */
html[data-app] .btn-danger,
html[data-app] .btn-logout,
html[data-app] .btn-reject,
html[data-app] .mz-btn-red {
  background: linear-gradient(180deg, #f87171, #ef4444) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .25) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 9px 22px -8px rgba(239, 68, 68, .7) !important;
}
html[data-app] .btn-ok,
html[data-app] .btn-accept,
html[data-app] .mz-btn-green {
  background: linear-gradient(180deg, #4ade80, #22c55e) !important;
  color: #052e16 !important;
  border: 1px solid rgba(255, 255, 255, .3) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 9px 22px -8px rgba(34, 197, 94, .7) !important;
}
html[data-app] .btn-blue, html[data-app] .mz-btn-blue {
  background: linear-gradient(180deg, #60a5fa, #3b82f6) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .28) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 9px 22px -8px rgba(59, 130, 246, .7) !important;
}
/* ripple identique */
html[data-app] .mz-ripple { animation: rip .6s ease-out forwards !important; background: rgba(255, 255, 255, .55); }

/* --- tag (pilule majuscules + point lumineux) --- */
html[data-app] .tag,
html[data-app] .badge,
html[data-app] .mz-tag,
html[data-app] [class^="b-"] {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 4px 11px !important;
  border-radius: 999px !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  letter-spacing: .07em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, .24) !important;
  white-space: nowrap;
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .8);
}
html[data-app] .tag::before,
html[data-app] .badge::before,
html[data-app] .mz-tag::before,
html[data-app] [class^="b-"]::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, .95);
  flex: none;
}
html[data-app] .b-published, html[data-app] .b-approved, html[data-app] .b-active,
html[data-app] .b-accepted, html[data-app] .mz-tag-ok { background: #15803d !important; color: #fff !important; }
html[data-app] .b-pending, html[data-app] .b-draft, html[data-app] .mz-tag-warn { background: #b45309 !important; color: #fff !important; }
html[data-app] .b-rejected, html[data-app] .b-suspended, html[data-app] .b-expired,
html[data-app] .b-cancelled, html[data-app] .mz-tag-bad { background: #b91c1c !important; color: #fff !important; }

/* --- héro (dégradé 120deg + kenburns) --- */
html[data-app] .hero,
html[data-app] .entry-hero {
  position: relative;
  overflow: clip !important;
  border-bottom: 1px solid var(--mz-line) !important;
  padding: 22px 16px !important;
  background: linear-gradient(120deg, rgba(245, 158, 11, .14), transparent 45%) !important;
  border-radius: 0 0 18px 18px !important;
  animation: riseIn .8s cubic-bezier(.22, .9, .3, 1) both;
}
html[data-app] .hero > * { animation: riseIn .8s cubic-bezier(.22, .9, .3, 1) both; }
html[data-app] .hero > *:nth-child(2) { animation-delay: .1s; }
html[data-app] .hero > *:nth-child(3) { animation-delay: .18s; }

/* --- toast exact (#toast + toastPop) --- */
html[data-app] .mz-toast {
  position: fixed !important;
  bottom: 16px !important;
  left: 50% !important;
  transform: translateX(-50%);
  background: #0a1230 !important;
  color: #fff !important;
  border: 1px solid var(--mz-ok) !important;
  border-radius: 12px !important;
  padding: 12px 20px !important;
  z-index: 2147483000 !important;
  font-weight: 700;
  max-width: 92vw;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .6) !important;
  animation: toastPop .45s cubic-bezier(.22, 1.35, .36, 1) both !important;
}
html[data-app] .mz-toast.err { border-color: var(--mz-bad) !important; }
html[data-app] .mz-toast.warn { border-color: var(--mz-acc) !important; }

/* --- tiroir (glissement exact) --- */
html[data-app] #drawer,
html[data-app] .drawer,
html[data-app] aside.drawer {
  width: min(320px, 86vw) !important;
  background: linear-gradient(180deg, #0c1430, #060b18) !important;
  border-right: 1px solid rgba(255, 255, 255, .10) !important;
  box-shadow: 24px 0 60px rgba(0, 0, 0, .55) !important;
}
html[data-app] #drawer.open, html[data-app] .drawer.open, html[data-app] .drawer.show {
  animation: drawerSlideIn .32s cubic-bezier(.22, .9, .3, 1) both;
}
html[data-app] .mz-overlay.show { background: rgba(3, 6, 14, .66); backdrop-filter: blur(4px); }

/* --- navigation basse exacte --- */
html[data-app] .bottomnav,
html[data-app] .bottomnav-inner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: rgba(6, 11, 24, .85) !important;
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, .1) !important;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom)) !important;
}
html[data-app] .bottomnav button, html[data-app] .bottomnav a { border-radius: 11px !important; }

/* --- bulles exactes --- */
html[data-app] .bubble, html[data-app] .bub, html[data-app] .msg {
  background: #101b3d !important;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  border-radius: 16px 16px 16px 6px !important;
  padding: 10px 13px !important;
  animation: tgPop .28s cubic-bezier(.22, 1, .36, 1) both;
}
html[data-app] .bubble.me, html[data-app] .bub.mine, html[data-app] .msg.me {
  background: linear-gradient(180deg, #1d2b52, #16213a) !important;
  border-color: rgba(245, 158, 11, .45) !important;
  border-radius: 16px 16px 6px 16px !important;
  margin-left: auto;
}
@keyframes tgPop { from { opacity: 0; transform: translateY(6px) scale(.98) } }
