/* Mode test (mode-test.js) : pastille et panneau « Se connecter comme… », mêmes jetons que l'application (marine, Geist,
   rayons et ombres maison), autonomes pour s'afficher pareil sur le site, l'application et les deux espaces. */
.mt-pastille, .mt-panneau {
  --mt-ink: #0b1f3a; --mt-text-2: #42526a; --mt-muted: #5b6b82; --mt-border: #e5ecf4; --mt-accent: #1f6fff; --mt-info: #1559d6;
  --mt-ambre: #f59e0b; --mt-ambre-soft: #fef3c7; --mt-ambre-texte: #92400e;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--mt-ink); -webkit-font-smoothing: antialiased; box-sizing: border-box;
}
.mt-pastille *, .mt-panneau * { box-sizing: border-box; }
.mt-i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Pastille : en bas, au centre, au-dessus de tout sauf des fenêtres ; plus haut sur téléphone (barre de navigation du bas) */
.mt-pastille { position: fixed; z-index: 2147483000; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px 0 12px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px;
  background: rgba(11,31,58,.94); color: #fff; font-size: var(--fs-micro, .8125rem); font-weight: 600; letter-spacing: .01em; cursor: pointer;
  box-shadow: 0 10px 28px -10px rgba(11,31,58,.55); backdrop-filter: blur(8px); transition: background 160ms cubic-bezier(.2,.7,.2,1), transform 160ms cubic-bezier(.2,.7,.2,1); }
.mt-pastille:hover { background: #0e2a52; }
.mt-pastille:focus-visible, .mt-panneau button:focus-visible { outline: 2px solid #7fd0ff; outline-offset: 2px; }
.mt-pastille-sep { width: 1px; height: 14px; background: rgba(255,255,255,.25); }
.mt-pastille-act { color: #c9d8ee; font-weight: 500; }
.mt-point { width: 8px; height: 8px; border-radius: 50%; background: var(--mt-ambre); box-shadow: 0 0 0 3px rgba(245,158,11,.25); flex: none; }

/* Panneau */
.mt-panneau { position: fixed; z-index: 2147483001; left: 50%; bottom: calc(58px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 90px); overflow: auto; background: #fff; border: 1px solid var(--mt-border); border-radius: 20px;
  box-shadow: 0 24px 60px -18px rgba(11,31,58,.45), 0 2px 6px rgba(11,31,58,.06); animation: mt-arrive 280ms cubic-bezier(.32,.72,0,1); }
.mt-panneau[hidden] { display: none; }
@keyframes mt-arrive { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .mt-panneau { animation: none; } }
.mt-tete { position: relative; padding: 18px 20px 14px; border-bottom: 1px solid var(--mt-border); }
.mt-tag { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--mt-ambre-soft); color: var(--mt-ambre-texte); font-size: var(--fs-micro, .8125rem); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.mt-tete h2 { margin: 10px 0 4px; font-size: 1.12rem; font-weight: 650; letter-spacing: -.01em; }
.mt-tete p { margin: 0; color: var(--mt-muted); font-size: .84rem; line-height: 1.45; }
.mt-fermer { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--mt-muted); cursor: pointer; }
.mt-fermer:hover { background: #eef2f7; color: var(--mt-ink); }

.mt-liste { list-style: none; margin: 0; padding: 6px 10px; }
.mt-compte { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 10px; border-radius: 14px; }
.mt-compte + .mt-compte { border-top: 1px solid var(--mt-border); }
.mt-compte:hover { background: #f5f8fc; }
.mt-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.mt-ico .mt-i { width: 20px; height: 20px; }
.mt-ico-proprietaire { background: linear-gradient(135deg, #0b1f3a, #133f8f); }
.mt-ico-gestionnaire { background: linear-gradient(135deg, #133f8f, #1f6fff); }
.mt-ico-locataire { background: linear-gradient(135deg, #0e7490, #22b8cf); }
.mt-ico-prestataire { background: linear-gradient(135deg, #b45309, #f59e0b); }
.mt-qui { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mt-qui b { font-size: .92rem; font-weight: 600; }
.mt-nom { font-weight: 500; color: var(--mt-text-2); }
.mt-detail { color: var(--mt-muted); font-size: var(--fs-micro, .8125rem); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mt-email, .mt-mdp code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: var(--fs-micro, .8125rem); color: var(--mt-text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-btn { height: 36px; padding: 0 14px; border: 1px solid #d3deea; border-radius: 10px; background: #fff; color: var(--mt-ink); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: border-color 160ms cubic-bezier(.2,.7,.2,1), background 160ms cubic-bezier(.2,.7,.2,1); }
.mt-btn:hover { border-color: #b9c7d8; background: #f5f8fc; }
.mt-btn-ici { background: var(--mt-ink); border-color: var(--mt-ink); color: #fff; }
.mt-btn-ici:hover { background: #0e2a52; border-color: #0e2a52; }
.mt-btn:disabled { opacity: .7; cursor: progress; }

.mt-pied { padding: 12px 20px 16px; border-top: 1px solid var(--mt-border); background: #f9fbfd; border-radius: 0 0 20px 20px; }
.mt-mdp { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .82rem; color: var(--mt-text-2); }
.mt-mdp code { padding: 3px 8px; border-radius: 7px; background: #fff; border: 1px solid var(--mt-border); color: var(--mt-ink); font-size: var(--fs-micro, .8125rem); }
.mt-lien { border: 0; background: none; padding: 4px 2px; color: var(--mt-info); font: inherit; font-weight: 600; cursor: pointer; }
.mt-lien:hover { text-decoration: underline; }
.mt-pied p { margin: 8px 0 0; color: var(--mt-muted); font-size: var(--fs-micro, .8125rem); line-height: 1.45; }

/* Téléphone : au-dessus de la barre de navigation du bas des espaces ; boutons sous le texte si la place manque */
@media (max-width: 767px) {
  .mt-pastille { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); height: 32px; font-size: var(--fs-micro, .8125rem); }
  .mt-panneau { bottom: calc(120px + env(safe-area-inset-bottom, 0px)); max-height: calc(100vh - 150px); }
}
/* Menu « … » ouvert en feuille du bas (barre-actions.css, sous 760 px) : la pastille s'efface le temps du menu, sinon elle couvre une
   entrée (09/11/2026 : « Mettre en vente » de la fiche d'un bien, devenue avant-dernière, n'était plus cliquable en son milieu). */
@media (max-width: 760px) { html:has(#view details.menu-plus[open]) .mt-pastille { visibility: hidden; } }
@media (max-width: 420px) {
  .mt-pastille-sep, .mt-pastille-act { display: none; }
  .mt-compte { grid-template-columns: 36px minmax(0, 1fr); }
  .mt-ico { width: 36px; height: 36px; }
  .mt-btn { grid-column: 2; justify-self: start; }
}
html.mode-test .toast { margin-bottom: 44px; } /* toasts au-dessus de la pastille */
.mt-compte-actif { background: #f0fdf4; }
.mt-compte-actif:hover { background: #f0fdf4; }
.mt-actif { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: var(--fs-micro, .8125rem); font-weight: 600; white-space: nowrap; }
.mt-point-ok { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.2); }
@media (max-width: 420px) { .mt-actif { grid-column: 2; justify-self: start; } }
/* Grand écran : panneau à droite, l'écran de connexion (au centre) reste visible */
@media (min-width: 1280px) {
  .mt-panneau { left: auto; right: 24px; bottom: 24px; transform: none; max-height: calc(100vh - 48px); animation-name: mt-arrive-droite; }
}
@keyframes mt-arrive-droite { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
