/* ============================================================
   Gestineo — hub modulaire (mobile-first)
   ============================================================ */
:root{
  --bg:#0f1426; --ink:#10162a; --ink-soft:#5b6478; --muted:#8b93a7;
  --line:#eef1f7; --brand:#8b5cf6; --primary:#8b5cf6; --green:#18b497; --amber:#f5a623; --red:#ef5e6e;
  --radius:20px;
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{
  font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--ink);
  background:#0b0f1c;-webkit-font-smoothing:antialiased;
  display:flex;justify-content:center;align-items:center;min-height:100vh;
}
.phone{position:relative;width:100%;max-width:430px;height:100vh;max-height:932px;background:#f3f5fa;display:flex;flex-direction:column;overflow:hidden}
@media(min-width:480px){.phone{border-radius:38px;box-shadow:0 30px 80px rgba(0,0,0,.55);height:900px}body{padding:20px}}

/* App bar */
.appbar{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:calc(env(safe-area-inset-top) + 16px) 20px 14px;background:#fff}
.appbar-left{display:flex;align-items:center;gap:12px}
.app-logo{width:36px;height:36px;border-radius:10px;flex-shrink:0;object-fit:cover;display:block}
.app-name{font-size:18px;font-weight:800;color:var(--ink);letter-spacing:-.3px}

/* Zone scrollable */
.screen{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:18px 16px 30px}

/* Hero */
.hub-hero{background:linear-gradient(155deg,#1d2747 0%,#0f1426 100%);color:#fff;border-radius:var(--radius);padding:22px 20px;box-shadow:0 14px 30px rgba(15,20,38,.35);margin-bottom:6px}
.hub-hello{font-size:13px;color:#9aa6c6;font-weight:600}
.hub-title{font-size:26px;font-weight:800;letter-spacing:-.6px;margin-top:2px}
.hub-sub{font-size:13px;color:#aeb8d6;font-weight:600;margin-top:4px}

/* Sections */
.mod-section{margin-top:20px}
.section-h{font-size:14px;font-weight:800;margin:0 2px 12px;color:var(--ink-soft);text-transform:uppercase;letter-spacing:.4px;font-size:12px}
.mod-list{display:flex;flex-direction:column;gap:12px}
.empty-hint{color:var(--muted);font-size:13px;padding:6px 2px}
.hub-foot{color:var(--muted);font-size:11.5px;line-height:1.6;margin-top:22px;padding:0 4px;text-align:center}

/* Carte module */
.mcard{background:#fff;border-radius:16px;padding:14px;display:flex;align-items:center;gap:10px;box-shadow:0 6px 16px rgba(16,22,42,.05);border:1.5px solid transparent;transition:.15s}
.mcard.on{border-color:rgba(79,110,247,.25)}
.mcard-body{flex:1;display:flex;align-items:center;gap:12px;min-width:0;cursor:pointer}
.mcard-body:active{opacity:.7}
.mcard-ic{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;font-size:22px;flex-shrink:0}
.mcard-txt{min-width:0;flex:1}
.mcard-top{display:flex;align-items:center;gap:8px}
.mcard-name{font-size:15px;font-weight:800;letter-spacing:-.2px}
.mcard-desc{font-size:12px;color:var(--muted);line-height:1.45;margin-top:3px}

/* Badges */
.badge{font-size:10px;font-weight:700;padding:2px 8px;border-radius:20px;flex-shrink:0}
.badge.ok{background:rgba(24,180,151,.15);color:var(--green)}
.badge.soft{background:#eef1f7;color:var(--muted)}

/* Interrupteur (switch) */
.switch{position:relative;display:inline-block;width:46px;height:28px;flex-shrink:0}
.switch input{opacity:0;width:0;height:0}
.slider{position:absolute;cursor:pointer;inset:0;background:#d3d9e6;border-radius:28px;transition:.22s}
.slider:before{content:"";position:absolute;height:22px;width:22px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.22s;box-shadow:0 2px 5px rgba(0,0,0,.2)}
.switch input:checked + .slider{background:var(--primary)}
.switch input:checked + .slider:before{transform:translateX(18px)}

/* Portail d'accès (login) */
.gate{position:fixed;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;padding:24px;
  background:linear-gradient(160deg,#1a1030 0%,#0f1426 60%,#1a1030 100%)}
.gate[hidden]{display:none}
.gate-inner{width:100%;max-width:340px;text-align:center;color:#fff}
.gate-logo{width:64px;height:64px;border-radius:20px;margin:0 auto 18px;box-shadow:0 12px 30px rgba(139,92,246,.4);object-fit:cover;display:block}
.gate-title{font-size:26px;font-weight:800;letter-spacing:-.5px}
.gate-sub{font-size:13px;color:#aeb8d6;margin:6px 0 24px;line-height:1.5}
.gate-form,#gate-form{display:block}
.gate #gate-pwd,.gate #gate-pwd2{width:100%;margin-bottom:12px;padding:14px 15px;border:1.5px solid rgba(255,255,255,.14);border-radius:12px;
  background:rgba(255,255,255,.06);color:#fff;font:inherit;font-size:15px;outline:none}
.gate #gate-pwd::placeholder,.gate #gate-pwd2::placeholder{color:#7f8bb0}
.gate #gate-pwd:focus,.gate #gate-pwd2:focus{border-color:#8b5cf6;background:rgba(255,255,255,.1)}
.gate .btn-primary{background:#8b5cf6;margin-top:4px}
.gate-err{font-size:12.5px;color:#ff9aa6;margin-top:12px}
.gate-err[hidden]{display:none}
.gate-foot{font-size:11px;color:rgba(255,255,255,.25);margin-top:28px;letter-spacing:.5px}

/* Bottom sheet */
.sheet-overlay{position:fixed;inset:0;background:rgba(10,14,28,.5);display:flex;align-items:flex-end;justify-content:center;z-index:50;opacity:0;transition:opacity .22s ease}
.sheet-overlay[hidden]{display:none}
.sheet-overlay.open{opacity:1}
.sheet{width:100%;max-width:430px;background:#fff;border-radius:24px 24px 0 0;padding:10px 20px calc(22px + env(safe-area-inset-bottom));transform:translateY(100%);transition:transform .24s cubic-bezier(.2,.8,.2,1)}
.sheet-overlay.open .sheet{transform:translateY(0)}
.sheet-grip{width:40px;height:4px;border-radius:3px;background:#cfd6e4;margin:6px auto 14px}
.sheet h3{font-size:17px;font-weight:800;margin-bottom:8px}
.sheet-msg{font-size:14px;color:var(--ink-soft);line-height:1.55;margin-bottom:16px}
.btn-primary{width:100%;border:0;border-radius:12px;padding:14px;background:var(--primary);color:#fff;font:inherit;font-weight:700;font-size:15px;cursor:pointer}
