:root{
  --bg:#FFFFFF; --soft:#F5F5F7; --line:#E8E8ED; --ink:#1D1D1F; --muted:#6E6E73;
  --link:#0A66D8; --link-h:#0850A8; --danger:#C4302B; --r-xl:22px; --r-m:12px;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--ink)}
body{font-family:Inter,-apple-system,system-ui,sans-serif;font-size:16px;line-height:1.5;-webkit-font-smoothing:antialiased}
a{color:var(--link)}a:hover{color:var(--link-h)}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid #0A66D8;outline-offset:3px;border-radius:6px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* Barre du haut */
.top{border-bottom:1px solid var(--line);background:rgba(255,255,255,.86);backdrop-filter:saturate(180%) blur(16px);position:sticky;top:0;z-index:5}
.top-in{max-width:1120px;margin:0 auto;padding:0 24px;min-height:52px;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.brand{font-weight:600;font-size:17px;letter-spacing:-.01em;text-decoration:none;color:var(--ink)}
.nav{display:flex;flex-wrap:wrap;gap:24px;font-size:13px}
.nav a{color:var(--muted);text-decoration:none;padding:12px 0}
.nav a[aria-current="page"]{color:var(--ink)}
.me{position:relative}
.avatar{width:44px;height:44px;border:0;background:transparent;display:grid;place-items:center;cursor:pointer;padding:0}
.avatar span{width:28px;height:28px;border-radius:50%;background:var(--ink);color:#fff;display:grid;place-items:center;font-size:11px;font-weight:600}
.menu{position:absolute;right:0;top:48px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 12px 32px rgba(0,0,0,.08);padding:6px;min-width:220px}
.menu p{margin:0;padding:10px 12px;color:var(--muted);font-size:13px;border-bottom:1px solid var(--line)}
.menu button{display:block;width:100%;text-align:left;border:0;background:transparent;padding:10px 12px;border-radius:8px;cursor:pointer;min-height:44px}
.menu button:hover{background:var(--soft)}

/* Page */
.wrap{max-width:1120px;margin:0 auto;padding:72px 24px 96px}
.hello{margin:0;text-align:center;font-weight:700;font-size:clamp(36px,6vw,56px);line-height:1.05;letter-spacing:-.03em}
.sub{margin:12px 0 0;text-align:center;font-size:clamp(17px,2.2vw,21px);color:var(--muted)}
.search{display:flex;align-items:center;gap:10px;max-width:560px;margin:40px auto 0;height:48px;padding:0 18px;border-radius:999px;background:var(--soft)}
.search input{flex:1;border:0;background:transparent;font-size:16px;min-width:0}
.search input:focus{outline:none}
.search:focus-within{box-shadow:0 0 0 3px #0A66D8}

.group-t{margin:64px 0 16px;font-size:21px;font-weight:600;letter-spacing:-.01em}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:20px}
.tile{display:flex;flex-direction:column;gap:28px;padding:28px;border-radius:var(--r-xl);background:var(--soft);color:var(--ink);text-decoration:none;min-height:240px;position:relative;transition:transform .2s ease}
.tile:hover{color:var(--ink);transform:translateY(-2px)}
.tile .mark{height:48px;display:flex;align-items:center}
.tile .mark img{max-height:48px;max-width:120px}
.mono{width:48px;height:48px;border-radius:12px;color:#fff;display:grid;place-items:center;font-weight:700;font-size:17px}
.tile .body{margin-top:auto}
.tile h3{margin:0;font-size:26px;font-weight:700;letter-spacing:-.02em}
.tile p{margin:4px 0 0;color:var(--muted)}
.tile .go{margin:14px 0 0;font-size:15px;color:var(--link);font-weight:500}
.badge{position:absolute;top:22px;right:22px;font-size:12px;font-weight:600;color:var(--muted);background:#fff;border-radius:999px;padding:2px 10px}
.tile.add{background:transparent;border:1.5px dashed #C7C7CC;align-items:center;justify-content:center;text-align:center;cursor:pointer}
.tile.add .body{margin:0}

.list{border-top:1px solid var(--line)}
.row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid var(--line)}
.row .txt{flex:1;min-width:0}
.row .who{color:var(--muted);flex:none;font-size:14px}
.check{width:22px;height:22px;border-radius:50%;border:1.5px solid #C7C7CC;background:#fff;flex:none;cursor:pointer;display:grid;place-items:center;padding:0}
.check[aria-pressed="true"]{background:var(--ink);border-color:var(--ink)}
.done .txt{color:var(--muted);text-decoration:line-through}
.inline-add{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}
.inline-add input,.inline-add select{height:44px;border:1px solid var(--line);border-radius:10px;padding:0 12px;background:#fff}
.inline-add input{flex:1 1 240px}
.empty{color:var(--muted);text-align:center;padding:40px 0}

/* Boutons */
.btn{min-height:44px;padding:0 20px;border-radius:999px;border:0;background:var(--ink);color:#fff;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}
.btn:hover{color:#fff;background:#000}
.btn.blue{background:var(--link)}.btn.blue:hover{background:var(--link-h)}
.btn.ghost{background:var(--soft);color:var(--ink)}.btn.ghost:hover{background:#EBEBEF;color:var(--ink)}
.btn.danger{background:transparent;color:var(--danger);border:1px solid #F0C9C7}
.btn[disabled]{opacity:.5;cursor:default}

/* Espace (société, site, outil) */
.sp-head{display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.sp-head .mark img{max-height:56px;max-width:140px}
.sp-head .mono{width:56px;height:56px;font-size:20px;border-radius:14px}
.sp-head h1{margin:0;font-size:clamp(32px,5vw,44px);font-weight:700;letter-spacing:-.03em;line-height:1.1}
.sp-head p{margin:2px 0 0;color:var(--muted)}
.sp-head .actions{margin-left:auto;display:flex;gap:10px;flex-wrap:wrap}
.tabs{display:flex;gap:6px;flex-wrap:wrap;margin:36px 0 28px;padding:4px;background:var(--soft);border-radius:999px;width:fit-content;max-width:100%}
.tabs button{border:0;background:transparent;border-radius:999px;padding:0 16px;min-height:40px;cursor:pointer;color:var(--muted);font-weight:500}
.tabs button[aria-selected="true"]{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.panel{background:var(--soft);border-radius:var(--r-xl);padding:32px}
.panel h2{margin:0 0 6px;font-size:22px;letter-spacing:-.01em}
.panel p{margin:0;color:var(--muted)}
.field{display:flex;flex-direction:column;gap:6px;margin-top:18px}
.field label{font-size:14px;font-weight:500}
.field input,.field select,.field textarea{height:44px;border:1px solid #D2D2D7;border-radius:10px;padding:0 12px;background:#fff;width:100%}
.field textarea{height:auto;min-height:88px;padding:10px 12px}
.field .hint{font-size:13px;color:var(--muted)}
.swatches{display:flex;gap:10px;flex-wrap:wrap}
.swatches button{width:36px;height:36px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px var(--line);cursor:pointer}
.swatches button[aria-pressed="true"]{box-shadow:0 0 0 2px var(--ink)}

/* Fenêtre */
dialog{border:0;border-radius:24px;padding:0;width:min(560px,calc(100vw - 32px));box-shadow:0 30px 80px rgba(0,0,0,.2)}
dialog::backdrop{background:rgba(0,0,0,.28);backdrop-filter:blur(2px)}
.dlg{padding:28px}
.dlg h2{margin:0;font-size:24px;letter-spacing:-.02em}
.dlg .foot{display:flex;justify-content:flex-end;gap:10px;margin-top:28px;flex-wrap:wrap}
.kinds{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:20px}
.kinds button{border:1.5px solid var(--line);background:#fff;border-radius:16px;padding:16px 12px;text-align:left;cursor:pointer;min-height:44px}
.kinds button strong{display:block}
.kinds button span{font-size:13px;color:var(--muted)}
.kinds button[aria-pressed="true"]{border-color:var(--ink)}
@media (max-width:520px){.kinds{grid-template-columns:1fr}}

/* Connexion */
.login{min-height:100vh;display:grid;place-items:center;padding:24px;background:var(--soft)}
.login form{background:#fff;border-radius:28px;padding:40px 32px;width:min(420px,100%)}
.login h1{margin:0;font-size:32px;letter-spacing:-.03em;text-align:center}
.login .lead{margin:6px 0 0;text-align:center;color:var(--muted)}
.login .btn{width:100%;margin-top:24px}
.err{color:var(--danger);font-size:14px;margin:14px 0 0}
.note{margin-top:18px;font-size:13px;color:var(--muted);text-align:center}
.linkbtn{border:0;background:none;color:var(--link);cursor:pointer;padding:10px 0;min-height:44px}
.demo-bar{background:#FFF7E0;color:#5C4400;text-align:center;font-size:13px;padding:8px 16px}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--ink);color:#fff;padding:12px 20px;border-radius:999px;font-size:14px;z-index:20}
.people .row .txt strong{display:block;font-weight:600}
.people .row .txt span{color:var(--muted);font-size:14px}

/* Module intégré */
.module{display:block;width:100%;height:calc(100vh - 140px);min-height:560px;border:0;border-radius:var(--r-xl);background:#F4F6F8;box-shadow:0 0 0 1px var(--line)}
.wrap:has(.module){max-width:1480px}

/* Bouton Face ID sur la page de connexion */
.btn.faceid { margin-top: 10px; background: transparent; color: inherit; border: 1px solid currentColor; }
