/* Gestineo — Module Immobilier — feuille de style mobile-first (iPhone 12, portrait) */
:root {
  --brand:#1d4ed8; --brand-dark:#1e40af; --accent:#f59e0b;
  --bg:#f4f6fa; --card:#ffffff; --ink:#111827; --muted:#6b7280; --line:#e6e8ee;
  --ok:#16a34a; --ok-bg:#e7f6ec; --warn:#d97706; --danger:#dc2626; --danger-bg:#fdeaea;
  --radius:14px; --shadow:0 1px 3px rgba(16,24,40,.08),0 1px 2px rgba(16,24,40,.05);
}
* { box-sizing:border-box; }
html,body { margin:0; padding:0; }
body {
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--ink); font-size:15px; line-height:1.45;
  -webkit-font-smoothing:antialiased;
}
a { color:var(--brand); text-decoration:none; }

/* Coquille centrée : sur grand écran, même contenu « zoomé » (largeur constante) */
.shell {
  max-width:480px; margin:0 auto; min-height:100dvh; background:var(--bg);
  position:relative; display:flex; flex-direction:column;
}
@media (min-width:520px){ .shell { box-shadow:0 0 40px rgba(0,0,0,.06); } }

/* En-tête */
.topbar {
  position:sticky; top:0; z-index:20; display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; background:#fff; border-bottom:1px solid var(--line);
}
.brand { display:flex; align-items:center; gap:8px; font-weight:700; }
.brand .logo { width:28px; height:28px; color:var(--brand); }
.brand .sub { color:var(--muted); font-weight:500; }
.topbar .actions { display:flex; align-items:center; gap:10px; }
.topbar .who { font-size:13px; color:var(--muted); }

/* Contenu */
.content { flex:1; padding:16px 16px 90px; }
.page-title { font-size:20px; font-weight:700; margin:4px 0 14px; }

/* Cartes */
.card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:16px; margin-bottom:14px; }
.card h2, .section-title { font-size:15px; font-weight:700; margin:0 0 10px; }

/* Grille de stats */
.stat-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:14px; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:14px; }
.stat .label { font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.3px; }
.stat .value { font-size:22px; font-weight:750; margin-top:4px; }
.stat .value.small { font-size:18px; }
.stat.brand { background:var(--brand); border-color:var(--brand); color:#fff; }
.stat.brand .label { color:rgba(255,255,255,.85); }

/* Listes */
.list { list-style:none; margin:0; padding:0; }
.list li { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 0; border-bottom:1px solid var(--line); }
.list li:last-child { border-bottom:none; }
.list .titre { font-weight:600; }
.list .meta { font-size:13px; color:var(--muted); }

/* Badges */
.badge { display:inline-block; font-size:12px; font-weight:600; padding:3px 9px; border-radius:999px; background:#eef2f7; color:#374151; }
.badge.ok { background:var(--ok-bg); color:var(--ok); }
.badge.warn { background:#fdf1e3; color:var(--warn); }
.badge.danger { background:var(--danger-bg); color:var(--danger); }

/* Boutons */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:11px 16px; border-radius:12px; border:1px solid var(--line); background:#fff; color:var(--ink); font-size:15px; font-weight:600; cursor:pointer; }
.btn:active { transform:translateY(1px); }
.btn-primary { background:var(--brand); border-color:var(--brand); color:#fff; }
.btn-accent { background:var(--accent); border-color:var(--accent); color:#fff; }
.btn-block { width:100%; }
.btn-sm { padding:7px 12px; font-size:13px; border-radius:10px; gap:5px; white-space:nowrap; }

/* Formulaires */
.field { margin-bottom:12px; }
.field label { display:block; font-size:13px; font-weight:600; color:#374151; margin-bottom:5px; }
.field input, .field select, .field textarea {
  width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:10px;
  font:inherit; color:var(--ink); background:#fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline:2px solid rgba(29,78,216,.25); border-color:var(--brand); }
.field .check { display:flex; align-items:center; gap:8px; }
.field .check input { width:auto; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }

/* Messages flash */
.flash { padding:11px 14px; border-radius:12px; margin-bottom:14px; font-size:14px; }
.flash.ok { background:var(--ok-bg); color:#14532d; }
.flash.err { background:var(--danger-bg); color:#7f1d1d; }

/* Tableaux (scroll interne autorisé) */
.table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
table.data { width:100%; border-collapse:collapse; font-size:14px; }
table.data th, table.data td { text-align:left; padding:9px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
table.data th { color:var(--muted); font-weight:600; font-size:12px; text-transform:uppercase; }

/* Navigation basse */
.bottomnav {
  position:fixed; bottom:0; left:50%; transform:translateX(-50%); width:100%; max-width:480px;
  display:flex; background:#fff; border-top:1px solid var(--line); z-index:30;
  padding:6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottomnav a { flex:1; display:flex; flex-direction:column; align-items:center; gap:2px; padding:6px 2px; color:var(--muted); font-size:11px; font-weight:600; }
.bottomnav a .ic { width:22px; height:22px; }
.bottomnav a.active { color:var(--brand); }

/* Écran de connexion */
.auth-wrap { min-height:100dvh; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:24px; background:var(--bg); }
.auth-card { width:100%; max-width:380px; background:#fff; border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); padding:26px; }
.auth-card .brand { justify-content:center; font-size:20px; margin-bottom:6px; }
.auth-card .tagline { text-align:center; color:var(--muted); margin-bottom:20px; font-size:14px; }

.empty { text-align:center; color:var(--muted); padding:24px 8px; }
.mt0{margin-top:0}.mb0{margin-bottom:0}.muted{color:var(--muted)}.small{font-size:13px}
.right{text-align:right}.strong{font-weight:700}

/* ===== Épuration UX ===== */
/* Titre de section hors carte */
.section-h { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.5px; color:var(--muted); margin:20px 2px 10px; }

/* Tuiles d'accès (dashboard) */
.tiles { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.tile { display:flex; flex-direction:column; gap:9px; padding:14px; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); color:var(--ink); transition:transform .08s ease; }
.tile:active { transform:scale(.98); }
.tile .ic { width:40px; height:40px; border-radius:12px; display:grid; place-items:center; background:rgba(29,78,216,.1); color:var(--brand); }
.tile .ic svg { width:21px; height:21px; }
.tile .tl { font-weight:650; font-size:14px; letter-spacing:-.2px; }
.tile .ts { font-size:11.5px; color:var(--muted); line-height:1.35; }

/* Menu (page « Plus ») */
.menu { list-style:none; margin:0 0 14px; padding:0; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; }
.menu li > a, .menu li > button, .menu li > form { display:flex; align-items:center; gap:13px; width:100%; padding:14px 16px; border:0; border-bottom:1px solid var(--line); background:none; color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
.menu li:last-child > * { border-bottom:none; }
.menu li > a:active, .menu li > button:active { background:var(--bg); }
.menu .ic { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; background:rgba(29,78,216,.1); color:var(--brand); flex-shrink:0; }
.menu .ic svg { width:18px; height:18px; }
.menu .mt { flex:1; font-weight:600; }
.menu .mt small { display:block; font-weight:500; color:var(--muted); font-size:12px; margin-top:1px; }
.menu .chev { color:#c3c9d4; font-size:20px; line-height:1; }

/* Boutons : état hover discret (desktop) */
@media (hover:hover){ .btn:hover{ filter:brightness(.98); } .tile:hover{ box-shadow:0 4px 14px rgba(16,24,40,.08); } }
