:root{--c1:#2878ff;--c2:#0f172a;--muted:#64748b}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:#f8fafc;color:var(--c2);
  padding-bottom:calc(68px + env(safe-area-inset-bottom,0px));}
.topbar{position:sticky;top:0;background:#fff;border-bottom:1px solid #e2e8f0;z-index:10}
.wrap{max-width:1100px;margin:0 auto;padding:16px}
.brand{display:flex;justify-content:space-between;align-items:center;gap:12px}
.logo-sigeif{ height: 50px; width:auto; opacity:.9; }
h1{font-size:20px;margin:0}
.bar{display:flex;gap:12px;align-items:center;margin-top:10px}
.btn{background:var(--c1);color:#fff;border:none;border-radius:12px;padding:12px 16px;font-weight:600;cursor:pointer;text-decoration:none;display:inline-block;line-height:1}
.btn-secondary{background:#64748b}
input[type=search],select{flex:1;padding:12px;border:1px solid #e2e8f0;border-radius:12px;font-size:16px}
.layout{display:grid;grid-template-columns:420px 1fr;gap:16px}
@media (max-width:1024px){.layout{grid-template-columns:1fr}}
.card{background:#fff;border:1px solid #e2e8f0;border-radius:16px;box-shadow:0 1px 2px rgba(0,0,0,.04);overflow:hidden}
.card-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid #f1f5f9}
.card-body{padding:14px}
.list{max-height:calc(100vh - 230px);overflow:auto}
@media (max-width:600px){.list{max-height:none}}
.row{padding:14px;border-top:1px solid #f1f5f9;display:flex;gap:10px;align-items:start;cursor:pointer}
.row:hover{background:#f8fafc}
.title{font-weight:700}
.muted{color:var(--muted)}
.badges{display:flex;gap:6px}
.badge{font-size:12px;border:1px solid #e2e8f0;border-radius:999px;padding:4px 10px;background:#f8fafc}
.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
@media (max-width:800px){.grid{grid-template-columns:1fr}}
.field{display:flex;flex-direction:column;gap:6px}
input[type=text],input[type=date],textarea,select{padding:10px;border:1px solid #e2e8f0;border-radius:10px;width:100%;font-size:16px}
textarea{min-height:84px}
.photos{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
@media (max-width:600px){.photos{grid-template-columns:repeat(2,1fr)}}
.figure{margin:0;border:1px solid #e2e8f0;border-radius:10px;padding:6px;background:#fff;display:flex;flex-direction:column;gap:6px}
.figure img{width:100%;height:120px;object-fit:cover;border-radius:8px}
.figure figcaption{font-size:12px;color:#64748b}
.actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;margin-top:8px}
.rbtn{padding:10px 12px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;cursor:pointer}
.rbtn.active{background:#2878ff;color:#fff;border-color:#2878ff}
.hr{height:1px;background:#e2e8f0;margin:12px 0}
.footnote{font-size:12px;color:#64748b}
.notice{padding:8px 12px;background:#fef9c3;border:1px solid #fde68a;border-radius:10px}
.bottombar{position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid #e2e8f0;z-index:20;
  padding-bottom:env(safe-area-inset-bottom,0px)}
.bottombar-content{display:flex;gap:12px;justify-content:center;align-items:center}
.actions-spaced{margin-bottom:96px} /* +++ espace pour éviter le chevauchement avec la barre du bas */
.add-tile{display:flex;justify-content:center;align-items:center;height:120px;border:2px dashed #cbd5e1;border-radius:10px;color:#475569;background:#f8fafc;cursor:pointer}
.add-tile span{font-weight:700}
.add-tile:hover{background:#eef2f7}
.add-tile input{display:none}
.cat-head{display:flex;justify-content:space-between;align-items:center}
.cat-head small{color:#64748b}
.toggle{background:none;border:none;color:#2878ff;cursor:pointer}